radv: mark RADV_DEBUG=nongg_gs as deprecated

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37145>
This commit is contained in:
Samuel Pitoiset 2025-09-02 17:42:39 +02:00 committed by Marge Bot
parent 7304423b5c
commit d98e31eab6
6 changed files with 12 additions and 7 deletions

View file

@ -1419,7 +1419,7 @@ RADV driver environment variables
``nonggc``
disable NGG culling for GFX10 and GFX10.3
``nongg_gs``
disable NGG GS for GFX10 and GFX10.3
disable NGG GS for GFX10 and GFX10.3 (deprecated)
``nort``
skip executing vkCmdTraceRays and ray queries (RT extensions will still be
advertised)

View file

@ -54,7 +54,7 @@ enum {
RADV_DEBUG_VIDEO_ARRAY_PATH = 1ull << 39,
RADV_DEBUG_NO_RT = 1ull << 40,
RADV_DEBUG_NO_MESH_SHADER = 1ull << 41,
RADV_DEBUG_NO_NGG_GS = 1ull << 42,
RADV_DEBUG_NO_NGG_GS = 1ull << 42, /* deprecated */
RADV_DEBUG_NO_ESO = 1ull << 43,
RADV_DEBUG_PSO_CACHE_STATS = 1ull << 44,
RADV_DEBUG_NIR_DEBUG_INFO = 1ull << 45,

View file

@ -229,8 +229,7 @@ radv_init_dri_options(struct radv_instance *instance)
if (driQueryOptionb(&instance->drirc.options, "radv_disable_dcc"))
instance->debug_flags |= RADV_DEBUG_NO_DCC;
if (driQueryOptionb(&instance->drirc.options, "radv_disable_ngg_gs"))
instance->debug_flags |= RADV_DEBUG_NO_NGG_GS;
instance->drirc.disable_ngg_gs = driQueryOptionb(&instance->drirc.options, "radv_disable_ngg_gs");
instance->drirc.clear_lds = driQueryOptionb(&instance->drirc.options, "radv_clear_lds");
@ -456,6 +455,12 @@ radv_CreateInstance(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationC
instance->drirc.split_fma = true;
}
if (instance->debug_flags & RADV_DEBUG_NO_NGG_GS) {
fprintf(stderr, "radv: RADV_DEBUG=nongg_gs is deprecated and will it be removed in future Mesa releases. "
"Please use radv_disable_ngg_gs=true instead.\n");
instance->drirc.disable_ngg_gs = true;
}
*pInstance = radv_instance_to_handle(instance);
return VK_SUCCESS;

View file

@ -77,6 +77,7 @@ struct radv_instance {
bool no_dynamic_bounds;
bool invariant_geom;
bool split_fma;
bool disable_ngg_gs;
char *app_layer;
uint8_t override_graphics_shader_version;
uint8_t override_compute_shader_version;

View file

@ -220,7 +220,7 @@ radv_physical_device_init_cache_key(struct radv_physical_device *pdev)
key->ge_wave32 = pdev->ge_wave_size == 32;
key->invariant_geom = instance->drirc.invariant_geom;
key->no_fmask = !!(instance->debug_flags & RADV_DEBUG_NO_FMASK);
key->no_ngg_gs = !!(instance->debug_flags & RADV_DEBUG_NO_NGG_GS);
key->no_ngg_gs = instance->drirc.disable_ngg_gs;
key->no_rt = !!(instance->debug_flags & RADV_DEBUG_NO_RT);
key->ps_wave32 = pdev->ps_wave_size == 32;
key->rt_wave64 = pdev->rt_wave_size == 64;

View file

@ -2196,7 +2196,6 @@ radv_fill_shader_info_ngg(struct radv_device *device, struct radv_shader_stage *
VkShaderStageFlagBits active_nir_stages)
{
const struct radv_physical_device *pdev = radv_device_physical(device);
const struct radv_instance *instance = radv_physical_device_instance(pdev);
if (!pdev->cache_key.use_ngg)
return;
@ -2234,7 +2233,7 @@ radv_fill_shader_info_ngg(struct radv_device *device, struct radv_shader_stage *
}
if ((last_vgt_stage && last_vgt_stage->nir->xfb_info) ||
((instance->debug_flags & RADV_DEBUG_NO_NGG_GS) && stages[MESA_SHADER_GEOMETRY].nir)) {
(pdev->cache_key.no_ngg_gs && stages[MESA_SHADER_GEOMETRY].nir)) {
/* NGG needs to be disabled on GFX10/GFX10.3 when:
* - streamout is used because NGG streamout isn't supported
* - NGG GS is explictly disabled to workaround performance issues