mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-07 06:24:57 +00:00
When patching mesh shaders only consider globals for its entry point
* For shaders with multiple entry points we can't process outputs for other entry points that may not be arrayed.
This commit is contained in:
1 file changed
+8
@@ -2222,11 +2222,15 @@ static void AddMeshShaderOutputStores(const ShaderReflection &refl,
|
||||
}
|
||||
|
||||
rdcspv::Id entryID;
|
||||
rdcarray<rdcspv::Id> 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));
|
||||
|
||||
Reference in new issue
Block a user