KiCad PCB EDA Suite
Loading...
Searching...
No Matches
rhi_render_pass.h
Go to the documentation of this file.
1
/*
2
* This program source code file is part of KiCad, a free EDA CAD application.
3
*
4
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5
*
6
* This program is free software: you can redistribute it and/or modify it
7
* under the terms of the GNU General Public License as published by the
8
* Free Software Foundation, either version 3 of the License, or (at your
9
* option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License along
17
* with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#pragma once
21
22
#include <
rhi/rhi_handle.h
>
23
#include <
rhi/rhi_texture.h
>
24
#include <cstdint>
25
#include <vector>
26
27
enum class
RHI_LOAD_OP
28
{
29
LOAD
,
30
CLEAR
,
31
DONT_CARE
32
};
33
34
enum class
RHI_STORE_OP
35
{
36
STORE
,
37
DONT_CARE
38
};
39
40
struct
RHI_COLOR_ATTACHMENT_DESC
41
{
42
RHI_TEXTURE_FORMAT
format
=
RHI_TEXTURE_FORMAT::RGBA8
;
43
RHI_LOAD_OP
loadOp
=
RHI_LOAD_OP::CLEAR
;
44
RHI_STORE_OP
storeOp
=
RHI_STORE_OP::STORE
;
45
float
clearColor
[4] = { 0.0f, 0.0f, 0.0f, 1.0f };
46
};
47
48
struct
RHI_DEPTH_STENCIL_ATTACHMENT_DESC
49
{
50
bool
enabled
=
false
;
51
RHI_LOAD_OP
depthLoadOp
=
RHI_LOAD_OP::CLEAR
;
52
RHI_STORE_OP
depthStoreOp
=
RHI_STORE_OP::DONT_CARE
;
53
float
clearDepth
= 1.0f;
54
RHI_LOAD_OP
stencilLoadOp
=
RHI_LOAD_OP::CLEAR
;
55
RHI_STORE_OP
stencilStoreOp
=
RHI_STORE_OP::DONT_CARE
;
56
uint32_t
clearStencil
= 0;
57
};
58
59
struct
RHI_RENDER_PASS_DESC
60
{
61
std::vector<RHI_COLOR_ATTACHMENT_DESC>
colorAttachments
;
62
RHI_DEPTH_STENCIL_ATTACHMENT_DESC
depthStencilAttachment
;
63
};
64
65
struct
RHI_FRAMEBUFFER_DESC
66
{
67
uint32_t
width
= 0;
68
uint32_t
height
= 0;
69
std::vector<RHI_TEXTURE_FORMAT>
colorFormats
;
70
bool
hasDepthStencil
=
false
;
71
};
rhi_handle.h
RHI_LOAD_OP
RHI_LOAD_OP
Definition
rhi_render_pass.h:28
RHI_LOAD_OP::DONT_CARE
@ DONT_CARE
Definition
rhi_render_pass.h:31
RHI_LOAD_OP::LOAD
@ LOAD
Definition
rhi_render_pass.h:29
RHI_LOAD_OP::CLEAR
@ CLEAR
Definition
rhi_render_pass.h:30
RHI_STORE_OP
RHI_STORE_OP
Definition
rhi_render_pass.h:35
RHI_STORE_OP::STORE
@ STORE
Definition
rhi_render_pass.h:36
RHI_STORE_OP::DONT_CARE
@ DONT_CARE
Definition
rhi_render_pass.h:37
rhi_texture.h
RHI_TEXTURE_FORMAT
RHI_TEXTURE_FORMAT
Definition
rhi_texture.h:27
RHI_TEXTURE_FORMAT::RGBA8
@ RGBA8
Definition
rhi_texture.h:28
CLEAR
static VECTOR2D CLEAR
Definition
sch_editor_control.cpp:1006
RHI_COLOR_ATTACHMENT_DESC
Definition
rhi_render_pass.h:41
RHI_COLOR_ATTACHMENT_DESC::storeOp
RHI_STORE_OP storeOp
Definition
rhi_render_pass.h:44
RHI_COLOR_ATTACHMENT_DESC::format
RHI_TEXTURE_FORMAT format
Definition
rhi_render_pass.h:42
RHI_COLOR_ATTACHMENT_DESC::clearColor
float clearColor[4]
Definition
rhi_render_pass.h:45
RHI_COLOR_ATTACHMENT_DESC::loadOp
RHI_LOAD_OP loadOp
Definition
rhi_render_pass.h:43
RHI_DEPTH_STENCIL_ATTACHMENT_DESC
Definition
rhi_render_pass.h:49
RHI_DEPTH_STENCIL_ATTACHMENT_DESC::clearDepth
float clearDepth
Definition
rhi_render_pass.h:53
RHI_DEPTH_STENCIL_ATTACHMENT_DESC::depthLoadOp
RHI_LOAD_OP depthLoadOp
Definition
rhi_render_pass.h:51
RHI_DEPTH_STENCIL_ATTACHMENT_DESC::depthStoreOp
RHI_STORE_OP depthStoreOp
Definition
rhi_render_pass.h:52
RHI_DEPTH_STENCIL_ATTACHMENT_DESC::stencilLoadOp
RHI_LOAD_OP stencilLoadOp
Definition
rhi_render_pass.h:54
RHI_DEPTH_STENCIL_ATTACHMENT_DESC::clearStencil
uint32_t clearStencil
Definition
rhi_render_pass.h:56
RHI_DEPTH_STENCIL_ATTACHMENT_DESC::stencilStoreOp
RHI_STORE_OP stencilStoreOp
Definition
rhi_render_pass.h:55
RHI_DEPTH_STENCIL_ATTACHMENT_DESC::enabled
bool enabled
Definition
rhi_render_pass.h:50
RHI_FRAMEBUFFER_DESC
Definition
rhi_render_pass.h:66
RHI_FRAMEBUFFER_DESC::width
uint32_t width
Definition
rhi_render_pass.h:67
RHI_FRAMEBUFFER_DESC::height
uint32_t height
Definition
rhi_render_pass.h:68
RHI_FRAMEBUFFER_DESC::colorFormats
std::vector< RHI_TEXTURE_FORMAT > colorFormats
Definition
rhi_render_pass.h:69
RHI_FRAMEBUFFER_DESC::hasDepthStencil
bool hasDepthStencil
Definition
rhi_render_pass.h:70
RHI_RENDER_PASS_DESC
Definition
rhi_render_pass.h:60
RHI_RENDER_PASS_DESC::colorAttachments
std::vector< RHI_COLOR_ATTACHMENT_DESC > colorAttachments
Definition
rhi_render_pass.h:61
RHI_RENDER_PASS_DESC::depthStencilAttachment
RHI_DEPTH_STENCIL_ATTACHMENT_DESC depthStencilAttachment
Definition
rhi_render_pass.h:62
src
include
rhi
rhi_render_pass.h
Generated on Thu Oct 22 2026 00:06:41 for KiCad PCB EDA Suite by
1.13.2