From: Marek Olšák Date: Mon, 29 Jul 2019 21:45:22 +0000 (-0400) Subject: radeonsi/gfx10: simplify NGG code in si_update_shaders X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=71b53020b7131a15a533e4a5eec79ba2533295f2;p=mesa.git radeonsi/gfx10: simplify NGG code in si_update_shaders Reviewed-by: Samuel Pitoiset 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 cb5f78ba23f..30ff33b56c3 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -3842,15 +3842,9 @@ bool si_update_shaders(struct si_context *sctx) if (sctx->gs_shader.cso) key.u.gs = 1; - if (sctx->chip_class >= GFX10) { - key.u.ngg = sctx->ngg; - - if (sctx->gs_shader.cso) - key.u.streamout = !!sctx->gs_shader.cso->so.num_outputs; - else if (sctx->tes_shader.cso) - key.u.streamout = !!sctx->tes_shader.cso->so.num_outputs; - else - key.u.streamout = !!sctx->vs_shader.cso->so.num_outputs; + if (sctx->ngg) { + key.u.ngg = 1; + key.u.streamout = !!si_get_vs(sctx)->cso->so.num_outputs; } /* Update TCS and TES. */