radv: advertise VK_KHR_copy_memory_indirect on GFX8+

GFX6-7 don't support indirect unaligned dispatches.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37634>
This commit is contained in:
Samuel Pitoiset 2024-10-04 13:53:28 +02:00 committed by Marge Bot
parent 99b3f4c7ab
commit f65290f6f9
3 changed files with 16 additions and 2 deletions

View file

@ -540,7 +540,7 @@ Khronos extensions that are not part of any Vulkan version:
VK_KHR_calibrated_timestamps DONE (anv, hk, kk, nvk, panvk/v10+, radv, tu/a750+, vn)
VK_KHR_compute_shader_derivatives DONE (anv, lvp, nvk, radv, tu, vn)
VK_KHR_cooperative_matrix DONE (anv, nvk/Turing+, radv/gfx11+, vn)
VK_KHR_copy_memory_indirect DONE (nvk)
VK_KHR_copy_memory_indirect DONE (nvk, radv/gfx8+)
VK_KHR_depth_clamp_zero_one DONE (anv, nvk, panvk, radv, tu, vn)
VK_KHR_deferred_host_operations DONE (anv, hasvk, lvp, radv, tu, vn)
VK_KHR_display DONE (anv, nvk, panvk, pvr, radv, tu, v3dv, vn)

View file

@ -14,7 +14,7 @@ VK_EXT_zero_initialize_device_memory on panvk
GL_EXT_shader_image_load_store on panfrost
VK_KHR_swapchain_mutable_format on panvk
VK_EXT_astc_decode_mode on panvk
VK_KHR_copy_memory_indirect on nvk
VK_KHR_copy_memory_indirect on nvk, RADV/GFX8+
VK_EXT_color_write_enable on panvk
VK_EXT_image_view_min_lod on panvk
VK_EXT_depth_clamp_control on panvk

View file

@ -630,6 +630,7 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device
.KHR_bind_memory2 = true,
.KHR_buffer_device_address = true,
.KHR_copy_commands2 = true,
.KHR_copy_memory_indirect = pdev->info.gfx_level >= GFX8,
.KHR_create_renderpass2 = true,
.KHR_dedicated_allocation = true,
.KHR_deferred_host_operations = true,
@ -1526,6 +1527,10 @@ radv_physical_device_get_features(const struct radv_physical_device *pdev, struc
.shaderMixedFloatDotProductFloat16AccFloat16 = pdev->info.gfx_level >= GFX11,
.shaderMixedFloatDotProductBFloat16Acc = radv_bfloat16_enabled(pdev),
.shaderMixedFloatDotProductFloat8AccFloat32 = pdev->info.gfx_level >= GFX12,
/* VK_KHR_copy_memory_indirect */
.indirectMemoryCopy = pdev->info.gfx_level >= GFX8,
.indirectMemoryToImageCopy = pdev->info.gfx_level >= GFX8,
};
}
@ -1645,6 +1650,12 @@ radv_get_physical_device_properties(struct radv_physical_device *pdev)
radv_init_image_properties(pdev);
VkQueueFlags copy_memory_indirect_queues = 0;
if (radv_graphics_queue_enabled(pdev))
copy_memory_indirect_queues |= VK_QUEUE_GRAPHICS_BIT;
if (radv_compute_queue_enabled(pdev))
copy_memory_indirect_queues |= VK_QUEUE_COMPUTE_BIT;
pdev->vk.properties = (struct vk_properties){
#ifdef ANDROID_STRICT
.apiVersion = RADV_API_VERSION,
@ -2210,6 +2221,9 @@ radv_get_physical_device_properties(struct radv_physical_device *pdev)
.rgba4OpaqueBlackSwizzled = true,
.resolveSrgbFormatAppliesTransferFunction = true,
.resolveSrgbFormatSupportsTransferFunctionControl = true,
/* VK_KHR_copy_memory_indirect */
.supportedQueues = copy_memory_indirect_queues,
};
struct vk_properties *p = &pdev->vk.properties;