summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_descriptor_set.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c
index a4b7638a618..7853ec7dd98 100644
--- a/src/intel/vulkan/anv_descriptor_set.c
+++ b/src/intel/vulkan/anv_descriptor_set.c
@@ -329,18 +329,18 @@ VkResult anv_CreateDescriptorPool(
}
}
- const size_t size =
- sizeof(*pool) +
+ const size_t pool_size =
pCreateInfo->maxSets * sizeof(struct anv_descriptor_set) +
descriptor_count * sizeof(struct anv_descriptor) +
buffer_count * sizeof(struct anv_buffer_view);
+ const size_t total_size = sizeof(*pool) + pool_size;
- pool = vk_alloc2(&device->alloc, pAllocator, size, 8,
+ pool = vk_alloc2(&device->alloc, pAllocator, total_size, 8,
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
if (!pool)
return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
- pool->size = size;
+ pool->size = pool_size;
pool->next = 0;
pool->free_list = EMPTY;