[Piglit] [PATCH v2] arb_provoking_vertex/clipped-strip-first: New test.
Zebediah Figura
z.figura12 at gmail.com
Sat Nov 2 20:32:45 UTC 2019
This test demonstrates https://bugs.freedesktop.org/show_bug.cgi?id=110451.
It fails when using llvmpipe or softpipe.
---
This is my first patch to piglit, and I do not have commit access. I have likely
made all manner of stylistic or procedural errors, patience is appreciated :-)
.../clipped-strip-first.shader_test | 45 +++++++++++++++++++
1 file changed, 45 insertions(+)
create mode 100644 tests/spec/arb_provoking_vertex/clipped-strip-first.shader_test
diff --git a/tests/spec/arb_provoking_vertex/clipped-strip-first.shader_test b/tests/spec/arb_provoking_vertex/clipped-strip-first.shader_test
new file mode 100644
index 0000000..553bf5b
--- /dev/null
+++ b/tests/spec/arb_provoking_vertex/clipped-strip-first.shader_test
@@ -0,0 +1,45 @@
+# Check that the correct provoking vertex is used when part of the geometry
+# is clipped and the flat interpolation qualifier is used.
+
+[require]
+GLSL >= 1.30
+GL_EXT_provoking_vertex
+
+[vertex shader]
+#version 130
+
+in vec4 piglit_vertex;
+in vec3 piglit_color;
+flat out vec4 fscolor;
+
+void main()
+{
+ gl_Position = piglit_vertex;
+ fscolor = vec4(piglit_color, 1.0);
+}
+
+[fragment shader]
+#version 130
+
+flat in vec4 fscolor;
+
+void main()
+{
+ gl_FragColor = fscolor;
+}
+
+[vertex data]
+piglit_vertex/float/2 piglit_color/float/3
+-2.0 -1.0 0.0 1.0 0.0
+ 2.0 -1.0 0.0 1.0 0.0
+-2.0 0.0 0.0 1.0 0.0
+ 2.0 0.0 0.0 1.0 0.0
+-2.0 1.0 1.0 0.0 0.0
+ 2.0 1.0 1.0 0.0 0.0
+
+[test]
+clear color 0.0 0.0 0.0 0.0
+clear
+provoking vertex first
+draw arrays GL_TRIANGLE_STRIP 0 6
+probe all rgba 0.0 1.0 0.0 1.0
--
2.23.0
More information about the Piglit
mailing list