From a77229c979d0edee165da8f44c5af70bb0c25507 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 13 May 2015 11:49:30 -0700 Subject: [PATCH] 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. --- src/vulkan/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.7.4