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.
This commit is contained in:
Kristian Høgsberg 2015-05-13 11:49:30 -07:00
parent a3fd136509
commit a77229c979

View file

@ -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) {