[Piglit] [PATCH 4/4] glean: Remove VertArrayBGRATest::testAPI

Ian Romanick idr at freedesktop.org
Fri Feb 7 20:46:05 PST 2014


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

It was redundant with arb_vertex_array_bgra-api-errors, and it had some
bugs that were already fixed in arb_vertex_array_bgra-api-errors.  I'm
keeping the glean rendering test because I believe that it's the only
rendering test in piglit for BGRA arrays.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 tests/glean/tvertarraybgra.cpp | 59 ------------------------------------------
 1 file changed, 59 deletions(-)

diff --git a/tests/glean/tvertarraybgra.cpp b/tests/glean/tvertarraybgra.cpp
index 67651d3..ff8ac31 100644
--- a/tests/glean/tvertarraybgra.cpp
+++ b/tests/glean/tvertarraybgra.cpp
@@ -59,61 +59,6 @@ VertArrayBGRATest::reportError(const char *msg)
 }
 
 
-bool
-VertArrayBGRATest::testAPI(void)
-{
-	// Get glSecondaryColorPointer() functon
-	PFNGLSECONDARYCOLORPOINTERPROC SecondaryColorPointer = NULL;
-	SecondaryColorPointer = (PFNGLSECONDARYCOLORPOINTERPROC)
-			GLUtils::getProcAddress("glSecondaryColorPointer");
-
-	// Get glVertexAttrib() function
-	PFNGLVERTEXATTRIBPOINTERARBPROC VertexAttribPointer = NULL;
-	if (GLUtils::getVersion() >= 2.0) {
-		VertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERARBPROC)
-			GLUtils::getProcAddress("glVertexAttribPointer");
-	}
-		
-	GLubyte array[4];
-
-	if (glGetError()) {
-		reportError("initial error state is not GL_NO_ERROR.");
-		return false;
-	}
-
-	glColorPointer(GL_BGRA, GL_UNSIGNED_BYTE, 0, array);
-	if (glGetError()) {
-		reportError("glColorPointer(size=GL_BGRA) generated an error.");
-		return false;
-	}
-
-	if (SecondaryColorPointer) {
-		SecondaryColorPointer(GL_BGRA, GL_UNSIGNED_BYTE, 0, array);
-		if (glGetError()) {
-			reportError("glSecondaryColorPointer(size=GL_BGRA) generated an error.");
-			return false;
-		}
-	}
-
-	if (VertexAttribPointer) {
-		VertexAttribPointer(2, GL_BGRA, GL_UNSIGNED_BYTE, GL_TRUE, 0, array);
-		if (glGetError()) {
-			reportError("glVertexAttribPointer(size=GL_BGRA) generated an error.");
-			return false;
-		}
-	}
-
-	// this _should_ generate an error
-	glColorPointer(GL_BGRA, GL_FLOAT, 0, array);
-	if (glGetError() != GL_INVALID_VALUE) {
-		reportError("glColorPointer(size=GL_BGRA, type=GL_FLOAT) did not generate expected error.");
-		return false;
-	}
-
-	return true;
-}
-
-
 void
 VertArrayBGRATest::setupPoints()
 {
@@ -160,10 +105,6 @@ VertArrayBGRATest::runOne(VertArrayBGRAResult &r, Window &w)
 	Image rgbaImage(WINDOW_SIZE, WINDOW_SIZE, GL_RGBA, GL_UNSIGNED_BYTE);
 	Image bgraImage(WINDOW_SIZE, WINDOW_SIZE, GL_RGBA, GL_UNSIGNED_BYTE);
 
-	r.pass = testAPI();
-	if (!r.pass)
-		return;
-
 	setupPoints();
 #if 0 // test lighting path too (debug only)
 	glEnable(GL_LIGHTING);
-- 
1.8.1.4



More information about the Piglit mailing list