summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2011-05-05 18:45:55 -0400
committerAlex Deucher <[email protected]>2011-05-05 18:45:55 -0400
commitbf7a3ddca6fcc73eebdd9afdc45a485b38477bd9 (patch)
tree54816c4a8d67f0f8ac6f5ed1d17fec301a707aaa /src
parent5066f7cd0e010db46b42f8f08a33c10cb34f8726 (diff)
r600g: further r6xx cache flush fixes
Don't emit sync packets for additional CBs or DB. Spotted by Fredrik Höglund. Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/winsys/r600/drm/r600_hw_context.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/gallium/winsys/r600/drm/r600_hw_context.c b/src/gallium/winsys/r600/drm/r600_hw_context.c
index ff99143485b..24538825273 100644
--- a/src/gallium/winsys/r600/drm/r600_hw_context.c
+++ b/src/gallium/winsys/r600/drm/r600_hw_context.c
@@ -797,7 +797,6 @@ void r600_context_bo_flush(struct r600_context *ctx, unsigned flush_flags,
unsigned flush_mask, struct r600_bo *rbo)
{
struct radeon_bo *bo;
- boolean use_event_flush = FALSE;
bo = rbo->bo;
/* if bo has already been flushed */
@@ -808,17 +807,16 @@ void r600_context_bo_flush(struct r600_context *ctx, unsigned flush_flags,
if ((ctx->radeon->family < CHIP_RV770) &&
(G_0085F0_CB_ACTION_ENA(flush_flags) ||
- G_0085F0_DB_ACTION_ENA(flush_flags)))
- use_event_flush = TRUE;
-
- if (use_event_flush && (ctx->flags & R600_CONTEXT_CHECK_EVENT_FLUSH)) {
- /* the rv670 seems to fail fbo-generatemipmap unless we flush the CB1 dest base ena */
- if (ctx->radeon->family == CHIP_RV670)
- r600_context_flush_all(ctx, S_0085F0_CB1_DEST_BASE_ENA(1));
-
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE, 0, ctx->predicate_drawing);
- ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE(EVENT_TYPE_CACHE_FLUSH_AND_INV_EVENT) | EVENT_INDEX(0);
- ctx->flags &= ~R600_CONTEXT_CHECK_EVENT_FLUSH;
+ G_0085F0_DB_ACTION_ENA(flush_flags))) {
+ if (ctx->flags & R600_CONTEXT_CHECK_EVENT_FLUSH) {
+ /* the rv670 seems to fail fbo-generatemipmap unless we flush the CB1 dest base ena */
+ if (ctx->radeon->family == CHIP_RV670)
+ r600_context_flush_all(ctx, S_0085F0_CB1_DEST_BASE_ENA(1));
+
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE, 0, ctx->predicate_drawing);
+ ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE(EVENT_TYPE_CACHE_FLUSH_AND_INV_EVENT) | EVENT_INDEX(0);
+ ctx->flags &= ~R600_CONTEXT_CHECK_EVENT_FLUSH;
+ }
} else {
ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_SURFACE_SYNC, 3, ctx->predicate_drawing);
ctx->pm4[ctx->pm4_cdwords++] = flush_flags;