radv: always enable NGG on GFX11

The legacy path is removed.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419>
This commit is contained in:
Bas Nieuwenhuizen 2022-05-04 21:44:18 +02:00 committed by Marge Bot
parent 278e533ec9
commit eb117a4711
3 changed files with 10 additions and 3 deletions

View File

@ -668,7 +668,7 @@ RADV driver environment variables
``nomemorycache``
disable memory shaders cache
``nongg``
disable NGG for GFX10+
disable NGG for GFX10 and GFX10.3
``nonggc``
disable NGG culling on GPUs where it's enabled by default (GFX10.3+ only).
``nooutoforder``

View File

@ -743,9 +743,10 @@ radv_physical_device_try_create(struct radv_instance *instance, drmDevicePtr drm
device->dcc_msaa_allowed = (device->instance->perftest_flags & RADV_PERFTEST_DCC_MSAA);
device->use_ngg = device->rad_info.gfx_level >= GFX10 &&
device->use_ngg = (device->rad_info.gfx_level >= GFX10 &&
device->rad_info.family != CHIP_NAVI14 &&
!(device->instance->debug_flags & RADV_DEBUG_NO_NGG);
!(device->instance->debug_flags & RADV_DEBUG_NO_NGG)) ||
device->rad_info.gfx_level >= GFX11;
device->use_ngg_culling = device->use_ngg && device->rad_info.max_render_backends > 1 &&
(device->rad_info.gfx_level >= GFX10_3 ||

View File

@ -3284,6 +3284,9 @@ radv_fill_shader_info(struct radv_pipeline *pipeline,
* might hang.
*/
stages[MESA_SHADER_TESS_EVAL].info.is_ngg = false;
/* GFX11+ requires NGG. */
assert(pipeline->device->physical_device->rad_info.gfx_level < GFX11);
}
gl_shader_stage last_xfb_stage = MESA_SHADER_VERTEX;
@ -3297,6 +3300,9 @@ radv_fill_shader_info(struct radv_pipeline *pipeline,
radv_nir_stage_uses_xfb(stages[last_xfb_stage].nir);
if (!device->physical_device->use_ngg_streamout && uses_xfb) {
/* GFX11+ requires NGG. */
assert(pipeline->device->physical_device->rad_info.gfx_level < GFX11);
if (stages[MESA_SHADER_TESS_CTRL].nir)
stages[MESA_SHADER_TESS_EVAL].info.is_ngg = false;
else