Index: src/gpu/vk/GrVkPipelineState.cpp |
diff --git a/src/gpu/vk/GrVkPipelineState.cpp b/src/gpu/vk/GrVkPipelineState.cpp |
index 8280e62c2a6ccbf5771e15a120ab47e6c9c13839..10a1ac9204acdee19b2377c91b58fc240ff24f7a 100644 |
--- a/src/gpu/vk/GrVkPipelineState.cpp |
+++ b/src/gpu/vk/GrVkPipelineState.cpp |
@@ -398,8 +398,9 @@ void GrVkPipelineState::addUniformResources(GrVkCommandBuffer& commandBuffer) { |
void GrVkPipelineState::DescriptorPoolManager::getNewPool(GrVkGpu* gpu) { |
if (fPool) { |
fPool->unref(gpu); |
- if (fMaxDescriptors < kMaxDescLimit >> 1) { |
- fMaxDescriptors = fMaxDescriptors << 1; |
+ uint32_t newPoolSize = fMaxDescriptors + ((fMaxDescriptors + 1) >> 1); |
+ if (newPoolSize < kMaxDescLimit) { |
+ fMaxDescriptors = newPoolSize; |
} else { |
fMaxDescriptors = kMaxDescLimit; |
} |