diff --git a/renderdoc/driver/vulkan/vk_postvs.cpp b/renderdoc/driver/vulkan/vk_postvs.cpp index dde43b433..8705b8f29 100644 --- a/renderdoc/driver/vulkan/vk_postvs.cpp +++ b/renderdoc/driver/vulkan/vk_postvs.cpp @@ -2222,11 +2222,15 @@ static void AddMeshShaderOutputStores(const ShaderReflection &refl, } rdcspv::Id entryID; + rdcarray entryInterface; for(const rdcspv::EntryPoint &entry : editor.GetEntries()) { if(entry.name == entryName && entry.executionModel == rdcspv::ExecutionModel::MeshEXT) + { entryID = entry.id; + entryInterface = entry.usedIds; + } } RDCASSERT(entryID); @@ -2308,6 +2312,10 @@ static void AddMeshShaderOutputStores(const ShaderReflection &refl, if(var.storage != rdcspv::StorageClass::Output) continue; + // skip variables that aren't for us + if(!entryInterface.contains(var.id)) + continue; + const rdcspv::Decorations &d = editor.GetDecorations(var.id); // global variables are all pointers const rdcspv::DataType &pointerType = editor.GetDataType(editor.GetIDType(var.id));