[Piglit] [PATCH 1/6] arb_shader_ballot: simple ballotARB execution test

Nicolai Hähnle nhaehnle at gmail.com
Fri Mar 31 17:02:23 UTC 2017


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

---
 .../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



More information about the Piglit mailing list