Mesa (master): r600g: fix s3tc-texsubimage

Dave Airlie airlied at kemper.freedesktop.org
Wed Feb 16 05:53:46 UTC 2011


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

Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Feb 16 15:56:11 2011 +1000

r600g: fix s3tc-texsubimage

we need to translate the destination box as well.

fixes piglit's s3tc-texsubimage test.

Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/gallium/drivers/r600/r600_blit.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c
index 6687d09..06375f7 100644
--- a/src/gallium/drivers/r600/r600_blit.c
+++ b/src/gallium/drivers/r600/r600_blit.c
@@ -285,6 +285,9 @@ static void r600_resource_copy_region(struct pipe_context *ctx,
 	if (util_format_is_s3tc(dst->format)) {
 		r600_s3tc_to_blittable(dst, dst_level, &orig_info[1]);
 		restore_orig[1] = TRUE;
+		/* translate the dst box as well */
+		dstx = util_format_get_nblocksx(orig_info[1].format, dstx);
+		dsty = util_format_get_nblocksx(orig_info[1].format, dsty);
 	}
 
 	r600_hw_copy_region(ctx, dst, dst_level, dstx, dsty, dstz,




More information about the mesa-commit mailing list