radv: disable gs_fast_launch=2 by default

This currently causes severe performance problems in Remnant 2 and
Alan Wake 2.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: 28ebe62af2 ("radv: enable mesh shader gs_fast_launch=2 and multi-row export")
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10071
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26090>
This commit is contained in:
Rhys Perry
2023-11-03 15:25:48 +00:00
committed by Marge Bot
parent 6a31c7a841
commit 2011b678c5
6 changed files with 12 additions and 1 deletions

View File

@@ -1342,6 +1342,8 @@ RADV driver environment variables
enable wave64 for ray tracing shaders (GFX10+)
``video_decode``
enable experimental video decoding support
``gsfastlaunch2``
use GS_FAST_LAUNCH=2 for Mesh shaders (GFX11+)
.. envvar:: RADV_TEX_ANISO

View File

@@ -88,6 +88,7 @@ enum {
RADV_PERFTEST_RT_WAVE_64 = 1u << 10,
RADV_PERFTEST_VIDEO_DECODE = 1u << 11,
RADV_PERFTEST_DMA_SHADERS = 1u << 12,
RADV_PERFTEST_GS_FAST_LAUNCH_2 = 1u << 13,
};
bool radv_init_trace(struct radv_device *device);

View File

@@ -943,7 +943,8 @@ 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->physical_device->rad_info.gfx_level >= GFX11;
device->mesh_fast_launch_2 = (device->instance->perftest_flags & RADV_PERFTEST_GS_FAST_LAUNCH_2) &&
device->physical_device->rad_info.gfx_level >= GFX11;
/* The maximum number of scratch waves. Scratch space isn't divided
* evenly between CUs. The number is only a function of the number of CUs.

View File

@@ -99,6 +99,7 @@ static const struct debug_control radv_perftest_options[] = {{"localbos", RADV_P
{"rtwave64", RADV_PERFTEST_RT_WAVE_64},
{"video_decode", RADV_PERFTEST_VIDEO_DECODE},
{"dmashaders", RADV_PERFTEST_DMA_SHADERS},
{"gsfastlaunch2", RADV_PERFTEST_GS_FAST_LAUNCH_2},
{NULL, 0}};
const char *

View File

@@ -214,6 +214,11 @@ radv_generate_pipeline_key(const struct radv_device *device, const VkPipelineSha
key.vertex_robustness1 = 1u;
}
for (uint32_t i = 0; i < num_stages; i++) {
if (stages[i].stage == VK_SHADER_STAGE_MESH_BIT_EXT && device->mesh_fast_launch_2)
key.mesh_fast_launch_2 = 1u;
}
return key;
}

View File

@@ -99,6 +99,7 @@ struct radv_pipeline_key {
uint32_t mesh_shader_queries : 1;
uint32_t vertex_robustness1 : 1;
uint32_t mesh_fast_launch_2 : 1;
struct radv_shader_stage_key stage_info[MESA_VULKAN_SHADER_STAGES];