From eb552d81725024c508b632f838db2b0df4479753 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 6 Apr 2020 16:19:06 +0100 Subject: [PATCH] Allow NULL for object name in vulkan debug functions --- renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp index 1c076612c..2af5835ae 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp @@ -1936,6 +1936,10 @@ bool WrappedVulkan::Serialise_vkDebugMarkerSetObjectNameEXT( if(IsReplayingAndReading()) { + // silently promote NULL name to empty string + if(ObjectName == NULL) + ObjectName = ""; + // if we don't have a live resource, this is probably a command buffer being named on the // virtual non-existant parent, not any of the baked IDs. Just save the name on the original ID // and we'll propagate it in Serialise_vkBeginCommandBuffer @@ -2045,6 +2049,10 @@ bool WrappedVulkan::Serialise_vkSetDebugUtilsObjectNameEXT( if(IsReplayingAndReading()) { + // silently promote NULL name to empty string + if(ObjectName == NULL) + ObjectName = ""; + // if we don't have a live resource, this is probably a command buffer being named on the // virtual non-existant parent, not any of the baked IDs. Just save the name on the original ID // and we'll propagate it in Serialise_vkBeginCommandBuffer