Fix 'maximally_reconverges' token to match the GLSL spec

This commit is contained in:
Jeff Bolz 2024-01-25 16:50:37 -06:00 committed by arcady-lunarg
parent 8066fa086b
commit 79536da264
6 changed files with 13 additions and 13 deletions

View File

@ -1635,7 +1635,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
builder.addExtension(spv::E_SPV_KHR_subgroup_uniform_control_flow);
builder.addExecutionMode(shaderEntry, spv::ExecutionModeSubgroupUniformControlFlowKHR);
}
if (glslangIntermediate->getMaximalReconvergence()) {
if (glslangIntermediate->getMaximallyReconverges()) {
builder.addExtension(spv::E_SPV_KHR_maximal_reconvergence);
builder.addExecutionMode(shaderEntry, spv::ExecutionModeMaximallyReconvergesKHR);
}

View File

@ -2,6 +2,6 @@
#extension GL_EXT_maximal_reconvergence : enable
[[random(4)]] void main() [[maximal_reconvergence]]
[[random(4)]] void main() [[maximally_reconverges]]
{
}

View File

@ -125,8 +125,8 @@ TAttributeType TParseContext::attributeFromName(const TString& name) const
return EatSubgroupUniformControlFlow;
else if (name == "export")
return EatExport;
else if (name == "maximal_reconvergence")
return EatMaximalReconvergence;
else if (name == "maximally_reconverges")
return EatMaximallyReconverges;
else
return EatNone;
}
@ -362,9 +362,9 @@ void TParseContext::handleFunctionAttributes(const TSourceLoc& loc, const TAttri
requireExtensions(loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
intermediate.setSubgroupUniformControlFlow();
break;
case EatMaximalReconvergence:
case EatMaximallyReconverges:
requireExtensions(loc, 1, &E_GL_EXT_maximal_reconvergence, "attribute");
intermediate.setMaximalReconvergence();
intermediate.setMaximallyReconverges();
break;
default:
warn(loc, "attribute does not apply to a function", "", "");

View File

@ -121,7 +121,7 @@ namespace glslang {
EatNonReadable,
EatSubgroupUniformControlFlow,
EatExport,
EatMaximalReconvergence,
EatMaximallyReconverges,
};
class TIntermAggregate;

View File

@ -1512,8 +1512,8 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree)
if (getSubgroupUniformControlFlow())
infoSink.debug << "subgroup_uniform_control_flow\n";
if (getMaximalReconvergence())
infoSink.debug << "maximal_reconvergence\n";
if (getMaximallyReconverges())
infoSink.debug << "maximally_reconverges\n";
switch (language) {
case EShLangVertex:

View File

@ -345,7 +345,7 @@ public:
needToLegalize(false),
binaryDoubleOutput(false),
subgroupUniformControlFlow(false),
maximalReconvergence(false),
maximallyReconverges(false),
usePhysicalStorageBuffer(false),
spirvRequirement(nullptr),
spirvExecutionMode(nullptr),
@ -964,8 +964,8 @@ public:
void setSubgroupUniformControlFlow() { subgroupUniformControlFlow = true; }
bool getSubgroupUniformControlFlow() const { return subgroupUniformControlFlow; }
void setMaximalReconvergence() { maximalReconvergence = true; }
bool getMaximalReconvergence() const { return maximalReconvergence; }
void setMaximallyReconverges() { maximallyReconverges = true; }
bool getMaximallyReconverges() const { return maximallyReconverges; }
// GL_EXT_spirv_intrinsics
void insertSpirvRequirement(const TSpirvRequirement* spirvReq);
@ -1230,7 +1230,7 @@ protected:
bool needToLegalize;
bool binaryDoubleOutput;
bool subgroupUniformControlFlow;
bool maximalReconvergence;
bool maximallyReconverges;
bool usePhysicalStorageBuffer;
TSpirvRequirement* spirvRequirement;