radeonsi: remove the prim_restart_tri_strips_only option
authorMarek Olšák <marek.olsak@amd.com>
Sun, 14 Aug 2022 07:43:54 +0000 (03:43 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 30 Aug 2022 04:57:43 +0000 (04:57 +0000)
Not used enough, no difference in performance for Dirt Rally on 6800.
Move the variable down.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195>

src/gallium/drivers/radeonsi/si_debug_options.h
src/gallium/drivers/radeonsi/si_state_draw.cpp
src/util/00-mesa-defaults.conf

index a598bdd..a01da8c 100644 (file)
@@ -7,7 +7,6 @@ OPT_BOOL(debug_disassembly, false,
 OPT_BOOL(halt_shaders, false, "Halt shaders at the start (will hang)")
 OPT_BOOL(vs_fetch_always_opencode, false,
          "Always open code vertex fetches (less efficient, purely for testing)")
-OPT_BOOL(prim_restart_tri_strips_only, false, "Only enable primitive restart for triangle strips")
 OPT_BOOL(no_infinite_interp, false, "Kill PS with infinite interp coeff")
 OPT_BOOL(clamp_div_by_zero, false, "Clamp div by zero (x / 0 becomes FLT_MAX instead of NaN)")
 OPT_BOOL(vrs2x2, false, "Enable 2x2 coarse shading for non-GUI elements")
index 9e2573c..89ac7e9 100644 (file)
@@ -1374,9 +1374,6 @@ static void si_emit_draw_registers(struct si_context *sctx,
    struct radeon_cmdbuf *cs = &sctx->gfx_cs;
    unsigned num_patches = HAS_TESS ? sctx->num_patches_per_workgroup : 0;
 
-   if (IS_DRAW_VERTEX_STATE)
-      primitive_restart = false;
-
    if (GFX_VERSION >= GFX10)
       gfx10_emit_ge_cntl<GFX_VERSION, HAS_TESS, HAS_GS, NGG>(sctx, num_patches);
    else
@@ -2343,11 +2340,6 @@ static void si_draw(struct pipe_context *ctx,
       }
    }
 
-   bool primitive_restart =
-      info->primitive_restart &&
-      (!sctx->screen->options.prim_restart_tri_strips_only ||
-       (prim != PIPE_PRIM_TRIANGLE_STRIP && prim != PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY));
-
    /* Set the rasterization primitive type.
     *
     * This must be done after si_decompress_textures, which can call
@@ -2488,6 +2480,8 @@ static void si_draw(struct pipe_context *ctx,
          sctx->context_roll = true;
    }
 
+   bool primitive_restart = !IS_DRAW_VERTEX_STATE && info->primitive_restart;
+
    /* Use optimal packet order based on whether we need to sync the pipeline. */
    if (unlikely(sctx->flags & (SI_CONTEXT_FLUSH_AND_INV_CB | SI_CONTEXT_FLUSH_AND_INV_DB |
                                SI_CONTEXT_PS_PARTIAL_FLUSH | SI_CONTEXT_CS_PARTIAL_FLUSH |
index 8fd2b36..293971b 100644 (file)
@@ -834,9 +834,6 @@ TODO: document the other workarounds.
         <application name="Rocket League" executable="RocketLeague">
             <option name="radeonsi_zerovram" value="true" />
         </application>
-        <application name="DiRT Rally" executable="DirtRally">
-            <option name="radeonsi_prim_restart_tri_strips_only" value="true"/>
-        </application>
         <application name="Gfx Bench" executable="gfxbench_gl">
             <!-- Helps offscreen tests -->
             <option name="mesa_glthread" value="true"/>