From: Kristian Høgsberg Date: Wed, 13 May 2015 18:49:30 +0000 (-0700) Subject: vk: Allocate layout->count number of descriptors X-Git-Tag: upstream/17.1.0~11012^2~2110 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a77229c979d0edee165da8f44c5af70bb0c25507;p=platform%2Fupstream%2Fmesa.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 2abc6cc..b547585 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) {