summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2015-09-21 15:52:36 -0700
committerIan Romanick <ian.d.romanick@intel.com>2015-09-29 14:33:56 -0700
commit2d0f91c9ece66eba4a9c8548732b03904554849c (patch)
tree8acce8211238c328c1b7498babc090b3ef86248a
parent5d772ea304b505b38fa4afbd2a4704028beffa8f (diff)
polygon-offset: Replace draw_2x2_quad with piglit_draw_rect
No change in output on Broadwell using my distro's Mesa 10.4.7 or Mesa master 11.1-ish. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Thanked-by: Kristian Høgsberg <krh@bitplanet.net>
-rw-r--r--tests/spec/gl-1.4/polygon-offset.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/tests/spec/gl-1.4/polygon-offset.c b/tests/spec/gl-1.4/polygon-offset.c
index fecb02c62..1f55cd61f 100644
--- a/tests/spec/gl-1.4/polygon-offset.c
+++ b/tests/spec/gl-1.4/polygon-offset.c
@@ -345,17 +345,6 @@ find_actual_mrd(GLdouble *next_to_near, GLdouble *next_to_far,
- base_depth;
}
-static void
-draw_2x2_quad(void)
-{
- glBegin(GL_QUADS);
- glVertex2f(-1.0, -1.0);
- glVertex2f( 1.0, -1.0);
- glVertex2f( 1.0, 1.0);
- glVertex2f(-1.0, 1.0);
- glEnd();
-}
-
static bool
check_slope_offset(const struct angle_axis *aa, GLdouble *ideal_mrd_near)
{
@@ -414,7 +403,7 @@ check_slope_offset(const struct angle_axis *aa, GLdouble *ideal_mrd_near)
glDisable(GL_POLYGON_OFFSET_FILL);
- draw_2x2_quad();
+ piglit_draw_rect(-1.0, -1.0, 2.0, 2.0);
gluProject(0.0, 0.0, 0.0, modelview_mat, projection_mat, viewport,
centerw + 0, centerw + 1, centerw + 2);
@@ -448,7 +437,7 @@ check_slope_offset(const struct angle_axis *aa, GLdouble *ideal_mrd_near)
glEnable(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(-1.0, 0.0);
piglit_present_results();
- draw_2x2_quad();
+ piglit_draw_rect(-1.0, -1.0, 2.0, 2.0);
offset_depth = read_depth(centerw[0], centerw[1]);
offset = fmax(base_depth - offset_depth, 0.0);
if (offset < mmin || offset > mmax) {
@@ -466,7 +455,7 @@ check_slope_offset(const struct angle_axis *aa, GLdouble *ideal_mrd_near)
glPolygonOffset(-2.0, 0.0);
piglit_present_results();
- draw_2x2_quad();
+ piglit_draw_rect(-1.0, -1.0, 2.0, 2.0);
offset_depth = read_depth(centerw[0], centerw[1]);
offset = fmax(base_depth - offset_depth, 0.0);
if (offset < 2.0 * mmin || offset > 2.0 * mmax) {