Flutter Engine
The Flutter Engine
GrVkDescriptorPool.h
Go to the documentation of this file.
1/*
2* Copyright 2016 Google Inc.
3*
4* Use of this source code is governed by a BSD-style license that can be
5* found in the LICENSE file.
6*/
7
8#ifndef GrVkDescriptorPool_DEFINED
9#define GrVkDescriptorPool_DEFINED
10
13
14#include <cinttypes>
15
16class GrVkGpu;
17
18/**
19 * We require that all descriptor sets are of a single descriptor type. We also use a pool to only
20 * make one type of descriptor set. Thus a single VkDescriptorPool will only allocated space for
21 * for one type of descriptor.
22 */
24public:
26
27 VkDescriptorPool descPool() const { return fDescPool; }
28
29 // Returns whether or not this descriptor pool could be used, assuming it gets fully reset and
30 // not in use by another draw, to support the requested type and count.
31 bool isCompatible(VkDescriptorType type, uint32_t count) const;
32
33#ifdef SK_TRACE_MANAGED_RESOURCES
34 void dumpInfo() const override {
35 SkDebugf("GrVkDescriptorPool: %" PRIdPTR ", type %d (%d refs)\n", (intptr_t)fDescPool,
36 fType, this->getRefCnt());
37 }
38#endif
39
40private:
41 GrVkDescriptorPool(const GrVkGpu*, VkDescriptorPool pool, VkDescriptorType type,
42 uint32_t count);
43
44 void freeGPUData() const override;
45
46 VkDescriptorType fType;
47 uint32_t fCount;
48 VkDescriptorPool fDescPool;
49
50 using INHERITED = GrVkManagedResource;
51};
52
53#endif
AutoreleasePool pool
int count
Definition: FontMgrTest.cpp:50
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
GLenum type
VkDescriptorPool descPool() const
static GrVkDescriptorPool * Create(GrVkGpu *gpu, VkDescriptorType type, uint32_t count)
bool isCompatible(VkDescriptorType type, uint32_t count) const
GrVkManagedResource(const GrVkGpu *gpu)
VkDescriptorType
Definition: vulkan_core.h:2124