|
f12e4123
|
2020-08-25T12:01:12
|
|
Vulkan: Match descriptor pool sizes to descriptor set layouts
When a descriptor pool is created, a list of descriptor types and counts
are given to vkCreateDescriptorPool(). Later, when allocating a
descriptor set from the pool, we pass along a descriptor set layout to
vkAllocateDescriptorSets() which is used to determine how many of each
type of descriptor (i.e. binding) to allocate from the pool.
In order for our "free descriptor set" counts to be accurate for each
pool, the descriptor pools need to be created with descriptor counts
that match the descriptor set layout binding counts.
This change fixes a bug where the descriptor set layouts were created
with more bindings than the descriptor pool sizes, causing the "free
descriptor set" count to be inaccurate, leading to allocating too many
descriptor sets from a pool.
Bug: angleproject:3570
Test: VulkanDescriptorSetTest
Change-Id: I660bf02d29a1291391fb15f39e6479bf348d0f83
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2391114
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|