SPIRV spec says "All \ used for Scope and Memory Semantics must be of an OpConstant.", but SPIRV Validator does not check the Scope \ argument of OpGroupNonUniform instructions correctly.
In the following code, %24 = OpGroupNonUniformBallot %v4uint %19 %true is not valid. %19 must be a OpConstant.
I checked Scope \ and Memory Semantics \ for both OpAtomicIAdd and OpMemoryBarrier.
SPIRV Validator did not check that Scope \ and Memory Semantics \ are not OpConstant.
Those Scope \ and Memory Semantics \ issues are not only the problem of OpGroupNonUniform instructions but also the problem of other instructions that have Scope \ and Memory Semantics \ as arguments.
SPIRV spec says "All \ used for Scope and Memory Semantics must be of an OpConstant.", but SPIRV Validator does not check the Scope \ argument of OpGroupNonUniform instructions correctly.
In the following code,
%24 = OpGroupNonUniformBallot %v4uint %19 %true
is not valid.%19
must be aOpConstant
.