From 71b53020b7131a15a533e4a5eec79ba2533295f2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 29 Jul 2019 17:45:22 -0400 Subject: [PATCH] radeonsi/gfx10: simplify NGG code in si_update_shaders Reviewed-by: Samuel Pitoiset Acked-by: Pierre-Eric Pelloux-Prayer --- src/gallium/drivers/radeonsi/si_state_shaders.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) 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. */ -- 2.30.2