[Piglit] [PATCH v2] Add glsl-fs-discard-only.shader_test
Nicolai Hähnle
nhaehnle at gmail.com
Thu Jan 21 11:53:53 PST 2016
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
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
---
.../glsl-1.10/glsl-fs-discard-only.shader_test | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 tests/spec/glsl-1.10/glsl-fs-discard-only.shader_test
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 0000000..5b9402b
--- /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
--
2.5.0
More information about the Piglit
mailing list