radv: Enable task shader feature for NV_mesh_shader.

Still hidden behind RADV_PERFTEST=nv_ms but now advertises
task shader support too.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16531>
This commit is contained in:
Timur Kristóf 2022-02-07 17:31:26 +01:00 committed by Marge Bot
parent 28db493cdc
commit 4eb7e53963
2 changed files with 18 additions and 5 deletions

View File

@ -54,3 +54,8 @@ dEQP-VK.graphicsfuzz.while-inside-switch
dEQP-VK.graphicsfuzz.spv-stable-maze-O-dead-code
dEQP-VK.graphicsfuzz.spv-stable-maze-O-memory-accesses
dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.uniform_32struct_to_16struct.uniform_buffer_block_geom
# These tests create an ACE cmdbuf which waits for GFX, thus can cause
# a deadlock when executed in parallel without gang submit.
dEQP-VK.mesh_shader.nv.synchronization.*
dEQP-VK.mesh_shader.nv.misc.many_task*

View File

@ -384,6 +384,14 @@ radv_perf_query_supported(const struct radv_physical_device *pdev)
return pdev->rad_info.gfx_level == GFX10_3 && !radv_thread_trace_enabled();
}
static bool
radv_taskmesh_enabled(const struct radv_physical_device *pdevice)
{
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_scheduled_fence_dependency;
}
#if defined(VK_USE_PLATFORM_WAYLAND_KHR) || defined(VK_USE_PLATFORM_XCB_KHR) || \
defined(VK_USE_PLATFORM_XLIB_KHR) || defined(VK_USE_PLATFORM_DISPLAY_KHR)
#define RADV_USE_WSI_PLATFORM
@ -607,10 +615,11 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device
.GOOGLE_user_type = true,
.INTEL_shader_integer_functions2 = true,
.NV_compute_shader_derivatives = true,
.NV_device_generated_commands = device->rad_info.gfx_level >= GFX7 && !(device->instance->debug_flags & RADV_DEBUG_NO_IBS) &&
.NV_device_generated_commands = device->rad_info.gfx_level >= GFX7 &&
!(device->instance->debug_flags & RADV_DEBUG_NO_IBS) &&
driQueryOptionb(&device->instance->dri_options, "radv_dgc"),
.NV_mesh_shader = device->use_ngg && device->rad_info.gfx_level >= GFX10_3 &&
device->instance->perftest_flags & RADV_PERFTEST_NV_MS && !device->use_llvm,
.NV_mesh_shader =
radv_taskmesh_enabled(device) && device->instance->perftest_flags & RADV_PERFTEST_NV_MS,
/* Undocumented extension purely for vkd3d-proton. This check is to prevent anyone else from
* using it.
*/
@ -1767,8 +1776,7 @@ radv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV: {
VkPhysicalDeviceMeshShaderFeaturesNV *features =
(VkPhysicalDeviceMeshShaderFeaturesNV *)ext;
features->meshShader = true;
features->taskShader = false; /* TODO */
features->taskShader = features->meshShader = radv_taskmesh_enabled(pdevice);
break;
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES: {