This test demonstrates https://bugs.freedesktop.org/show_bug.cgi?id=110451.
It fails when using llvmpipe or softpipe.

Signed-off-by: Zebediah Figura <z.figur...@gmail.com>
---
This is my first patch to piglit. 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.22.0

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to