From 5c5735fd68168fd1e80d474df84dc819d7a1ad24 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 20 Sep 2022 14:05:39 +0200 Subject: [PATCH] radv: advertise VK_EXT_descriptor_buffer Pass dEQP-VK.*descriptor_buffer*. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- docs/features.txt | 1 + docs/relnotes/new_features.txt | 1 + src/amd/vulkan/radv_device.c | 48 ++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) diff --git a/docs/features.txt b/docs/features.txt index 66132bc75a6..6830b96e87d 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -547,6 +547,7 @@ Khronos extensions that are not part of any Vulkan version: VK_EXT_depth_clip_control DONE (anv, lvp, radv, tu, v3dv, vn) VK_EXT_depth_clip_enable DONE (anv, lvp, radv, tu, vn) VK_EXT_depth_range_unrestricted DONE (radv, lvp) + VK_EXT_descriptor_buffer DONE (radv) VK_EXT_discard_rectangles DONE (radv) VK_EXT_display_control DONE (anv, radv, tu) VK_EXT_extended_dynamic_state3 DONE (lvp, radv, tu) diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index e69de29bb2d..23bdb235663 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -0,0 +1 @@ +VK_EXT_descriptor_buffer on RADV diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index c7f2b051655..d8c87c3acb3 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -566,6 +566,7 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device .EXT_depth_clip_control = true, .EXT_depth_clip_enable = true, .EXT_depth_range_unrestricted = true, + .EXT_descriptor_buffer = true, .EXT_descriptor_indexing = true, .EXT_discard_rectangles = true, #ifdef VK_USE_PLATFORM_DISPLAY_KHR @@ -1939,6 +1940,15 @@ radv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, features->extendedDynamicState3ShadingRateImageEnable = false; break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT: { + VkPhysicalDeviceDescriptorBufferFeaturesEXT *features = + (VkPhysicalDeviceDescriptorBufferFeaturesEXT *)ext; + features->descriptorBuffer = true; + features->descriptorBufferCaptureReplay = false; + features->descriptorBufferImageLayoutIgnored = true; + features->descriptorBufferPushDescriptors = true; + break; + } default: break; } @@ -2726,6 +2736,44 @@ radv_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, properties->dynamicPrimitiveTopologyUnrestricted = false; break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT: { + VkPhysicalDeviceDescriptorBufferPropertiesEXT *properties = + (VkPhysicalDeviceDescriptorBufferPropertiesEXT *)ext; + properties->combinedImageSamplerDescriptorSingleArray = true; + properties->bufferlessPushDescriptors = true; + properties->allowSamplerImageViewPostSubmitCreation = false; + properties->descriptorBufferOffsetAlignment = 4; + properties->maxDescriptorBufferBindings = MAX_SETS; + properties->maxResourceDescriptorBufferBindings = MAX_SETS; + properties->maxSamplerDescriptorBufferBindings = MAX_SETS; + properties->maxEmbeddedImmutableSamplerBindings = MAX_SETS; + properties->maxEmbeddedImmutableSamplers = radv_max_descriptor_set_size(); + properties->bufferCaptureReplayDescriptorDataSize = 0; + properties->imageCaptureReplayDescriptorDataSize = 0; + properties->imageViewCaptureReplayDescriptorDataSize = 0; + properties->samplerCaptureReplayDescriptorDataSize = 0; + properties->accelerationStructureCaptureReplayDescriptorDataSize = 0; + properties->samplerDescriptorSize = 16; + properties->combinedImageSamplerDescriptorSize = 96; + properties->sampledImageDescriptorSize = 64; + properties->storageImageDescriptorSize = 32; + properties->uniformTexelBufferDescriptorSize = 16; + properties->robustUniformTexelBufferDescriptorSize = 16; + properties->storageTexelBufferDescriptorSize = 16; + properties->robustStorageTexelBufferDescriptorSize = 16; + properties->uniformBufferDescriptorSize = 16; + properties->robustUniformBufferDescriptorSize = 16; + properties->storageBufferDescriptorSize = 16; + properties->robustStorageBufferDescriptorSize = 16; + properties->inputAttachmentDescriptorSize = 64; + properties->accelerationStructureDescriptorSize = 16; + properties->maxSamplerDescriptorBufferRange = UINT32_MAX; + properties->maxResourceDescriptorBufferRange = UINT32_MAX; + properties->samplerDescriptorBufferAddressSpaceSize = RADV_MAX_MEMORY_ALLOCATION_SIZE; + properties->resourceDescriptorBufferAddressSpaceSize = RADV_MAX_MEMORY_ALLOCATION_SIZE; + properties->descriptorBufferAddressSpaceSize = RADV_MAX_MEMORY_ALLOCATION_SIZE; + break; + } default: break; }