Implement GL_EXT_demote_to_helper_invocation

This commit is contained in:
Jeff Bolz 2019-07-01 09:23:23 -05:00
parent 4162de4bbf
commit ba6170b534
18 changed files with 3618 additions and 3426 deletions

View file

@ -3111,6 +3111,12 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T
builder.clearAccessChain();
break;
case glslang::EOpDemote:
builder.createNoResultOp(spv::OpDemoteToHelperInvocationEXT);
builder.addExtension(spv::E_SPV_EXT_demote_to_helper_invocation);
builder.addCapability(spv::CapabilityDemoteToHelperInvocationEXT);
break;
default:
assert(0);
break;
@ -7610,6 +7616,13 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
builder.createNoResultOp(spv::OpEndInvocationInterlockEXT);
return 0;
case glslang::EOpIsHelperInvocation:
{
std::vector<spv::Id> args; // Dummy arguments
spv::Id id = builder.createOp(spv::OpIsHelperInvocationEXT, typeId, args);
return id;
}
default:
logger->missingFunctionality("unknown operation with no arguments");
return 0;