Skip to content

Commit e9a9ad9

Browse files
egdanielSkia Commit-Bot
authored andcommitted
Remove unused GrVkDescriptorSetManager factor.
Change-Id: I50476e8b8bc9796656cb87cdbd6ec0fe83819f0e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314496 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Auto-Submit: Greg Daniel <egdaniel@google.com>
1 parent c0dd06d commit e9a9ad9

File tree

4 files changed

+0
-56
lines changed

4 files changed

+0
-56
lines changed

src/gpu/vk/GrVkDescriptorSetManager.cpp

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,6 @@ GrVkDescriptorSetManager* GrVkDescriptorSetManager::CreateSamplerManager(
3939
return Create(gpu, type, visibilities, immutableSamplers);
4040
}
4141

42-
GrVkDescriptorSetManager* GrVkDescriptorSetManager::CreateSamplerManager(
43-
GrVkGpu* gpu, VkDescriptorType type, const SkTArray<uint32_t>& visibilities) {
44-
SkSTArray<4, const GrVkSampler*> immutableSamplers;
45-
SkASSERT(type == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER);
46-
for (int i = 0 ; i < visibilities.count(); ++i) {
47-
immutableSamplers.push_back(nullptr);
48-
}
49-
return Create(gpu, type, visibilities, immutableSamplers);
50-
}
51-
5242
VkShaderStageFlags visibility_to_vk_stage_flags(uint32_t visibility) {
5343
VkShaderStageFlags flags = 0;
5444

@@ -254,26 +244,6 @@ bool GrVkDescriptorSetManager::isCompatible(VkDescriptorType type,
254244
return true;
255245
}
256246

257-
bool GrVkDescriptorSetManager::isCompatible(VkDescriptorType type,
258-
const SkTArray<uint32_t>& visibilities) const {
259-
if (type != fPoolManager.fDescType) {
260-
return false;
261-
}
262-
263-
if (VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER == type ||
264-
VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER == type) {
265-
if (fBindingVisibilities.count() != visibilities.count()) {
266-
return false;
267-
}
268-
for (int i = 0; i < visibilities.count(); ++i) {
269-
if (visibilities[i] != fBindingVisibilities[i] || fImmutableSamplers[i] != nullptr) {
270-
return false;
271-
}
272-
}
273-
}
274-
return true;
275-
}
276-
277247
////////////////////////////////////////////////////////////////////////////////
278248

279249
GrVkDescriptorSetManager::DescriptorPoolManager::DescriptorPoolManager(

src/gpu/vk/GrVkDescriptorSetManager.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ class GrVkDescriptorSetManager {
3030
static GrVkDescriptorSetManager* CreateUniformManager(GrVkGpu* gpu);
3131
static GrVkDescriptorSetManager* CreateSamplerManager(GrVkGpu* gpu, VkDescriptorType type,
3232
const GrVkUniformHandler&);
33-
static GrVkDescriptorSetManager* CreateSamplerManager(GrVkGpu* gpu, VkDescriptorType type,
34-
const SkTArray<uint32_t>& visibilities);
3533

3634
~GrVkDescriptorSetManager() {}
3735

@@ -44,8 +42,6 @@ class GrVkDescriptorSetManager {
4442
void recycleDescriptorSet(const GrVkDescriptorSet*);
4543

4644
bool isCompatible(VkDescriptorType type, const GrVkUniformHandler*) const;
47-
bool isCompatible(VkDescriptorType type,
48-
const SkTArray<uint32_t>& visibilities) const;
4945

5046
private:
5147
struct DescriptorPoolManager {

src/gpu/vk/GrVkResourceProvider.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -280,25 +280,6 @@ void GrVkResourceProvider::getSamplerDescriptorSetHandle(VkDescriptorType type,
280280
*handle = GrVkDescriptorSetManager::Handle(fDescriptorSetManagers.count() - 1);
281281
}
282282

283-
void GrVkResourceProvider::getSamplerDescriptorSetHandle(VkDescriptorType type,
284-
const SkTArray<uint32_t>& visibilities,
285-
GrVkDescriptorSetManager::Handle* handle) {
286-
SkASSERT(handle);
287-
SkASSERT(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER == type ||
288-
VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER == type);
289-
for (int i = 0; i < fDescriptorSetManagers.count(); ++i) {
290-
if (fDescriptorSetManagers[i]->isCompatible(type, visibilities)) {
291-
*handle = GrVkDescriptorSetManager::Handle(i);
292-
return;
293-
}
294-
}
295-
296-
GrVkDescriptorSetManager* dsm = GrVkDescriptorSetManager::CreateSamplerManager(fGpu, type,
297-
visibilities);
298-
fDescriptorSetManagers.emplace_back(dsm);
299-
*handle = GrVkDescriptorSetManager::Handle(fDescriptorSetManagers.count() - 1);
300-
}
301-
302283
VkDescriptorSetLayout GrVkResourceProvider::getUniformDSLayout() const {
303284
SkASSERT(fUniformDSHandle.isValid());
304285
return fDescriptorSetManagers[fUniformDSHandle.toIndex()]->layout();

src/gpu/vk/GrVkResourceProvider.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,6 @@ class GrVkResourceProvider {
128128
void getSamplerDescriptorSetHandle(VkDescriptorType type,
129129
const GrVkUniformHandler&,
130130
GrVkDescriptorSetManager::Handle* handle);
131-
void getSamplerDescriptorSetHandle(VkDescriptorType type,
132-
const SkTArray<uint32_t>& visibilities,
133-
GrVkDescriptorSetManager::Handle* handle);
134131

135132
// Returns the compatible VkDescriptorSetLayout to use for uniform buffers. The caller does not
136133
// own the VkDescriptorSetLayout and thus should not delete it. This function should be used

0 commit comments

Comments
 (0)