1use crate::proc::KeywordSet;
2use crate::racy_lock::RacyLock;
3
4pub const RESERVED_KEYWORDS: &[&str] = &[
5 "const",
13 "uniform",
14 "buffer",
15 "shared",
16 "attribute",
17 "varying",
18 "coherent",
19 "volatile",
20 "restrict",
21 "readonly",
22 "writeonly",
23 "atomic_uint",
24 "layout",
25 "centroid",
26 "flat",
27 "smooth",
28 "noperspective",
29 "patch",
30 "sample",
31 "invariant",
32 "precise",
33 "break",
34 "continue",
35 "do",
36 "for",
37 "while",
38 "switch",
39 "case",
40 "default",
41 "if",
42 "else",
43 "subroutine",
44 "in",
45 "out",
46 "inout",
47 "int",
48 "void",
49 "bool",
50 "true",
51 "false",
52 "float",
53 "double",
54 "discard",
55 "return",
56 "vec2",
57 "vec3",
58 "vec4",
59 "ivec2",
60 "ivec3",
61 "ivec4",
62 "bvec2",
63 "bvec3",
64 "bvec4",
65 "uint",
66 "uvec2",
67 "uvec3",
68 "uvec4",
69 "dvec2",
70 "dvec3",
71 "dvec4",
72 "mat2",
73 "mat3",
74 "mat4",
75 "mat2x2",
76 "mat2x3",
77 "mat2x4",
78 "mat3x2",
79 "mat3x3",
80 "mat3x4",
81 "mat4x2",
82 "mat4x3",
83 "mat4x4",
84 "dmat2",
85 "dmat3",
86 "dmat4",
87 "dmat2x2",
88 "dmat2x3",
89 "dmat2x4",
90 "dmat3x2",
91 "dmat3x3",
92 "dmat3x4",
93 "dmat4x2",
94 "dmat4x3",
95 "dmat4x4",
96 "lowp",
97 "mediump",
98 "highp",
99 "precision",
100 "sampler1D",
101 "sampler1DShadow",
102 "sampler1DArray",
103 "sampler1DArrayShadow",
104 "isampler1D",
105 "isampler1DArray",
106 "usampler1D",
107 "usampler1DArray",
108 "sampler2D",
109 "sampler2DShadow",
110 "sampler2DArray",
111 "sampler2DArrayShadow",
112 "isampler2D",
113 "isampler2DArray",
114 "usampler2D",
115 "usampler2DArray",
116 "sampler2DRect",
117 "sampler2DRectShadow",
118 "isampler2DRect",
119 "usampler2DRect",
120 "sampler2DMS",
121 "isampler2DMS",
122 "usampler2DMS",
123 "sampler2DMSArray",
124 "isampler2DMSArray",
125 "usampler2DMSArray",
126 "sampler3D",
127 "isampler3D",
128 "usampler3D",
129 "samplerCube",
130 "samplerCubeShadow",
131 "isamplerCube",
132 "usamplerCube",
133 "samplerCubeArray",
134 "samplerCubeArrayShadow",
135 "isamplerCubeArray",
136 "usamplerCubeArray",
137 "samplerBuffer",
138 "isamplerBuffer",
139 "usamplerBuffer",
140 "image1D",
141 "iimage1D",
142 "uimage1D",
143 "image1DArray",
144 "iimage1DArray",
145 "uimage1DArray",
146 "image2D",
147 "iimage2D",
148 "uimage2D",
149 "image2DArray",
150 "iimage2DArray",
151 "uimage2DArray",
152 "image2DRect",
153 "iimage2DRect",
154 "uimage2DRect",
155 "image2DMS",
156 "iimage2DMS",
157 "uimage2DMS",
158 "image2DMSArray",
159 "iimage2DMSArray",
160 "uimage2DMSArray",
161 "image3D",
162 "iimage3D",
163 "uimage3D",
164 "imageCube",
165 "iimageCube",
166 "uimageCube",
167 "imageCubeArray",
168 "iimageCubeArray",
169 "uimageCubeArray",
170 "imageBuffer",
171 "iimageBuffer",
172 "uimageBuffer",
173 "struct",
174 "texture1D",
176 "texture1DArray",
177 "itexture1D",
178 "itexture1DArray",
179 "utexture1D",
180 "utexture1DArray",
181 "texture2D",
182 "texture2DArray",
183 "itexture2D",
184 "itexture2DArray",
185 "utexture2D",
186 "utexture2DArray",
187 "texture2DRect",
188 "itexture2DRect",
189 "utexture2DRect",
190 "texture2DMS",
191 "itexture2DMS",
192 "utexture2DMS",
193 "texture2DMSArray",
194 "itexture2DMSArray",
195 "utexture2DMSArray",
196 "texture3D",
197 "itexture3D",
198 "utexture3D",
199 "textureCube",
200 "itextureCube",
201 "utextureCube",
202 "textureCubeArray",
203 "itextureCubeArray",
204 "utextureCubeArray",
205 "textureBuffer",
206 "itextureBuffer",
207 "utextureBuffer",
208 "sampler",
209 "samplerShadow",
210 "subpassInput",
211 "isubpassInput",
212 "usubpassInput",
213 "subpassInputMS",
214 "isubpassInputMS",
215 "usubpassInputMS",
216 "common",
218 "partition",
219 "active",
220 "asm",
221 "class",
222 "union",
223 "enum",
224 "typedef",
225 "template",
226 "this",
227 "resource",
228 "goto",
229 "inline",
230 "noinline",
231 "public",
232 "static",
233 "extern",
234 "external",
235 "interface",
236 "long",
237 "short",
238 "half",
239 "fixed",
240 "unsigned",
241 "superp",
242 "input",
243 "output",
244 "hvec2",
245 "hvec3",
246 "hvec4",
247 "fvec2",
248 "fvec3",
249 "fvec4",
250 "filter",
251 "sizeof",
252 "cast",
253 "namespace",
254 "using",
255 "sampler3DRect",
256 "image1DArrayShadow",
258 "image1DShadow",
259 "image2DArrayShadow",
260 "image2DShadow",
261 "packed",
263 "row_major",
264 "radians",
269 "degrees",
270 "sin",
271 "cos",
272 "tan",
273 "asin",
274 "acos",
275 "atan",
276 "sinh",
277 "cosh",
278 "tanh",
279 "asinh",
280 "acosh",
281 "atanh",
282 "pow",
284 "exp",
285 "log",
286 "exp2",
287 "log2",
288 "sqrt",
289 "inversesqrt",
290 "abs",
292 "sign",
293 "floor",
294 "trunc",
295 "round",
296 "roundEven",
297 "ceil",
298 "fract",
299 "mod",
300 "modf",
301 "min",
302 "max",
303 "clamp",
304 "mix",
305 "step",
306 "smoothstep",
307 "isnan",
308 "isinf",
309 "floatBitsToInt",
310 "floatBitsToUint",
311 "intBitsToFloat",
312 "uintBitsToFloat",
313 "fma",
314 "frexp",
315 "ldexp",
316 "packUnorm2x16",
318 "packSnorm2x16",
319 "packUnorm4x8",
320 "packSnorm4x8",
321 "unpackUnorm2x16",
322 "unpackSnorm2x16",
323 "unpackUnorm4x8",
324 "unpackSnorm4x8",
325 "packHalf2x16",
326 "unpackHalf2x16",
327 "packDouble2x32",
328 "unpackDouble2x32",
329 "length",
331 "distance",
332 "dot",
333 "cross",
334 "normalize",
335 "ftransform",
336 "faceforward",
337 "reflect",
338 "refract",
339 "matrixCompMult",
341 "outerProduct",
342 "transpose",
343 "determinant",
344 "inverse",
345 "lessThan",
347 "lessThanEqual",
348 "greaterThan",
349 "greaterThanEqual",
350 "equal",
351 "notEqual",
352 "any",
353 "all",
354 "not",
355 "uaddCarry",
357 "usubBorrow",
358 "umulExtended",
359 "imulExtended",
360 "bitfieldExtract",
361 "bitfieldInsert",
362 "bitfieldReverse",
363 "bitCount",
364 "findLSB",
365 "findMSB",
366 "textureSize",
368 "textureQueryLod",
369 "textureQueryLevels",
370 "textureSamples",
371 "texture",
373 "textureProj",
374 "textureLod",
375 "textureOffset",
376 "texelFetch",
377 "texelFetchOffset",
378 "textureProjOffset",
379 "textureLodOffset",
380 "textureProjLod",
381 "textureProjLodOffset",
382 "textureGrad",
383 "textureGradOffset",
384 "textureProjGrad",
385 "textureProjGradOffset",
386 "textureGather",
388 "textureGatherOffset",
389 "textureGatherOffsets",
390 "texture1D",
392 "texture1DProj",
393 "texture1DLod",
394 "texture1DProjLod",
395 "texture2D",
396 "texture2DProj",
397 "texture2DLod",
398 "texture2DProjLod",
399 "texture3D",
400 "texture3DProj",
401 "texture3DLod",
402 "texture3DProjLod",
403 "textureCube",
404 "textureCubeLod",
405 "shadow1D",
406 "shadow2D",
407 "shadow1DProj",
408 "shadow2DProj",
409 "shadow1DLod",
410 "shadow2DLod",
411 "shadow1DProjLod",
412 "shadow2DProjLod",
413 "atomicCounterIncrement",
415 "atomicCounterDecrement",
416 "atomicCounter",
417 "atomicCounterAdd",
418 "atomicCounterSubtract",
419 "atomicCounterMin",
420 "atomicCounterMax",
421 "atomicCounterAnd",
422 "atomicCounterOr",
423 "atomicCounterXor",
424 "atomicCounterExchange",
425 "atomicCounterCompSwap",
426 "atomicAdd",
428 "atomicMin",
429 "atomicMax",
430 "atomicAnd",
431 "atomicOr",
432 "atomicXor",
433 "atomicExchange",
434 "atomicCompSwap",
435 "imageSize",
437 "imageSamples",
438 "imageLoad",
439 "imageStore",
440 "imageAtomicAdd",
441 "imageAtomicMin",
442 "imageAtomicMax",
443 "imageAtomicAnd",
444 "imageAtomicOr",
445 "imageAtomicXor",
446 "imageAtomicExchange",
447 "imageAtomicCompSwap",
448 "EmitStreamVertex",
450 "EndStreamPrimitive",
451 "EmitVertex",
452 "EndPrimitive",
453 "dFdx",
455 "dFdy",
456 "dFdxFine",
457 "dFdyFine",
458 "dFdxCoarse",
459 "dFdyCoarse",
460 "fwidth",
461 "fwidthFine",
462 "fwidthCoarse",
463 "interpolateAtCentroid",
465 "interpolateAtSample",
466 "interpolateAtOffset",
467 "noise1",
469 "noise2",
470 "noise3",
471 "noise4",
472 "barrier",
474 "memoryBarrier",
476 "memoryBarrierAtomicCounter",
477 "memoryBarrierBuffer",
478 "memoryBarrierShared",
479 "memoryBarrierImage",
480 "groupMemoryBarrier",
481 "subpassLoad",
483 "anyInvocation",
485 "allInvocations",
486 "allInvocationsEqual",
487 "main",
491 super::MODF_FUNCTION,
493 super::FREXP_FUNCTION,
494 super::FIRST_INSTANCE_BINDING,
495];
496
497pub static RESERVED_KEYWORD_SET: RacyLock<KeywordSet> =
502 RacyLock::new(|| KeywordSet::from_iter(RESERVED_KEYWORDS));