On Fri, Jun 23, 2017 at 06:43:37PM -0700, Ian Romanick wrote:
> On 06/23/2017 04:58 AM, [email protected] wrote:
> > From: Ville Syrjälä <[email protected]>
> >
> > 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.
>
> Yes... this seems right. The calculation of srcW and srcH already take
> care to handle src[XY]0 > src[XY]1, so this make sense.
>
> Reviewed-by: Ian Romanick <[email protected]>
>
> > 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.
>
> Any idea what might be wrong with those?
Not really. Some of the reported values were off by just a little bit,
so migth be some precision issue, or maybe the coordinates are off
by a smidge, somehow. But IIRC there was also some bigger errors
reported so not sure. I'll try to take a better look at it at some
point.
>
> > It looks to me like commit b702233f53d6 ("meta: Refactor the
> > BlitFramebuffer color CopyTexImage fallback.") most likely
> > broke this codepath.
> >
> > Cc: [email protected]
> > Cc: Eric Anholt <[email protected]>
> > Cc: Kenneth Graunke <[email protected]>
> > Cc: Ian Romanick <[email protected]>
> > Cc: Anuj Phogat <[email protected]>
> > 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ä <[email protected]>
> > ---
> > 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;
--
Ville Syrjälä
Intel OTC
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev