From: Kristian Høgsberg Date: Wed, 13 May 2015 18:49:30 +0000 (-0700) Subject: vk: Allocate layout->count number of descriptors X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a77229c979d0edee165da8f44c5af70bb0c25507;p=mesa.git vk: Allocate layout->count number of descriptors layout->count is the number of descriptors the application requested. layout->total is the number of entries we need across all stages. --- diff --git a/src/vulkan/device.c b/src/vulkan/device.c index 2abc6cc0be9..b547585c7b9 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -1502,7 +1502,7 @@ VkResult VKAPI vkAllocDescriptorSets( for (uint32_t i = 0; i < count; i++) { layout = (struct anv_descriptor_set_layout *) pSetLayouts[i]; - size = sizeof(*set) + layout->total * sizeof(set->descriptors[0]); + size = sizeof(*set) + layout->count * sizeof(set->descriptors[0]); set = anv_device_alloc(device, size, 8, VK_SYSTEM_ALLOC_TYPE_API_OBJECT); if (!set) {