summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2020-07-30 14:21:35 -0400
committerMarge Bot <eric+marge@anholt.net>2020-07-31 13:27:24 +0000
commit9f891e9bbb3a228e96cdd207d62e2427aec1b920 (patch)
treeb50ba2b8db214f480e7efbeae97e92920e4b618a
parentef47be35ec8c30b1c3f7c5ef90f01b7ccf6fa38a (diff)
arb_gpu_shader5: prevent uniform from being optimized out in samplemaskin-indirect
this gets optimized out and causes the test to fail without further use Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/355>
-rw-r--r--tests/spec/arb_gpu_shader5/execution/samplemaskin-indirect.shader_test3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/spec/arb_gpu_shader5/execution/samplemaskin-indirect.shader_test b/tests/spec/arb_gpu_shader5/execution/samplemaskin-indirect.shader_test
index 6dc7bc934..7040cc74b 100644
--- a/tests/spec/arb_gpu_shader5/execution/samplemaskin-indirect.shader_test
+++ b/tests/spec/arb_gpu_shader5/execution/samplemaskin-indirect.shader_test
@@ -19,6 +19,9 @@ void main()
if (gl_SampleMaskIn[zero] == 1) {
color.rg = vec2(0.0, 1.0);
}
+ /* this prevents 'zero' from being optimized out */
+ if (zero == 1)
+ color = vec4(0.0, 0.0, 0.0, 1.0);
}
[test]