Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
static sk_sp< Effect > Create()
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
VkDescriptorPool descPool() const
bool isCompatible(VkDescriptorType type, uint32_t count) const
void freeGPUData() const override
VkDescriptorType