[Piglit] [PATCH] glsl-1.40: Add a simple test of math on uniform buffer loads.

Eric Anholt eric at anholt.net
Wed Feb 20 18:02:29 PST 2013


Catches an assertion failure/rendering failure in i965.
---
 .../glsl-1.40/uniform_buffer/fs-exp2.shader_test   |   36 ++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 tests/spec/glsl-1.40/uniform_buffer/fs-exp2.shader_test

diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-exp2.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-exp2.shader_test
new file mode 100644
index 0000000..c2d8fa8
--- /dev/null
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-exp2.shader_test
@@ -0,0 +1,36 @@
+[require]
+GLSL >= 1.40
+
+[vertex shader]
+#version 140
+
+in vec4 vertex;
+
+void main()
+{
+	gl_Position = vertex;
+}
+
+[fragment shader]
+#version 140
+
+uniform ubo1 {
+	vec4 v;
+};
+
+void main()
+{
+	gl_FragColor = exp2(v);
+}
+
+[vertex data]
+vertex/float/2
+-1.0 -1.0
+ 1.0 -1.0
+ 1.0  1.0
+-1.0  1.0
+
+[test]
+uniform vec4 v -2.0 -1.0 0.0 1.0
+draw arrays GL_TRIANGLE_FAN 0 4
+probe all rgba 0.25 0.5 1.0 1.0
-- 
1.7.10.4



More information about the Piglit mailing list