radeonsi/gfx9: don't use GS scenario A for VS writing ViewportIndex
authorMarek Olšák <marek.olsak@amd.com>
Fri, 18 Aug 2017 22:01:18 +0000 (00:01 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 22 Aug 2017 11:29:47 +0000 (13:29 +0200)
Vulkan doesn't do it anymore.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_state_shaders.c

index 45b321b0a61a718f996ccfcf819570f62ed478c3..28c2f11c8a7a8eafb321b47281a8e9ce597fe214 100644 (file)
@@ -857,14 +857,10 @@ static void si_shader_vs(struct si_screen *sscreen, struct si_shader *shader,
         * not sent again.
         */
        if (!gs) {
-               unsigned mode = 0;
+               unsigned mode = V_028A40_GS_OFF;
 
-               /* PrimID needs GS scenario A.
-                * GFX9 also needs it when ViewportIndex is enabled.
-                */
-               if (enable_prim_id ||
-                   (sscreen->b.chip_class >= GFX9 &&
-                    shader->selector->info.writes_viewport_index))
+               /* PrimID needs GS scenario A. */
+               if (enable_prim_id)
                        mode = V_028A40_GS_SCENARIO_A;
 
                si_pm4_set_reg(pm4, R_028A40_VGT_GS_MODE, S_028A40_MODE(mode));