[Mesa-dev] [PATCH 4/5] r600g: Initialize VGT_PRIMITIVE_TYPE in the start_cs_cmd atom

Tom Stellard tstellar at gmail.com
Tue Jul 24 11:36:58 PDT 2012


The value of this register will always be DI_PT_POINTLIST for compute
shaders.
---
 src/gallium/drivers/r600/evergreen_compute.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c
index 3822694..b4a4e32 100644
--- a/src/gallium/drivers/r600/evergreen_compute.c
+++ b/src/gallium/drivers/r600/evergreen_compute.c
@@ -265,7 +265,6 @@ void evergreen_direct_dispatch(
 	struct evergreen_compute_resource* res = get_empty_res(shader,
 		COMPUTE_RESOURCE_DISPATCH, 0);
 
-	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);
@@ -635,6 +634,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.
-- 
1.7.7.6



More information about the mesa-dev mailing list