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

Side by Side Diff: src/gpu/vk/GrVkResourceProvider.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 unified diff | Download patch
« no previous file with comments | « src/gpu/vk/GrVkResourceProvider.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrVkResourceProvider.h" 8 #include "GrVkResourceProvider.h"
9 9
10 #include "GrTextureParams.h" 10 #include "GrTextureParams.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 } 72 }
73 73
74 GrVkRenderPass* renderPass = new GrVkRenderPass(); 74 GrVkRenderPass* renderPass = new GrVkRenderPass();
75 renderPass->initSimple(fGpu, target); 75 renderPass->initSimple(fGpu, target);
76 fSimpleRenderPasses.push_back(renderPass); 76 fSimpleRenderPasses.push_back(renderPass);
77 renderPass->ref(); 77 renderPass->ref();
78 return renderPass; 78 return renderPass;
79 } 79 }
80 80
81 GrVkDescriptorPool* GrVkResourceProvider::findOrCreateCompatibleDescriptorPool( 81 GrVkDescriptorPool* GrVkResourceProvider::findOrCreateCompatibleDescriptorPool(
82 const GrVkDescriptorPool::DescriptorTypeC ounts& typeCounts) { 82 VkDescriptorType typ e, uint32_t count) {
83 return new GrVkDescriptorPool(fGpu, typeCounts); 83 return new GrVkDescriptorPool(fGpu, type, count);
84 } 84 }
85 85
86 GrVkSampler* GrVkResourceProvider::findOrCreateCompatibleSampler(const GrTexture Params& params) { 86 GrVkSampler* GrVkResourceProvider::findOrCreateCompatibleSampler(const GrTexture Params& params) {
87 GrVkSampler* sampler = fSamplers.find(GrVkSampler::GenerateKey(params)); 87 GrVkSampler* sampler = fSamplers.find(GrVkSampler::GenerateKey(params));
88 if (!sampler) { 88 if (!sampler) {
89 sampler = GrVkSampler::Create(fGpu, params); 89 sampler = GrVkSampler::Create(fGpu, params);
90 fSamplers.add(sampler); 90 fSamplers.add(sampler);
91 } 91 }
92 SkASSERT(sampler); 92 SkASSERT(sampler);
93 sampler->ref(); 93 sampler->ref();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 for (; !iter.done(); ++iter) { 158 for (; !iter.done(); ++iter) {
159 (*iter).unrefAndAbandon(); 159 (*iter).unrefAndAbandon();
160 } 160 }
161 fSamplers.reset(); 161 fSamplers.reset();
162 162
163 #ifdef SK_TRACE_VK_RESOURCES 163 #ifdef SK_TRACE_VK_RESOURCES
164 SkASSERT(0 == GrVkResource::fTrace.count()); 164 SkASSERT(0 == GrVkResource::fTrace.count());
165 #endif 165 #endif
166 fPipelineCache = VK_NULL_HANDLE; 166 fPipelineCache = VK_NULL_HANDLE;
167 } 167 }
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkResourceProvider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698