v3dv/device: compute maxDescriptorSet*Limits multiplying per-stage by 4
We were multiplying it by 6, that is the number of possible shader stages, but from spec it points that we need to multiply by the number of supported shader stages. From Vulkan 1.3 spec, chapter 33, "Limits", note 8 on Table 33 "Required Limits": "The minimum maxDescriptorSet* limit is n times the corresponding specification minimum maxPerStageDescriptor* limit, where n is the number of shader stages supported by the VkPhysicalDevice. If all shader stages are supported, n = 6 (vertex, tessellation control, tessellation evaluation, geometry, fragment, compute)." Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29430>
This commit is contained in:

committed by
Marge Bot

parent
3f3c83a6b7
commit
d6ac631c43
@@ -829,6 +829,8 @@ get_device_properties(const struct v3dv_physical_device *device,
|
||||
|
||||
const uint32_t max_varying_components = 16 * 4;
|
||||
|
||||
const uint32_t max_per_stage_resources = 128;
|
||||
|
||||
const float v3d_point_line_granularity = 2.0f / (1 << V3D_COORD_SHIFT);
|
||||
const uint32_t max_fb_size = V3D_MAX_IMAGE_DIMENSION;
|
||||
|
||||
@@ -908,19 +910,20 @@ get_device_properties(const struct v3dv_physical_device *device,
|
||||
.maxPerStageDescriptorSampledImages = MAX_SAMPLED_IMAGES,
|
||||
.maxPerStageDescriptorStorageImages = MAX_STORAGE_IMAGES,
|
||||
.maxPerStageDescriptorInputAttachments = MAX_INPUT_ATTACHMENTS,
|
||||
.maxPerStageResources = 128,
|
||||
.maxPerStageResources = max_per_stage_resources,
|
||||
|
||||
/* Some of these limits are multiplied by 6 because they need to
|
||||
* include all possible shader stages (even if not supported). See
|
||||
* 'Required Limits' table in the Vulkan spec.
|
||||
*/
|
||||
.maxDescriptorSetSamplers = 6 * V3D_MAX_TEXTURE_SAMPLERS,
|
||||
.maxDescriptorSetUniformBuffers = 6 * MAX_UNIFORM_BUFFERS,
|
||||
.maxDescriptorSetSamplers =
|
||||
V3DV_SUPPORTED_SHADER_STAGES * V3D_MAX_TEXTURE_SAMPLERS,
|
||||
.maxDescriptorSetUniformBuffers =
|
||||
V3DV_SUPPORTED_SHADER_STAGES * MAX_UNIFORM_BUFFERS,
|
||||
.maxDescriptorSetUniformBuffersDynamic = MAX_DYNAMIC_UNIFORM_BUFFERS,
|
||||
.maxDescriptorSetStorageBuffers = 6 * MAX_STORAGE_BUFFERS,
|
||||
.maxDescriptorSetStorageBuffers =
|
||||
V3DV_SUPPORTED_SHADER_STAGES * MAX_STORAGE_BUFFERS,
|
||||
.maxDescriptorSetStorageBuffersDynamic = MAX_DYNAMIC_STORAGE_BUFFERS,
|
||||
.maxDescriptorSetSampledImages = 6 * MAX_SAMPLED_IMAGES,
|
||||
.maxDescriptorSetStorageImages = 6 * MAX_STORAGE_IMAGES,
|
||||
.maxDescriptorSetSampledImages =
|
||||
V3DV_SUPPORTED_SHADER_STAGES * MAX_SAMPLED_IMAGES,
|
||||
.maxDescriptorSetStorageImages =
|
||||
V3DV_SUPPORTED_SHADER_STAGES * MAX_STORAGE_IMAGES,
|
||||
.maxDescriptorSetInputAttachments = MAX_INPUT_ATTACHMENTS,
|
||||
|
||||
/* Vertex limits */
|
||||
|
@@ -52,6 +52,8 @@
|
||||
|
||||
#define MAX_MULTIVIEW_VIEW_COUNT 16
|
||||
|
||||
#define V3DV_SUPPORTED_SHADER_STAGES 4
|
||||
|
||||
/* These are tunable parameters in the HW design, but all the V3D
|
||||
* implementations agree.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user