Descriptor Pool typo
Fixed typos where end() was used instead of begin()
Bug b/137554711
Change-Id: I5faff14d400a644146501a941c35d503535355c4
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34111
Tested-by: Alexis Hétu <sugoi@google.com>
Presubmit-Ready: Alexis Hétu <sugoi@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Vulkan/VkDescriptorPool.cpp b/src/Vulkan/VkDescriptorPool.cpp
index 18a9d16..e888018 100644
--- a/src/Vulkan/VkDescriptorPool.cpp
+++ b/src/Vulkan/VkDescriptorPool.cpp
@@ -101,7 +101,7 @@
}
// Second, look for space at the beginning of the pool
- const auto itBegin = nodes.end();
+ const auto itBegin = nodes.begin();
freeSpace = itBegin->set - pool;
if(freeSpace >= size)
{
@@ -215,7 +215,7 @@
totalFreeSize += poolSize - (itLast->set - pool) + itLast->size;
// Compute space at the beginning of the pool
- const auto itBegin = nodes.end();
+ const auto itBegin = nodes.begin();
totalFreeSize += itBegin->set - pool;
// Finally, look between existing pool items