Blender V5.3
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
14namespace blender::gpu::shader {
15
16enum class Language {
18 /* Shared header. */
20 /* Metal Shading Language. */
22 /* OpenGL Shading Language. */
24 /* Blender Shading Language. */
26 /* Legacy Create Info files. */
28 /* Same as GLSL but enable partial C++ feature support like template, references,
29 * include system, etc ... */
31 /* Output Intermediate Language. */
33};
34
35}
36
38
39using namespace lexit;
40
41enum class ScopeType : char {
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',
54 Template = 'T',
56 Subscript = 'A',
59 Attributes = 'B',
60 Attribute = 'b',
61 /* Added scope inside function body. */
62 Local = 'L',
63 /* Added scope inside FunctionArgs. */
65 /* Added scope inside FunctionCall. */
67 /* Added scope inside LoopArgs. */
68 LoopArg = 'r',
69
70 Statement = 's',
71 Separator = 'o',
72 /* Undetermined. */
74 Bracket = Local,
77};
78
79} // namespace blender::gpu::shader::parser
#define Square(a, x, y)
@ Struct
Definition types.hh:117
@ Namespace
Definition types.hh:107
@ Invalid
Definition types.hh:42
@ Template
Definition types.hh:119