Diligent Engine API Reference: D:/GitHub/DiligentEngine/DiligentCore/Graphics/HLSL2GLSLConverterLib/include/HLSLKeywords.h Source File

Diligent Engine API Reference

HLSLKeywords.h
1 /* Copyright 2015-2018 Egor Yusov
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
12 *
13 * In no event and under no legal theory, whether in tort (including negligence),
14 * contract, or otherwise, unless required by applicable law (such as deliberate
15 * and grossly negligent acts) or agreed to in writing, shall any Contributor be
16 * liable for any damages, including any direct, indirect, special, incidental,
17 * or consequential damages of any character arising as a result of this License or
18 * out of the use or inability to use the software (including but not limited to damages
19 * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
20 * all other commercial damages or losses), even if such Contributor has been advised
21 * of the possibility of such damages.
22 */
23
24 #pragma once
25
26 #define LIST_VECTOR_AND_MATRIX_EXPANSIONS(KEYWORD_HANDLER, type)\
27 KEYWORD_HANDLER(type)\
28 KEYWORD_HANDLER(type##1)\
29 KEYWORD_HANDLER(type##2)\
30 KEYWORD_HANDLER(type##3)\
31 KEYWORD_HANDLER(type##4)\
32 KEYWORD_HANDLER(type##1x1)\
33 KEYWORD_HANDLER(type##1x2)\
34 KEYWORD_HANDLER(type##1x3)\
35 KEYWORD_HANDLER(type##1x4)\
36 KEYWORD_HANDLER(type##2x1)\
37 KEYWORD_HANDLER(type##2x2)\
38 KEYWORD_HANDLER(type##2x3)\
39 KEYWORD_HANDLER(type##2x4)\
40 KEYWORD_HANDLER(type##3x1)\
41 KEYWORD_HANDLER(type##3x2)\
42 KEYWORD_HANDLER(type##3x3)\
43 KEYWORD_HANDLER(type##3x4)\
44 KEYWORD_HANDLER(type##4x1)\
45 KEYWORD_HANDLER(type##4x2)\
46 KEYWORD_HANDLER(type##4x3)\
47 KEYWORD_HANDLER(type##4x4)
48
49 #define ITERATE_KEYWORDS(KEYWORD_HANDLER)\
50 /*All built-in types must be defined consecutively between bool and void*/\
51 LIST_VECTOR_AND_MATRIX_EXPANSIONS(KEYWORD_HANDLER, bool)\
52 LIST_VECTOR_AND_MATRIX_EXPANSIONS(KEYWORD_HANDLER, float)\
53 LIST_VECTOR_AND_MATRIX_EXPANSIONS(KEYWORD_HANDLER, int)\
54 LIST_VECTOR_AND_MATRIX_EXPANSIONS(KEYWORD_HANDLER, uint)\
55 LIST_VECTOR_AND_MATRIX_EXPANSIONS(KEYWORD_HANDLER, min16float)\
56 LIST_VECTOR_AND_MATRIX_EXPANSIONS(KEYWORD_HANDLER, min10float)\
57 LIST_VECTOR_AND_MATRIX_EXPANSIONS(KEYWORD_HANDLER, min16int)\
58 LIST_VECTOR_AND_MATRIX_EXPANSIONS(KEYWORD_HANDLER, min12int)\
59 LIST_VECTOR_AND_MATRIX_EXPANSIONS(KEYWORD_HANDLER, min16uint)\
60 KEYWORD_HANDLER(matrix)\
61 KEYWORD_HANDLER(void)\
62 /*All flow control keywords must be defined consecutively between break and while*/\
63 KEYWORD_HANDLER(break)\
64 KEYWORD_HANDLER(case)\
65 KEYWORD_HANDLER(continue)\
66 KEYWORD_HANDLER(default)\
67 KEYWORD_HANDLER(do)\
68 KEYWORD_HANDLER(else)\
69 KEYWORD_HANDLER(for)\
70 KEYWORD_HANDLER(if)\
71 KEYWORD_HANDLER(return)\
72 KEYWORD_HANDLER(switch)\
73 KEYWORD_HANDLER(while)\
74 KEYWORD_HANDLER(AppendStructuredBuffer)\
75 KEYWORD_HANDLER(asm)\
76 KEYWORD_HANDLER(asm_fragment)\
77 KEYWORD_HANDLER(BlendState)\
78 KEYWORD_HANDLER(Buffer)\
79 KEYWORD_HANDLER(ByteAddressBuffer)\
80 KEYWORD_HANDLER(cbuffer)\
81 KEYWORD_HANDLER(centroid)\
82 KEYWORD_HANDLER(class)\
83 KEYWORD_HANDLER(column_major)\
84 KEYWORD_HANDLER(compile)\
85 KEYWORD_HANDLER(compile_fragment)\
86 KEYWORD_HANDLER(CompileShader)\
87 KEYWORD_HANDLER(const)\
88 KEYWORD_HANDLER(ComputeShader)\
89 KEYWORD_HANDLER(ConsumeStructuredBuffer)\
90 KEYWORD_HANDLER(DepthStencilState)\
91 KEYWORD_HANDLER(DepthStencilView)\
92 KEYWORD_HANDLER(discard)\
93 KEYWORD_HANDLER(double)\
94 KEYWORD_HANDLER(DomainShader)\
95 KEYWORD_HANDLER(dword)\
96 KEYWORD_HANDLER(export)\
97 KEYWORD_HANDLER(extern)\
98 KEYWORD_HANDLER(false)\
99 KEYWORD_HANDLER(fxgroup)\
100 KEYWORD_HANDLER(GeometryShader)\
101 KEYWORD_HANDLER(groupshared)\
102 KEYWORD_HANDLER(half)\
103 KEYWORD_HANDLER(Hullshader)\
104 KEYWORD_HANDLER(in)\
105 KEYWORD_HANDLER(inline)\
106 KEYWORD_HANDLER(inout)\
107 KEYWORD_HANDLER(InputPatch)\
108 KEYWORD_HANDLER(interface)\
109 KEYWORD_HANDLER(line)\
110 KEYWORD_HANDLER(lineadj)\
111 KEYWORD_HANDLER(linear)\
112 KEYWORD_HANDLER(LineStream)\
113 KEYWORD_HANDLER(namespace)\
114 KEYWORD_HANDLER(nointerpolation)\
115 KEYWORD_HANDLER(noperspective)\
116 KEYWORD_HANDLER(NULL)\
117 KEYWORD_HANDLER(out)\
118 KEYWORD_HANDLER(OutputPatch)\
119 KEYWORD_HANDLER(packoffset)\
120 KEYWORD_HANDLER(pass)\
121 KEYWORD_HANDLER(pixelfragment)\
122 KEYWORD_HANDLER(PixelShader)\
123 KEYWORD_HANDLER(point)\
124 KEYWORD_HANDLER(PointStream)\
125 KEYWORD_HANDLER(precise)\
126 KEYWORD_HANDLER(RasterizerState)\
127 KEYWORD_HANDLER(RenderTargetView)\
128 KEYWORD_HANDLER(register)\
129 KEYWORD_HANDLER(row_major)\
130 KEYWORD_HANDLER(RWBuffer)\
131 KEYWORD_HANDLER(RWByteAddressBuffer)\
132 KEYWORD_HANDLER(RWStructuredBuffer)\
133 KEYWORD_HANDLER(RWTexture1D)\
134 KEYWORD_HANDLER(RWTexture1DArray)\
135 KEYWORD_HANDLER(RWTexture2D)\
136 KEYWORD_HANDLER(RWTexture2DArray)\
137 KEYWORD_HANDLER(RWTexture3D)\
138 KEYWORD_HANDLER(sample)\
139 KEYWORD_HANDLER(sampler)\
140 KEYWORD_HANDLER(SamplerState)\
141 KEYWORD_HANDLER(SamplerComparisonState)\
142 KEYWORD_HANDLER(shared)\
143 KEYWORD_HANDLER(snorm)\
144 KEYWORD_HANDLER(stateblock)\
145 KEYWORD_HANDLER(stateblock_state)\
146 KEYWORD_HANDLER(static)\
147 KEYWORD_HANDLER(string)\
148 KEYWORD_HANDLER(struct)\
149 KEYWORD_HANDLER(StructuredBuffer)\
150 KEYWORD_HANDLER(tbuffer)\
151 KEYWORD_HANDLER(technique)\
152 KEYWORD_HANDLER(technique10)\
153 KEYWORD_HANDLER(technique11)\
154 KEYWORD_HANDLER(texture)\
155 KEYWORD_HANDLER(Texture1D)\
156 KEYWORD_HANDLER(Texture1DArray)\
157 KEYWORD_HANDLER(Texture2D)\
158 KEYWORD_HANDLER(Texture2DArray)\
159 KEYWORD_HANDLER(Texture2DMS)\
160 KEYWORD_HANDLER(Texture2DMSArray)\
161 KEYWORD_HANDLER(Texture3D)\
162 KEYWORD_HANDLER(TextureCube)\
163 KEYWORD_HANDLER(TextureCubeArray)\
164 KEYWORD_HANDLER(true)\
165 KEYWORD_HANDLER(typedef)\
166 KEYWORD_HANDLER(triangle)\
167 KEYWORD_HANDLER(triangleadj)\
168 KEYWORD_HANDLER(TriangleStream)\
169 KEYWORD_HANDLER(uniform)\
170 KEYWORD_HANDLER(unorm)\
171 KEYWORD_HANDLER(unsigned)\
172 KEYWORD_HANDLER(vector)\
173 KEYWORD_HANDLER(vertexfragment)\
174 KEYWORD_HANDLER(VertexShader)\
175 KEYWORD_HANDLER(volatile)