From: Marek Olšák Date: Tue, 17 Dec 2019 02:05:05 +0000 (-0500) Subject: radeonsi/gfx10: improve performance for TES using PrimID but not exporting it X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e79f55ff8660b8160ccbe0566f8ed1726095edcd;p=mesa.git radeonsi/gfx10: improve performance for TES using PrimID but not exporting it This field is really for the primitive export to the pixel shader. Acked-by: Pierre-Eric Pelloux-Prayer --- diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 6fa9c37bf86..941a397525e 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -1202,7 +1202,8 @@ static void gfx10_shader_ngg(struct si_screen *sscreen, struct si_shader *shader shader->ctx_reg.ngg.vgt_primitiveid_en = S_028A84_PRIMITIVEID_EN(es_enable_prim_id) | - S_028A84_NGG_DISABLE_PROVOK_REUSE(es_enable_prim_id); + S_028A84_NGG_DISABLE_PROVOK_REUSE(shader->key.mono.u.vs_export_prim_id || + gs_sel->info.writes_primid); if (gs_type == PIPE_SHADER_GEOMETRY) { shader->ctx_reg.ngg.vgt_esgs_ring_itemsize = es_sel->esgs_itemsize / 4;