mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-22 13:45:55 +00:00
Remove unused execution modes when removing entry points
This commit is contained in:
@@ -483,6 +483,17 @@ static void ConvertToMeshOutputCompute(const ShaderReflection &refl,
|
||||
editor.Remove(it);
|
||||
}
|
||||
|
||||
for(rdcspv::Iter it = editor.Begin(rdcspv::Section::ExecutionMode),
|
||||
end = editor.End(rdcspv::Section::ExecutionMode);
|
||||
it < end; ++it)
|
||||
{
|
||||
// this can also handle ExecutionModeId and we don't care about the difference
|
||||
rdcspv::OpExecutionMode execMode(it);
|
||||
|
||||
if(execMode.entryPoint != entryID)
|
||||
editor.Remove(it);
|
||||
}
|
||||
|
||||
for(rdcspv::Iter it = editor.Begin(rdcspv::Section::DebugNames),
|
||||
end2 = editor.End(rdcspv::Section::DebugNames);
|
||||
it < end2; ++it)
|
||||
|
||||
@@ -3007,6 +3007,19 @@ static void CreatePSInputFetcher(rdcarray<uint32_t> &fragspv, uint32_t &structSt
|
||||
it++;
|
||||
}
|
||||
|
||||
it = editor.Begin(rdcspv::Section::ExecutionMode);
|
||||
end = editor.End(rdcspv::Section::ExecutionMode);
|
||||
while(it < end)
|
||||
{
|
||||
// this can also handle ExecutionModeId and we don't care about the difference
|
||||
rdcspv::OpExecutionMode execMode(it);
|
||||
|
||||
// remove any execution modes not for our entry
|
||||
if(execMode.entryPoint != entryID)
|
||||
editor.Remove(it);
|
||||
it++;
|
||||
}
|
||||
|
||||
// remove any OpName that refers to deleted IDs - functions or results
|
||||
it = editor.Begin(rdcspv::Section::DebugNames);
|
||||
end = editor.End(rdcspv::Section::DebugNames);
|
||||
|
||||
Reference in New Issue
Block a user