From: Marek Olšák <marek.ol...@amd.com>

Vulkan doesn't do it anymore.
---
 src/gallium/drivers/radeonsi/si_state_shaders.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c 
b/src/gallium/drivers/radeonsi/si_state_shaders.c
index fd9828f..66cd902 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -850,28 +850,24 @@ static void si_shader_vs(struct si_screen *sscreen, 
struct si_shader *shader,
                return;
 
        /* We always write VGT_GS_MODE in the VS state, because every switch
         * between different shader pipelines involving a different GS or no
         * GS at all involves a switch of the VS (different GS use different
         * copy shaders). On the other hand, when the API switches from a GS to
         * no GS and then back to the same GS used originally, the GS state is
         * 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));
                si_pm4_set_reg(pm4, R_028A84_VGT_PRIMITIVEID_EN, 
enable_prim_id);
        } else {
                si_pm4_set_reg(pm4, R_028A40_VGT_GS_MODE, si_vgt_gs_mode(gs));
                si_pm4_set_reg(pm4, R_028A84_VGT_PRIMITIVEID_EN, 0);
        }
 
        va = shader->bo->gpu_address;
-- 
2.7.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to