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

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

Issue 1765923002: Add DescriptorPool and set manager to GrVkProgram (Closed) Base URL: https://skia.googlesource.com/skia.git@samplerDesc
Patch Set: rebase Created 4 years, 9 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/GrVkProgram.cpp ('k') | src/gpu/vk/GrVkResourceProvider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkProgramBuilder.cpp
diff --git a/src/gpu/vk/GrVkProgramBuilder.cpp b/src/gpu/vk/GrVkProgramBuilder.cpp
index 1b56054d99ebd84c086c9c8b2d5d73937c241938..9dbbbb848c89f5f19ab52a936f74f2a02ad7c1ec 100644
--- a/src/gpu/vk/GrVkProgramBuilder.cpp
+++ b/src/gpu/vk/GrVkProgramBuilder.cpp
@@ -272,33 +272,10 @@ GrVkProgram* GrVkProgramBuilder::finalize(GrPrimitiveType primitiveType,
return nullptr;
}
-
- GrVkDescriptorPool::DescriptorTypeCounts typeCounts;
- typeCounts.setTypeCount(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 2);
- SkASSERT(numSamplers < 256);
- typeCounts.setTypeCount(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, (uint8_t)numSamplers);
- GrVkDescriptorPool* descriptorPool =
- fGpu->resourceProvider().findOrCreateCompatibleDescriptorPool(typeCounts);
-
- VkDescriptorSetAllocateInfo dsAllocateInfo;
- memset(&dsAllocateInfo, 0, sizeof(VkDescriptorSetAllocateInfo));
- dsAllocateInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO;
- dsAllocateInfo.pNext = nullptr;
- dsAllocateInfo.descriptorPool = descriptorPool->descPool();
- dsAllocateInfo.descriptorSetCount = 2;
- dsAllocateInfo.pSetLayouts = dsLayout;
-
- VkDescriptorSet descriptorSets[2];
- GR_VK_CALL_ERRCHECK(fGpu->vkInterface(), AllocateDescriptorSets(fGpu->device(),
- &dsAllocateInfo,
- descriptorSets));
-
return new GrVkProgram(fGpu,
pipeline,
pipelineLayout,
dsLayout,
- descriptorPool,
- descriptorSets,
fUniformHandles,
fUniformHandler.fUniforms,
fUniformHandler.fCurrentVertexUBOOffset,
« no previous file with comments | « src/gpu/vk/GrVkProgram.cpp ('k') | src/gpu/vk/GrVkResourceProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698