From: Nicolai Hähnle <[email protected]>

---
 .../execution/fs-ballot.shader_test                | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 tests/spec/arb_shader_ballot/execution/fs-ballot.shader_test

diff --git a/tests/spec/arb_shader_ballot/execution/fs-ballot.shader_test 
b/tests/spec/arb_shader_ballot/execution/fs-ballot.shader_test
new file mode 100644
index 0000000..b16d723
--- /dev/null
+++ b/tests/spec/arb_shader_ballot/execution/fs-ballot.shader_test
@@ -0,0 +1,28 @@
+[require]
+GL >= 3.2
+GLSL >= 1.50
+GL_ARB_shader_ballot
+
+[vertex shader passthrough]
+
+[fragment shader]
+#version 150
+#extension GL_ARB_shader_ballot : require
+
+out vec4 outcolor;
+
+void main() {
+       if (ballotARB(false) != 0ul)
+               outcolor = vec4(1.0, 0.0, 0.0, 0.0);
+       else if (ballotARB(true) == 0ul)
+               outcolor = vec4(1.0, 0.1, 0.0, 0.0);
+       else
+               outcolor = vec4(0.0, 1.0, 0.0, 1.0);
+}
+
+[test]
+clear color 0.0 0.0 0.0 0.0
+clear
+
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
-- 
2.9.3

_______________________________________________
Piglit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to