Flutter Engine
The Flutter Engine
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
14
15namespace skgpu::graphite {
16
17/**
18 * Types of descriptors supported within graphite
19*/
20enum class DescriptorType : uint8_t {
21 kUniformBuffer = 0,
23 kTexture,
25 kStorageBuffer,
26 kInputAttachment,
27
28 kLast = kInputAttachment,
29};
30static constexpr int kDescriptorTypeCount = (int)(DescriptorType::kLast) + 1;
31
32enum class PipelineStageFlags : uint8_t {
33 kVertexShader = 0b001,
34 kFragmentShader = 0b010,
35 kCompute = 0b100,
36};
38
41 uint32_t count,
42 int bindingIdx,
44 const Sampler* immutableSampler = nullptr)
45 : fType (type)
46 , fCount (count)
47 , fBindingIndex (bindingIdx)
48 , fPipelineStageFlags(stageFlags)
49 , fImmutableSampler(immutableSampler) {}
50
52 uint32_t fCount;
56};
57
58}; // namespace skgpu::graphite
59
60#endif // skgpu_graphite_DescriptorTypes_DEFINED
int count
Definition: FontMgrTest.cpp:50
GLenum type
SK_MAKE_BITMASK_OPS(DawnErrorType)
static constexpr int kDescriptorTypeCount
DescriptorData(DescriptorType type, uint32_t count, int bindingIdx, SkEnumBitMask< PipelineStageFlags > stageFlags, const Sampler *immutableSampler=nullptr)
SkEnumBitMask< PipelineStageFlags > fPipelineStageFlags