[Piglit] [PATCH 10/25] arb_direct_state_access: Delete test_texture_matrix subtest from texunits

Ian Romanick idr at freedesktop.org
Mon May 18 13:50:03 PDT 2015


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

There are no DSA functions used in this test, so it does not belong
here.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 tests/spec/arb_direct_state_access/texunits.c | 63 ---------------------------
 1 file changed, 63 deletions(-)

diff --git a/tests/spec/arb_direct_state_access/texunits.c b/tests/spec/arb_direct_state_access/texunits.c
index a55192f..cb78610 100644
--- a/tests/spec/arb_direct_state_access/texunits.c
+++ b/tests/spec/arb_direct_state_access/texunits.c
@@ -70,18 +70,6 @@ equal4v(const GLfloat v1[4], const GLfloat v2[4])
 }
 
 
-static bool
-equal16v(const GLfloat v1[16], const GLfloat v2[16])
-{
-   int i;
-   for (i = 0; i < 16; i++) {
-      if (v1[i] != v2[i])
-         return false;
-   }
-   return true;
-}
-
-
 static void
 report4v(const GLfloat exp[4], const GLfloat act[4])
 {
@@ -92,56 +80,6 @@ report4v(const GLfloat exp[4], const GLfloat act[4])
 
 
 static bool
-test_texture_matrix(void)
-{
-   int i;
-
-   piglit_reset_gl_error();
-
-   /* set tex matrices */
-   for (i = 0; i < MaxTextureCoordUnits; i++) {
-      glActiveTexture(GL_TEXTURE0 + i);
-      glMatrixMode(GL_TEXTURE);
-      glLoadMatrixf((GLfloat *) Random + (i * 4) % 124);
-   }
-
-   /* query matrices */
-   for (i = 0; i < MaxTextureCoordUnits; i++) {
-      GLfloat m[16];
-      glActiveTexture(GL_TEXTURE0 + i);
-      glGetFloatv(GL_TEXTURE_MATRIX, m);
-      if (!equal16v((GLfloat *) Random + (i * 4) % 124, m)) {
-         printf("Get texture matrix unit %d failed\n", i);
-         return false;
-      }
-   }
-
-   /* there should be no errors at this point */
-   if (!piglit_check_gl_error(GL_NO_ERROR))
-      return false;
-
-   /* this should generate an error */
-   {
-      GLfloat m[16];
-      glActiveTexture(GL_TEXTURE0 + MaxTextureCoordUnits);
-      if (MaxTextureCoordUnits == MaxTextureCombinedUnits) {
-         /* INVALID_ENUM is expected */
-         if (!piglit_check_gl_error(GL_INVALID_ENUM))
-            return false;
-
-      } else {
-         /* INVALID_OPERATION is expected */
-         glGetFloatv(GL_TEXTURE_MATRIX, m);
-         if (!piglit_check_gl_error(GL_INVALID_OPERATION))
-            return false;
-      }
-   }
-
-   return true;
-}
-
-
-static bool
 test_texture_params(void)
 {
    GLuint tex[MAX_UNITS];
@@ -206,7 +144,6 @@ piglit_display(void)
 {
 	bool pass = true;
 
-	pass = test_texture_matrix() && pass;
 	pass = test_texture_params() && pass;
 
 	return pass ? PIGLIT_PASS : PIGLIT_FAIL;
-- 
2.1.0



More information about the Piglit mailing list