diff options
author | Zebediah Figura <z.figura12@gmail.com> | 2019-06-22 23:52:16 -0500 |
---|---|---|
committer | Zebediah Figura <z.figura12@gmail.com> | 2020-02-10 18:08:01 -0600 |
commit | 4b5c7d31f866853cd13541abebb922ab6215cbba (patch) | |
tree | 381beb3cc8e9379092067cb39dee9abca5447967 | |
parent | 1924e40adaa8e6c3b5ec8ad5296c96b1195332df (diff) |
arb_provoking_vertex/clipped-strip-first: New test.
This is a regression test for <https://gitlab.freedesktop.org/mesa/mesa/commit/a3c8bc10aa9294bd78c0e2cf5818fb4b8a42cd7a>.
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/piglit/merge_requests/218>
Part-of: <https://gitlab.freedesktop.org/mesa/piglit/merge_requests/218>
-rw-r--r-- | tests/spec/arb_provoking_vertex/clipped-strip-first.shader_test | 45 |
1 files changed, 45 insertions, 0 deletions
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 000000000..21e742a79 --- /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 with triangle strips. + +[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 |