diff options
author | Segovia, Benjamin <benjamin.segovia@intel.com> | 2010-07-27 17:21:20 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-07-28 08:18:33 -0600 |
commit | 2e786472e6c0dcbb84bbe7022b2083d91c9c067d (patch) | |
tree | dbf489a4c4bec7b9938b2ed6b66fa8613494ae83 /tests/shaders/glsl-vs-masked-cos.shader_test | |
parent | 92e4ba8245517700f1cd80cd111c7c8e4d946cc5 (diff) |
glsl-vs-masked-cos, glsl-vs-masked-dot: extra masking / swizzling tests
Added two more tests to stress the new optimizations in prog_optimize.c in the
mesa code base.
Signed-off-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'tests/shaders/glsl-vs-masked-cos.shader_test')
-rw-r--r-- | tests/shaders/glsl-vs-masked-cos.shader_test | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/shaders/glsl-vs-masked-cos.shader_test b/tests/shaders/glsl-vs-masked-cos.shader_test new file mode 100644 index 000000000..cc42f6eaf --- /dev/null +++ b/tests/shaders/glsl-vs-masked-cos.shader_test @@ -0,0 +1,33 @@ +[require] +GL >= 2.0 +GLSL >= 1.10 + +[vertex shader] +uniform vec2 arg0; +uniform vec3 arg1; +varying vec3 color; + +void main() +{ + gl_Position = gl_Vertex; + + /* try to trigger masked mov for cos */ + vec3 val = arg1; + val.z = cos(arg0.x); + color.x = val.z; + color.yz = val.xy; +} + +[fragment shader] +varying vec3 color; +void main() +{ + gl_FragColor = vec4(color, 0.0); +} + +[test] +uniform vec2 arg0 0.0 0.0 +uniform vec3 arg1 1.0 0.5 1.0 +draw rect -1 -1 2 2 +probe rgba 1 1 1.0 1.0 0.5 0.0 + |