[Mesa-dev] [PATCH] meta: Unbind texture from FBO after completeness check

Brian Paul brianp at vmware.com
Fri Feb 10 07:16:49 PST 2012


On 02/09/2012 06:27 PM, Ian Romanick wrote:
> From: Ian Romanick<ian.d.romanick at intel.com>
>
> ---
>   src/mesa/drivers/common/meta.c |    7 +++++++
>   1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
> index aa5fef8..3647395 100644
> --- a/src/mesa/drivers/common/meta.c
> +++ b/src/mesa/drivers/common/meta.c
> @@ -2661,6 +2661,13 @@ _mesa_meta_check_generate_mipmap_fallback(struct gl_context *ctx, GLenum target,
>
>      status = _mesa_CheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
>
> +   /* Unbind the texture from the FBO.  Note that the texture will be rebound
> +    * (many times) during mipmap generation.
> +    */
> +   _mesa_FramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT,
> +				 GL_COLOR_ATTACHMENT0_EXT,
> +				 GL_TEXTURE_2D, 0, 0);
> +
>      _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboSave);
>
>      if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {


Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the mesa-dev mailing list