mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 09:48:07 +02:00
v3dv/device: add assert for texture-related limits
There are several limits that when added shouldn't be greater than V3D_MAX_TEXTURE_SAMPLERS (defined at common/v3d_limits.h), so let's assert it. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
parent
29ef4ddcf9
commit
54efbe0a03
1 changed files with 4 additions and 1 deletions
|
|
@ -759,6 +759,9 @@ v3dv_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,
|
|||
const uint32_t max_dynamic_storage_buffers = 6;
|
||||
const uint32_t max_sampled_images = 16;
|
||||
const uint32_t max_storage_images = 4;
|
||||
const uint32_t max_input_attachments = 4;
|
||||
assert(max_sampled_images + max_storage_images + max_input_attachments
|
||||
<= V3D_MAX_TEXTURE_SAMPLERS);
|
||||
|
||||
const uint32_t max_varying_components = 16 * 4;
|
||||
const uint32_t max_render_targets = 4;
|
||||
|
|
@ -791,7 +794,7 @@ v3dv_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,
|
|||
.maxPerStageDescriptorStorageBuffers = max_storage_buffers,
|
||||
.maxPerStageDescriptorSampledImages = max_sampled_images,
|
||||
.maxPerStageDescriptorStorageImages = max_storage_images,
|
||||
.maxPerStageDescriptorInputAttachments = 4,
|
||||
.maxPerStageDescriptorInputAttachments = max_input_attachments,
|
||||
.maxPerStageResources = 128,
|
||||
|
||||
/* We multiply some limits by 6 to account for all shader stages */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue