Mesa (master): radeonsi/compute: Let the state tracker do all the flushing

Marek Olšák mareko at kemper.freedesktop.org
Fri Aug 16 23:49:15 UTC 2013


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

Author: Tom Stellard <thomas.stellard at amd.com>
Date:   Fri Aug 16 17:38:40 2013 -0400

radeonsi/compute: Let the state tracker do all the flushing

It shouldn't be necessary to call radeon_winsys::cs_flush() from
radeonsi_launch_grid(), because the state tracker is responsible for
flushing the pipeline at the appropriate time.  The current behavior is
also wrong, because radeonsi_launch_grid() submits packets to the
compute ring, but when the state tracker calls pipe->flush() everything
is submitted to the graphics ring.  This has the potential to create a
race condition.

The downside of removing this flush is that the compute dispatch packets
will be sent to the graphics ring rather than the compute ring.
In the future we will need to come up with a way to detect 'compute'
command streams and submit them to the appropriate ring.

Signed-off-by: Marek Olšák <marek.olsak at amd.com>

---

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

diff --git a/src/gallium/drivers/radeonsi/radeonsi_compute.c b/src/gallium/drivers/radeonsi/radeonsi_compute.c
index 41c72c5..10309ba 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_compute.c
+++ b/src/gallium/drivers/radeonsi/radeonsi_compute.c
@@ -230,9 +230,6 @@ static void radeonsi_launch_grid(
 	}
 #endif
 
-	rctx->ws->cs_flush(rctx->cs, RADEON_FLUSH_COMPUTE, 0);
-	rctx->ws->buffer_wait(shader->bo->buf, 0);
-
 	FREE(pm4);
 	FREE(kernel_args);
 }




More information about the mesa-commit mailing list