[Mesa-dev] [PATCH] meta: Don't bind the created texture object in init_temp_texture().

Brian Paul brianp at vmware.com
Thu Sep 16 12:02:31 PDT 2010


On 09/16/2010 11:52 AM, Francisco Jerez wrote:
> This function is executed outside _mesa_meta_begin/end(), that means
> that e.g. _mesa_meta_Bitmap() clobbers the texturing state because it
> changes the currently active texture object.
>
> There's no need to bind the new texture when it's created, it's done
> again later anyway (from setup_drawpix/copypix_texture()).
> ---
>   src/mesa/drivers/common/meta.c |    1 -
>   1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
> index a03cb68..87d116a 100644
> --- a/src/mesa/drivers/common/meta.c
> +++ b/src/mesa/drivers/common/meta.c
> @@ -855,7 +855,6 @@ init_temp_texture(GLcontext *ctx, struct temp_texture *tex)
>      assert(tex->MaxSize>  0);
>
>      _mesa_GenTextures(1,&tex->TexObj);
> -   _mesa_BindTexture(tex->Target, tex->TexObj);
>   }
>
>

Thanks.  I did an inspection of the code and it looks like 
_mesa_BindTexture() is still called later where needed, as you said.

I'll cherry-pick to the 7.9 branch in a day or so just to make sure 
nothing regresses.

-Brian



More information about the mesa-dev mailing list