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.
This commit is contained in:
baldurk committed 2018-12-18 16:46:55 +00:00
1 parent 5cfe6c7623
commit ddb7aeef92
1 file changed
+2 -1
+2 -1
View File
@@ -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