-
Basic DescriptorPool and DescriptorSetLayout implementation · c8176632Alexis Hetu authored
This cl is a minimal implementation of DescriptorPool and DescriptorSetLayout. A DescriptorSet itself is just a straight memory pointer. A DescriptorPool is a memory pool where DescriptorSets are allocated. The DescriptorPool object itself is little more than a memory allocator. A few minor optimizations were made to speed up the default case: - The Descriptor pool starts looking for a large enough memory block at the end of the pool, which should be optimal if the DescriptorSets are allocated linearly - When allocating multiple DescriptorSets at once, the pool first attempts to allocated all of them contiguously. This prevents looking for free memory blocks multiple times and once again should be optimal if the DescriptorSets are allocated linearly Note: For now, DescriptorSetLayout::GetDescriptorSize() is a dummy function which always returns the same size for every Descriptor type. This will be implemented properly case by case as we add support for new Descriptor types. Passes all tests in: dEQP-VK.api.*descriptor* Bug b/123244275 Change-Id: I2a2e73396e38dae28b59b77243cd8a366b35c12c Reviewed-on: https://swiftshader-review.googlesource.com/c/24028Tested-by:Alexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com>
c8176632
×