Flutter Engine
The Flutter Engine
third_party
skia
src
gpu
graphite
DescriptorData.h
Go to the documentation of this file.
1
/*
2
* Copyright 2023 Google LLC
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 skgpu_graphite_DescriptorTypes_DEFINED
9
#define skgpu_graphite_DescriptorTypes_DEFINED
10
11
#include "
include/private/base/SkTArray.h
"
12
#include "
src/base/SkEnumBitMask.h
"
13
#include "
src/gpu/graphite/Sampler.h
"
14
15
namespace
skgpu::graphite
{
16
17
/**
18
* Types of descriptors supported within graphite
19
*/
20
enum class
DescriptorType
: uint8_t {
21
kUniformBuffer = 0,
22
kTextureSampler
,
23
kTexture,
24
kCombinedTextureSampler
,
25
kStorageBuffer,
26
kInputAttachment,
27
28
kLast = kInputAttachment,
29
};
30
static
constexpr
int
kDescriptorTypeCount
= (
int
)(
DescriptorType::kLast
) + 1;
31
32
enum class
PipelineStageFlags
: uint8_t {
33
kVertexShader = 0b001,
34
kFragmentShader = 0b010,
35
kCompute = 0b100,
36
};
37
SK_MAKE_BITMASK_OPS
(
PipelineStageFlags
);
38
39
struct
DescriptorData
{
40
DescriptorData
(
DescriptorType
type
,
41
uint32_t
count
,
42
int
bindingIdx,
43
SkEnumBitMask<PipelineStageFlags>
stageFlags,
44
const
Sampler
* immutableSampler =
nullptr
)
45
:
fType
(
type
)
46
,
fCount
(
count
)
47
,
fBindingIndex
(bindingIdx)
48
,
fPipelineStageFlags
(stageFlags)
49
,
fImmutableSampler
(immutableSampler) {}
50
51
DescriptorType
fType
;
52
uint32_t
fCount
;
53
int
fBindingIndex
;
54
SkEnumBitMask<PipelineStageFlags>
fPipelineStageFlags
;
55
const
Sampler
*
fImmutableSampler
;
56
};
57
58
};
// namespace skgpu::graphite
59
60
#endif
// skgpu_graphite_DescriptorTypes_DEFINED
count
int count
Definition:
FontMgrTest.cpp:50
Sampler.h
SkEnumBitMask.h
SkTArray.h
type
GLenum type
Definition:
blit_command_gles.cc:126
SkEnumBitMask< PipelineStageFlags >
skgpu::graphite::Sampler
Definition:
Sampler.h:15
skgpu::graphite
Definition:
BoundsManagerBench.cpp:27
skgpu::graphite::SK_MAKE_BITMASK_OPS
SK_MAKE_BITMASK_OPS(DawnErrorType)
skgpu::graphite::PipelineStageFlags
PipelineStageFlags
Definition:
DescriptorData.h:32
skgpu::graphite::DescriptorType
DescriptorType
Definition:
DescriptorData.h:20
skgpu::graphite::DescriptorType::kTextureSampler
@ kTextureSampler
skgpu::graphite::DescriptorType::kCombinedTextureSampler
@ kCombinedTextureSampler
skgpu::graphite::DescriptorType::kLast
@ kLast
skgpu::graphite::kDescriptorTypeCount
static constexpr int kDescriptorTypeCount
Definition:
DescriptorData.h:30
tools.skpbench.skpbench.int
int
Definition:
skpbench.py:49
skgpu::graphite::DescriptorData
Definition:
DescriptorData.h:39
skgpu::graphite::DescriptorData::fCount
uint32_t fCount
Definition:
DescriptorData.h:52
skgpu::graphite::DescriptorData::DescriptorData
DescriptorData(DescriptorType type, uint32_t count, int bindingIdx, SkEnumBitMask< PipelineStageFlags > stageFlags, const Sampler *immutableSampler=nullptr)
Definition:
DescriptorData.h:40
skgpu::graphite::DescriptorData::fType
DescriptorType fType
Definition:
DescriptorData.h:51
skgpu::graphite::DescriptorData::fBindingIndex
int fBindingIndex
Definition:
DescriptorData.h:53
skgpu::graphite::DescriptorData::fPipelineStageFlags
SkEnumBitMask< PipelineStageFlags > fPipelineStageFlags
Definition:
DescriptorData.h:54
skgpu::graphite::DescriptorData::fImmutableSampler
const Sampler * fImmutableSampler
Definition:
DescriptorData.h:55
Generated on Sun Jun 23 2024 21:56:26 for Flutter Engine by
1.9.4