blob: c5761fb6d66add910410b30964a2be5773d32b90 [file] [log] [blame]
dan sinclair9d3ffa62024-09-16 19:11:34 +00001// Copyright 2024 The Dawn & Tint Authors
2//
3// Redistribution and use in source and binary forms, with or without
4// modification, are permitted provided that the following conditions are met:
5//
6// 1. Redistributions of source code must retain the above copyright notice, this
7// list of conditions and the following disclaimer.
8//
9// 2. Redistributions in binary form must reproduce the above copyright notice,
10// this list of conditions and the following disclaimer in the documentation
11// and/or other materials provided with the distribution.
12//
13// 3. Neither the name of the copyright holder nor the names of its
14// contributors may be used to endorse or promote products derived from
15// this software without specific prior written permission.
16//
17// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28////////////////////////////////////////////////////////////////////////////////
29// File generated by 'tools/src/cmd/gen' using the template:
30// src/tint/lang/glsl/builtin_fn.cc.tmpl
31//
32// To regenerate run: './tools/run gen'
33//
34// Do not modify this file directly
35////////////////////////////////////////////////////////////////////////////////
36
37#include "src/tint/lang/glsl/builtin_fn.h"
38
39namespace tint::glsl {
40
41const char* str(BuiltinFn i) {
42 switch (i) {
43 case BuiltinFn::kNone:
44 return "<none>";
dan sinclairda2fa972024-09-23 16:35:35 +000045 case BuiltinFn::kLength:
46 return "length";
dan sinclair9d3ffa62024-09-16 19:11:34 +000047 case BuiltinFn::kBarrier:
48 return "barrier";
49 case BuiltinFn::kMemoryBarrierBuffer:
50 return "memoryBarrierBuffer";
51 case BuiltinFn::kMemoryBarrierImage:
52 return "memoryBarrierImage";
dan sinclair7b7fb812024-09-16 19:43:49 +000053 case BuiltinFn::kAtomicCompSwap:
54 return "atomicCompSwap";
55 case BuiltinFn::kAtomicSub:
56 return "atomicSub";
dan sinclair562d9b72024-09-17 22:33:56 +000057 case BuiltinFn::kFloatBitsToInt:
58 return "floatBitsToInt";
59 case BuiltinFn::kFloatBitsToUint:
60 return "floatBitsToUint";
61 case BuiltinFn::kIntBitsToFloat:
62 return "intBitsToFloat";
63 case BuiltinFn::kUintBitsToFloat:
64 return "uintBitsToFloat";
dan sinclair416092b2024-09-18 02:36:45 +000065 case BuiltinFn::kBitCount:
66 return "bitCount";
dan sinclairdd143d22024-09-18 04:34:45 +000067 case BuiltinFn::kBitfieldExtract:
68 return "bitfieldExtract";
dan sinclair5bc64762024-09-18 04:34:52 +000069 case BuiltinFn::kBitfieldInsert:
70 return "bitfieldInsert";
dan sinclair9ae5b842024-09-17 23:49:20 +000071 case BuiltinFn::kPackFloat2X16:
72 return "packFloat2x16";
73 case BuiltinFn::kUnpackFloat2X16:
74 return "unpackFloat2x16";
dan sinclair8879b182024-09-25 14:35:19 +000075 case BuiltinFn::kAbs:
76 return "abs";
dan sinclairfa3e1442024-09-24 22:59:17 +000077 case BuiltinFn::kAny:
78 return "any";
79 case BuiltinFn::kAll:
80 return "all";
dan sinclaire0ca1652024-09-24 20:37:31 +000081 case BuiltinFn::kDot:
82 return "dot";
dan sinclaira6300bf2024-09-27 23:48:30 +000083 case BuiltinFn::kMix:
84 return "mix";
dan sinclair8ce2ed72024-09-24 20:40:08 +000085 case BuiltinFn::kModf:
86 return "modf";
dan sinclair5deac0c2024-09-25 14:31:01 +000087 case BuiltinFn::kFrexp:
88 return "frexp";
dan sinclair8055bf42024-10-08 01:52:48 +000089 case BuiltinFn::kTexture:
90 return "texture";
91 case BuiltinFn::kTextureOffset:
92 return "textureOffset";
dan sinclairec448b12024-10-08 02:52:12 +000093 case BuiltinFn::kTextureLod:
94 return "textureLod";
95 case BuiltinFn::kExtTextureLod:
96 return "extTextureLod";
97 case BuiltinFn::kTextureLodOffset:
98 return "textureLodOffset";
99 case BuiltinFn::kExtTextureLodOffset:
100 return "extTextureLodOffset";
dan sinclairb6fc95f2024-10-08 03:38:53 +0000101 case BuiltinFn::kTextureGrad:
102 return "textureGrad";
dan sinclair8055bf42024-10-08 01:52:48 +0000103 case BuiltinFn::kTextureGradOffset:
104 return "textureGradOffset";
dan sinclair144db472024-10-07 19:57:55 +0000105 case BuiltinFn::kTextureGather:
106 return "textureGather";
107 case BuiltinFn::kTextureGatherOffset:
108 return "textureGatherOffset";
dan sinclair81247372024-09-18 00:01:43 +0000109 case BuiltinFn::kTextureSize:
110 return "textureSize";
111 case BuiltinFn::kImageSize:
112 return "imageSize";
dan sinclaira5afb1f2024-09-20 04:34:34 +0000113 case BuiltinFn::kTexelFetch:
114 return "texelFetch";
115 case BuiltinFn::kImageLoad:
116 return "imageLoad";
dan sinclaird13c9f92024-09-20 05:00:42 +0000117 case BuiltinFn::kImageStore:
118 return "imageStore";
dan sinclair803ff2b2024-09-23 18:37:22 +0000119 case BuiltinFn::kLessThan:
120 return "lessThan";
121 case BuiltinFn::kLessThanEqual:
122 return "lessThanEqual";
123 case BuiltinFn::kGreaterThan:
124 return "greaterThan";
125 case BuiltinFn::kGreaterThanEqual:
126 return "greaterThanEqual";
127 case BuiltinFn::kEqual:
128 return "equal";
129 case BuiltinFn::kNotEqual:
130 return "notEqual";
dan sinclair9d3ffa62024-09-16 19:11:34 +0000131 }
132 return "<unknown>";
133}
134
135} // namespace tint::glsl