r600g: fix additional EVENT_WRITE packet
authorAlex Deucher <alexdeucher@gmail.com>
Mon, 22 Nov 2010 22:39:16 +0000 (17:39 -0500)
committerAlex Deucher <alexdeucher@gmail.com>
Mon, 22 Nov 2010 22:39:16 +0000 (17:39 -0500)
Add explicit EVENT_TYPE field

src/gallium/drivers/r600/evergreend.h
src/gallium/winsys/r600/drm/evergreen_hw_context.c

index a337916c0981de887225d8f1d17349f4e131f59d..e67254b2560bdc9177216ac58592fecc6d3f8ed4 100644 (file)
 
 #define EVENT_TYPE_ZPASS_DONE                  0x15
 #define EVENT_TYPE_CACHE_FLUSH_AND_INV_EVENT   0x16
+#define                EVENT_TYPE(x)                           ((x) << 0)
+#define                EVENT_INDEX(x)                          ((x) << 8)
+                /* 0 - any non-TS event
+                * 1 - ZPASS_DONE
+                * 2 - SAMPLE_PIPELINESTAT
+                * 3 - SAMPLE_STREAMOUTSTAT*
+                * 4 - *S_PARTIAL_FLUSH
+                * 5 - TS events
+                */
 
 #define R600_TEXEL_PITCH_ALIGNMENT_MASK        0x7
 
index b93cc650272e67851245c6f60e2f9ea9c7a9aab1..e1f163eab621ad0d7e30b62ced4c19ff73c90133 100644 (file)
@@ -855,7 +855,7 @@ void evergreen_context_draw(struct r600_context *ctx, const struct r600_draw *dr
                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 < 12; i++) {