KiCad PCB EDA Suite
Loading...
Searching...
No Matches
rhi_shader.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 <cstddef>
24
#include <cstdint>
25
26
enum class
RHI_SHADER_TYPE
27
{
28
VERTEX
,
29
FRAGMENT
,
30
COMPUTE
31
};
32
34
struct
RHI_SHADER_DESC
35
{
36
RHI_SHADER_TYPE
type
=
RHI_SHADER_TYPE::VERTEX
;
37
const
uint8_t*
bytecode
=
nullptr
;
38
size_t
sizeBytes
= 0;
39
};
40
45
struct
RHI_SHADER_BLOB
46
{
47
const
uint8_t*
spirv
=
nullptr
;
48
size_t
spirvSize
= 0;
49
const
char
*
msl
=
nullptr
;
50
size_t
mslSize
= 0;
51
};
VERTEX
Definition
vertex_set.h:54
RHI_SHADER_STAGE::FRAGMENT
@ FRAGMENT
Definition
rhi_bind_group.h:44
RHI_SHADER_STAGE::COMPUTE
@ COMPUTE
Definition
rhi_bind_group.h:45
rhi_handle.h
RHI_SHADER_TYPE
RHI_SHADER_TYPE
Definition
rhi_shader.h:27
RHI_SHADER_TYPE::VERTEX
@ VERTEX
Definition
rhi_shader.h:28
RHI_SHADER_BLOB
One shader stage as GenerateShaderHeader.cmake embeds it.
Definition
rhi_shader.h:46
RHI_SHADER_BLOB::mslSize
size_t mslSize
Definition
rhi_shader.h:50
RHI_SHADER_BLOB::msl
const char * msl
Definition
rhi_shader.h:49
RHI_SHADER_BLOB::spirv
const uint8_t * spirv
Definition
rhi_shader.h:47
RHI_SHADER_BLOB::spirvSize
size_t spirvSize
Definition
rhi_shader.h:48
RHI_SHADER_DESC
The bytecode is SPIR-V on Vulkan and MSL source text on Metal.
Definition
rhi_shader.h:35
RHI_SHADER_DESC::type
RHI_SHADER_TYPE type
Definition
rhi_shader.h:36
RHI_SHADER_DESC::sizeBytes
size_t sizeBytes
Definition
rhi_shader.h:38
RHI_SHADER_DESC::bytecode
const uint8_t * bytecode
Definition
rhi_shader.h:37
src
include
rhi
rhi_shader.h
Generated on Thu Oct 22 2026 00:06:41 for KiCad PCB EDA Suite by
1.13.2