Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
gpu
ganesh
vk
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
11
#include "
include/gpu/vk/GrVkTypes.h
"
12
#include "
src/gpu/ganesh/vk/GrVkManagedResource.h
"
13
14
#include <cinttypes>
15
16
class
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
*/
23
class
GrVkDescriptorPool
:
public
GrVkManagedResource
{
24
public
:
25
static
GrVkDescriptorPool
*
Create
(
GrVkGpu
* gpu,
VkDescriptorType
type
, uint32_t
count
);
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
40
private
:
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
pool
AutoreleasePool pool
Definition
BazelBenchmarkTestRunner.cpp:313
count
int count
Definition
FontMgrTest.cpp:50
GrVkManagedResource.h
GrVkTypes.h
Create
static sk_sp< Effect > Create()
Definition
RefCntTest.cpp:117
SkDebugf
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
GrVkDescriptorPool
Definition
GrVkDescriptorPool.h:23
GrVkDescriptorPool::descPool
VkDescriptorPool descPool() const
Definition
GrVkDescriptorPool.h:27
GrVkDescriptorPool::isCompatible
bool isCompatible(VkDescriptorType type, uint32_t count) const
Definition
GrVkDescriptorPool.cpp:45
GrVkDescriptorPool::freeGPUData
void freeGPUData() const override
Definition
GrVkDescriptorPool.cpp:49
GrVkGpu
Definition
GrVkGpu.h:42
GrVkManagedResource
Definition
GrVkManagedResource.h:15
type
uint8_t type
Definition
fl_standard_message_codec_test.cc:1115
VkDescriptorType
VkDescriptorType
Definition
vulkan_core.h:2124
Generated on Fri Apr 26 2024 06:17:14 for Flutter Engine by
1.9.8