r600: use radeon_emit in a few more places in evergreen_compute
authorDave Airlie <airlied@redhat.com>
Wed, 6 Apr 2016 21:38:21 +0000 (22:38 +0100)
committerDave Airlie <airlied@redhat.com>
Thu, 7 Apr 2016 03:39:26 +0000 (04:39 +0100)
This is just a cleanup of the code.

Acked-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/evergreen_compute.c

index 07977b7db3ed5e2bbc36724eff32dbdbbb7a72ea..6f171487f92f8740cde9332c5b623d38c7104ab2 100644 (file)
@@ -532,14 +532,14 @@ static void compute_emit_cs(struct r600_context *rctx,
        rctx->b.flags = 0;
 
        if (rctx->b.chip_class >= CAYMAN) {
-               cs->buf[cs->cdw++] = PKT3(PKT3_EVENT_WRITE, 0, 0);
-               cs->buf[cs->cdw++] = EVENT_TYPE(EVENT_TYPE_CS_PARTIAL_FLUSH) | EVENT_INDEX(4);
+               radeon_emit(cs, PKT3(PKT3_EVENT_WRITE, 0, 0));
+               radeon_emit(cs, EVENT_TYPE(EVENT_TYPE_CS_PARTIAL_FLUSH) | EVENT_INDEX(4));
                /* DEALLOC_STATE prevents the GPU from hanging when a
                 * SURFACE_SYNC packet is emitted some time after a DISPATCH_DIRECT
                 * with any of the CB*_DEST_BASE_ENA or DB_DEST_BASE_ENA bits set.
                 */
-               cs->buf[cs->cdw++] = PKT3C(PKT3_DEALLOC_STATE, 0, 0);
-               cs->buf[cs->cdw++] = 0;
+               radeon_emit(cs, PKT3C(PKT3_DEALLOC_STATE, 0, 0));
+               radeon_emit(cs, 0);
        }
 
 #if 0