Skip to content

func.shader-ballot.builtins: Don't set bits after gl_SubGroupSize-1

Caio Oliveira requested to merge cmarcelo/crucible:r/fix-ballot-builtins into master

According to description of SubgroupGeMask decoration in Vulkan spec

The bits corresponding to the invocations greater than or equal to
SubgroupLocalInvocationId through SubgroupSize-1 are set in the
variable decorated with SubgroupGeMask. All other bits are set to
zero.

Similar restriction applies to others. So when building bitmasks to compare with the builtins, ensure that they don't set the wrong bits. Note that the Lt/Le expected bitmasks don't set larger bits, so don't need to be masked.

Fixes: e42ad5a5 ("add AMD_shader_ballot tests")

Merge request reports