radeonsi: enable shader culling on Navi1x consumer SKUs as well

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13393>
This commit is contained in:
Marek Olšák 2021-10-16 12:21:30 -04:00 committed by Marge Bot
parent 8cf802e8ef
commit cbcdcd42fc
5 changed files with 2 additions and 13 deletions

View file

@ -10,7 +10,6 @@ OPT_BOOL(vs_fetch_always_opencode, false,
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(shader_culling, false, "Cull primitives in shaders when benefical (without tess and GS)")
OPT_BOOL(vrs2x2, false, "Enable 2x2 coarse shading for non-GUI elements")
OPT_BOOL(enable_sam, false, "Enable Smart Access Memory with Above 4G Decoding for unvalidated platforms.")
OPT_BOOL(disable_sam, false, "Disable Smart Access Memory.")

View file

@ -94,7 +94,6 @@ static const struct debug_named_value radeonsi_debug_options[] = {
{"nogfx", DBG(NO_GFX), "Disable graphics. Only multimedia compute paths can be used."},
{"nongg", DBG(NO_NGG), "Disable NGG and use the legacy pipeline."},
{"nggc", DBG(ALWAYS_NGG_CULLING_ALL), "Always use NGG culling even when it can hurt."},
{"nggctess", DBG(ALWAYS_NGG_CULLING_TESS), "Always use NGG culling for tessellation."},
{"nonggc", DBG(NO_NGG_CULLING), "Disable NGG culling."},
{"switch_on_eop", DBG(SWITCH_ON_EOP), "Program WD/IA to switch on end-of-packet."},
{"nooutoforder", DBG(NO_OUT_OF_ORDER), "Disable out-of-order rasterization"},

View file

@ -217,7 +217,6 @@ enum
DBG_NO_GFX,
DBG_NO_NGG,
DBG_ALWAYS_NGG_CULLING_ALL,
DBG_ALWAYS_NGG_CULLING_TESS,
DBG_NO_NGG_CULLING,
DBG_SWITCH_ON_EOP,
DBG_NO_OUT_OF_ORDER,

View file

@ -3039,17 +3039,10 @@ static void *si_create_shader_selector(struct pipe_context *ctx,
if (sel->info.stage == MESA_SHADER_VERTEX) {
if (sscreen->debug_flags & DBG(ALWAYS_NGG_CULLING_ALL))
sel->ngg_cull_vert_threshold = 0; /* always enabled */
else if (sscreen->options.shader_culling ||
sscreen->info.chip_class == GFX10_3 ||
(sscreen->info.chip_class == GFX10 &&
sscreen->info.is_pro_graphics)) {
else
sel->ngg_cull_vert_threshold = 128;
}
} else if (sel->info.stage == MESA_SHADER_TESS_EVAL) {
if (sel->rast_prim != PIPE_PRIM_POINTS &&
(sscreen->debug_flags & DBG(ALWAYS_NGG_CULLING_ALL) ||
sscreen->debug_flags & DBG(ALWAYS_NGG_CULLING_TESS) ||
sscreen->info.chip_class == GFX10_3))
if (sel->rast_prim != PIPE_PRIM_POINTS)
sel->ngg_cull_vert_threshold = 0; /* always enabled */
}
}

View file

@ -769,7 +769,6 @@ TODO: document the other workarounds.
<option name="radeonsi_sync_compile" value="true" />
<option name="radeonsi_clamp_div_by_zero" value="true" />
<option name="radeonsi_inline_uniforms" value="true" />
<option name="radeonsi_shader_culling" value="true" />
</application>
<application name="Road Redemption" executable="RoadRedemption.x86_64">
<option name="radeonsi_clamp_div_by_zero" value="true" />