mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 07:38:10 +02:00
anv/descriptor_set: Use the correct size for the descriptor pool
The descriptor sizes array gives the total number of each type of descriptor that will ever be allocated from the pool, not the total amount that may be in any particular set. In our case, this simply means that we have to sum a bunch of things up and there we go.
This commit is contained in:
parent
040355b688
commit
f0f7cc22f3
1 changed files with 3 additions and 6 deletions
|
|
@ -283,14 +283,11 @@ VkResult anv_CreateDescriptorPool(
|
|||
}
|
||||
}
|
||||
|
||||
const size_t set_size =
|
||||
sizeof(struct anv_descriptor_set) +
|
||||
descriptor_count * sizeof(struct anv_descriptor) +
|
||||
buffer_count * sizeof(struct anv_buffer_view);
|
||||
|
||||
const size_t size =
|
||||
sizeof(*pool) +
|
||||
pCreateInfo->maxSets * set_size;
|
||||
pCreateInfo->maxSets * sizeof(struct anv_descriptor_set) +
|
||||
descriptor_count * sizeof(struct anv_descriptor) +
|
||||
buffer_count * sizeof(struct anv_buffer_view);
|
||||
|
||||
pool = anv_alloc2(&device->alloc, pAllocator, size, 8,
|
||||
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue