diff options
author | Chad Versace <chad.versace@linux.intel.com> | 2012-12-07 13:21:43 -0600 |
---|---|---|
committer | Chad Versace <chad.versace@linux.intel.com> | 2012-12-11 12:44:51 -0600 |
commit | 93f632add35f47e73db2187980ec4d6bb4e2fd0c (patch) | |
tree | 081665cbd2a8d2e2f3d03d4b8cb67ade6690b705 /tests/spec/glsl-es-3.00/execution | |
parent | 260f211d82ed798e3f89454fc8a8862b57c36ad0 (diff) |
glsl-es-3.00: Add sanity.shader_test
The test fills the window with red, then green, then blue.
Tested against mesa-gles3-412a815 with Intel Sandybridge.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'tests/spec/glsl-es-3.00/execution')
-rw-r--r-- | tests/spec/glsl-es-3.00/execution/sanity.shader_test | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/spec/glsl-es-3.00/execution/sanity.shader_test b/tests/spec/glsl-es-3.00/execution/sanity.shader_test new file mode 100644 index 000000000..e7e6dedf2 --- /dev/null +++ b/tests/spec/glsl-es-3.00/execution/sanity.shader_test @@ -0,0 +1,44 @@ +# Fill the window with red, then green, then blue. + +[require] +GL >= 3.0 es +GLSL >= 3.00 es + +[vertex shader] +#version 300 es + +in vec4 vertex; + +void main() { + gl_Position = vertex; +} + +[fragment shader] +#version 300 es + +uniform vec4 u_color; +out vec4 color; + +void main() { + color = u_color; +} + +[vertex data] +vertex/float/2 +-1.0 -1.0 + 1.0 -1.0 + 1.0 1.0 +-1.0 1.0 + +[test] +uniform vec4 u_color 1.0 0.0 0.0 1.0 +draw arrays GL_TRIANGLE_FAN 0 4 +probe all rgba 1.0 0.0 0.0 1.0 + +uniform vec4 u_color 0.0 1.0 0.0 1.0 +draw arrays GL_TRIANGLE_FAN 0 4 +probe all rgba 0.0 1.0 0.0 1.0 + +uniform vec4 u_color 0.0 0.0 1.0 1.0 +draw arrays GL_TRIANGLE_FAN 0 4 +probe all rgba 0.0 0.0 1.0 1.0 |