From 8300378bf367609242fc6509e9a34325bcc075d1 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 31 May 2024 17:03:07 +0200 Subject: [PATCH] radv: advertise VK_EXT_device_generated_commands on GFX8+ GFX6-7 can't really support it and it's not worth the effort anyways. Signed-off-by: Samuel Pitoiset Part-of: --- docs/features.txt | 2 +- docs/relnotes/new_features.txt | 2 +- src/amd/ci/radv-skips.txt | 3 +++ src/amd/vulkan/radv_physical_device.c | 21 +++++++++++++++++++++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/docs/features.txt b/docs/features.txt index 3738b485475..52aaaa788e2 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -584,7 +584,7 @@ Khronos extensions that are not part of any Vulkan version: VK_EXT_descriptor_buffer DONE (anv, lvp, nvk, radv, tu) VK_EXT_device_address_binding_report DONE (radv, tu) VK_EXT_device_fault DONE (radv) - VK_EXT_device_generated_commands DONE (nvk/Turing+) + VK_EXT_device_generated_commands DONE (nvk/Turing+, radv/gfx8+) VK_EXT_device_memory_report DONE (vn) VK_EXT_direct_mode_display DONE (anv, lvp, nvk, radv, tu, v3dv) VK_EXT_discard_rectangles DONE (radv) diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index 1ac837b15a4..8ae834bfbb3 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -17,7 +17,7 @@ VK_KHR_shader_relaxed_extended_instruction on anv, hasvk, hk, nvk, radv, tu, v3d GL_OVR_multiview and GL_OVR_multiview2 on zink VK_KHR_shader_float_controls2 on radv VK_KHR_shader_float_controls2 on nvk -VK_EXT_device_generated_commands on nvk +VK_EXT_device_generated_commands on nvk, radv VK_EXT_host_image_copy on nvk/Turing+ VK_EXT_depth_clamp_control on anv, hasvk, nvk, radv VK_KHR_shader_quad_control on nvk diff --git a/src/amd/ci/radv-skips.txt b/src/amd/ci/radv-skips.txt index afb776082ca..93642f00c6d 100644 --- a/src/amd/ci/radv-skips.txt +++ b/src/amd/ci/radv-skips.txt @@ -48,3 +48,6 @@ dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic # Some reconvergence tests are very slow. dEQP-VK.reconvergence.(subgroup|workgroup)_uniform_control_flow_(ballot|elect).compute.nesting4.* dEQP-VK.reconvergence.maximal.compute.nesting4.7.38 + +# RADV bug +dEQP-VK.dgc.ext.misc.properties.maxIndirectSequenceCount diff --git a/src/amd/vulkan/radv_physical_device.c b/src/amd/vulkan/radv_physical_device.c index baf1ad57a9c..8873b2cefa1 100644 --- a/src/amd/vulkan/radv_physical_device.c +++ b/src/amd/vulkan/radv_physical_device.c @@ -644,6 +644,7 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device .EXT_descriptor_indexing = true, .EXT_device_address_binding_report = true, .EXT_device_fault = pdev->info.has_gpuvm_fault_query, + .EXT_device_generated_commands = pdev->info.gfx_level >= GFX8, .EXT_discard_rectangles = true, #ifdef VK_USE_PLATFORM_DISPLAY_KHR .EXT_display_control = true, @@ -1277,6 +1278,10 @@ radv_physical_device_get_features(const struct radv_physical_device *pdev, struc /* VK_EXT_depth_clamp_control */ .depthClampControl = true, + + /* VK_EXT_device_generated_commands */ + .deviceGeneratedCommands = true, + .dynamicGeneratedPipelineLayout = true, }; } @@ -1965,6 +1970,22 @@ radv_get_physical_device_properties(struct radv_physical_device *pdev) /* VK_KHR_compute_shader_derivatives */ p->meshAndTaskShaderDerivatives = radv_taskmesh_enabled(pdev); + + /* VK_EXT_device_generated_commands */ + p->maxIndirectPipelineCount = 4096; + p->maxIndirectShaderObjectCount = 4096; + p->maxIndirectSequenceCount = 1048576; + p->maxIndirectCommandsTokenCount = 128; + p->maxIndirectCommandsTokenOffset = 2047; + p->maxIndirectCommandsIndirectStride = 2048; + p->supportedIndirectCommandsInputModes = + VK_INDIRECT_COMMANDS_INPUT_MODE_VULKAN_INDEX_BUFFER_EXT | VK_INDIRECT_COMMANDS_INPUT_MODE_DXGI_INDEX_BUFFER_EXT; + p->supportedIndirectCommandsShaderStages = + RADV_GRAPHICS_STAGE_BITS | VK_SHADER_STAGE_COMPUTE_BIT | RADV_RT_STAGE_BITS; + p->supportedIndirectCommandsShaderStagesPipelineBinding = VK_SHADER_STAGE_COMPUTE_BIT; + p->supportedIndirectCommandsShaderStagesShaderBinding = 0; + p->deviceGeneratedCommandsTransformFeedback = true; + p->deviceGeneratedCommandsMultiDrawIndirectCount = true; } static VkResult