On 19.01.2016 15:25, Ilia Mirkin wrote:
On Tue, Jan 19, 2016 at 3:22 PM, Ilia Mirkin <[email protected]> wrote:
On Tue, Jan 19, 2016 at 3:20 PM, Nicolai Hähnle <[email protected]> wrote:
From: Nicolai Hähnle <[email protected]>
Test a pure depth write with conditional discard in the fragment shader.
This currently fails in radeonsi.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93761
---
tests/shaders/glsl-fs-discard-only.shader_test | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 tests/shaders/glsl-fs-discard-only.shader_test
diff --git a/tests/shaders/glsl-fs-discard-only.shader_test
b/tests/shaders/glsl-fs-discard-only.shader_test
new file mode 100644
index 0000000..5585922
--- /dev/null
+++ b/tests/shaders/glsl-fs-discard-only.shader_test
@@ -0,0 +1,26 @@
+[require]
+GLSL >= 1.10
+depthbuffer
+
+[vertex shader]
[vertex shader passthrough]
Good point.
Oh, and this should probably go into tests/spec/glsl-1.10
(hm, seems like piglit only has tests for discard starting glsl
1.30... but I assume it was a feature in 1.10 too? odd.)
There are more discard tests in tests/shaders, which is why I put that
here. But sure, I can put this in tests/spec/glsl-1.10. Probably makes
sense to move the others as well while I'm at it, what do you think?
Cheers,
Nicolai
+void main()
+{
+ gl_Position = gl_Vertex;
+}
+
+[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
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit