[Piglit] [PATCH] fbo: Remove Enable/Disable GL_TEXTURE_2D_ARRAY_EXT calls.

Vinson Lee vlee at vmware.com
Thu Jul 21 16:42:39 PDT 2011


 fbo: Remove Enable/Disable GL_TEXTURE_2D_ARRAY_EXT calls.

According to the EXT_texture_array specification at http://www.opengl.org/registry/specs/EXT/texture_array.txt, TEXTURE_2D_ARRAY_EXT isn't supported for fixed-function.

<quote>
This extension does not provide for the use of array textures with
fixed-function fragment processing.  Such support could be added by
providing an additional extension allowing applications to pass the new
target enumerants (TEXTURE_1D_ARRAY_EXT and TEXTURE_2D_ARRAY_EXT) to
Enable and Disable.
</quote>

Fixes GL_INVALID_ENUM errors on Mac OS X.

diff --git a/tests/fbo/fbo-array.c b/tests/fbo/fbo-array.c
index fa3b78a..3dce90f 100644
--- a/tests/fbo/fbo-array.c
+++ b/tests/fbo/fbo-array.c
@@ -146,7 +146,6 @@ draw_layer(int x, int y, int depth)
 
 	glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
 
-	glEnable(GL_TEXTURE_2D_ARRAY_EXT);
 	glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
 	glTexParameteri(GL_TEXTURE_2D_ARRAY_EXT, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
 	glTexParameteri(GL_TEXTURE_2D_ARRAY_EXT, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
@@ -169,7 +168,6 @@ draw_layer(int x, int y, int depth)
 
 	glEnd();
 
-	glDisable(GL_TEXTURE_2D_ARRAY_EXT);
 	glUseProgram(0);
 }
 
diff --git a/tests/fbo/fbo-depth-array.c b/tests/fbo/fbo-depth-array.c
index 8c796c4..599e001 100644
--- a/tests/fbo/fbo-depth-array.c
+++ b/tests/fbo/fbo-depth-array.c
@@ -169,7 +169,6 @@ draw_layer(int x, int y, int depth)
 
 	glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
 
-	glEnable(GL_TEXTURE_2D_ARRAY_EXT);
 	glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
 	glTexParameteri(GL_TEXTURE_2D_ARRAY_EXT, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
 	glTexParameteri(GL_TEXTURE_2D_ARRAY_EXT, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
@@ -192,7 +191,6 @@ draw_layer(int x, int y, int depth)
 
 	glEnd();
 
-	glDisable(GL_TEXTURE_2D_ARRAY_EXT);
 	glUseProgram(0);
 }
 


More information about the Piglit mailing list