diff options
author | Eric Anholt <eric@anholt.net> | 2013-02-20 18:01:29 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2013-03-20 10:16:14 -0700 |
commit | c64f8cf0d97d1b53f04ab724ee8ea4e82e8988f0 (patch) | |
tree | f21e61dcd215765005eee7b351691bc4313b6e08 | |
parent | e9b2c655116333a8d34ff08a5bffc3a3a008b2b6 (diff) |
glsl-1.40: Add a simple test of math on uniform buffer loads.
Catches an assertion failure/rendering failure in i965.
-rw-r--r-- | tests/spec/glsl-1.40/uniform_buffer/fs-exp2.shader_test | 36 |
1 files changed, 36 insertions, 0 deletions
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 00000000..c2d8fa85 --- /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 |