Keep any preserved builtins in entry point interface. Closes #2417

* When running SPIR-V < 1.4 we only put Input variables in the entry point
  interface, which is usually just our thread ID. However we keep subgroup
  builtins as-is and they are also Inputs and need to be kept in the interface.
This commit is contained in:
baldurk
2021-11-19 14:51:56 +00:00
parent 861f55b467
commit fb7f3c2ecb
+6 -1
View File
@@ -876,9 +876,14 @@ static void ConvertToMeshOutputCompute(const ShaderReflection &refl,
// name :(.
// editor.SetName(wrapperEntry, "RenderDoc_MeshFetch_Wrapper_Entrypoint");
// if we're not using all globals, this is only Input variables so only our invocation Id
// if we're not using all globals, this is only Input variables so only our invocation Id and any
// builtins we kept
if(!editor.EntryPointAllGlobals())
{
globals = {invocationId};
for(rdcspv::Id id : builtinKeeps)
globals.push_back(id);
}
// insert the new patched entry point with the globals
editor.AddOperation(editor.Begin(rdcspv::Section::EntryPoints),