[Piglit] [PATCH] fbo-generatemipmap-array: Remove fixed-function operations.

Ian Romanick idr at freedesktop.org
Mon Oct 24 09:34:47 PDT 2011


On 10/24/2011 08:55 AM, Vinson Lee wrote:
> The EXT_texture specification does not support fixed-function for
> TEXTURE_[12]D_ARRAY_EXT.
>
> Fixes GL_INVALID_ENUM errors on Mac OS X with
> glEnable(GL_TEXTURE_[12]D_ARRAY_EXT).

That looks much better.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

> ---
>   tests/fbo/fbo-generatemipmap-array.c |    6 ------
>   1 files changed, 0 insertions(+), 6 deletions(-)
>
> diff --git a/tests/fbo/fbo-generatemipmap-array.c b/tests/fbo/fbo-generatemipmap-array.c
> index 12c9e30..876ec73 100644
> --- a/tests/fbo/fbo-generatemipmap-array.c
> +++ b/tests/fbo/fbo-generatemipmap-array.c
> @@ -257,14 +257,11 @@ 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 +279,11 @@ 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);
>   }
>



More information about the Piglit mailing list