From fb7f3c2ecba49b86d2199ecd6ea534e4a3a478d5 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 19 Nov 2021 14:51:56 +0000 Subject: [PATCH] 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. --- renderdoc/driver/vulkan/vk_postvs.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/renderdoc/driver/vulkan/vk_postvs.cpp b/renderdoc/driver/vulkan/vk_postvs.cpp index a2c1ca49e..746059189 100644 --- a/renderdoc/driver/vulkan/vk_postvs.cpp +++ b/renderdoc/driver/vulkan/vk_postvs.cpp @@ -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),