Blender
V5.3
source
blender
gpu
shader_tool
enums.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2025 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
9
10
#pragma once
11
12
#include "
lexit/lexit.hh
"
13
14
namespace
blender::gpu::shader
{
15
16
enum class
Language
{
17
UNKNOWN
= 0,
18
/* Shared header. */
19
CPP
,
20
/* Metal Shading Language. */
21
MSL
,
22
/* OpenGL Shading Language. */
23
GLSL
,
24
/* Blender Shading Language. */
25
BSL
,
26
/* Legacy Create Info files. */
27
INFO
,
28
/* Same as GLSL but enable partial C++ feature support like template, references,
29
* include system, etc ... */
30
BLENDER_GLSL
,
31
/* Output Intermediate Language. */
32
IL
,
33
};
34
35
}
36
37
namespace
blender::gpu::shader::parser
{
38
39
using namespace
lexit
;
40
41
enum class
ScopeType
:
char
{
42
Invalid
= 0,
43
/* Use ascii chars to store them in string, and for easy debugging / testing. */
44
Global
=
'G'
,
45
Namespace
=
'N'
,
46
Struct
=
'S'
,
47
Function
=
'F'
,
48
LoopArgs
=
'l'
,
49
LoopBody
=
'p'
,
50
SwitchArg
=
'w'
,
51
SwitchBody
=
'W'
,
52
FunctionArgs
=
'f'
,
53
FunctionCall
=
'c'
,
54
Template
=
'T'
,
55
TemplateArg
=
't'
,
56
Subscript
=
'A'
,
57
Preprocessor
=
'P'
,
58
Assignment
=
'a'
,
59
Attributes =
'B'
,
60
Attribute
=
'b'
,
61
/* Added scope inside function body. */
62
Local =
'L'
,
63
/* Added scope inside FunctionArgs. */
64
FunctionArg
=
'g'
,
65
/* Added scope inside FunctionCall. */
66
FunctionParam
=
'm'
,
67
/* Added scope inside LoopArgs. */
68
LoopArg
=
'r'
,
69
70
Statement
=
's'
,
71
Separator
=
'o'
,
72
/* Undetermined. */
73
Angle
=
Template
,
74
Bracket
= Local,
75
Parenthesis
=
FunctionArgs
,
76
Square
=
Subscript
,
77
};
78
79
}
// namespace blender::gpu::shader::parser
blender::bke::Attribute
Definition
BKE_attribute_storage.hh:42
lexit.hh
Square
#define Square(a, x, y)
Definition
math_boolean.cc:268
blender::gpu::shader::parser
Definition
ast.cc:12
blender::gpu::shader::parser::ScopeType
ScopeType
Definition
enums.hh:41
blender::gpu::shader::parser::ScopeType::LoopArg
@ LoopArg
Definition
enums.hh:68
blender::gpu::shader::parser::ScopeType::FunctionArg
@ FunctionArg
Definition
enums.hh:64
blender::gpu::shader::parser::ScopeType::LoopArgs
@ LoopArgs
Definition
enums.hh:48
blender::gpu::shader::parser::ScopeType::Statement
@ Statement
Definition
enums.hh:70
blender::gpu::shader::parser::ScopeType::SwitchArg
@ SwitchArg
Definition
enums.hh:50
blender::gpu::shader::parser::ScopeType::Parenthesis
@ Parenthesis
Definition
enums.hh:75
blender::gpu::shader::parser::ScopeType::SwitchBody
@ SwitchBody
Definition
enums.hh:51
blender::gpu::shader::parser::ScopeType::Angle
@ Angle
Definition
enums.hh:73
blender::gpu::shader::parser::ScopeType::FunctionParam
@ FunctionParam
Definition
enums.hh:66
blender::gpu::shader::parser::ScopeType::Function
@ Function
Definition
enums.hh:47
blender::gpu::shader::parser::ScopeType::FunctionArgs
@ FunctionArgs
Definition
enums.hh:52
blender::gpu::shader::parser::ScopeType::Bracket
@ Bracket
Definition
enums.hh:74
blender::gpu::shader::parser::ScopeType::LoopBody
@ LoopBody
Definition
enums.hh:49
blender::gpu::shader::parser::ScopeType::Assignment
@ Assignment
Definition
enums.hh:58
blender::gpu::shader::parser::ScopeType::FunctionCall
@ FunctionCall
Definition
enums.hh:53
blender::gpu::shader
Definition
GPU_common_types.hh:92
blender::gpu::shader::Language
Language
Definition
enums.hh:16
blender::gpu::shader::Language::MSL
@ MSL
Definition
enums.hh:21
blender::gpu::shader::Language::GLSL
@ GLSL
Definition
enums.hh:23
blender::gpu::shader::Language::CPP
@ CPP
Definition
enums.hh:19
blender::gpu::shader::Language::INFO
@ INFO
Definition
enums.hh:27
blender::gpu::shader::Language::UNKNOWN
@ UNKNOWN
Definition
enums.hh:17
blender::gpu::shader::Language::BSL
@ BSL
Definition
enums.hh:25
blender::gpu::shader::Language::IL
@ IL
Definition
enums.hh:32
blender::gpu::shader::Language::BLENDER_GLSL
@ BLENDER_GLSL
Definition
enums.hh:30
lexit
Definition
identifier.hh:22
lexit::Struct
@ Struct
Definition
types.hh:117
lexit::Namespace
@ Namespace
Definition
types.hh:107
lexit::Invalid
@ Invalid
Definition
types.hh:42
lexit::Template
@ Template
Definition
types.hh:119
blender::Global
Definition
BKE_global.hh:30
blender::gpu::Separator
Definition
mtl_shader_generate.cc:25
blender::gpu::shader::parser::ast::Preprocessor
Definition
ast.hh:446
blender::gpu::shader::parser::ast::Subscript
Definition
ast.hh:699
blender::gpu::shader::parser::ast::TemplateArg
Definition
ast.hh:571
Generated on
for Blender by
doxygen
1.18.0