The previous comparison values were calculated by shifting ~0 by the
invocation index. This would end up including bits higher than
gl_SubGroupSizeARB.
---
.../arb_shader_ballot/execution/fs-builtin-variables.shader_test | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/tests/spec/arb_shader_ballot/execution/fs-builtin-variables.shader_test
b/tests/spec/arb_shader_ballot/execution/fs-builtin-variables.shader_test
index cd75bca..15987b6 100644
--- a/tests/spec/arb_shader_ballot/execution/fs-builtin-variables.shader_test
+++ b/tests/spec/arb_shader_ballot/execution/fs-builtin-variables.shader_test
@@ -16,6 +16,7 @@ void main() {
uint64_t active_set = ballotARB(true);
uint id = gl_SubGroupInvocationARB;
+ uint64_t group_mask = ~0ul >> (64u - gl_SubGroupSizeARB);
if (id >= gl_SubGroupSizeARB) {
outcolor = vec4(1.0, 0 / 255.0, id / 255.0, gl_SubGroupSizeARB
/ 255.0);
@@ -27,12 +28,12 @@ void main() {
return;
}
- if (gl_SubGroupGeMaskARB != (~0ul << id)) {
+ if (gl_SubGroupGeMaskARB != ((~0ul << id) & group_mask)) {
outcolor = vec4(1.0, 2 / 255.0, id / 255.0, 0.0);
return;
}
- if (gl_SubGroupGtMaskARB != (~1ul << id)) {
+ if (gl_SubGroupGtMaskARB != ((~1ul << id) & group_mask)) {
outcolor = vec4(1.0, 2 / 255.0, id / 255.0, 0.0);
return;
}
--
2.9.5
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit