radv: enable GS_FAST_LAUNCH=2 by default for RDNA3 APUs (Phoenix)

GS_FAST_LAUNCH=1 shouldn't be used on GFX11 but it's still needed for
dGPUs (eg. NAVI31) because it destroys performance for unknown reasons.

On RDNA3 APUs, GS_FAST_LAUNCH=2 seems to be required for working
mesh shaders and performance is fine. There is possibly a firmware bug
on APUs that would explain why GS_FAST_LAUNCH=1 doesn't work on Phoenix.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10583
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10397
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27618>
This commit is contained in:
Samuel Pitoiset
2024-02-14 16:54:50 +00:00
committed by Marge Bot
parent 0c2213cbbd
commit 6894692d27
2 changed files with 12 additions and 3 deletions

View File

@@ -1347,7 +1347,7 @@ RADV driver environment variables
``gewave32``
enable wave32 for vertex/tess/geometry shaders (GFX10+)
``gsfastlaunch2``
use GS_FAST_LAUNCH=2 for Mesh shaders (GFX11+)
use GS_FAST_LAUNCH=2 for Mesh shaders (GFX11+ dGPUs only)
``localbos``
enable local BOs
``nggc``

View File

@@ -829,8 +829,17 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr
device->pbb_allowed =
device->physical_device->rad_info.gfx_level >= GFX9 && !(device->instance->debug_flags & RADV_DEBUG_NOBINNING);
device->mesh_fast_launch_2 = (device->instance->perftest_flags & RADV_PERFTEST_GS_FAST_LAUNCH_2) &&
device->physical_device->rad_info.gfx_level >= GFX11;
/* GS_FAST_LAUNCH=2 mode is supposed to be used on GFX11 but it turns
* out it has severe impact on performance for unknown reasons (tested on
* NAVI31 dGPU). It's disabled by default.
*
* On RDNA3 APUs (Phoenix) it turns GS_FAST_LAUNCH=1 doesn't work at all,
* and using mode2 fixes everything without any performance impact.
*/
device->mesh_fast_launch_2 = ((device->instance->perftest_flags & RADV_PERFTEST_GS_FAST_LAUNCH_2) &&
device->physical_device->rad_info.gfx_level >= GFX11) ||
device->physical_device->rad_info.family == CHIP_GFX1103_R1 ||
device->physical_device->rad_info.family == CHIP_GFX1103_R2;
device->disable_trunc_coord = device->instance->drirc.disable_trunc_coord;