From: Ville Syrjälä <ville.syrj...@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-sta...@lists.freedesktop.org Cc: Eric Anholt <e...@anholt.net> Cc: Kenneth Graunke <kenn...@whitecape.org> Cc: Ian Romanick <ian.d.roman...@intel.com> Cc: Anuj Phogat <anuj.pho...@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.syrj...@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; -- 2.13.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev