r600g: fix buffer copying on R600-R700
authorMarek Olšák <marek.olsak@amd.com>
Sat, 19 Apr 2014 22:53:32 +0000 (00:53 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 24 Apr 2014 23:33:12 +0000 (01:33 +0200)
This fixes broken rendering in DOTA 2.

Cc: 10.0 10.1 mesa-stable@lists.freedesktop.org
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/r600/r600_blit.c

index 98c07b5afdbd88f7caf9e3b94372bcb043366c5a..1a2a911263184d34332b7781b65dc81a4a597f89 100644 (file)
@@ -500,6 +500,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);
 }
 
 /**