Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
RenderPassDesc.h
Go to the documentation of this file.
1/*
2 * Copyright 2024 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_RenderPassDesc_DEFINED
9#define skgpu_graphite_RenderPassDesc_DEFINED
10
14
15#include "src/gpu/Swizzle.h"
16
17#include <array>
18
19namespace skgpu::graphite {
20
21class Caps;
22
30
32 static RenderPassDesc Make(const Caps* caps,
33 const TextureInfo& targetInfo,
34 LoadOp loadOp,
35 StoreOp storeOp,
36 SkEnumBitMask<DepthStencilFlags> depthStencilFlags,
37 const std::array<float, 4>& clearColor,
38 bool requiresMSAA,
39 Swizzle writeSwizzle);
40
42 std::array<float, 4> fClearColor;
44
47 uint32_t fClearStencil;
48
50
51 // This samples count usually matches fColorAttachment & fDepthStencilAttachment's samples
52 // count. The only exceptional case is when multisampled render to single sampled is used. In
53 // that case, the fColorAttachment's samples count will be 1 and fSampleCount will be > 1.
54 uint32_t fSampleCount;
55
56 SkString toString() const;
57
58 // TODO:
59 // * bounds (TBD whether exact bounds vs. granular)
60 // * input attachments
61 // * subpass makeup information
62};
63
64} // namespace skgpu::graphite
65
66#endif // skgpu_graphite_RenderPassDesc_DEFINED
std::array< float, 4 > fClearColor
static RenderPassDesc Make(const Caps *caps, const TextureInfo &targetInfo, LoadOp loadOp, StoreOp storeOp, SkEnumBitMask< DepthStencilFlags > depthStencilFlags, const std::array< float, 4 > &clearColor, bool requiresMSAA, Swizzle writeSwizzle)