This adds a basic shader test for the GL_NV_fill_rectangle extension. The test simply draws a single prim with the polygon mode set to GL_FILL_RECTANGLE_NV and checks that the prim was rasterized as a full rectangle, along with checking that the rectangle only occupies the space we gave it in it's vertex data.
Signed-off-by: Lyude <[email protected]> --- .../rectangle-from-triangular-prim.shader_test | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/spec/nv_fill_rectangle/execution/rectangle-from-triangular-prim.shader_test diff --git a/tests/spec/nv_fill_rectangle/execution/rectangle-from-triangular-prim.shader_test b/tests/spec/nv_fill_rectangle/execution/rectangle-from-triangular-prim.shader_test new file mode 100644 index 0000000..24e330a --- /dev/null +++ b/tests/spec/nv_fill_rectangle/execution/rectangle-from-triangular-prim.shader_test @@ -0,0 +1,24 @@ +[require] +GLSL >= 1.10 +GL_NV_fill_rectangle + +[vertex shader passthrough] + +[fragment shader] +void main() { gl_FragColor = vec4(1.0); } + +[vertex data] +piglit_vertex/float/3 + 0.0 0.5 0.0 + 0.5 -0.5 0.0 +-0.5 -0.5 0.0 + +[test] +clear color 0.0 0.0 0.0 0.0 +clear + +polygon mode GL_FRONT_AND_BACK GL_FILL_RECTANGLE_NV +draw arrays GL_TRIANGLE_FAN 0 3 + +relative probe rect rgb (0.25, 0.26, 0.50, 0.49) (1.0, 1.0, 1.0, 1.0) +probe rgb 0 0 0.0 0.0 0.0 -- 2.9.3 _______________________________________________ Piglit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/piglit
