summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2011-04-20 13:09:09 -0400
committerAlex Deucher <[email protected]>2011-04-20 13:09:09 -0400
commitabee17057f52a1b83ab5d7897bc9299e452b5953 (patch)
tree44c70293468d9d0317aba13a2fdce0cdc6fcedae /src/gallium/winsys
parent6067a2a67f9a7aab2aee051469bea8af03747a95 (diff)
r600g: fix userspace fences again
reinstate b7617346dcff50a66a10c61b95c33682cf629c9e after the rework in 6067a2a67f9a7aab2aee051469bea8af03747a95. Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/r600/drm/r600_hw_context.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/winsys/r600/drm/r600_hw_context.c b/src/gallium/winsys/r600/drm/r600_hw_context.c
index 8e547da657c..662455be28c 100644
--- a/src/gallium/winsys/r600/drm/r600_hw_context.c
+++ b/src/gallium/winsys/r600/drm/r600_hw_context.c
@@ -1310,6 +1310,9 @@ void r600_context_flush(struct r600_context *ctx)
else
r600_context_flush_dest_caches(ctx);
+ /* partial flush is needed to avoid lockups on some chips with user fences */
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE, 0, 0);
+ ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE(EVENT_TYPE_PS_PARTIAL_FLUSH) | EVENT_INDEX(4);
/* emit fence */
ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE_EOP, 4, 0);
ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE(EVENT_TYPE_CACHE_FLUSH_AND_INV_TS_EVENT) | EVENT_INDEX(5);