Index: src/gpu/vk/GrVkPipelineState.cpp |
diff --git a/src/gpu/vk/GrVkPipelineState.cpp b/src/gpu/vk/GrVkPipelineState.cpp |
index 5e3acf818a297f3bf62f0cd74934559df94c4486..3e442fb249b5c7d1b51a559156e8e3614e4186a4 100644 |
--- a/src/gpu/vk/GrVkPipelineState.cpp |
+++ b/src/gpu/vk/GrVkPipelineState.cpp |
@@ -409,7 +409,11 @@ void GrVkPipelineState::DescriptorPoolManager::getNewPool(GrVkGpu* gpu) { |
if (fPool) { |
fPool->unref(gpu); |
SkASSERT(fMaxDescriptorSets < (SK_MaxU32 >> 1)); |
- fMaxDescriptorSets = fMaxDescriptorSets << 1; |
+ if (fMaxDescriptorSets < kMaxDescSetLimit >> 1) { |
+ fMaxDescriptorSets = fMaxDescriptorSets << 1; |
+ } else { |
+ fMaxDescriptorSets = kMaxDescSetLimit; |
+ } |
} |
if (fMaxDescriptorSets) { |