diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2016-01-19 14:01:06 -0500 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2016-01-21 16:37:20 -0500 |
commit | 33a33dee5bcf948b6b4510c3553d592ec663beef (patch) | |
tree | a5c10e4cd41193c2aa43f8b62e7e143b0baec105 | |
parent | 3e3e873b2f38044dad60ba4103e352d8a76f41d1 (diff) |
Add glsl-fs-discard-only.shader_test
Test a pure depth write with conditional discard in the fragment shader.
This currently fails in radeonsi.
v2: use vertex shader passthrough and move to tests/spec/glsl-1.10 (Ilia Mirkin)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93761
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
-rw-r--r-- | tests/spec/glsl-1.10/glsl-fs-discard-only.shader_test | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/spec/glsl-1.10/glsl-fs-discard-only.shader_test b/tests/spec/glsl-1.10/glsl-fs-discard-only.shader_test new file mode 100644 index 000000000..5b9402b7e --- /dev/null +++ b/tests/spec/glsl-1.10/glsl-fs-discard-only.shader_test @@ -0,0 +1,22 @@ +[require] +GLSL >= 1.10 +depthbuffer + +[vertex shader passthrough] + +[fragment shader] +void main() +{ + if (gl_FragCoord.x < 10.0) + discard; +} + +[test] +clear depth 1.0 +clear +enable GL_DEPTH_TEST +draw rect -1 -1 2 2 +probe depth 0 0 1.0 +probe depth 9 0 1.0 +probe depth 10 0 0.5 +probe depth 11 0 0.5 |