Module: Mesa Branch: main Commit: a97160cad8d142ebbfab139e7673ffb26c544aed URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a97160cad8d142ebbfab139e7673ffb26c544aed
Author: Samuel Pitoiset <samuel.pitoi...@gmail.com> Date: Tue Oct 31 13:41:37 2023 +0100 radv: add RADV_DEBUG=nomeshshader This option will be used to disable VK_EXT_mesh_shader in Mesa CI for GFX11 because running task shader tests in parallel can hang the GPU. Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10051 Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25969> --- docs/envvars.rst | 2 ++ src/amd/vulkan/radv_debug.h | 1 + src/amd/vulkan/radv_instance.c | 1 + src/amd/vulkan/radv_physical_device.c | 3 +++ 4 files changed, 7 insertions(+) diff --git a/docs/envvars.rst b/docs/envvars.rst index 1584cc7f3c2..763a04e70a8 100644 --- a/docs/envvars.rst +++ b/docs/envvars.rst @@ -1259,6 +1259,8 @@ RADV driver environment variables disable directly recording command buffers in GPU-visible memory ``nomemorycache`` disable memory shaders cache + ``nomeshshader`` + disable mesh shader support on GFX10.3+ ``nongg`` disable NGG for GFX10 and GFX10.3 ``nonggc`` diff --git a/src/amd/vulkan/radv_debug.h b/src/amd/vulkan/radv_debug.h index 12b5d1a9bbc..82d93f4e196 100644 --- a/src/amd/vulkan/radv_debug.h +++ b/src/amd/vulkan/radv_debug.h @@ -71,6 +71,7 @@ enum { RADV_DEBUG_NO_GPL = 1ull << 40, RADV_DEBUG_VIDEO_ARRAY_PATH = 1ull << 41, RADV_DEBUG_NO_RT = 1ull << 42, + RADV_DEBUG_NO_MESH_SHADER = 1ull << 43, }; enum { diff --git a/src/amd/vulkan/radv_instance.c b/src/amd/vulkan/radv_instance.c index 7e9a60e2929..72a2eb35c46 100644 --- a/src/amd/vulkan/radv_instance.c +++ b/src/amd/vulkan/radv_instance.c @@ -76,6 +76,7 @@ static const struct debug_control radv_debug_options[] = {{"nofastclears", RADV_ {"nogpl", RADV_DEBUG_NO_GPL}, {"videoarraypath", RADV_DEBUG_VIDEO_ARRAY_PATH}, {"nort", RADV_DEBUG_NO_RT}, + {"nomeshshader", RADV_DEBUG_NO_MESH_SHADER}, {NULL, 0}}; const char * diff --git a/src/amd/vulkan/radv_physical_device.c b/src/amd/vulkan/radv_physical_device.c index 38dcf6ce1e4..efdbb0de379 100644 --- a/src/amd/vulkan/radv_physical_device.c +++ b/src/amd/vulkan/radv_physical_device.c @@ -64,6 +64,9 @@ radv_perf_query_supported(const struct radv_physical_device *pdev) static bool radv_taskmesh_enabled(const struct radv_physical_device *pdevice) { + if (pdevice->instance->debug_flags & RADV_DEBUG_NO_MESH_SHADER) + return false; + return pdevice->use_ngg && !pdevice->use_llvm && pdevice->rad_info.gfx_level >= GFX10_3 && !(pdevice->instance->debug_flags & RADV_DEBUG_NO_COMPUTE_QUEUE) && pdevice->rad_info.has_gang_submit; }