From d245c3b1ad48b8558fa24eafdcccb46a201d396b Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 27 May 2020 16:26:43 +0100 Subject: [PATCH] Don't import GLSL.std.450 while patching function --- renderdoc/driver/vulkan/vk_bindless_feedback.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/renderdoc/driver/vulkan/vk_bindless_feedback.cpp b/renderdoc/driver/vulkan/vk_bindless_feedback.cpp index 272f46d46..718ae96c3 100644 --- a/renderdoc/driver/vulkan/vk_bindless_feedback.cpp +++ b/renderdoc/driver/vulkan/vk_bindless_feedback.cpp @@ -213,6 +213,8 @@ void AnnotateShader(const SPIRVPatchData &patchData, const char *entryName, rdcspv::Id semantics = editor.AddConstantImmediate(0U); rdcspv::Id uint32shift = editor.AddConstantImmediate(2U); + rdcspv::Id glsl450 = editor.ImportExtInst("GLSL.std.450"); + std::map intTypeLookup; for(auto scalarType : editor.GetTypeInfo()) @@ -458,8 +460,6 @@ void AnnotateShader(const SPIRVPatchData &patchData, const char *entryName, // clamp the index to the maximum slot. If the user is reading out of bounds, don't write // out of bounds. { - rdcspv::Id glsl450 = editor.ImportExtInst("GLSL.std.450"); - rdcspv::Id clampedtype = editor.DeclareType(rdcspv::Scalar(rdcspv::Op::TypeInt, targetIndexWidth, false)); index = editor.AddOperation(