From 03554f18b31bd954867354a3354728e39635b8ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= Date: Tue, 28 May 2024 13:05:20 +0200 Subject: [PATCH] v3dv/device: set DescriptorUpdateAfterBind limits We were exposing them as zero, as based on just the name, we assumed that it was about the descriptors using the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit. But from spec, that limit takes into account descriptors created *with or without*, so for example: "maxPerStageDescriptorUpdateAfterBindUniformBuffers is similar to maxPerStageDescriptorUniformBuffers but counts descriptors from descriptor sets created with or without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set." As we don't support the feature, those limits are the same of the existing without the DescriptorUpdateAfterBind. Reviewed-by: Iago Toral Quiroga Part-of: --- src/broadcom/vulkan/v3dv_device.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c index e4a9c506e6b..c5d03dfb38f 100644 --- a/src/broadcom/vulkan/v3dv_device.c +++ b/src/broadcom/vulkan/v3dv_device.c @@ -1088,6 +1088,27 @@ get_device_properties(const struct v3dv_physical_device *device, .shaderRoundingModeRTZFloat32 = false, .shaderRoundingModeRTZFloat64 = false, + .maxPerStageDescriptorUpdateAfterBindSamplers = V3D_MAX_TEXTURE_SAMPLERS, + .maxPerStageDescriptorUpdateAfterBindUniformBuffers = MAX_UNIFORM_BUFFERS, + .maxPerStageDescriptorUpdateAfterBindStorageBuffers = MAX_STORAGE_BUFFERS, + .maxPerStageDescriptorUpdateAfterBindSampledImages = MAX_SAMPLED_IMAGES, + .maxPerStageDescriptorUpdateAfterBindStorageImages = MAX_STORAGE_IMAGES, + .maxPerStageDescriptorUpdateAfterBindInputAttachments = MAX_INPUT_ATTACHMENTS, + .maxPerStageUpdateAfterBindResources = max_per_stage_resources, + .maxDescriptorSetUpdateAfterBindSamplers = + V3DV_SUPPORTED_SHADER_STAGES * V3D_MAX_TEXTURE_SAMPLERS, + .maxDescriptorSetUpdateAfterBindUniformBuffers = + V3DV_SUPPORTED_SHADER_STAGES * MAX_UNIFORM_BUFFERS, + .maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = MAX_DYNAMIC_UNIFORM_BUFFERS, + .maxDescriptorSetUpdateAfterBindStorageBuffers = + V3DV_SUPPORTED_SHADER_STAGES * MAX_STORAGE_BUFFERS, + .maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = MAX_DYNAMIC_UNIFORM_BUFFERS, + .maxDescriptorSetUpdateAfterBindSampledImages = + V3DV_SUPPORTED_SHADER_STAGES * MAX_SAMPLED_IMAGES, + .maxDescriptorSetUpdateAfterBindStorageImages = + V3DV_SUPPORTED_SHADER_STAGES * MAX_STORAGE_IMAGES, + .maxDescriptorSetUpdateAfterBindInputAttachments = MAX_INPUT_ATTACHMENTS, + /* V3D doesn't support min/max filtering */ .filterMinmaxSingleComponentFormats = false, .filterMinmaxImageComponentMapping = false,