diff options
author | Nicolai Hähnle <[email protected]> | 2017-05-03 10:02:59 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-05-08 17:42:17 +0200 |
commit | b84b631c6381d9b36bca5d0e7cc67dd23af188c1 (patch) | |
tree | e51632e36de7cad77d0ac18821c7ec97f49aca13 /src/gallium/drivers/radeonsi | |
parent | 0549ea15ec380f3ca6df76ce53ff4c30bfc21dbf (diff) |
radeonsi: load patch_id for TES-as-ES when exporting for PS
For some reason, this change is only necessary on SI.
Cc: [email protected]
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_shaders.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 9138706acd0..cc61643144a 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -843,7 +843,7 @@ static void si_shader_vs(struct si_screen *sscreen, struct si_shader *shader, unsigned oc_lds_en; unsigned window_space = shader->selector->info.properties[TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION]; - bool enable_prim_id = shader->key.mono.vs_export_prim_id; + bool enable_prim_id = shader->key.mono.vs_export_prim_id || shader->selector->info.uses_primid; pm4 = si_get_shader_pm4_state(shader); if (!pm4) @@ -888,7 +888,7 @@ static void si_shader_vs(struct si_screen *sscreen, struct si_shader *shader, vgpr_comp_cnt = enable_prim_id ? 2 : (shader->info.uses_instanceid ? 1 : 0); num_user_sgprs = SI_VS_NUM_USER_SGPR; } else if (shader->selector->type == PIPE_SHADER_TESS_EVAL) { - vgpr_comp_cnt = shader->selector->info.uses_primid ? 3 : 2; + vgpr_comp_cnt = enable_prim_id ? 3 : 2; num_user_sgprs = SI_TES_NUM_USER_SGPR; } else unreachable("invalid shader selector type"); |