[Mesa-dev] [PATCH] meta: Fix BlitFramebuffer temp texture setup

Andres Gomez agomez at igalia.com
Mon Jul 10 20:42:18 UTC 2017


Ville, has this patch fallen through the cracks ?

On Fri, 2017-06-23 at 14:58 +0300, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Pass the correct src coordinates to CopyTexSubImage()
> when creating the temporary texture, and also take care to adjust
> flipX/Y if the original src coordinates were flipped compared to
> the new temporary texture src coordinates.
> 
> This fixes all the flip_src_x/y tests in
> piglit.spec.arb_framebuffer_object.fbo-blit-stretch on i915, but
> we're still left with the some failures in the stretch tests.
> 
> It looks to me like commit b702233f53d6 ("meta: Refactor the
> BlitFramebuffer color CopyTexImage fallback.") most likely
> broke this codepath.
> 
> Cc: mesa-stable at lists.freedesktop.org
> Cc: Eric Anholt <eric at anholt.net>
> Cc: Kenneth Graunke <kenneth at whitecape.org>
> Cc: Ian Romanick <ian.d.romanick at intel.com>
> Cc: Anuj Phogat <anuj.phogat at gmail.com>
> Fixes: b702233f53d6 ("meta: Refactor the BlitFramebuffer color CopyTexImage fallback.")
> References: https://bugs.freedesktop.org/show_bug.cgi?id=101414
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>  src/mesa/drivers/common/meta_blit.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c
> index 7adad469aceb..7262ecdfaf13 100644
> --- a/src/mesa/drivers/common/meta_blit.c
> +++ b/src/mesa/drivers/common/meta_blit.c
> @@ -680,12 +680,16 @@ blitframebuffer_texture(struct gl_context *ctx,
>        }
>  
>        _mesa_meta_setup_copypix_texture(ctx, meta_temp_texture,
> -                                       srcX0, srcY0,
> +                                       MIN2(srcX0, srcX1),
> +                                       MIN2(srcY0, srcY1),
>                                         srcW, srcH,
>                                         tex_base_format,
>                                         filter);
>  
> -
> +      if (srcX0 > srcX1)
> +         flipX = -flipX;
> +      if (srcY0 > srcY1)
> +         flipY = -flipY;
>        srcX0 = 0;
>        srcY0 = 0;
>        srcX1 = srcW;
-- 
Br,

Andres


More information about the mesa-dev mailing list