From bb7307b4a80d4c032e68f3313f268d6e2c5debe4 Mon Sep 17 00:00:00 2001 From: Rex Xu Date: Mon, 15 Jul 2019 14:57:20 +0800 Subject: [PATCH] OpIsHelperInvocationEXT should declare relevant SPV extension and capability --- SPIRV/GlslangToSpv.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index fabaee95..4019436a 100644 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -7619,8 +7619,9 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv: case glslang::EOpIsHelperInvocation: { std::vector args; // Dummy arguments - spv::Id id = builder.createOp(spv::OpIsHelperInvocationEXT, typeId, args); - return id; + builder.addExtension(spv::E_SPV_EXT_demote_to_helper_invocation); + builder.addCapability(spv::CapabilityDemoteToHelperInvocationEXT); + return builder.createOp(spv::OpIsHelperInvocationEXT, typeId, args); } case glslang::EOpReadClockSubgroupKHR: {