summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-08-10 00:52:21 +0200
committerMarek Olšák <[email protected]>2015-08-13 01:25:26 +0200
commit8e11be0ddb0920633c5fab8d6a6460b7591a2627 (patch)
treed534f9c8c97a6afb5d014378410c43a54f14e62b /src/gallium/drivers
parentbdc564b942ba292a897ea0d7d37f4bcafc236129 (diff)
radeonsi: move VGT_GS_MODE to the VS state
The VS will want to select GS scenario A here (VS with PrimitiveID). Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 475aea1f46d..a6480b330cd 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -314,6 +314,12 @@ static void si_shader_vs(struct si_shader *shader)
if (pm4 == NULL)
return;
+ /* If this is the GS copy shader, the GS state writes this register.
+ * Otherwise, the VS state writes it.
+ */
+ if (!shader->is_gs_copy_shader)
+ si_pm4_set_reg(pm4, R_028A40_VGT_GS_MODE, 0);
+
va = shader->bo->gpu_address;
si_pm4_add_bo(pm4, shader->bo, RADEON_USAGE_READ, RADEON_PRIO_SHADER_DATA);
@@ -1287,8 +1293,6 @@ static void si_update_vgt_shader_config(struct si_context *sctx)
}
si_pm4_set_reg(*pm4, R_028B54_VGT_SHADER_STAGES_EN, stages);
- if (!sctx->gs_shader)
- si_pm4_set_reg(*pm4, R_028A40_VGT_GS_MODE, 0);
}
si_pm4_bind_state(sctx, vgt_shader_config, *pm4);
}