[Piglit] [PATCH] texgen: read pixels from back buffer instead of the front buffer

Luca Barbieri luca at luca-barbieri.com
Fri Sep 3 20:20:49 PDT 2010


Reading from the front buffer causes the test to fail for me.

This may be a bug, but it's definitely unrelated to the goal of this
test.
---
 tests/general/texgen.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/tests/general/texgen.c b/tests/general/texgen.c
index cbe9907..c878172 100644
--- a/tests/general/texgen.c
+++ b/tests/general/texgen.c
@@ -81,13 +81,12 @@ static void test_sanity(void)
 		glVertex2f(0, 1);
 	glEnd();
 
-	glutSwapBuffers();
-	glReadBuffer(GL_FRONT);
-
 	for(y = 0; y < 4; ++y) {
 		for(x = 0; x < 4; ++x)
 			probe_cell("test_sanity", x, y, TextureData[y][x]);
 	}
+
+	glutSwapBuffers();
 }
 
 static void do_test_texgen_eye(const char* testname)
@@ -141,13 +140,12 @@ static void do_test_texgen_eye(const char* testname)
 
 	glDisable(GL_TEXTURE_GEN_S);
 
-	glutSwapBuffers();
-	glReadBuffer(GL_FRONT);
-
 	for(y = 0; y < 2; ++y) {
 		for(x = 0; x < 2; ++x)
 			probe_cell(testname, x, y, TextureData[y+1][x+1]);
 	}
+
+	glutSwapBuffers();
 }
 
 static void test_texgen_eye(void)
-- 
1.7.0.4



More information about the Piglit mailing list