Mesa (10.1): r600g: fix buffer copying on R600-R700

Carl Worth cworth at kemper.freedesktop.org
Thu May 1 14:31:39 UTC 2014


Module: Mesa
Branch: 10.1
Commit: 25670677c3b03ca2ea79edd6f2ae3091b55825f1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=25670677c3b03ca2ea79edd6f2ae3091b55825f1

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sun Apr 20 00:53:32 2014 +0200

r600g: fix buffer copying on R600-R700

This fixes broken rendering in DOTA 2.

Cc: 10.0 10.1 mesa-stable at lists.freedesktop.org
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
(cherry picked from commit 0967970768c517c8c2f1a969e0a043982b4b1bf7)

---

 src/gallium/drivers/r600/r600_blit.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c
index 53c720b..f7ac38e 100644
--- a/src/gallium/drivers/r600/r600_blit.c
+++ b/src/gallium/drivers/r600/r600_blit.c
@@ -599,6 +599,12 @@ static void r600_copy_buffer(struct pipe_context *ctx, struct pipe_resource *dst
 	} else {
 		util_resource_copy_region(ctx, dst, 0, dstx, 0, 0, src, 0, src_box);
 	}
+
+	/* The index buffer (VGT) doesn't seem to see the result of the copying.
+	 * Can we somehow flush the index buffer cache? Starting a new IB seems
+	 * to do the trick. */
+	if (rctx->b.chip_class <= R700)
+		rctx->b.rings.gfx.flush(ctx, RADEON_FLUSH_ASYNC, NULL);
 }
 
 /**




More information about the mesa-commit mailing list