summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/evergreen_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_state.c')
-rw-r--r--src/gallium/drivers/r600/evergreen_state.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index e6aa12228f9..c206c08c9c9 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -2725,7 +2725,7 @@ static void evergreen_emit_shader_stages(struct r600_context *rctx, struct r600_
struct radeon_winsys_cs *cs = rctx->b.rings.gfx.cs;
struct r600_shader_stages_state *state = (struct r600_shader_stages_state*)a;
- uint32_t v = 0, v2 = 0;
+ uint32_t v = 0, v2 = 0, primid = 0;
if (state->geom_enable) {
v = S_028B54_ES_EN(V_028B54_ES_STAGE_REAL) |
@@ -2734,10 +2734,14 @@ static void evergreen_emit_shader_stages(struct r600_context *rctx, struct r600_
v2 = S_028A40_MODE(V_028A40_GS_SCENARIO_G) |
S_028A40_CUT_MODE(V_028A40_GS_CUT_128);
+
+ if (rctx->gs_shader->current->shader.gs_prim_id_input)
+ primid = 1;
}
r600_write_context_reg(cs, R_028B54_VGT_SHADER_STAGES_EN, v);
r600_write_context_reg(cs, R_028A40_VGT_GS_MODE, v2);
+ r600_write_context_reg(cs, R_028A84_VGT_PRIMITIVEID_EN, primid);
}
static void evergreen_emit_gs_rings(struct r600_context *rctx, struct r600_atom *a)