OpIsHelperInvocationEXT should declare relevant SPV extension and capability
diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp
index fabaee9..4019436 100644
--- a/SPIRV/GlslangToSpv.cpp
+++ b/SPIRV/GlslangToSpv.cpp
@@ -7619,8 +7619,9 @@
case glslang::EOpIsHelperInvocation:
{
std::vector<spv::Id> 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: {