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

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

Issue 1906623002: Update min Vulkan version to 1.0.8.0, and fix various bugs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 4 years, 8 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.h ('k') | src/gpu/vk/GrVkRenderTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkPipelineState.cpp
diff --git a/src/gpu/vk/GrVkPipelineState.cpp b/src/gpu/vk/GrVkPipelineState.cpp
index e464848034cd0c61f4f66ad7bcec13aeb5e9aef1..0194e290ad351aeb980114885be973768836700e 100644
--- a/src/gpu/vk/GrVkPipelineState.cpp
+++ b/src/gpu/vk/GrVkPipelineState.cpp
@@ -408,30 +408,29 @@ void GrVkPipelineState::addUniformResources(GrVkCommandBuffer& commandBuffer) {
void GrVkPipelineState::DescriptorPoolManager::getNewPool(GrVkGpu* gpu) {
if (fPool) {
fPool->unref(gpu);
- SkASSERT(fMaxDescriptorSets < (SK_MaxU32 >> 1));
- if (fMaxDescriptorSets < kMaxDescSetLimit >> 1) {
- fMaxDescriptorSets = fMaxDescriptorSets << 1;
+ if (fMaxDescriptors < kMaxDescLimit >> 1) {
+ fMaxDescriptors = fMaxDescriptors << 1;
} else {
- fMaxDescriptorSets = kMaxDescSetLimit;
+ fMaxDescriptors = kMaxDescLimit;
}
}
- if (fMaxDescriptorSets) {
+ if (fMaxDescriptors) {
fPool = gpu->resourceProvider().findOrCreateCompatibleDescriptorPool(fDescType,
- fMaxDescriptorSets);
+ fMaxDescriptors);
}
- SkASSERT(fPool || !fMaxDescriptorSets);
+ SkASSERT(fPool || !fMaxDescriptors);
}
void GrVkPipelineState::DescriptorPoolManager::getNewDescriptorSet(GrVkGpu* gpu, VkDescriptorSet* ds) {
- if (!fMaxDescriptorSets) {
+ if (!fMaxDescriptors) {
return;
}
- if (fCurrentDescriptorSet == fMaxDescriptorSets) {
+ if (fCurrentDescriptorCount == fMaxDescriptors) {
this->getNewPool(gpu);
- fCurrentDescriptorSet = 0;
+ fCurrentDescriptorCount = 0;
}
- fCurrentDescriptorSet++;
+ fCurrentDescriptorCount += fDescCountPerSet;
VkDescriptorSetAllocateInfo dsAllocateInfo;
memset(&dsAllocateInfo, 0, sizeof(VkDescriptorSetAllocateInfo));
« no previous file with comments | « src/gpu/vk/GrVkPipelineState.h ('k') | src/gpu/vk/GrVkRenderTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698