[Mesa-dev] [PATCH] meta: do the full FBO completeness check in decompress_texture_image

Ian Romanick idr at freedesktop.org
Tue Jun 20 19:51:05 UTC 2017


This patch is

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

On 06/20/2017 06:29 AM, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> _mesa_update_state will no longer recompute Width/Height if the framebuffer
> is complete. We now rely on the FBO completeness check to do it.
> 
> The only code that needs to be fixed seems to be this one.
> ---
>  src/mesa/drivers/common/meta.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
> index 1ff4651..6f6a5cc 100644
> --- a/src/mesa/drivers/common/meta.c
> +++ b/src/mesa/drivers/common/meta.c
> @@ -3057,20 +3057,25 @@ decompress_texture_image(struct gl_context *ctx,
>                                       decompress_fbo->rb);
>     }
>     else {
>        _mesa_bind_framebuffers(ctx, decompress_fbo->fb, decompress_fbo->fb);
>     }
>  
>     /* alloc dest surface */
>     if (width > decompress_fbo->Width || height > decompress_fbo->Height) {
>        _mesa_renderbuffer_storage(ctx, decompress_fbo->rb, rbFormat,
>                                   width, height, 0);
> +
> +      /* Do the full completeness check to recompute
> +       * ctx->DrawBuffer->Width/Height.
> +       */
> +      ctx->DrawBuffer->_Status = GL_FRAMEBUFFER_UNDEFINED;
>        status = _mesa_check_framebuffer_status(ctx, ctx->DrawBuffer);
>        if (status != GL_FRAMEBUFFER_COMPLETE) {
>           /* If the framebuffer isn't complete then we'll leave
>            * decompress_fbo->Width as zero so that it will fail again next time
>            * too */
>           _mesa_meta_end(ctx);
>           return false;
>        }
>        decompress_fbo->Width = width;
>        decompress_fbo->Height = height;
> 



More information about the mesa-dev mailing list