From f766fabaa0547eac84b2bf4e2e53e5fa61598147 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Wed, 28 Aug 2019 00:01:54 -0600 Subject: [PATCH] GLSL: Only require constant for subgroupBroadcast when SPV < 1.5. --- glslang/MachineIndependent/ParseHelper.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index 08fa610c..e8177d3f 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -2155,9 +2155,11 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan break; case EOpSubgroupBroadcast: - // must be an integral constant expression. - if ((*argp)[1]->getAsConstantUnion() == nullptr) - error(loc, "argument must be compile-time constant", "id", ""); + if (spvVersion.spv < EShTargetSpv_1_5) { + // must be an integral constant expression. + if ((*argp)[1]->getAsConstantUnion() == nullptr) + error(loc, "argument must be compile-time constant", "id", ""); + } break; case EOpBarrier: