summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/r600/drm/r600_hw_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys/r600/drm/r600_hw_context.c')
-rw-r--r--src/gallium/winsys/r600/drm/r600_hw_context.c16
1 files changed, 4 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 b70dffabd70..71a531f535f 100644
--- a/src/gallium/winsys/r600/drm/r600_hw_context.c
+++ b/src/gallium/winsys/r600/drm/r600_hw_context.c
@@ -1062,7 +1062,7 @@ void r600_context_draw(struct r600_context *ctx, const struct r600_draw *draw)
ctx->pm4[ctx->pm4_cdwords++] = draw->vgt_draw_initiator;
}
ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE, 0);
- ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE_CACHE_FLUSH_AND_INV_EVENT;
+ ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE(EVENT_TYPE_CACHE_FLUSH_AND_INV_EVENT) | EVENT_INDEX(0);
/* flush color buffer */
for (int i = 0; i < 8; i++) {
@@ -1099,7 +1099,7 @@ void r600_context_flush(struct r600_context *ctx)
/* emit fence */
ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE_EOP, 4);
- ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE_CACHE_FLUSH_AND_INV_TS_EVENT | (5 << 8);
+ ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE(EVENT_TYPE_CACHE_FLUSH_AND_INV_TS_EVENT) | EVENT_INDEX(5);
ctx->pm4[ctx->pm4_cdwords++] = 0;
ctx->pm4[ctx->pm4_cdwords++] = (1 << 29) | (0 << 24);
ctx->pm4[ctx->pm4_cdwords++] = ctx->fence;
@@ -1279,11 +1279,7 @@ void r600_query_begin(struct r600_context *ctx, struct r600_query *query)
/* emit begin query */
ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE, 2);
- if (ctx->radeon->chip_class == EVERGREEN) {
- ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE_ZPASS_DONE | EG_EVENT_INDEX(1);
- } else {
- ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE_ZPASS_DONE;
- }
+ ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE(EVENT_TYPE_ZPASS_DONE) | EVENT_INDEX(1);
ctx->pm4[ctx->pm4_cdwords++] = query->num_results + r600_bo_offset(query->buffer);
ctx->pm4[ctx->pm4_cdwords++] = 0;
ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_NOP, 0);
@@ -1299,11 +1295,7 @@ void r600_query_end(struct r600_context *ctx, struct r600_query *query)
{
/* emit begin query */
ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE, 2);
- if (ctx->radeon->chip_class == EVERGREEN) {
- ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE_ZPASS_DONE | EG_EVENT_INDEX(1);
- } else {
- ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE_ZPASS_DONE;
- }
+ ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE(EVENT_TYPE_ZPASS_DONE) | EVENT_INDEX(1);
ctx->pm4[ctx->pm4_cdwords++] = query->num_results + 8 + r600_bo_offset(query->buffer);
ctx->pm4[ctx->pm4_cdwords++] = 0;
ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_NOP, 0);