blob: 3f4b94489fc4b83333b26dc1fd4bd8fef0e0aa66 [file] [log] [blame]
Austin Engcc2516a2023-10-17 20:57:54 +00001// Copyright 2021 The Dawn & Tint Authors
Ben Claytonb85e6922022-02-02 23:07:11 +00002//
Austin Engcc2516a2023-10-17 20:57:54 +00003// Redistribution and use in source and binary forms, with or without
4// modification, are permitted provided that the following conditions are met:
Ben Claytonb85e6922022-02-02 23:07:11 +00005//
Austin Engcc2516a2023-10-17 20:57:54 +00006// 1. Redistributions of source code must retain the above copyright notice, this
7// list of conditions and the following disclaimer.
Ben Claytonb85e6922022-02-02 23:07:11 +00008//
Austin Engcc2516a2023-10-17 20:57:54 +00009// 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.
Ben Claytonb85e6922022-02-02 23:07:11 +000027
28////////////////////////////////////////////////////////////////////////////////
Ben Clayton62d98482023-09-21 10:31:23 +000029// core builtin definition file //
Ben Claytonb85e6922022-02-02 23:07:11 +000030// //
31// This file is used to generate parts of the Tint BuiltinTable, various //
Ben Claytone4351242024-02-21 08:11:33 +000032// enum definition files. //
David Netof72919f2023-09-14 16:52:23 +000033// //
34// After modifying this file, run: //
35// tools/run gen //
36// from the Dawn source directory. //
Ben Claytone4351242024-02-21 08:11:33 +000037// //
38// See docs/tint/intrinsic_definition_files.md for syntax //
Ben Claytonb85e6922022-02-02 23:07:11 +000039////////////////////////////////////////////////////////////////////////////////
40
Ben Clayton62d98482023-09-21 10:31:23 +000041import "src/tint/lang/core/address_space.def"
42import "src/tint/lang/core/access.def"
dan sinclair23fa64f2024-08-19 22:50:10 +000043import "src/tint/lang/core/subgroup_matrix_kind.def"
Ben Clayton62d98482023-09-21 10:31:23 +000044import "src/tint/lang/core/texel_format.def"
45
Ben Claytonb85e6922022-02-02 23:07:11 +000046////////////////////////////////////////////////////////////////////////////////
47// Enumerators //
48////////////////////////////////////////////////////////////////////////////////
49
Jiawei Shao1eca38f2024-08-13 02:20:18 +000050// https://www.w3.org/TR/WGSL/#builtin-inputs-outputs
Ben Claytonfe8e6ee2022-07-27 22:21:30 +000051enum builtin_value {
52 position
53 vertex_index
54 instance_index
55 front_facing
56 frag_depth
57 local_invocation_id
58 local_invocation_index
59 global_invocation_id
60 workgroup_id
61 num_workgroups
62 sample_index
63 sample_mask
Jiawei Shao2918c422024-08-15 00:55:19 +000064 clip_distances
James Priceae32ef42023-08-01 15:01:32 +000065 subgroup_invocation_id
66 subgroup_size
Ben Clayton4d3ff972023-02-21 17:33:54 +000067 __point_size
Ben Claytonfe8e6ee2022-07-27 22:21:30 +000068}
69
Ben Claytonf9ed9d32022-10-11 19:49:17 +000070// https://www.w3.org/TR/WGSL/#interpolation
71enum interpolation_type {
72 perspective
73 linear
74 flat
75}
76
77// https://www.w3.org/TR/WGSL/#interpolation
78enum interpolation_sampling {
79 center
80 centroid
81 sample
Gregg Tavaresd0151512024-07-11 23:12:44 +000082 first
83 either
Ben Claytonf9ed9d32022-10-11 19:49:17 +000084}
85
Ben Claytonad7330182023-02-07 13:35:58 +000086enum builtin_type {
Ben Clayton6e0a5152023-02-09 23:33:24 +000087 // https://www.w3.org/TR/WGSL/#scalar-types
88 bool
89 f16
90 f32
91 i32
92 u32
Ben Clayton0335c7d2022-12-14 11:55:58 +000093 // https://www.w3.org/TR/WGSL/#matrix-types
Ben Clayton971318f2023-02-14 13:52:43 +000094 mat2x2
95 mat2x3
96 mat2x4
97 mat3x2
98 mat3x3
99 mat3x4
100 mat4x2
101 mat4x3
102 mat4x4
Ben Clayton0335c7d2022-12-14 11:55:58 +0000103 mat2x2f
104 mat2x2h
105 mat2x3f
106 mat2x3h
107 mat2x4f
108 mat2x4h
109 mat3x2f
110 mat3x2h
111 mat3x3f
112 mat3x3h
113 mat3x4f
114 mat3x4h
115 mat4x2f
116 mat4x2h
117 mat4x3f
118 mat4x3h
119 mat4x4f
120 mat4x4h
121 // https://www.w3.org/TR/WGSL/#vector-types
Ben Clayton971318f2023-02-14 13:52:43 +0000122 vec2
123 vec3
124 vec4
Ben Claytond5d207b2022-12-01 13:41:56 +0000125 vec2f
126 vec2h
127 vec2i
128 vec2u
129 vec3f
130 vec3h
131 vec3i
132 vec3u
133 vec4f
134 vec4h
135 vec4i
136 vec4u
Ben Clayton971318f2023-02-14 13:52:43 +0000137 // https://www.w3.org/TR/WGSL/#array-types
138 array
139 // https://www.w3.org/TR/WGSL/#atomic-types
140 atomic
141 // https://www.w3.org/TR/WGSL/#ref-ptr-types
142 ptr
Ben Claytoned3389f2023-02-09 23:56:42 +0000143 // https://www.w3.org/TR/WGSL/#sampler-type
144 sampler
145 sampler_comparison
Ben Claytona5fec202023-02-10 02:34:21 +0000146 // https://www.w3.org/TR/WGSL/#texture-depth
147 texture_depth_2d
148 texture_depth_2d_array
149 texture_depth_cube
150 texture_depth_cube_array
151 texture_depth_multisampled_2d
Ben Clayton971318f2023-02-14 13:52:43 +0000152 // https://www.w3.org/TR/WGSL/#sampled-texture-type
153 texture_1d
154 texture_2d
155 texture_2d_array
156 texture_3d
157 texture_cube
158 texture_cube_array
159 // https://www.w3.org/TR/WGSL/#multisampled-texture-type
160 texture_multisampled_2d
Ben Clayton1131d312023-02-10 19:24:24 +0000161 // https://www.w3.org/TR/WGSL/#texture-storage
162 texture_storage_1d
163 texture_storage_2d
164 texture_storage_2d_array
165 texture_storage_3d
Ben Clayton4906b032023-02-09 23:59:07 +0000166 // https://www.w3.org/TR/WGSL/#external-texture-type
167 texture_external
Le Hoang Quyene4e46132024-05-23 22:28:18 +0000168 // chromium_internal_input_attachments
169 input_attachment
James Price4d3af662023-02-27 20:21:03 +0000170
171 // Internal types.
Ben Clayton9073b752024-02-09 21:23:02 +0000172 __packed_vec3 // note: not core type, but used by legacy MSL writer
Ben Clayton47dd3012023-04-26 18:27:53 +0000173 __atomic_compare_exchange_result_i32
174 __atomic_compare_exchange_result_u32
175 __frexp_result_abstract
176 __frexp_result_f16
177 __frexp_result_f32
178 __frexp_result_vec2_abstract
179 __frexp_result_vec2_f16
180 __frexp_result_vec2_f32
181 __frexp_result_vec3_abstract
182 __frexp_result_vec3_f16
183 __frexp_result_vec3_f32
184 __frexp_result_vec4_abstract
185 __frexp_result_vec4_f16
186 __frexp_result_vec4_f32
187 __modf_result_abstract
188 __modf_result_f16
189 __modf_result_f32
190 __modf_result_vec2_abstract
191 __modf_result_vec2_f16
192 __modf_result_vec2_f32
193 __modf_result_vec3_abstract
194 __modf_result_vec3_f16
195 __modf_result_vec3_f32
196 __modf_result_vec4_abstract
197 __modf_result_vec4_f16
198 __modf_result_vec4_f32
Ben Claytond5d207b2022-12-01 13:41:56 +0000199}
200
dan sinclair077d97a2023-02-23 19:08:57 +0000201// https://gpuweb.github.io/gpuweb/wgsl/#attributes
202// Notes:
203// * `diagnostic` is listed, even though it is a keyword, so it appears in suggested alternatives
204// * `const` is not listed here as it can not be written in user programs and should not show up
205// in error messages
206enum attribute {
207 align
208 binding
Corentin Wallezdfb4eb02024-01-30 12:06:13 +0000209 blend_src
dan sinclair077d97a2023-02-23 19:08:57 +0000210 builtin
211 compute
212 diagnostic
213 fragment
214 group
215 id
216 interpolate
217 invariant
218 location
219 must_use
220 size
221 vertex
222 workgroup_size
Ben Claytonc36093e2023-11-10 09:46:24 +0000223
224 // framebuffer-fetch input
225 color
Le Hoang Quyen59eb7f32024-05-23 15:44:53 +0000226
227 // chromium_internal_input_attachments
228 input_attachment_index
dan sinclair077d97a2023-02-23 19:08:57 +0000229}
230
dan sinclair1688de02024-07-18 20:04:21 +0000231// These are parameter usages which show up in other def files but not in core.def.
dan sinclair6bbb5d42024-07-11 16:12:10 +0000232enum usages {
dan sinclair5bc64762024-09-18 04:34:52 +0000233 base
dan sinclairdd143d22024-09-18 04:34:45 +0000234 bits
dan sinclair6bbb5d42024-07-11 16:12:10 +0000235 depth
dan sinclaire09d97e2024-07-18 03:38:32 +0000236 compare_value
dan sinclair6bbb5d42024-07-11 16:12:10 +0000237 elements
dan sinclaira108e6f2024-07-12 18:22:35 +0000238 height
dan sinclair5bc64762024-09-18 04:34:52 +0000239 insert
dan sinclair249a21a2024-08-01 01:52:08 +0000240 level
dan sinclaire09d97e2024-07-18 03:38:32 +0000241 location
dan sinclair6bbb5d42024-07-11 16:12:10 +0000242 num_levels
dan sinclaire09d97e2024-07-18 03:38:32 +0000243 original_value
dan sinclaira108e6f2024-07-12 18:22:35 +0000244 samples
245 width
dan sinclair6bbb5d42024-07-11 16:12:10 +0000246}
247
Ben Claytonb85e6922022-02-02 23:07:11 +0000248////////////////////////////////////////////////////////////////////////////////
Ben Claytone4351242024-02-21 08:11:33 +0000249// Primitive types //
Ben Claytonb85e6922022-02-02 23:07:11 +0000250////////////////////////////////////////////////////////////////////////////////
251
252// https://gpuweb.github.io/gpuweb/wgsl/#plain-types-section
253type bool
dan sinclair23fa64f2024-08-19 22:50:10 +0000254type i8
255type u8
Zhaoming Jiang60588822022-06-28 14:03:36 +0000256@precedence(3) type i32
257@precedence(2) type u32
258@precedence(1) type f32
259@precedence(0) type f16
Ben Claytonb85e6922022-02-02 23:07:11 +0000260type vec2<T>
261type vec3<T>
262type vec4<T>
Ben Clayton6ae608c2022-05-16 20:54:42 +0000263type mat2x2<T>
264type mat2x3<T>
265type mat2x4<T>
266type mat3x2<T>
267type mat3x3<T>
268type mat3x4<T>
269type mat4x2<T>
270type mat4x3<T>
271type mat4x4<T>
Ben Claytone3e91c02022-06-01 20:44:50 +0000272@display("vec{N}<{T}>") type vec<N: num, T>
273@display("mat{N}x{M}<{T}>") type mat<N: num, M: num, T>
dan sinclairff7cf212022-10-03 14:05:23 +0000274type ptr<S: address_space, T, A: access>
Ben Claytonb85e6922022-02-02 23:07:11 +0000275type atomic<T>
276type array<T>
277type sampler
278type sampler_comparison
279type texture_1d<T>
280type texture_2d<T>
281type texture_2d_array<T>
282type texture_3d<T>
283type texture_cube<T>
284type texture_cube_array<T>
285type texture_multisampled_2d<T>
286type texture_depth_2d
287type texture_depth_2d_array
288type texture_depth_cube
289type texture_depth_cube_array
290type texture_depth_multisampled_2d
291type texture_storage_1d<F: texel_format, A: access>
292type texture_storage_2d<F: texel_format, A: access>
293type texture_storage_2d_array<F: texel_format, A: access>
294type texture_storage_3d<F: texel_format, A: access>
295type texture_external
Le Hoang Quyenc2241312024-05-28 18:29:28 +0000296type input_attachment<T>
Ben Claytonb85e6922022-02-02 23:07:11 +0000297
Zhaoming Jiang20cddbf2022-08-05 15:11:44 +0000298@display("__modf_result_{T}") type __modf_result<T>
299@display("__modf_result_vec{N}_{T}") type __modf_result_vec<N: num, T>
300@display("__frexp_result_{T}") type __frexp_result<T>
301@display("__frexp_result_vec{N}_{T}") type __frexp_result_vec<N: num, T>
Ben Claytonb85e6922022-02-02 23:07:11 +0000302
Antonio Maiorano08f4b552022-05-31 13:20:28 +0000303type __atomic_compare_exchange_result<T>
304
dan sinclair23fa64f2024-08-19 22:50:10 +0000305type subgroup_matrix<S: subgroup_matrix_kind, T, M: num, K: num>
306
Ben Claytonb85e6922022-02-02 23:07:11 +0000307////////////////////////////////////////////////////////////////////////////////
308// Type matchers //
309// //
310// A type matcher that can match one or more types. //
311////////////////////////////////////////////////////////////////////////////////
312
Ben Clayton9073b752024-02-09 21:23:02 +0000313match scalar: f32 | f16 | i32 | u32 | bool
314match scalar_no_f32: i32 | f16 | u32 | bool
315match scalar_no_f16: f32 | i32 | u32 | bool
316match scalar_no_i32: f32 | f16 | u32 | bool
317match scalar_no_u32: f32 | f16 | i32 | bool
318match scalar_no_bool: f32 | f16 | i32 | u32
Zhaoming Jiang1e98a9b2022-07-21 19:55:35 +0000319match fiu32_f16: f32 | i32 | u32 | f16
320match fiu32: f32 | i32 | u32
321match fi32_f16: f32 | i32 | f16
322match fi32: f32 | i32
323match f32_f16: f32 | f16
324match iu32: i32 | u32
Ben Claytonb85e6922022-02-02 23:07:11 +0000325
dan sinclair23fa64f2024-08-19 22:50:10 +0000326match subgroup_matrix_elements: f32 | f16 | u32 | i32 | u8 | i8
327match subgroup_matrix_kind_left : subgroup_matrix_kind.left
328match subgroup_matrix_kind_right : subgroup_matrix_kind.right
329match subgroup_matrix_kind_result : subgroup_matrix_kind.result
330
Ben Claytonb85e6922022-02-02 23:07:11 +0000331////////////////////////////////////////////////////////////////////////////////
332// Enum matchers //
333// //
334// A number matcher that can match one or more enumerator values. //
335// All enumerator values listed in the match declaration need to be from the //
336// same enum. //
337////////////////////////////////////////////////////////////////////////////////
338
339// https://gpuweb.github.io/gpuweb/wgsl/#texel-formats
Ben Claytonc768e642022-07-26 17:49:54 +0000340match f32_texel_format
Ben Clayton448c01b2024-02-28 00:23:17 +0000341 : texel_format.r8unorm
342 | texel_format.bgra8unorm
Ben Claytond03dcee2023-01-18 19:42:03 +0000343 | texel_format.rgba8unorm
Ben Claytonc768e642022-07-26 17:49:54 +0000344 | texel_format.rgba8snorm
345 | texel_format.rgba16float
346 | texel_format.r32float
347 | texel_format.rg32float
348 | texel_format.rgba32float
349match i32_texel_format
350 : texel_format.rgba8sint
351 | texel_format.rgba16sint
352 | texel_format.r32sint
353 | texel_format.rg32sint
354 | texel_format.rgba32sint
355match u32_texel_format
356 : texel_format.rgba8uint
357 | texel_format.rgba16uint
358 | texel_format.r32uint
359 | texel_format.rg32uint
360 | texel_format.rgba32uint
Ben Claytonb85e6922022-02-02 23:07:11 +0000361
Ben Claytonc768e642022-07-26 17:49:54 +0000362match write: access.write
363match read_write: access.read_write
James Price88c231b2023-08-15 12:47:28 +0000364match readable
365 : access.read
366 | access.read_write
James Price807f3ef2023-08-11 00:45:54 +0000367match writable
368 : access.write
369 | access.read_write
Ben Claytonb85e6922022-02-02 23:07:11 +0000370
Ben Claytonc768e642022-07-26 17:49:54 +0000371match function_private_workgroup
dan sinclairff7cf212022-10-03 14:05:23 +0000372 : address_space.function
373 | address_space.private
374 | address_space.workgroup
Ben Claytonc768e642022-07-26 17:49:54 +0000375match workgroup_or_storage
dan sinclairff7cf212022-10-03 14:05:23 +0000376 : address_space.workgroup
377 | address_space.storage
Ben Claytonc768e642022-07-26 17:49:54 +0000378match storage
dan sinclairff7cf212022-10-03 14:05:23 +0000379 : address_space.storage
James Price128980f2023-01-06 02:25:06 +0000380match workgroup
381 : address_space.workgroup
Ben Claytonb85e6922022-02-02 23:07:11 +0000382
383////////////////////////////////////////////////////////////////////////////////
384// Builtin Functions //
Ben Claytonb85e6922022-02-02 23:07:11 +0000385////////////////////////////////////////////////////////////////////////////////
386
387// https://gpuweb.github.io/gpuweb/wgsl/#builtin-functions
dan sinclair4ac9ba92024-08-19 19:21:19 +0000388@must_use @const implicit(T: fiu32_f16) fn abs(T) -> T
389@must_use @const implicit(N: num, T: fiu32_f16) fn abs(vec<N, T>) -> vec<N, T>
390@must_use @const implicit(T: f32_f16) fn acos(@test_value(0.96891242171) T) -> T
391@must_use @const implicit(N: num, T: f32_f16) fn acos(@test_value(0.96891242171) vec<N, T>) -> vec<N, T>
392@must_use @const implicit(T: f32_f16) fn acosh(@test_value(1.5430806348) T) -> T
393@must_use @const implicit(N: num, T: f32_f16) fn acosh(@test_value(1.5430806348) vec<N, T>) -> vec<N, T>
Ben Claytond8490322023-02-22 13:52:21 +0000394@must_use @const fn all(bool) -> bool
dan sinclair4ac9ba92024-08-19 19:21:19 +0000395@must_use @const implicit(N: num) fn all(vec<N, bool>) -> bool
Ben Claytond8490322023-02-22 13:52:21 +0000396@must_use @const fn any(bool) -> bool
dan sinclair4ac9ba92024-08-19 19:21:19 +0000397@must_use @const implicit(N: num) fn any(vec<N, bool>) -> bool
398@must_use implicit(T, A: access) fn arrayLength(ptr<storage, array<T>, A>) -> u32
399@must_use @const implicit(T: f32_f16) fn asin(@test_value(0.479425538604) T) -> T
400@must_use @const implicit(N: num, T: f32_f16) fn asin(@test_value(0.479425538604) vec<N, T>) -> vec<N, T>
401@must_use @const implicit(T: f32_f16) fn asinh(T) -> T
402@must_use @const implicit(N: num, T: f32_f16) fn asinh(vec<N, T>) -> vec<N, T>
403@must_use @const implicit(T: f32_f16) fn atan(T) -> T
404@must_use @const implicit(N: num, T: f32_f16) fn atan(vec<N, T>) -> vec<N, T>
405@must_use @const implicit(T: f32_f16) fn atan2(T, T) -> T
406@must_use @const implicit(T: f32_f16, N: num) fn atan2(vec<N, T>, vec<N, T>) -> vec<N, T>
407@must_use @const implicit(T: f32_f16) fn atanh(@test_value(0.5) T) -> T
408@must_use @const implicit(N: num, T: f32_f16) fn atanh(@test_value(0.5) vec<N, T>) -> vec<N, T>
409@must_use @const implicit(T: f32_f16) fn ceil(@test_value(1.5) T) -> T
410@must_use @const implicit(N: num, T: f32_f16) fn ceil(@test_value(1.5) vec<N, T>) -> vec<N, T>
411@must_use @const implicit(T: fiu32_f16) fn clamp(T, T, T) -> T
412@must_use @const implicit(T: fiu32_f16, N: num) fn clamp(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T>
413@must_use @const implicit(T: f32_f16) fn cos(@test_value(0) T) -> T
414@must_use @const implicit(N: num, T: f32_f16) fn cos(@test_value(0) vec<N, T>) -> vec<N, T>
415@must_use @const implicit(T: f32_f16) fn cosh(@test_value(0) T) -> T
416@must_use @const implicit(N: num, T: f32_f16) fn cosh(@test_value(0) vec<N, T>) -> vec<N, T>
417@must_use @const implicit(T: iu32) fn countLeadingZeros(T) -> T
418@must_use @const implicit(N: num, T: iu32) fn countLeadingZeros(vec<N, T>) -> vec<N, T>
419@must_use @const implicit(T: iu32) fn countOneBits(T) -> T
420@must_use @const implicit(N: num, T: iu32) fn countOneBits(vec<N, T>) -> vec<N, T>
421@must_use @const implicit(T: iu32) fn countTrailingZeros(T) -> T
422@must_use @const implicit(N: num, T: iu32) fn countTrailingZeros(vec<N, T>) -> vec<N, T>
423@must_use @const implicit(T: f32_f16) fn cross(vec3<T>, vec3<T>) -> vec3<T>
424@must_use @const implicit(T: f32_f16) fn degrees(T) -> T
425@must_use @const implicit(N: num, T: f32_f16) fn degrees(vec<N, T>) -> vec<N, T>
426@must_use @const implicit(N: num, T: f32_f16) fn determinant(mat<N, N, T>) -> T
427@must_use @const implicit(T: f32_f16) fn distance(T, T) -> T
428@must_use @const implicit(N: num, T: f32_f16) fn distance(vec<N, T>, vec<N, T>) -> T
429@must_use @const implicit(N: num, T: fiu32_f16) fn dot(vec<N, T>, vec<N, T>) -> T
dan sinclair82ac0fd2024-03-20 20:43:24 +0000430@must_use @const fn dot4I8Packed(u32, u32) -> i32
431@must_use @const fn dot4U8Packed(u32, u32) -> u32
Ben Claytond8490322023-02-22 13:52:21 +0000432@must_use @stage("fragment") fn dpdx(f32) -> f32
dan sinclair4ac9ba92024-08-19 19:21:19 +0000433@must_use @stage("fragment") implicit(N: num) fn dpdx(vec<N, f32>) -> vec<N, f32>
Ben Claytond8490322023-02-22 13:52:21 +0000434@must_use @stage("fragment") fn dpdxCoarse(f32) -> f32
dan sinclair4ac9ba92024-08-19 19:21:19 +0000435@must_use @stage("fragment") implicit(N: num) fn dpdxCoarse(vec<N, f32>) -> vec<N, f32>
Ben Claytond8490322023-02-22 13:52:21 +0000436@must_use @stage("fragment") fn dpdxFine(f32) -> f32
dan sinclair4ac9ba92024-08-19 19:21:19 +0000437@must_use @stage("fragment") implicit(N: num) fn dpdxFine(vec<N, f32>) -> vec<N, f32>
Ben Claytond8490322023-02-22 13:52:21 +0000438@must_use @stage("fragment") fn dpdy(f32) -> f32
dan sinclair4ac9ba92024-08-19 19:21:19 +0000439@must_use @stage("fragment") implicit(N: num) fn dpdy(vec<N, f32>) -> vec<N, f32>
Ben Claytond8490322023-02-22 13:52:21 +0000440@must_use @stage("fragment") fn dpdyCoarse(f32) -> f32
dan sinclair4ac9ba92024-08-19 19:21:19 +0000441@must_use @stage("fragment") implicit(N: num) fn dpdyCoarse(vec<N, f32>) -> vec<N, f32>
Ben Claytond8490322023-02-22 13:52:21 +0000442@must_use @stage("fragment") fn dpdyFine(f32) -> f32
dan sinclair4ac9ba92024-08-19 19:21:19 +0000443@must_use @stage("fragment") implicit(N: num) fn dpdyFine(vec<N, f32>) -> vec<N, f32>
444@must_use @const implicit(T: f32_f16) fn exp(T) -> T
445@must_use @const implicit(N: num, T: f32_f16) fn exp(vec<N, T>) -> vec<N, T>
446@must_use @const implicit(T: f32_f16) fn exp2(T) -> T
447@must_use @const implicit(N: num, T: f32_f16) fn exp2(vec<N, T>) -> vec<N, T>
448@must_use @const implicit(T: iu32) fn extractBits(T, u32, u32) -> T
449@must_use @const implicit(N: num, T: iu32) fn extractBits(vec<N, T>, u32, u32) -> vec<N, T>
450@must_use @const implicit(N: num, T: f32_f16) fn faceForward(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T>
451@must_use @const implicit(T: iu32) fn firstLeadingBit(T) -> T
452@must_use @const implicit(N: num, T: iu32) fn firstLeadingBit(vec<N, T>) -> vec<N, T>
453@must_use @const implicit(T: iu32) fn firstTrailingBit(T) -> T
454@must_use @const implicit(N: num, T: iu32) fn firstTrailingBit(vec<N, T>) -> vec<N, T>
455@must_use @const implicit(T: f32_f16) fn floor(@test_value(1.5) T) -> T
456@must_use @const implicit(N: num, T: f32_f16) fn floor(@test_value(1.5) vec<N, T>) -> vec<N, T>
457@must_use @const implicit(T: f32_f16) fn fma(T, T, T) -> T
458@must_use @const implicit(N: num, T: f32_f16) fn fma(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T>
459@must_use @const implicit(T: f32_f16) fn fract(@test_value(1.25) T) -> T
460@must_use @const implicit(N: num, T: f32_f16) fn fract(@test_value(1.25) vec<N, T>) -> vec<N, T>
461@must_use @const implicit(T: f32_f16) fn frexp(T) -> __frexp_result<T>
462@must_use @const implicit(N: num, T: f32_f16) fn frexp(vec<N, T>) -> __frexp_result_vec<N, T>
Ben Claytond8490322023-02-22 13:52:21 +0000463@must_use @stage("fragment") fn fwidth(f32) -> f32
dan sinclair4ac9ba92024-08-19 19:21:19 +0000464@must_use @stage("fragment") implicit(N: num) fn fwidth(vec<N, f32>) -> vec<N, f32>
Ben Claytond8490322023-02-22 13:52:21 +0000465@must_use @stage("fragment") fn fwidthCoarse(f32) -> f32
dan sinclair4ac9ba92024-08-19 19:21:19 +0000466@must_use @stage("fragment") implicit(N: num) fn fwidthCoarse(vec<N, f32>) -> vec<N, f32>
Ben Claytond8490322023-02-22 13:52:21 +0000467@must_use @stage("fragment") fn fwidthFine(f32) -> f32
dan sinclair4ac9ba92024-08-19 19:21:19 +0000468@must_use @stage("fragment") implicit(N: num) fn fwidthFine(vec<N, f32>) -> vec<N, f32>
469@must_use @const implicit(T: iu32) fn insertBits(T, T, u32, u32) -> T
470@must_use @const implicit(N: num, T: iu32) fn insertBits(vec<N, T>, vec<N, T>, u32, u32) -> vec<N, T>
471@must_use @const implicit(T: f32_f16) fn inverseSqrt(T) -> T
472@must_use @const implicit(N: num, T: f32_f16) fn inverseSqrt(vec<N, T>) -> vec<N, T>
473@must_use @const implicit(T: f32_f16, U: i32) fn ldexp(T, U) -> T
474@must_use @const implicit(N: num, T: f32_f16, U: i32) fn ldexp(vec<N, T>, vec<N, U>) -> vec<N, T>
475@must_use @const implicit(T: f32_f16) fn length(@test_value(0.0) T) -> T
476@must_use @const implicit(N: num, T: f32_f16) fn length(@test_value(0.0) vec<N, T>) -> T
477@must_use @const implicit(T: f32_f16) fn log(T) -> T
478@must_use @const implicit(N: num, T: f32_f16) fn log(vec<N, T>) -> vec<N, T>
479@must_use @const implicit(T: f32_f16) fn log2(T) -> T
480@must_use @const implicit(N: num, T: f32_f16) fn log2(vec<N, T>) -> vec<N, T>
481@must_use @const implicit(T: fiu32_f16) fn max(T, T) -> T
482@must_use @const implicit(N: num, T: fiu32_f16) fn max(vec<N, T>, vec<N, T>) -> vec<N, T>
483@must_use @const implicit(T: fiu32_f16) fn min(T, T) -> T
484@must_use @const implicit(N: num, T: fiu32_f16) fn min(vec<N, T>, vec<N, T>) -> vec<N, T>
485@must_use @const implicit(T: f32_f16) fn mix(T, T, T) -> T
486@must_use @const implicit(N: num, T: f32_f16) fn mix(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T>
487@must_use @const implicit(N: num, T: f32_f16) fn mix(vec<N, T>, vec<N, T>, T) -> vec<N, T>
488@must_use @const implicit(T: f32_f16) fn modf(@test_value(-1.5) T) -> __modf_result<T>
489@must_use @const implicit(N: num, T: f32_f16) fn modf(@test_value(-1.5) vec<N, T>) -> __modf_result_vec<N, T>
490@must_use @const implicit(N: num, T: f32_f16) fn normalize(vec<N, T>) -> vec<N, T>
Ben Claytond8490322023-02-22 13:52:21 +0000491@must_use @const fn pack2x16float(vec2<f32>) -> u32
492@must_use @const fn pack2x16snorm(vec2<f32>) -> u32
493@must_use @const fn pack2x16unorm(vec2<f32>) -> u32
494@must_use @const fn pack4x8snorm(vec4<f32>) -> u32
495@must_use @const fn pack4x8unorm(vec4<f32>) -> u32
Jiawei Shaoc8ca47f2023-12-19 19:20:32 +0000496@must_use @const fn pack4xI8(vec4<i32>) -> u32
497@must_use @const fn pack4xU8(vec4<u32>) -> u32
Jiawei Shao0a408862024-01-05 03:14:11 +0000498@must_use @const fn pack4xI8Clamp(vec4<i32>) -> u32
499@must_use @const fn pack4xU8Clamp(vec4<u32>) -> u32
dan sinclair4ac9ba92024-08-19 19:21:19 +0000500@must_use @const implicit(T: f32_f16) fn pow(T, T) -> T
501@must_use @const implicit(N: num, T: f32_f16) fn pow(vec<N, T>, vec<N, T>) -> vec<N, T>
Ben Claytond8490322023-02-22 13:52:21 +0000502@must_use @const fn quantizeToF16(f32) -> f32
dan sinclair4ac9ba92024-08-19 19:21:19 +0000503@must_use @const implicit(N: num) fn quantizeToF16(vec<N, f32>) -> vec<N, f32>
504@must_use @const implicit(T: f32_f16) fn radians(T) -> T
505@must_use @const implicit(N: num, T: f32_f16) fn radians(vec<N, T>) -> vec<N, T>
506@must_use @const implicit(N: num, T: f32_f16) fn reflect(vec<N, T>, vec<N, T>) -> vec<N, T>
507@must_use @const implicit(N: num, T: f32_f16) fn refract(vec<N, T>, vec<N, T>, T) -> vec<N, T>
508@must_use @const implicit(T: iu32) fn reverseBits(T) -> T
509@must_use @const implicit(N: num, T: iu32) fn reverseBits(vec<N, T>) -> vec<N, T>
510@must_use @const implicit(T: f32_f16) fn round(@test_value(3.5) T) -> T
511@must_use @const implicit(N: num, T: f32_f16) fn round(@test_value(3.5) vec<N, T>) -> vec<N, T>
512@must_use @const implicit(T: f32_f16) fn saturate(@test_value(2) T) -> T
513@must_use @const implicit(T: f32_f16, N: num) fn saturate(@test_value(2) vec<N, T>) -> vec<N, T>
514@must_use @const("select_bool") implicit(T: scalar) fn select(T, T, bool) -> T
515@must_use @const("select_bool") implicit(T: scalar, N: num) fn select(vec<N, T>, vec<N, T>, bool) -> vec<N, T>
516@must_use @const("select_boolvec") implicit(N: num, T: scalar) fn select(vec<N, T>, vec<N, T>, vec<N, bool>) -> vec<N, T>
517@must_use @const implicit(T: fi32_f16) fn sign(T) -> T
518@must_use @const implicit(N: num, T: fi32_f16) fn sign(vec<N, T>) -> vec<N, T>
519@must_use @const implicit(T: f32_f16) fn sin(@test_value(1.57079632679) T) -> T
520@must_use @const implicit(N: num, T: f32_f16) fn sin(@test_value(1.57079632679) vec<N, T>) -> vec<N, T>
521@must_use @const implicit(T: f32_f16) fn sinh(T) -> T
522@must_use @const implicit(N: num, T: f32_f16) fn sinh(vec<N, T>) -> vec<N, T>
523@must_use @const implicit(T: f32_f16) fn smoothstep(@test_value(2) T, @test_value(4) T, @test_value(3) T) -> T
524@must_use @const implicit(N: num, T: f32_f16) fn smoothstep(@test_value(2) vec<N, T>, @test_value(4) vec<N, T>, @test_value(3) vec<N, T>) -> vec<N, T>
525@must_use @const implicit(T: f32_f16) fn sqrt(T) -> T
526@must_use @const implicit(N: num, T: f32_f16) fn sqrt(vec<N, T>) -> vec<N, T>
527@must_use @const implicit(T: f32_f16) fn step(T, T) -> T
528@must_use @const implicit(N: num, T: f32_f16) fn step(vec<N, T>, vec<N, T>) -> vec<N, T>
Ben Claytone3e91c02022-06-01 20:44:50 +0000529@stage("compute") fn storageBarrier()
dan sinclair4ac9ba92024-08-19 19:21:19 +0000530@must_use @const implicit(T: f32_f16) fn tan(T) -> T
531@must_use @const implicit(N: num, T: f32_f16) fn tan(vec<N, T>) -> vec<N, T>
532@must_use @const implicit(T: f32_f16) fn tanh(T) -> T
533@must_use @const implicit(N: num, T: f32_f16) fn tanh(vec<N, T>) -> vec<N, T>
534@must_use @const implicit(M: num, N: num, T: f32_f16) fn transpose(mat<M, N, T>) -> mat<N, M, T>
535@must_use @const implicit(T: f32_f16) fn trunc(@test_value(1.5) T) -> T
536@must_use @const implicit(N: num, T: f32_f16) fn trunc(@test_value(1.5) vec<N, T>) -> vec<N, T>
Ben Claytond8490322023-02-22 13:52:21 +0000537@must_use @const fn unpack2x16float(u32) -> vec2<f32>
538@must_use @const fn unpack2x16snorm(u32) -> vec2<f32>
539@must_use @const fn unpack2x16unorm(u32) -> vec2<f32>
540@must_use @const fn unpack4x8snorm(u32) -> vec4<f32>
541@must_use @const fn unpack4x8unorm(u32) -> vec4<f32>
Jiawei Shao0a408862024-01-05 03:14:11 +0000542@must_use @const fn unpack4xI8(u32) -> vec4<i32>
543@must_use @const fn unpack4xU8(u32) -> vec4<u32>
Ben Claytone3e91c02022-06-01 20:44:50 +0000544@stage("compute") fn workgroupBarrier()
Ben Claytonb85e6922022-02-02 23:07:11 +0000545
James Price79f4a072023-08-11 00:45:54 +0000546@stage("compute") fn textureBarrier()
dan sinclair4ac9ba92024-08-19 19:21:19 +0000547@must_use implicit(T: fiu32) fn textureDimensions(texture: texture_1d<T>) -> u32
548@must_use implicit(T: fiu32, L: iu32) fn textureDimensions(texture: texture_1d<T>, level: L) -> u32
549@must_use implicit(T: fiu32) fn textureDimensions(texture: texture_2d<T>) -> vec2<u32>
550@must_use implicit(T: fiu32, L: iu32) fn textureDimensions(texture: texture_2d<T>, level: L) -> vec2<u32>
551@must_use implicit(T: fiu32) fn textureDimensions(texture: texture_2d_array<T>) -> vec2<u32>
552@must_use implicit(T: fiu32, L: iu32) fn textureDimensions(texture: texture_2d_array<T>, level: L) -> vec2<u32>
553@must_use implicit(T: fiu32) fn textureDimensions(texture: texture_3d<T>) -> vec3<u32>
554@must_use implicit(T: fiu32, L: iu32) fn textureDimensions(texture: texture_3d<T>, level: L) -> vec3<u32>
555@must_use implicit(T: fiu32) fn textureDimensions(texture: texture_cube<T>) -> vec2<u32>
556@must_use implicit(T: fiu32, L: iu32) fn textureDimensions(texture: texture_cube<T>, level: L) -> vec2<u32>
557@must_use implicit(T: fiu32) fn textureDimensions(texture: texture_cube_array<T>) -> vec2<u32>
558@must_use implicit(T: fiu32, L: iu32) fn textureDimensions(texture: texture_cube_array<T>, level: L) -> vec2<u32>
559@must_use implicit(T: fiu32) fn textureDimensions(texture: texture_multisampled_2d<T>) -> vec2<u32>
Ben Claytond8490322023-02-22 13:52:21 +0000560@must_use fn textureDimensions(texture: texture_depth_2d) -> vec2<u32>
dan sinclair4ac9ba92024-08-19 19:21:19 +0000561@must_use implicit(L: iu32) fn textureDimensions(texture: texture_depth_2d, level: L) -> vec2<u32>
Ben Claytond8490322023-02-22 13:52:21 +0000562@must_use fn textureDimensions(texture: texture_depth_2d_array) -> vec2<u32>
dan sinclair4ac9ba92024-08-19 19:21:19 +0000563@must_use implicit(L: iu32) fn textureDimensions(texture: texture_depth_2d_array, level: L) -> vec2<u32>
Ben Claytond8490322023-02-22 13:52:21 +0000564@must_use fn textureDimensions(texture: texture_depth_cube) -> vec2<u32>
dan sinclair4ac9ba92024-08-19 19:21:19 +0000565@must_use implicit(L: iu32) fn textureDimensions(texture: texture_depth_cube, level: L) -> vec2<u32>
Ben Claytond8490322023-02-22 13:52:21 +0000566@must_use fn textureDimensions(texture: texture_depth_cube_array) -> vec2<u32>
dan sinclair4ac9ba92024-08-19 19:21:19 +0000567@must_use implicit(L: iu32) fn textureDimensions(texture: texture_depth_cube_array, level: L) -> vec2<u32>
Ben Claytond8490322023-02-22 13:52:21 +0000568@must_use fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<u32>
dan sinclair4ac9ba92024-08-19 19:21:19 +0000569@must_use implicit(F: texel_format, A: access) fn textureDimensions(texture: texture_storage_1d<F, A>) -> u32
570@must_use implicit(F: texel_format, A: access) fn textureDimensions(texture: texture_storage_2d<F, A>) -> vec2<u32>
571@must_use implicit(F: texel_format, A: access) fn textureDimensions(texture: texture_storage_2d_array<F, A>) -> vec2<u32>
572@must_use implicit(F: texel_format, A: access) fn textureDimensions(texture: texture_storage_3d<F, A>) -> vec3<u32>
Ben Claytond8490322023-02-22 13:52:21 +0000573@must_use fn textureDimensions(texture: texture_external) -> vec2<u32>
dan sinclair4ac9ba92024-08-19 19:21:19 +0000574@must_use implicit(T: fiu32, C: iu32) fn textureGather(@const component: C, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T>
575@must_use implicit(T: fiu32, C: iu32) fn textureGather(@const component: C, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<T>
576@must_use implicit(T: fiu32, C: iu32, A: iu32) fn textureGather(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<T>
577@must_use implicit(T: fiu32, C: iu32, A: iu32) fn textureGather(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> vec4<T>
578@must_use implicit(T: fiu32, C: iu32) fn textureGather(@const component: C, texture: texture_cube<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T>
579@must_use implicit(T: fiu32, C: iu32, A: iu32) fn textureGather(@const component: C, texture: texture_cube_array<T>, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<T>
Ben Claytond8490322023-02-22 13:52:21 +0000580@must_use fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
581@must_use fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
dan sinclair4ac9ba92024-08-19 19:21:19 +0000582@must_use implicit(A: iu32) fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<f32>
583@must_use implicit(A: iu32) fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> vec4<f32>
Ben Claytond8490322023-02-22 13:52:21 +0000584@must_use fn textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
dan sinclair4ac9ba92024-08-19 19:21:19 +0000585@must_use implicit(A: iu32) fn textureGather(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<f32>
Ben Claytond8490322023-02-22 13:52:21 +0000586@must_use fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> vec4<f32>
587@must_use fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32>
dan sinclair4ac9ba92024-08-19 19:21:19 +0000588@must_use implicit(A: iu32) fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> vec4<f32>
589@must_use implicit(A: iu32) fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32>
Ben Claytond8490322023-02-22 13:52:21 +0000590@must_use fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> vec4<f32>
dan sinclair4ac9ba92024-08-19 19:21:19 +0000591@must_use implicit(A: iu32) fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: A, depth_ref: f32) -> vec4<f32>
592@must_use implicit(T: fiu32) fn textureNumLayers(texture: texture_2d_array<T>) -> u32
593@must_use implicit(T: fiu32) fn textureNumLayers(texture: texture_cube_array<T>) -> u32
Ben Claytond8490322023-02-22 13:52:21 +0000594@must_use fn textureNumLayers(texture: texture_depth_2d_array) -> u32
Ben Clayton068eb3e2023-03-08 02:48:34 +0000595@must_use fn textureNumLayers(texture: texture_depth_cube_array) -> u32
dan sinclair4ac9ba92024-08-19 19:21:19 +0000596@must_use implicit(F: texel_format, A: access) fn textureNumLayers(texture: texture_storage_2d_array<F, A>) -> u32
597@must_use implicit(T: fiu32) fn textureNumLevels(texture: texture_1d<T>) -> u32
598@must_use implicit(T: fiu32) fn textureNumLevels(texture: texture_2d<T>) -> u32
599@must_use implicit(T: fiu32) fn textureNumLevels(texture: texture_2d_array<T>) -> u32
600@must_use implicit(T: fiu32) fn textureNumLevels(texture: texture_3d<T>) -> u32
601@must_use implicit(T: fiu32) fn textureNumLevels(texture: texture_cube<T>) -> u32
602@must_use implicit(T: fiu32) fn textureNumLevels(texture: texture_cube_array<T>) -> u32
Ben Claytond8490322023-02-22 13:52:21 +0000603@must_use fn textureNumLevels(texture: texture_depth_2d) -> u32
604@must_use fn textureNumLevels(texture: texture_depth_2d_array) -> u32
605@must_use fn textureNumLevels(texture: texture_depth_cube) -> u32
606@must_use fn textureNumLevels(texture: texture_depth_cube_array) -> u32
dan sinclair4ac9ba92024-08-19 19:21:19 +0000607@must_use implicit(T: fiu32) fn textureNumSamples(texture: texture_multisampled_2d<T>) -> u32
Ben Claytond8490322023-02-22 13:52:21 +0000608@must_use fn textureNumSamples(texture: texture_depth_multisampled_2d) -> u32
609@must_use @stage("fragment") fn textureSample(texture: texture_1d<f32>, sampler: sampler, coords: f32) -> vec4<f32>
610@must_use @stage("fragment") fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
611@must_use @stage("fragment") fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
dan sinclair4ac9ba92024-08-19 19:21:19 +0000612@must_use @stage("fragment") implicit(A: iu32) fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<f32>
613@must_use @stage("fragment") implicit(A: iu32) fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> vec4<f32>
Ben Claytond8490322023-02-22 13:52:21 +0000614@must_use @stage("fragment") fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
615@must_use @stage("fragment") fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, @const offset: vec3<i32>) -> vec4<f32>
616@must_use @stage("fragment") fn textureSample(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
dan sinclair4ac9ba92024-08-19 19:21:19 +0000617@must_use @stage("fragment") implicit(A: iu32) fn textureSample(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<f32>
Ben Claytond8490322023-02-22 13:52:21 +0000618@must_use @stage("fragment") fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> f32
619@must_use @stage("fragment") fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> f32
dan sinclair4ac9ba92024-08-19 19:21:19 +0000620@must_use @stage("fragment") implicit(A: iu32) fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A) -> f32
621@must_use @stage("fragment") implicit(A: iu32) fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> f32
Ben Claytond8490322023-02-22 13:52:21 +0000622@must_use @stage("fragment") fn textureSample(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> f32
dan sinclair4ac9ba92024-08-19 19:21:19 +0000623@must_use @stage("fragment") implicit(A: iu32) fn textureSample(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: A) -> f32
Ben Claytond8490322023-02-22 13:52:21 +0000624@must_use @stage("fragment") fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32) -> vec4<f32>
625@must_use @stage("fragment") fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32, @const offset: vec2<i32>) -> vec4<f32>
dan sinclair4ac9ba92024-08-19 19:21:19 +0000626@must_use @stage("fragment") implicit(A: iu32) fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, bias: f32) -> vec4<f32>
627@must_use @stage("fragment") implicit(A: iu32) fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, bias: f32, @const offset: vec2<i32>) -> vec4<f32>
Ben Claytond8490322023-02-22 13:52:21 +0000628@must_use @stage("fragment") fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32>
629@must_use @stage("fragment") fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32, @const offset: vec3<i32>) -> vec4<f32>
630@must_use @stage("fragment") fn textureSampleBias(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32>
dan sinclair4ac9ba92024-08-19 19:21:19 +0000631@must_use @stage("fragment") implicit(A: iu32) fn textureSampleBias(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A, bias: f32) -> vec4<f32>
Ben Claytond8490322023-02-22 13:52:21 +0000632@must_use @stage("fragment") fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32
633@must_use @stage("fragment") fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32
dan sinclair4ac9ba92024-08-19 19:21:19 +0000634@must_use @stage("fragment") implicit(A: iu32) fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> f32
635@must_use @stage("fragment") implicit(A: iu32) fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32, @const offset: vec2<i32>) -> f32
Ben Claytond8490322023-02-22 13:52:21 +0000636@must_use @stage("fragment") fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
dan sinclair4ac9ba92024-08-19 19:21:19 +0000637@must_use @stage("fragment") implicit(A: iu32) fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: A, depth_ref: f32) -> f32
Ben Claytond8490322023-02-22 13:52:21 +0000638@must_use fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32
639@must_use fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32
dan sinclair4ac9ba92024-08-19 19:21:19 +0000640@must_use implicit(A: iu32) fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> f32
641@must_use implicit(A: iu32) fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32, @const offset: vec2<i32>) -> f32
Ben Claytond8490322023-02-22 13:52:21 +0000642@must_use fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
dan sinclair4ac9ba92024-08-19 19:21:19 +0000643@must_use implicit(A: iu32) fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: A, depth_ref: f32) -> f32
Ben Claytond8490322023-02-22 13:52:21 +0000644@must_use fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
645@must_use fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
dan sinclair4ac9ba92024-08-19 19:21:19 +0000646@must_use implicit(A: iu32) fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
647@must_use implicit(A: iu32) fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
Ben Claytond8490322023-02-22 13:52:21 +0000648@must_use fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
649@must_use fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>, @const offset: vec3<i32>) -> vec4<f32>
650@must_use fn textureSampleGrad(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
dan sinclair4ac9ba92024-08-19 19:21:19 +0000651@must_use implicit(A: iu32) fn textureSampleGrad(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
Ben Claytond8490322023-02-22 13:52:21 +0000652@must_use fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32) -> vec4<f32>
653@must_use fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32, @const offset: vec2<i32>) -> vec4<f32>
dan sinclair4ac9ba92024-08-19 19:21:19 +0000654@must_use implicit(A: iu32) fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, level: f32) -> vec4<f32>
655@must_use implicit(A: iu32) fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, level: f32, @const offset: vec2<i32>) -> vec4<f32>
Ben Claytond8490322023-02-22 13:52:21 +0000656@must_use fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32>
657@must_use fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32, @const offset: vec3<i32>) -> vec4<f32>
658@must_use fn textureSampleLevel(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32>
dan sinclair4ac9ba92024-08-19 19:21:19 +0000659@must_use implicit(A: iu32) fn textureSampleLevel(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A, level: f32) -> vec4<f32>
660@must_use implicit(L: iu32) fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: L) -> f32
661@must_use implicit(L: iu32) fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: L, @const offset: vec2<i32>) -> f32
662@must_use implicit(A: iu32, L: iu32) fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, level: L) -> f32
663@must_use implicit(A: iu32, L: iu32) fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, level: L, @const offset: vec2<i32>) -> f32
664@must_use implicit(L: iu32) fn textureSampleLevel(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: L) -> f32
665@must_use implicit(A: iu32, L: iu32) fn textureSampleLevel(texture: texture_depth_cube_array,sampler: sampler, coords: vec3<f32>, array_index: A, level: L) -> f32
Ben Claytond8490322023-02-22 13:52:21 +0000666@must_use fn textureSampleBaseClampToEdge(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
667@must_use fn textureSampleBaseClampToEdge(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
dan sinclair4ac9ba92024-08-19 19:21:19 +0000668implicit(C: iu32) fn textureStore(texture: texture_storage_1d<f32_texel_format, writable>, coords: C, value: vec4<f32>)
669implicit(C: iu32) fn textureStore(texture: texture_storage_2d<f32_texel_format, writable>, coords: vec2<C>, value: vec4<f32>)
670implicit(C: iu32, A: iu32) fn textureStore(texture: texture_storage_2d_array<f32_texel_format, writable>, coords: vec2<C>, array_index: A, value: vec4<f32>)
671implicit(C: iu32) fn textureStore(texture: texture_storage_3d<f32_texel_format, writable>, coords: vec3<C>, value: vec4<f32>)
672implicit(C: iu32) fn textureStore(texture: texture_storage_1d<i32_texel_format, writable>, coords: C, value: vec4<i32>)
673implicit(C: iu32) fn textureStore(texture: texture_storage_2d<i32_texel_format, writable>, coords: vec2<C>, value: vec4<i32>)
674implicit(C: iu32, A: iu32) fn textureStore(texture: texture_storage_2d_array<i32_texel_format, writable>, coords: vec2<C>, array_index: A, value: vec4<i32>)
675implicit(C: iu32) fn textureStore(texture: texture_storage_3d<i32_texel_format, writable>, coords: vec3<C>, value: vec4<i32>)
676implicit(C: iu32) fn textureStore(texture: texture_storage_1d<u32_texel_format, writable>, coords: C, value: vec4<u32>)
677implicit(C: iu32) fn textureStore(texture: texture_storage_2d<u32_texel_format, writable>, coords: vec2<C>, value: vec4<u32>)
678implicit(C: iu32, A: iu32) fn textureStore(texture: texture_storage_2d_array<u32_texel_format, writable>, coords: vec2<C>, array_index: A, value: vec4<u32>)
679implicit(C: iu32) fn textureStore(texture: texture_storage_3d<u32_texel_format, writable>, coords: vec3<C>, value: vec4<u32>)
680@must_use implicit(T: fiu32, C: iu32, L: iu32) fn textureLoad(texture: texture_1d<T>, coords: C, level: L) -> vec4<T>
681@must_use implicit(T: fiu32, C: iu32, L: iu32) fn textureLoad(texture: texture_2d<T>, coords: vec2<C>, level: L) -> vec4<T>
682@must_use implicit(T: fiu32, C: iu32, A: iu32, L: iu32) fn textureLoad(texture: texture_2d_array<T>, coords: vec2<C>, array_index: A, level: L) -> vec4<T>
683@must_use implicit(T: fiu32, C: iu32, L: iu32) fn textureLoad(texture: texture_3d<T>, coords: vec3<C>, level: L) -> vec4<T>
684@must_use implicit(T: fiu32, C: iu32, S: iu32) fn textureLoad(texture: texture_multisampled_2d<T>, coords: vec2<C>, sample_index: S) -> vec4<T>
685@must_use implicit(C: iu32, L: iu32) fn textureLoad(texture: texture_depth_2d, coords: vec2<C>, level: L) -> f32
686@must_use implicit(C: iu32, A: iu32, L: iu32) fn textureLoad(texture: texture_depth_2d_array, coords: vec2<C>, array_index: A, level: L) -> f32
687@must_use implicit(C: iu32, S: iu32) fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2<C>, sample_index: S) -> f32
688@must_use implicit(C: iu32) fn textureLoad(texture: texture_external, coords: vec2<C>) -> vec4<f32>
689@must_use implicit(C: iu32) fn textureLoad(texture: texture_storage_1d<f32_texel_format, readable>, coords: C) -> vec4<f32>
690@must_use implicit(C: iu32) fn textureLoad(texture: texture_storage_1d<i32_texel_format, readable>, coords: C) -> vec4<i32>
691@must_use implicit(C: iu32) fn textureLoad(texture: texture_storage_1d<u32_texel_format, readable>, coords: C) -> vec4<u32>
692@must_use implicit(C: iu32) fn textureLoad(texture: texture_storage_2d<f32_texel_format, readable>, coords: vec2<C>) -> vec4<f32>
693@must_use implicit(C: iu32) fn textureLoad(texture: texture_storage_2d<i32_texel_format, readable>, coords: vec2<C>) -> vec4<i32>
694@must_use implicit(C: iu32) fn textureLoad(texture: texture_storage_2d<u32_texel_format, readable>, coords: vec2<C>) -> vec4<u32>
695@must_use implicit(C: iu32, A: iu32) fn textureLoad(texture: texture_storage_2d_array<f32_texel_format, readable>, coords: vec2<C>, array_index: A) -> vec4<f32>
696@must_use implicit(C: iu32, A: iu32) fn textureLoad(texture: texture_storage_2d_array<i32_texel_format, readable>, coords: vec2<C>, array_index: A) -> vec4<i32>
697@must_use implicit(C: iu32, A: iu32) fn textureLoad(texture: texture_storage_2d_array<u32_texel_format, readable>, coords: vec2<C>, array_index: A) -> vec4<u32>
698@must_use implicit(C: iu32) fn textureLoad(texture: texture_storage_3d<f32_texel_format, readable>, coords: vec3<C>) -> vec4<f32>
699@must_use implicit(C: iu32) fn textureLoad(texture: texture_storage_3d<i32_texel_format, readable>, coords: vec3<C>) -> vec4<i32>
700@must_use implicit(C: iu32) fn textureLoad(texture: texture_storage_3d<u32_texel_format, readable>, coords: vec3<C>) -> vec4<u32>
Ben Claytonb85e6922022-02-02 23:07:11 +0000701
dan sinclair4ac9ba92024-08-19 19:21:19 +0000702@stage("fragment") implicit(T: fiu32) fn inputAttachmentLoad(input_attachment: input_attachment<T>) -> vec4<T>
Le Hoang Quyenc2241312024-05-28 18:29:28 +0000703
dan sinclair4ac9ba92024-08-19 19:21:19 +0000704@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicLoad(ptr<S, atomic<T>, read_write>) -> T
705@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicStore(ptr<S, atomic<T>, read_write>, T)
706@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicAdd(ptr<S, atomic<T>, read_write>, T) -> T
707@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicSub(ptr<S, atomic<T>, read_write>, T) -> T
708@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicMax(ptr<S, atomic<T>, read_write>, T) -> T
709@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicMin(ptr<S, atomic<T>, read_write>, T) -> T
710@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicAnd(ptr<S, atomic<T>, read_write>, T) -> T
711@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicOr(ptr<S, atomic<T>, read_write>, T) -> T
712@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicXor(ptr<S, atomic<T>, read_write>, T) -> T
713@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicExchange(ptr<S, atomic<T>, read_write>, T) -> T
714@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicCompareExchangeWeak(ptr<S, atomic<T>, read_write>, T, T) -> __atomic_compare_exchange_result<T>
Ben Clayton9fb29a32022-05-09 20:00:13 +0000715
Natalie Chouinard8f3ec782024-08-08 13:41:53 +0000716@must_use @stage("fragment", "compute") fn subgroupBallot(bool) -> vec4<u32>
Natalie Chouinardf15cc072024-08-09 20:50:15 +0000717@must_use @stage("fragment", "compute") fn subgroupElect() -> bool
dan sinclair4ac9ba92024-08-19 19:21:19 +0000718@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupBroadcast(value: T, @const sourceLaneIndex: iu32) -> T
719@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupBroadcast(value: vec<N, T>, @const sourceLaneIndex: iu32) -> vec<N, T>
720@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupBroadcastFirst(value: T) -> T
721@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupBroadcastFirst(value: vec<N, T>) -> vec<N, T>
722@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupShuffle(value: T, sourceLaneIndex: iu32) -> T
723@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupShuffle(value: vec<N, T>, sourceLaneIndex: iu32) -> vec<N, T>
724@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupShuffleXor(value: T, mask: u32) -> T
725@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupShuffleXor(value: vec<N, T>, mask: u32) -> vec<N, T>
726@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupShuffleUp(value: T, delta: u32) -> T
727@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupShuffleUp(value: vec<N, T>, delta: u32) -> vec<N, T>
728@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupShuffleDown(value: T, delta: u32) -> T
729@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupShuffleDown(value: vec<N, T>, delta: u32) -> vec<N, T>
730@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupAdd(value: T) -> T
731@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupAdd(value: vec<N, T>) -> vec<N, T>
732@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupExclusiveAdd(value: T) -> T
733@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupExclusiveAdd(value: vec<N, T>) -> vec<N, T>
734@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupMul(value: T) -> T
735@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupMul(value: vec<N, T>) -> vec<N, T>
736@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupExclusiveMul(value: T) -> T
737@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupExclusiveMul(value: vec<N, T>) -> vec<N, T>
738@must_use @stage("fragment", "compute") implicit(T: iu32) fn subgroupAnd(value: T) -> T
739@must_use @stage("fragment", "compute") implicit(N: num, T: iu32) fn subgroupAnd(value: vec<N, T>) -> vec<N, T>
740@must_use @stage("fragment", "compute") implicit(T: iu32) fn subgroupOr(value: T) -> T
741@must_use @stage("fragment", "compute") implicit(N: num, T: iu32) fn subgroupOr(value: vec<N, T>) -> vec<N, T>
742@must_use @stage("fragment", "compute") implicit(T: iu32) fn subgroupXor(value: T) -> T
743@must_use @stage("fragment", "compute") implicit(N: num, T: iu32) fn subgroupXor(value: vec<N, T>) -> vec<N, T>
744@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupMin(value: T) -> T
745@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupMin(value: vec<N, T>) -> vec<N, T>
746@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupMax(value: T) -> T
747@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupMax(value: vec<N, T>) -> vec<N, T>
Natalie Chouinard95624692024-08-09 19:03:38 +0000748@must_use @stage("fragment", "compute") fn subgroupAll(bool) -> bool
749@must_use @stage("fragment", "compute") fn subgroupAny(bool) -> bool
dan sinclair4ac9ba92024-08-19 19:21:19 +0000750@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn quadBroadcast(e: T, @const id: iu32) -> T
751@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn quadBroadcast(e: vec<N, T>, @const id: iu32) -> vec<N, T>
752@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn quadSwapX(e: T) -> T
753@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn quadSwapX(e: vec<N, T>) -> vec<N, T>
754@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn quadSwapY(e: T) -> T
755@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn quadSwapY(e: vec<N, T>) -> vec<N, T>
756@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn quadSwapDiagonal(e: T) -> T
757@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn quadSwapDiagonal(e: vec<N, T>) -> vec<N, T>
James Price77980d12023-08-01 09:13:41 +0000758
Ben Clayton9fb29a32022-05-09 20:00:13 +0000759////////////////////////////////////////////////////////////////////////////////
Ben Clayton54a104e2023-02-22 20:04:40 +0000760// Value constructors //
Ben Clayton6ae608c2022-05-16 20:54:42 +0000761////////////////////////////////////////////////////////////////////////////////
762
Ben Clayton54a104e2023-02-22 20:04:40 +0000763// Zero value constructors
764@must_use @const("Zero") ctor i32() -> i32
765@must_use @const("Zero") ctor u32() -> u32
766@must_use @const("Zero") ctor f32() -> f32
767@must_use @const("Zero") ctor f16() -> f16
768@must_use @const("Zero") ctor bool() -> bool
Ben Clayton17770f52024-02-20 17:34:27 +0000769@must_use @const("Zero") ctor vec2<T: scalar>() -> vec2<T>
770@must_use @const("Zero") ctor vec3<T: scalar>() -> vec3<T>
771@must_use @const("Zero") ctor vec4<T: scalar>() -> vec4<T>
772@must_use @const("Zero") ctor mat2x2<T: f32_f16>() -> mat2x2<T>
773@must_use @const("Zero") ctor mat2x3<T: f32_f16>() -> mat2x3<T>
774@must_use @const("Zero") ctor mat2x4<T: f32_f16>() -> mat2x4<T>
775@must_use @const("Zero") ctor mat3x2<T: f32_f16>() -> mat3x2<T>
776@must_use @const("Zero") ctor mat3x3<T: f32_f16>() -> mat3x3<T>
777@must_use @const("Zero") ctor mat3x4<T: f32_f16>() -> mat3x4<T>
778@must_use @const("Zero") ctor mat4x2<T: f32_f16>() -> mat4x2<T>
779@must_use @const("Zero") ctor mat4x3<T: f32_f16>() -> mat4x3<T>
780@must_use @const("Zero") ctor mat4x4<T: f32_f16>() -> mat4x4<T>
Ben Clayton6ae608c2022-05-16 20:54:42 +0000781
dan sinclair23fa64f2024-08-19 22:50:10 +0000782@must_use @stage("compute") ctor subgroup_matrix_left<T: subgroup_matrix_elements, M: num, K: num>() -> subgroup_matrix<subgroup_matrix_kind_left, T, M, K>
783@must_use @stage("compute") ctor subgroup_matrix_right<T: subgroup_matrix_elements, K: num, N: num>() -> subgroup_matrix<subgroup_matrix_kind_right, T, K, N>
784@must_use @stage("compute") ctor subgroup_matrix_result<T: subgroup_matrix_elements, M: num, N: num>() -> subgroup_matrix<subgroup_matrix_kind_result, T, M, N>
785
Ben Clayton54a104e2023-02-22 20:04:40 +0000786// Identity constructors
787@must_use @const("Identity") ctor i32(i32) -> i32
788@must_use @const("Identity") ctor u32(u32) -> u32
789@must_use @const("Identity") ctor f32(f32) -> f32
790@must_use @const("Identity") ctor f16(f16) -> f16
791@must_use @const("Identity") ctor bool(bool) -> bool
Ben Clayton17770f52024-02-20 17:34:27 +0000792@must_use @const("Identity") ctor vec2<T: scalar>(vec2<T>) -> vec2<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000793@must_use @const("Identity") ctor vec3<T: scalar>(vec3<T>) -> vec3<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000794@must_use @const("Identity") ctor vec4<T: scalar>(vec4<T>) -> vec4<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000795@must_use @const("Identity") ctor mat2x2<T: f32_f16>(mat2x2<T>) -> mat2x2<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000796@must_use @const("Identity") ctor mat2x3<T: f32_f16>(mat2x3<T>) -> mat2x3<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000797@must_use @const("Identity") ctor mat2x4<T: f32_f16>(mat2x4<T>) -> mat2x4<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000798@must_use @const("Identity") ctor mat3x2<T: f32_f16>(mat3x2<T>) -> mat3x2<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000799@must_use @const("Identity") ctor mat3x3<T: f32_f16>(mat3x3<T>) -> mat3x3<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000800@must_use @const("Identity") ctor mat3x4<T: f32_f16>(mat3x4<T>) -> mat3x4<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000801@must_use @const("Identity") ctor mat4x2<T: f32_f16>(mat4x2<T>) -> mat4x2<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000802@must_use @const("Identity") ctor mat4x3<T: f32_f16>(mat4x3<T>) -> mat4x3<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000803@must_use @const("Identity") ctor mat4x4<T: f32_f16>(mat4x4<T>) -> mat4x4<T>
Ben Clayton6ae608c2022-05-16 20:54:42 +0000804
Ben Clayton54a104e2023-02-22 20:04:40 +0000805// Vector constructors (splat)
Ben Clayton17770f52024-02-20 17:34:27 +0000806@must_use @const("VecSplat") ctor vec2<T: scalar>(T) -> vec2<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000807@must_use @const("VecSplat") ctor vec3<T: scalar>(T) -> vec3<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000808@must_use @const("VecSplat") ctor vec4<T: scalar>(T) -> vec4<T>
Ben Clayton6ae608c2022-05-16 20:54:42 +0000809
Ben Clayton54a104e2023-02-22 20:04:40 +0000810// Vector constructors (scalar)
Ben Clayton17770f52024-02-20 17:34:27 +0000811@must_use @const("VecInitS") ctor vec2<T: scalar>(x: T, y: T) -> vec2<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000812@must_use @const("VecInitS") ctor vec3<T: scalar>(x: T, y: T, z: T) -> vec3<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000813@must_use @const("VecInitS") ctor vec4<T: scalar>(x: T, y: T, z: T, w: T) -> vec4<T>
Ben Clayton6a80ce62022-07-15 22:27:50 +0000814
Ben Clayton54a104e2023-02-22 20:04:40 +0000815// Vector constructors (mixed)
Ben Clayton17770f52024-02-20 17:34:27 +0000816@must_use @const("VecInitM") ctor vec3<T: scalar>(xy: vec2<T>, z: T) -> vec3<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000817@must_use @const("VecInitM") ctor vec3<T: scalar>(x: T, yz: vec2<T>) -> vec3<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000818@must_use @const("VecInitM") ctor vec4<T: scalar>(xy: vec2<T>, z: T, w: T) -> vec4<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000819@must_use @const("VecInitM") ctor vec4<T: scalar>(x: T, yz: vec2<T>, w: T) -> vec4<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000820@must_use @const("VecInitM") ctor vec4<T: scalar>(x: T, y: T, zw: vec2<T>) -> vec4<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000821@must_use @const("VecInitM") ctor vec4<T: scalar>(xy: vec2<T>, zw: vec2<T>) -> vec4<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000822@must_use @const("VecInitM") ctor vec4<T: scalar>(xyz: vec3<T>, w: T) -> vec4<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000823@must_use @const("VecInitM") ctor vec4<T: scalar>(x: T, zyw: vec3<T>) -> vec4<T>
Ben Clayton6a80ce62022-07-15 22:27:50 +0000824
Ben Clayton54a104e2023-02-22 20:04:40 +0000825// Matrix constructors (scalar)
Ben Claytond8490322023-02-22 13:52:21 +0000826@must_use @const("MatInitS")
Ben Clayton17770f52024-02-20 17:34:27 +0000827ctor mat2x2<T: f32_f16>(T, T,
828 T, T) -> mat2x2<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000829
830@must_use @const("MatInitS")
831ctor mat2x3<T: f32_f16>(T, T, T,
832 T, T, T) -> mat2x3<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000833
834@must_use @const("MatInitS")
835ctor mat2x4<T: f32_f16>(T, T, T, T,
836 T, T, T, T) -> mat2x4<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000837
838@must_use @const("MatInitS")
839ctor mat3x2<T: f32_f16>(T, T,
840 T, T,
841 T, T) -> mat3x2<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000842
843@must_use @const("MatInitS")
844ctor mat3x3<T: f32_f16>(T, T, T,
845 T, T, T,
846 T, T, T) -> mat3x3<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000847
848@must_use @const("MatInitS")
849ctor mat3x4<T: f32_f16>(T, T, T, T,
850 T, T, T, T,
851 T, T, T, T) -> mat3x4<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000852
853@must_use @const("MatInitS")
854ctor mat4x2<T: f32_f16>(T, T,
855 T, T,
856 T, T,
857 T, T) -> mat4x2<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000858
859@must_use @const("MatInitS")
860ctor mat4x3<T: f32_f16>(T, T, T,
861 T, T, T,
862 T, T, T,
863 T, T, T) -> mat4x3<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000864
865@must_use @const("MatInitS")
866ctor mat4x4<T: f32_f16>(T, T, T, T,
867 T, T, T, T,
868 T, T, T, T,
869 T, T, T, T) -> mat4x4<T>
870
Ben Clayton54a104e2023-02-22 20:04:40 +0000871// Matrix constructors (column vectors)
Ben Clayton17770f52024-02-20 17:34:27 +0000872@must_use @const("MatInitV") ctor mat2x2<T: f32_f16>(vec2<T>, vec2<T>) -> mat2x2<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000873@must_use @const("MatInitV") ctor mat2x3<T: f32_f16>(vec3<T>, vec3<T>) -> mat2x3<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000874@must_use @const("MatInitV") ctor mat2x4<T: f32_f16>(vec4<T>, vec4<T>) -> mat2x4<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000875@must_use @const("MatInitV") ctor mat3x2<T: f32_f16>(vec2<T>, vec2<T>, vec2<T>) -> mat3x2<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000876@must_use @const("MatInitV") ctor mat3x3<T: f32_f16>(vec3<T>, vec3<T>, vec3<T>) -> mat3x3<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000877@must_use @const("MatInitV") ctor mat3x4<T: f32_f16>(vec4<T>, vec4<T>, vec4<T>) -> mat3x4<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000878@must_use @const("MatInitV") ctor mat4x2<T: f32_f16>(vec2<T>, vec2<T>, vec2<T>, vec2<T>) -> mat4x2<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000879@must_use @const("MatInitV") ctor mat4x3<T: f32_f16>(vec3<T>, vec3<T>, vec3<T>, vec3<T>) -> mat4x3<T>
Ben Clayton17770f52024-02-20 17:34:27 +0000880@must_use @const("MatInitV") ctor mat4x4<T: f32_f16>(vec4<T>, vec4<T>, vec4<T>, vec4<T>) -> mat4x4<T>
Ben Clayton6ae608c2022-05-16 20:54:42 +0000881
882////////////////////////////////////////////////////////////////////////////////
Ben Clayton54a104e2023-02-22 20:04:40 +0000883// Value conversions //
Ben Clayton6ae608c2022-05-16 20:54:42 +0000884////////////////////////////////////////////////////////////////////////////////
dan sinclair4ac9ba92024-08-19 19:21:19 +0000885@must_use @const implicit(T: scalar_no_f32) conv f32(T) -> f32
886@must_use @const implicit(T: scalar_no_f16) conv f16(T) -> f16
887@must_use @const implicit(T: scalar_no_i32) conv i32(T) -> i32
888@must_use @const implicit(T: scalar_no_u32) conv u32(T) -> u32
889@must_use @const implicit(T: scalar_no_bool) conv bool(T) -> bool
Ben Clayton6ae608c2022-05-16 20:54:42 +0000890
dan sinclair4ac9ba92024-08-19 19:21:19 +0000891@must_use @const implicit(U: scalar_no_f32) conv vec2<T: f32>(vec2<U>) -> vec2<T>
892@must_use @const implicit(U: scalar_no_f16) conv vec2<T: f16>(vec2<U>) -> vec2<T>
893@must_use @const implicit(U: scalar_no_i32) conv vec2<T: i32>(vec2<U>) -> vec2<T>
894@must_use @const implicit(U: scalar_no_u32) conv vec2<T: u32>(vec2<U>) -> vec2<T>
895@must_use @const implicit(U: scalar_no_bool) conv vec2<T: bool>(vec2<U>) -> vec2<T>
Ben Clayton6ae608c2022-05-16 20:54:42 +0000896
dan sinclair4ac9ba92024-08-19 19:21:19 +0000897@must_use @const implicit(U: scalar_no_f32) conv vec3<T: f32>(vec3<U>) -> vec3<T>
898@must_use @const implicit(U: scalar_no_f16) conv vec3<T: f16>(vec3<U>) -> vec3<T>
899@must_use @const implicit(U: scalar_no_i32) conv vec3<T: i32>(vec3<U>) -> vec3<T>
900@must_use @const implicit(U: scalar_no_u32) conv vec3<T: u32>(vec3<U>) -> vec3<T>
901@must_use @const implicit(U: scalar_no_bool) conv vec3<T: bool>(vec3<U>) -> vec3<T>
Ben Clayton6ae608c2022-05-16 20:54:42 +0000902
dan sinclair4ac9ba92024-08-19 19:21:19 +0000903@must_use @const implicit(U: scalar_no_f32) conv vec4<T: f32>(vec4<U>) -> vec4<T>
904@must_use @const implicit(U: scalar_no_f16) conv vec4<T: f16>(vec4<U>) -> vec4<T>
905@must_use @const implicit(U: scalar_no_i32) conv vec4<T: i32>(vec4<U>) -> vec4<T>
906@must_use @const implicit(U: scalar_no_u32) conv vec4<T: u32>(vec4<U>) -> vec4<T>
907@must_use @const implicit(U: scalar_no_bool) conv vec4<T: bool>(vec4<U>) -> vec4<T>
Ben Clayton6ae608c2022-05-16 20:54:42 +0000908
Ben Clayton17770f52024-02-20 17:34:27 +0000909@must_use @const conv mat2x2<T: f16>(mat2x2<f32>) -> mat2x2<T>
910@must_use @const conv mat2x2<T: f32>(mat2x2<f16>) -> mat2x2<T>
911@must_use @const conv mat2x3<T: f16>(mat2x3<f32>) -> mat2x3<T>
912@must_use @const conv mat2x3<T: f32>(mat2x3<f16>) -> mat2x3<T>
913@must_use @const conv mat2x4<T: f16>(mat2x4<f32>) -> mat2x4<T>
914@must_use @const conv mat2x4<T: f32>(mat2x4<f16>) -> mat2x4<T>
915@must_use @const conv mat3x2<T: f16>(mat3x2<f32>) -> mat3x2<T>
916@must_use @const conv mat3x2<T: f32>(mat3x2<f16>) -> mat3x2<T>
917@must_use @const conv mat3x3<T: f16>(mat3x3<f32>) -> mat3x3<T>
918@must_use @const conv mat3x3<T: f32>(mat3x3<f16>) -> mat3x3<T>
919@must_use @const conv mat3x4<T: f16>(mat3x4<f32>) -> mat3x4<T>
920@must_use @const conv mat3x4<T: f32>(mat3x4<f16>) -> mat3x4<T>
921@must_use @const conv mat4x2<T: f16>(mat4x2<f32>) -> mat4x2<T>
922@must_use @const conv mat4x2<T: f32>(mat4x2<f16>) -> mat4x2<T>
923@must_use @const conv mat4x3<T: f16>(mat4x3<f32>) -> mat4x3<T>
924@must_use @const conv mat4x3<T: f32>(mat4x3<f16>) -> mat4x3<T>
925@must_use @const conv mat4x4<T: f16>(mat4x4<f32>) -> mat4x4<T>
926@must_use @const conv mat4x4<T: f32>(mat4x4<f16>) -> mat4x4<T>
Zhaoming Jiang60588822022-06-28 14:03:36 +0000927
Ben Clayton6ae608c2022-05-16 20:54:42 +0000928////////////////////////////////////////////////////////////////////////////////
Ben Claytonb61e0452022-05-09 21:22:24 +0000929// Unary Operators //
930////////////////////////////////////////////////////////////////////////////////
Ben Claytond8490322023-02-22 13:52:21 +0000931@must_use @const op ! (bool) -> bool
dan sinclair4ac9ba92024-08-19 19:21:19 +0000932@must_use @const implicit(N: num) op ! (vec<N, bool>) -> vec<N, bool>
Ben Claytonb61e0452022-05-09 21:22:24 +0000933
dan sinclair4ac9ba92024-08-19 19:21:19 +0000934@must_use @const implicit(T: iu32) op ~ (T) -> T
935@must_use @const implicit(T: iu32, N: num) op ~ (vec<N, T>) -> vec<N, T>
Ben Claytonb61e0452022-05-09 21:22:24 +0000936
dan sinclair4ac9ba92024-08-19 19:21:19 +0000937@must_use @const("UnaryMinus") implicit(T: fi32_f16) op - (T) -> T
938@must_use @const("UnaryMinus") implicit(T: fi32_f16, N: num) op - (vec<N, T>) -> vec<N, T>
Ben Claytonb61e0452022-05-09 21:22:24 +0000939
940////////////////////////////////////////////////////////////////////////////////
Ben Clayton9fb29a32022-05-09 20:00:13 +0000941// Binary Operators //
942////////////////////////////////////////////////////////////////////////////////
dan sinclair4ac9ba92024-08-19 19:21:19 +0000943@must_use @const implicit(T: fiu32_f16) op + (T, T) -> T
944@must_use @const implicit(T: fiu32_f16, N: num) op + (vec<N, T>, vec<N, T>) -> vec<N, T>
945@must_use @const implicit(T: fiu32_f16, N: num) op + (vec<N, T>, T) -> vec<N, T>
946@must_use @const implicit(T: fiu32_f16, N: num) op + (T, vec<N, T>) -> vec<N, T>
947@must_use @const implicit(T: f32_f16, N: num, M: num) op + (mat<N, M, T>, mat<N, M, T>) -> mat<N, M, T>
Ben Clayton9fb29a32022-05-09 20:00:13 +0000948
dan sinclair4ac9ba92024-08-19 19:21:19 +0000949@must_use @const implicit(T: fiu32_f16) op - (T, T) -> T
950@must_use @const implicit(T: fiu32_f16, N: num) op - (vec<N, T>, vec<N, T>) -> vec<N, T>
951@must_use @const implicit(T: fiu32_f16, N: num) op - (vec<N, T>, T) -> vec<N, T>
952@must_use @const implicit(T: fiu32_f16, N: num) op - (T, vec<N, T>) -> vec<N, T>
953@must_use @const implicit(T: f32_f16, N: num, M: num) op - (mat<N, M, T>, mat<N, M, T>) -> mat<N, M, T>
Ben Clayton9fb29a32022-05-09 20:00:13 +0000954
dan sinclair4ac9ba92024-08-19 19:21:19 +0000955@must_use @const("Multiply") implicit(T: fiu32_f16) op * (T, T) -> T
956@must_use @const("Multiply") implicit(T: fiu32_f16, N: num) op * (vec<N, T>, vec<N, T>) -> vec<N, T>
957@must_use @const("Multiply") implicit(T: fiu32_f16, N: num) op * (vec<N, T>, T) -> vec<N, T>
958@must_use @const("Multiply") implicit(T: fiu32_f16, N: num) op * (T, vec<N, T>) -> vec<N, T>
959@must_use @const("Multiply") implicit(T: f32_f16, N: num, M: num) op * (T, mat<N, M, T>) -> mat<N, M, T>
960@must_use @const("Multiply") implicit(T: f32_f16, N: num, M: num) op * (mat<N, M, T>, T) -> mat<N, M, T>
961@must_use @const("MultiplyMatVec") implicit(T: f32_f16, C: num, R: num) op * (mat<C, R, T>, vec<C, T>) -> vec<R, T>
962@must_use @const("MultiplyVecMat") implicit(T: f32_f16, C: num, R: num) op * (vec<R, T>, mat<C, R, T>) -> vec<C, T>
963@must_use @const("MultiplyMatMat") implicit(T: f32_f16, K: num, C: num, R: num) op * (mat<K, R, T>, mat<C, K, T>) -> mat<C, R, T>
Ben Clayton9fb29a32022-05-09 20:00:13 +0000964
dan sinclair4ac9ba92024-08-19 19:21:19 +0000965@must_use @const implicit(T: fiu32_f16) op / (T, T) -> T
966@must_use @const implicit(T: fiu32_f16, N: num) op / (vec<N, T>, vec<N, T>) -> vec<N, T>
967@must_use @const implicit(T: fiu32_f16, N: num) op / (vec<N, T>, T) -> vec<N, T>
968@must_use @const implicit(T: fiu32_f16, N: num) op / (T, vec<N, T>) -> vec<N, T>
Ben Clayton9fb29a32022-05-09 20:00:13 +0000969
dan sinclair4ac9ba92024-08-19 19:21:19 +0000970@must_use @const implicit(T: fiu32_f16) op % (T, T) -> T
971@must_use @const implicit(T: fiu32_f16, N: num) op % (vec<N, T>, vec<N, T>) -> vec<N, T>
972@must_use @const implicit(T: fiu32_f16, N: num) op % (vec<N, T>, T) -> vec<N, T>
973@must_use @const implicit(T: fiu32_f16, N: num) op % (T, vec<N, T>) -> vec<N, T>
Ben Clayton9fb29a32022-05-09 20:00:13 +0000974
dan sinclair4ac9ba92024-08-19 19:21:19 +0000975@must_use @const implicit(T: iu32) op ^ (T, T) -> T
976@must_use @const implicit(T: iu32, N: num) op ^ (vec<N, T>, vec<N, T>) -> vec<N, T>
Ben Clayton9fb29a32022-05-09 20:00:13 +0000977
Ben Claytond8490322023-02-22 13:52:21 +0000978@must_use @const op & (bool, bool) -> bool
dan sinclair4ac9ba92024-08-19 19:21:19 +0000979@must_use @const implicit(N: num) op & (vec<N, bool>, vec<N, bool>) -> vec<N, bool>
980@must_use @const implicit(T: iu32) op & (T, T) -> T
981@must_use @const implicit(T: iu32, N: num) op & (vec<N, T>, vec<N, T>) -> vec<N, T>
Ben Clayton9fb29a32022-05-09 20:00:13 +0000982
Ben Claytond8490322023-02-22 13:52:21 +0000983@must_use @const op | (bool, bool) -> bool
dan sinclair4ac9ba92024-08-19 19:21:19 +0000984@must_use @const implicit(N: num) op | (vec<N, bool>, vec<N, bool>) -> vec<N, bool>
985@must_use @const implicit(T: iu32) op | (T, T) -> T
986@must_use @const implicit(T: iu32, N: num) op | (vec<N, T>, vec<N, T>) -> vec<N, T>
Ben Clayton9fb29a32022-05-09 20:00:13 +0000987
Ben Claytond8490322023-02-22 13:52:21 +0000988@must_use @const op && (bool, bool) -> bool
989@must_use @const op || (bool, bool) -> bool
Ben Clayton9fb29a32022-05-09 20:00:13 +0000990
dan sinclair4ac9ba92024-08-19 19:21:19 +0000991@must_use @const implicit(T: scalar) op == (T, T) -> bool
992@must_use @const implicit(T: scalar, N: num) op == (vec<N, T>, vec<N, T>) -> vec<N, bool>
Ben Clayton9fb29a32022-05-09 20:00:13 +0000993
dan sinclair4ac9ba92024-08-19 19:21:19 +0000994@must_use @const implicit(T: scalar) op != (T, T) -> bool
995@must_use @const implicit(T: scalar, N: num) op != (vec<N, T>, vec<N, T>) -> vec<N, bool>
Ben Clayton9fb29a32022-05-09 20:00:13 +0000996
dan sinclair4ac9ba92024-08-19 19:21:19 +0000997@must_use @const implicit(T: fiu32_f16) op < (T, T) -> bool
998@must_use @const implicit(T: fiu32_f16, N: num) op < (vec<N, T>, vec<N, T>) -> vec<N, bool>
Ben Clayton9fb29a32022-05-09 20:00:13 +0000999
dan sinclair4ac9ba92024-08-19 19:21:19 +00001000@must_use @const implicit(T: fiu32_f16) op > (T, T) -> bool
1001@must_use @const implicit(T: fiu32_f16, N: num) op > (vec<N, T>, vec<N, T>) -> vec<N, bool>
Ben Clayton9fb29a32022-05-09 20:00:13 +00001002
dan sinclair4ac9ba92024-08-19 19:21:19 +00001003@must_use @const implicit(T: fiu32_f16) op <= (T, T) -> bool
1004@must_use @const implicit(T: fiu32_f16, N: num) op <= (vec<N, T>, vec<N, T>) -> vec<N, bool>
Ben Clayton9fb29a32022-05-09 20:00:13 +00001005
dan sinclair4ac9ba92024-08-19 19:21:19 +00001006@must_use @const implicit(T: fiu32_f16) op >= (T, T) -> bool
1007@must_use @const implicit(T: fiu32_f16, N: num) op >= (vec<N, T>, vec<N, T>) -> vec<N, bool>
Ben Clayton9fb29a32022-05-09 20:00:13 +00001008
dan sinclair4ac9ba92024-08-19 19:21:19 +00001009@must_use @const implicit(T: iu32) op << (T, u32) -> T
1010@must_use @const implicit(T: iu32, N: num) op << (vec<N, T>, vec<N, u32>) -> vec<N, T>
Ben Clayton9fb29a32022-05-09 20:00:13 +00001011
dan sinclair4ac9ba92024-08-19 19:21:19 +00001012@must_use @const implicit(T: iu32) op >> (T, u32) -> T
1013@must_use @const implicit(T: iu32, N: num) op >> (vec<N, T>, vec<N, u32>) -> vec<N, T>