[Piglit] [PATCH 1/1] fbo-generatemipmap-array: Remove Enable/Disable GL_TEXTURE_*_ARRAY_EXT calls.

Vinson Lee vlee at vmware.com
Wed Oct 19 15:26:48 PDT 2011


The EXT_texture specification does not support fixed-function for
TEXTURE_1D_ARRAY_EXT and TEXTURE_1D_ARRAY_EXT.

Fixes GL_INVALID_ENUM errors on Mac OS X.
---
 tests/fbo/fbo-generatemipmap-array.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/tests/fbo/fbo-generatemipmap-array.c b/tests/fbo/fbo-generatemipmap-array.c
index 12c9e30..c47b3f8 100644
--- a/tests/fbo/fbo-generatemipmap-array.c
+++ b/tests/fbo/fbo-generatemipmap-array.c
@@ -257,14 +257,12 @@ draw_mipmap_2d(int x, int y, int dim, int layer)
 
 	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_MIPMAP_NEAREST);
 	glTexParameteri(GL_TEXTURE_2D_ARRAY_EXT, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 
 	piglit_draw_rect_tex3(x, y, dim, dim,
 			      0, 0, 1, 1, layer);
-	glDisable(GL_TEXTURE_2D_ARRAY_EXT);
 	glUseProgram(0);
 }
 
@@ -282,14 +280,12 @@ draw_mipmap_1d(int x, int y, int dim, int layer)
 
 	glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
 
-	glEnable(GL_TEXTURE_1D_ARRAY_EXT);
 	glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
 	glTexParameteri(GL_TEXTURE_1D_ARRAY_EXT, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);
 	glTexParameteri(GL_TEXTURE_1D_ARRAY_EXT, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 
 	piglit_draw_rect_tex3(x, y, dim, dim,
 			      0, layer, 1, 0, 0);
-	glDisable(GL_TEXTURE_1D_ARRAY_EXT);
 	glUseProgram(0);
 }
 
-- 
1.7.4.4



More information about the Piglit mailing list