Mesa (master): freedreno/a6xx: Support y-inverted blits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Feb 11 20:26:39 UTC 2019


Module: Mesa
Branch: master
Commit: bc8c813d5ae1f893b39a50d17f71bcfc2f76df01
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bc8c813d5ae1f893b39a50d17f71bcfc2f76df01

Author: Kristian H. Kristensen <hoegsberg at chromium.org>
Date:   Thu Feb  7 15:35:07 2019 -0800

freedreno/a6xx: Support y-inverted blits

The src coordinates are s24.8. For an inverted blit that ends at y=0
we need to program -1 for sy2, so we need to handle negative values
correctly.

Fixes

  dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_reverse_dst_y
  dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_dst_y
  dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_y
  dEQP-GLES3.functional.fbo.invalidate.sub.unbind_blit_color
  dEQP-GLES3.functional.fbo.invalidate.whole.unbind_blit_color

Reviewed-by: Rob Clark <robdclark at gmail.com>
Signed-off-by: Kristian H. Kristensen <hoegsberg at chromium.org>

---

 src/gallium/drivers/freedreno/a6xx/fd6_blitter.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
index 0a741acf1d..08fbe4b705 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
@@ -114,9 +114,6 @@ can_do_blit(const struct pipe_blit_info *info)
 	fail_if(util_format_is_compressed(info->src.format) &&
 			info->src.format != info->dst.format);
 
-	/* src box can be inverted, which we don't support.. dst box cannot: */
-	fail_if((info->src.box.width < 0) || (info->src.box.height < 0));
-
 	fail_if(!ok_dims(info->src.resource, &info->src.box, info->src.level));
 
 	fail_if(!ok_dims(info->dst.resource, &info->dst.box, info->dst.level));
@@ -347,8 +344,8 @@ emit_blit_texture(struct fd_ringbuffer *ring, const struct pipe_blit_info *info)
 	enum a6xx_tile_mode stile, dtile;
 	enum a3xx_color_swap sswap, dswap;
 	unsigned spitch, dpitch;
-	unsigned sx1, sy1, sx2, sy2;
-	unsigned dx1, dy1, dx2, dy2;
+	int sx1, sy1, sx2, sy2;
+	int dx1, dy1, dx2, dy2;
 
 	if (DEBUG_BLIT_FALLBACK) {
 		fprintf(stderr, "texture blit: ");




More information about the mesa-commit mailing list