radeonsi/gfx10: simplify NGG code in si_update_shaders
authorMarek Olšák <marek.olsak@amd.com>
Mon, 29 Jul 2019 21:45:22 +0000 (17:45 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 6 Aug 2019 21:08:53 +0000 (17:08 -0400)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
src/gallium/drivers/radeonsi/si_state_shaders.c

index cb5f78ba23fb397694d99133967cfbe46344506e..30ff33b56c37828d28f1c641861fdaaca8e3c76c 100644 (file)
@@ -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. */