mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
zink: use max-descriptor define
This avoids compile errors on MSVC due to VLAs. Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com> Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11380>
This commit is contained in:
parent
4439f500a2
commit
14597315f8
1 changed files with 2 additions and 3 deletions
|
|
@ -339,7 +339,7 @@ descriptor_layout_create(struct zink_screen *screen, enum zink_descriptor_type t
|
|||
dcslci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO;
|
||||
dcslci.pNext = NULL;
|
||||
VkDescriptorSetLayoutBindingFlagsCreateInfo fci = {0};
|
||||
VkDescriptorBindingFlags flags[num_bindings];
|
||||
VkDescriptorBindingFlags flags[ZINK_MAX_DESCRIPTORS_PER_TYPE];
|
||||
if (screen->descriptor_mode == ZINK_DESCRIPTOR_MODE_LAZY) {
|
||||
dcslci.pNext = &fci;
|
||||
if (t == ZINK_DESCRIPTOR_TYPES)
|
||||
|
|
@ -1235,9 +1235,8 @@ update_descriptors_internal(struct zink_context *ctx, struct zink_descriptor_set
|
|||
}
|
||||
|
||||
unsigned num_resources = 0;
|
||||
unsigned num_descriptors = zds[h]->pool->key.layout->num_descriptors;
|
||||
ASSERTED unsigned num_bindings = zds[h]->pool->num_resources;
|
||||
VkWriteDescriptorSet wds[num_descriptors];
|
||||
VkWriteDescriptorSet wds[ZINK_MAX_DESCRIPTORS_PER_TYPE];
|
||||
unsigned num_wds = 0;
|
||||
|
||||
for (int i = 0; i < num_stages; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue