[Piglit] [PATCH 13/13] read-front: Make this test distinguish top/bottom flipping.
Eric Anholt
eric at anholt.net
Sat Oct 15 13:19:42 PDT 2011
It was displaying something that would distinguish left/right, but
that's a much less likely failure mode. I was concerned while working
on rb mapping for swrast.
---
tests/general/read-front.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/tests/general/read-front.c b/tests/general/read-front.c
index 25280a5..562cf1e 100644
--- a/tests/general/read-front.c
+++ b/tests/general/read-front.c
@@ -44,22 +44,24 @@ enum piglit_result
piglit_display(void)
{
GLboolean pass = GL_TRUE;
- static float red[] = {1.0, 0.0, 0.0, 0.0};
+ static float blue[] = {0.0, 0.0, 1.0, 0.0};
static float green[] = {0.0, 1.0, 0.0, 0.0};
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glClearColor(1.0, 0.0, 0.0, 0.0);
+ glClearColor(0.0, 0.0, 1.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT);
glColor4fv(green);
- piglit_draw_rect(piglit_width / 2, 0, piglit_width / 2, piglit_height);
+ piglit_draw_rect(0, piglit_height / 2, piglit_width, piglit_height);
glReadBuffer(GL_FRONT);
glutSwapBuffers();
- pass &= piglit_probe_rect_rgb(0, 0, piglit_width/2, piglit_height, red);
- pass &= piglit_probe_rect_rgb(piglit_width/2, 0, piglit_width/2, piglit_height, green);
+ pass &= piglit_probe_rect_rgb(0, 0,
+ piglit_width, piglit_height / 2, blue);
+ pass &= piglit_probe_rect_rgb(0, piglit_height / 2,
+ piglit_width, piglit_height / 2, green);
glReadBuffer(GL_BACK);
--
1.7.7
More information about the Piglit
mailing list