r600g: Initialize VGT_PRIMITIVE_TYPE in the start_cs_cmd atom
authorTom Stellard <thomas.stellard@amd.com>
Tue, 24 Jul 2012 14:49:25 +0000 (14:49 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Fri, 27 Jul 2012 17:08:09 +0000 (17:08 +0000)
The value of this register will always be DI_PT_POINTLIST for compute
shaders.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
src/gallium/drivers/r600/evergreen_compute.c

index 33e3243c9f9c30f1eb41a2abaa83e892704b6d41..5e43faebeb1b18a9d6cae12318737b295d9f5ff4 100644 (file)
@@ -268,8 +268,6 @@ void evergreen_direct_dispatch(
        /* Set CB_TARGET_MASK */
        evergreen_reg_set(res, R_028238_CB_TARGET_MASK, rctx->compute_cb_target_mask);
 
-       evergreen_reg_set(res, R_008958_VGT_PRIMITIVE_TYPE, V_008958_DI_PT_POINTLIST);
-
        evergreen_reg_set(res, R_00899C_VGT_COMPUTE_START_X, 0);
        evergreen_reg_set(res, R_0089A0_VGT_COMPUTE_START_Y, 0);
        evergreen_reg_set(res, R_0089A4_VGT_COMPUTE_START_Z, 0);
@@ -633,6 +631,11 @@ void evergreen_init_atom_start_compute_cs(struct r600_context *ctx)
        }
 
        /* Config Registers */
+
+       /* The primitive type always needs to be POINTLIST for compute. */
+       r600_store_config_reg(cb, R_008958_VGT_PRIMITIVE_TYPE,
+                                               V_008958_DI_PT_POINTLIST);
+
        if (ctx->chip_class < CAYMAN) {
 
                /* These registers control which simds can be used by each stage.