Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1403)

Unified Diff: src/gpu/vk/GrVkResourceProvider.cpp

Issue 2121243002: Grow descriptor pools by 1.5 (Closed) Base URL: https://skia.googlesource.com/skia.git@filters
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/vk/GrVkPipelineState.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkResourceProvider.cpp
diff --git a/src/gpu/vk/GrVkResourceProvider.cpp b/src/gpu/vk/GrVkResourceProvider.cpp
index 4f6c7927c752b58ebd4c6d89de36d76230cc3e3e..81dcf586b76beff09f9837cc4c8b8438d9b5399a 100644
--- a/src/gpu/vk/GrVkResourceProvider.cpp
+++ b/src/gpu/vk/GrVkResourceProvider.cpp
@@ -196,8 +196,9 @@ void GrVkResourceProvider::getUniformDescriptorSet(VkDescriptorSet* ds,
fCurrentUniformDescCount += kNumUniformDescPerSet;
if (fCurrentUniformDescCount > fCurrMaxUniDescriptors) {
fUniformDescPool->unref(fGpu);
- if (fCurrMaxUniDescriptors < kMaxUniformDescriptors >> 1) {
- fCurrMaxUniDescriptors = fCurrMaxUniDescriptors << 1;
+ uint32_t newPoolSize = fCurrMaxUniDescriptors + ((fCurrMaxUniDescriptors + 1) >> 1);
+ if (newPoolSize < kMaxUniformDescriptors) {
+ fCurrMaxUniDescriptors = newPoolSize;
} else {
fCurrMaxUniDescriptors = kMaxUniformDescriptors;
}
« no previous file with comments | « src/gpu/vk/GrVkPipelineState.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698