[Piglit] [PATCH 12/17] glean: Just use glTexImage2D in ttexgen

Ian Romanick idr at freedesktop.org
Tue Sep 22 08:36:37 PDT 2015


From: Ian Romanick <ian.d.romanick at intel.com>

The test sets the filter modes to GL_NEAREST, so levels other than zero
are never used.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 tests/glean/ttexgen.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/glean/ttexgen.cpp b/tests/glean/ttexgen.cpp
index e81c2a5..f44cb9a 100644
--- a/tests/glean/ttexgen.cpp
+++ b/tests/glean/ttexgen.cpp
@@ -231,7 +231,9 @@ TexgenTest::runOne(BasicResult& r, Window&) {
 			redBlueCheck[(x+(256*y))*3 + 2] = ((xPastHalf && !yPastHalf) || (!xPastHalf && yPastHalf)) ? 255 : 0;
 		}
 	}
-	gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGB, 256, 256, GL_RGB, GL_UNSIGNED_BYTE, redBlueCheck);
+
+	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 256, 256, 0, GL_RGB,
+		     GL_UNSIGNED_BYTE, redBlueCheck);
     
     // Setup our arrays of configuration info; we loop over the rendering pass a number of times,
     // using a different GL primitive path each time.
-- 
2.1.0



More information about the Piglit mailing list