summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-vs-deadcode-2.shader_test
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2012-02-23 13:32:49 -0800
committerEric Anholt <eric@anholt.net>2012-02-29 15:39:42 -0800
commit8ee32d3b944733d05fbca151f29b04717ebed85c (patch)
treea2dbd50d15f5c0d4938a22db7c3257a43349ccc9 /tests/shaders/glsl-vs-deadcode-2.shader_test
parent867f77023322247493ee78d6f763bb90dfac8804 (diff)
glsl-vs-deadcode-*: New tests for changes to Mesa's opt_dead_code_local.cpp.
The second test is a slight strip-down of a glean test that regressed. The first was just what I wrote to first look at the implementation. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'tests/shaders/glsl-vs-deadcode-2.shader_test')
-rw-r--r--tests/shaders/glsl-vs-deadcode-2.shader_test34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/shaders/glsl-vs-deadcode-2.shader_test b/tests/shaders/glsl-vs-deadcode-2.shader_test
new file mode 100644
index 000000000..47d5e9d25
--- /dev/null
+++ b/tests/shaders/glsl-vs-deadcode-2.shader_test
@@ -0,0 +1,34 @@
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+varying vec3 color;
+uniform vec4 v1;
+uniform float v2;
+uniform float v3;
+
+void main()
+{
+ gl_Position = gl_Vertex;
+
+ color.xyz = v1.xyz;
+ color.y = v2;
+ color.z = v3;
+}
+
+[fragment shader]
+varying vec3 color;
+
+void main()
+{
+ gl_FragColor = vec4(color, 0.4);
+}
+
+[test]
+uniform vec4 v1 0.1 0.9 0.9
+uniform float v2 0.2
+uniform float v3 0.3
+
+draw rect -1 -1 2 2
+
+probe all rgba 0.1 0.2 0.3 0.4