From ddb7aeef92d2251cc7d8fe6f63d8ec352e3bb022 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 18 Dec 2018 16:46:55 +0000 Subject: [PATCH] If a SPIR-V type has been replaced due to aliasing don't set custom name * If we have e.g. Input Float* and Output Float* when we patch they will both become Private Float* and we collapse the types together. When that happens, don't rename names for the losing type, just remove names. --- renderdoc/driver/vulkan/vk_postvs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/renderdoc/driver/vulkan/vk_postvs.cpp b/renderdoc/driver/vulkan/vk_postvs.cpp index e082f40d0..39ac01081 100644 --- a/renderdoc/driver/vulkan/vk_postvs.cpp +++ b/renderdoc/driver/vulkan/vk_postvs.cpp @@ -333,7 +333,8 @@ static void ConvertToMeshOutputCompute(const ShaderReflection &refl, const SPIRV SPIRVId id = it.word(1); std::string oldName = (const char *)&it.word(2); editor.Remove(it); - editor.SetName(id, ("emulated_" + oldName).c_str()); + if(typeReplacements.find(id) == typeReplacements.end()) + editor.SetName(id, ("emulated_" + oldName).c_str()); } // remove any OpName for the old entry points