tools: Add @must_use support to intrinsics.def

Emits the new OverloadFlag::kMustUse flag on the annotated overloads.
Nothing consumes this, yet.

Bug: tint:1844
Change-Id: I4eb0943a23eaf5de98cd63444a686cffe62fb36e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120920
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
Ben Clayton 2023-02-22 13:52:21 +00:00 committed by Dawn LUCI CQ
parent ce10962d82
commit d84903201d
8 changed files with 916 additions and 900 deletions

View File

@ -511,280 +511,280 @@ match workgroup
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// https://gpuweb.github.io/gpuweb/wgsl/#builtin-functions // https://gpuweb.github.io/gpuweb/wgsl/#builtin-functions
@const fn abs<T: fia_fiu32_f16>(T) -> T @must_use @const fn abs<T: fia_fiu32_f16>(T) -> T
@const fn abs<N: num, T: fia_fiu32_f16>(vec<N, T>) -> vec<N, T> @must_use @const fn abs<N: num, T: fia_fiu32_f16>(vec<N, T>) -> vec<N, T>
@const fn acos<T: fa_f32_f16>(@test_value(0.96891242171) T) -> T @must_use @const fn acos<T: fa_f32_f16>(@test_value(0.96891242171) T) -> T
@const fn acos<N: num, T: fa_f32_f16>(@test_value(0.96891242171) vec<N, T>) -> vec<N, T> @must_use @const fn acos<N: num, T: fa_f32_f16>(@test_value(0.96891242171) vec<N, T>) -> vec<N, T>
@const fn acosh<T: fa_f32_f16>(@test_value(2.0) T) -> T @must_use @const fn acosh<T: fa_f32_f16>(@test_value(2.0) T) -> T
@const fn acosh<N: num, T: fa_f32_f16>(@test_value(2.0) vec<N, T>) -> vec<N, T> @must_use @const fn acosh<N: num, T: fa_f32_f16>(@test_value(2.0) vec<N, T>) -> vec<N, T>
@const fn all(bool) -> bool @must_use @const fn all(bool) -> bool
@const fn all<N: num>(vec<N, bool>) -> bool @must_use @const fn all<N: num>(vec<N, bool>) -> bool
@const fn any(bool) -> bool @must_use @const fn any(bool) -> bool
@const fn any<N: num>(vec<N, bool>) -> bool @must_use @const fn any<N: num>(vec<N, bool>) -> bool
fn arrayLength<T, A: access>(ptr<storage, array<T>, A>) -> u32 @must_use fn arrayLength<T, A: access>(ptr<storage, array<T>, A>) -> u32
@const fn asin<T: fa_f32_f16>(@test_value(0.479425538604) T) -> T @must_use @const fn asin<T: fa_f32_f16>(@test_value(0.479425538604) T) -> T
@const fn asin<N: num, T: fa_f32_f16>(@test_value(0.479425538604) vec<N, T>) -> vec<N, T> @must_use @const fn asin<N: num, T: fa_f32_f16>(@test_value(0.479425538604) vec<N, T>) -> vec<N, T>
@const fn asinh<T: fa_f32_f16>(T) -> T @must_use @const fn asinh<T: fa_f32_f16>(T) -> T
@const fn asinh<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T> @must_use @const fn asinh<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
@const fn atan<T: fa_f32_f16>(T) -> T @must_use @const fn atan<T: fa_f32_f16>(T) -> T
@const fn atan<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T> @must_use @const fn atan<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
@const fn atan2<T: fa_f32_f16>(T, T) -> T @must_use @const fn atan2<T: fa_f32_f16>(T, T) -> T
@const fn atan2<T: fa_f32_f16, N: num>(vec<N, T>, vec<N, T>) -> vec<N, T> @must_use @const fn atan2<T: fa_f32_f16, N: num>(vec<N, T>, vec<N, T>) -> vec<N, T>
@const fn atanh<T: fa_f32_f16>(@test_value(0.5) T) -> T @must_use @const fn atanh<T: fa_f32_f16>(@test_value(0.5) T) -> T
@const fn atanh<N: num, T: fa_f32_f16>(@test_value(0.5) vec<N, T>) -> vec<N, T> @must_use @const fn atanh<N: num, T: fa_f32_f16>(@test_value(0.5) vec<N, T>) -> vec<N, T>
@const fn ceil<T: fa_f32_f16>(@test_value(1.5) T) -> T @must_use @const fn ceil<T: fa_f32_f16>(@test_value(1.5) T) -> T
@const fn ceil<N: num, T: fa_f32_f16>(@test_value(1.5) vec<N, T>) -> vec<N, T> @must_use @const fn ceil<N: num, T: fa_f32_f16>(@test_value(1.5) vec<N, T>) -> vec<N, T>
@const fn clamp<T: fia_fiu32_f16>(T, T, T) -> T @must_use @const fn clamp<T: fia_fiu32_f16>(T, T, T) -> T
@const fn clamp<T: fia_fiu32_f16, N: num>(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> @must_use @const fn clamp<T: fia_fiu32_f16, N: num>(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T>
@const fn cos<T: fa_f32_f16>(@test_value(0) T) -> T @must_use @const fn cos<T: fa_f32_f16>(@test_value(0) T) -> T
@const fn cos<N: num, T: fa_f32_f16>(@test_value(0) vec<N, T>) -> vec<N, T> @must_use @const fn cos<N: num, T: fa_f32_f16>(@test_value(0) vec<N, T>) -> vec<N, T>
@const fn cosh<T: fa_f32_f16>(@test_value(0) T) -> T @must_use @const fn cosh<T: fa_f32_f16>(@test_value(0) T) -> T
@const fn cosh<N: num, T: fa_f32_f16>(@test_value(0) vec<N, T>) -> vec<N, T> @must_use @const fn cosh<N: num, T: fa_f32_f16>(@test_value(0) vec<N, T>) -> vec<N, T>
@const fn countLeadingZeros<T: iu32>(T) -> T @must_use @const fn countLeadingZeros<T: iu32>(T) -> T
@const fn countLeadingZeros<N: num, T: iu32>(vec<N, T>) -> vec<N, T> @must_use @const fn countLeadingZeros<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
@const fn countOneBits<T: iu32>(T) -> T @must_use @const fn countOneBits<T: iu32>(T) -> T
@const fn countOneBits<N: num, T: iu32>(vec<N, T>) -> vec<N, T> @must_use @const fn countOneBits<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
@const fn countTrailingZeros<T: iu32>(T) -> T @must_use @const fn countTrailingZeros<T: iu32>(T) -> T
@const fn countTrailingZeros<N: num, T: iu32>(vec<N, T>) -> vec<N, T> @must_use @const fn countTrailingZeros<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
@const fn cross<T: fa_f32_f16>(vec3<T>, vec3<T>) -> vec3<T> @must_use @const fn cross<T: fa_f32_f16>(vec3<T>, vec3<T>) -> vec3<T>
@const fn degrees<T: fa_f32_f16>(T) -> T @must_use @const fn degrees<T: fa_f32_f16>(T) -> T
@const fn degrees<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T> @must_use @const fn degrees<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
@const fn determinant<N: num, T: fa_f32_f16>(mat<N, N, T>) -> T @must_use @const fn determinant<N: num, T: fa_f32_f16>(mat<N, N, T>) -> T
@const fn distance<T: fa_f32_f16>(T, T) -> T @must_use @const fn distance<T: fa_f32_f16>(T, T) -> T
@const fn distance<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>) -> T @must_use @const fn distance<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>) -> T
@const fn dot<N: num, T: fia_fiu32_f16>(vec<N, T>, vec<N, T>) -> T @must_use @const fn dot<N: num, T: fia_fiu32_f16>(vec<N, T>, vec<N, T>) -> T
fn dot4I8Packed(u32, u32) -> i32 @must_use fn dot4I8Packed(u32, u32) -> i32
fn dot4U8Packed(u32, u32) -> u32 @must_use fn dot4U8Packed(u32, u32) -> u32
@stage("fragment") fn dpdx(f32) -> f32 @must_use @stage("fragment") fn dpdx(f32) -> f32
@stage("fragment") fn dpdx<N: num>(vec<N, f32>) -> vec<N, f32> @must_use @stage("fragment") fn dpdx<N: num>(vec<N, f32>) -> vec<N, f32>
@stage("fragment") fn dpdxCoarse(f32) -> f32 @must_use @stage("fragment") fn dpdxCoarse(f32) -> f32
@stage("fragment") fn dpdxCoarse<N: num>(vec<N, f32>) -> vec<N, f32> @must_use @stage("fragment") fn dpdxCoarse<N: num>(vec<N, f32>) -> vec<N, f32>
@stage("fragment") fn dpdxFine(f32) -> f32 @must_use @stage("fragment") fn dpdxFine(f32) -> f32
@stage("fragment") fn dpdxFine<N: num>(vec<N, f32>) -> vec<N, f32> @must_use @stage("fragment") fn dpdxFine<N: num>(vec<N, f32>) -> vec<N, f32>
@stage("fragment") fn dpdy(f32) -> f32 @must_use @stage("fragment") fn dpdy(f32) -> f32
@stage("fragment") fn dpdy<N: num>(vec<N, f32>) -> vec<N, f32> @must_use @stage("fragment") fn dpdy<N: num>(vec<N, f32>) -> vec<N, f32>
@stage("fragment") fn dpdyCoarse(f32) -> f32 @must_use @stage("fragment") fn dpdyCoarse(f32) -> f32
@stage("fragment") fn dpdyCoarse<N: num>(vec<N, f32>) -> vec<N, f32> @must_use @stage("fragment") fn dpdyCoarse<N: num>(vec<N, f32>) -> vec<N, f32>
@stage("fragment") fn dpdyFine(f32) -> f32 @must_use @stage("fragment") fn dpdyFine(f32) -> f32
@stage("fragment") fn dpdyFine<N: num>(vec<N, f32>) -> vec<N, f32> @must_use @stage("fragment") fn dpdyFine<N: num>(vec<N, f32>) -> vec<N, f32>
@const fn exp<T: fa_f32_f16>(T) -> T @must_use @const fn exp<T: fa_f32_f16>(T) -> T
@const fn exp<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T> @must_use @const fn exp<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
@const fn exp2<T: fa_f32_f16>(T) -> T @must_use @const fn exp2<T: fa_f32_f16>(T) -> T
@const fn exp2<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T> @must_use @const fn exp2<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
@const fn extractBits<T: iu32>(T, u32, u32) -> T @must_use @const fn extractBits<T: iu32>(T, u32, u32) -> T
@const fn extractBits<N: num, T: iu32>(vec<N, T>, u32, u32) -> vec<N, T> @must_use @const fn extractBits<N: num, T: iu32>(vec<N, T>, u32, u32) -> vec<N, T>
@const fn faceForward<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> @must_use @const fn faceForward<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T>
@const fn firstLeadingBit<T: iu32>(T) -> T @must_use @const fn firstLeadingBit<T: iu32>(T) -> T
@const fn firstLeadingBit<N: num, T: iu32>(vec<N, T>) -> vec<N, T> @must_use @const fn firstLeadingBit<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
@const fn firstTrailingBit<T: iu32>(T) -> T @must_use @const fn firstTrailingBit<T: iu32>(T) -> T
@const fn firstTrailingBit<N: num, T: iu32>(vec<N, T>) -> vec<N, T> @must_use @const fn firstTrailingBit<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
@const fn floor<T: fa_f32_f16>(@test_value(1.5) T) -> T @must_use @const fn floor<T: fa_f32_f16>(@test_value(1.5) T) -> T
@const fn floor<N: num, T: fa_f32_f16>(@test_value(1.5) vec<N, T>) -> vec<N, T> @must_use @const fn floor<N: num, T: fa_f32_f16>(@test_value(1.5) vec<N, T>) -> vec<N, T>
@const fn fma<T: fa_f32_f16>(T, T, T) -> T @must_use @const fn fma<T: fa_f32_f16>(T, T, T) -> T
@const fn fma<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> @must_use @const fn fma<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T>
@const fn fract<T: fa_f32_f16>(@test_value(1.25) T) -> T @must_use @const fn fract<T: fa_f32_f16>(@test_value(1.25) T) -> T
@const fn fract<N: num, T: fa_f32_f16>(@test_value(1.25) vec<N, T>) -> vec<N, T> @must_use @const fn fract<N: num, T: fa_f32_f16>(@test_value(1.25) vec<N, T>) -> vec<N, T>
@const fn frexp<T: fa_f32_f16>(T) -> __frexp_result<T> @must_use @const fn frexp<T: fa_f32_f16>(T) -> __frexp_result<T>
@const fn frexp<N: num, T: fa_f32_f16>(vec<N, T>) -> __frexp_result_vec<N, T> @must_use @const fn frexp<N: num, T: fa_f32_f16>(vec<N, T>) -> __frexp_result_vec<N, T>
@stage("fragment") fn fwidth(f32) -> f32 @must_use @stage("fragment") fn fwidth(f32) -> f32
@stage("fragment") fn fwidth<N: num>(vec<N, f32>) -> vec<N, f32> @must_use @stage("fragment") fn fwidth<N: num>(vec<N, f32>) -> vec<N, f32>
@stage("fragment") fn fwidthCoarse(f32) -> f32 @must_use @stage("fragment") fn fwidthCoarse(f32) -> f32
@stage("fragment") fn fwidthCoarse<N: num>(vec<N, f32>) -> vec<N, f32> @must_use @stage("fragment") fn fwidthCoarse<N: num>(vec<N, f32>) -> vec<N, f32>
@stage("fragment") fn fwidthFine(f32) -> f32 @must_use @stage("fragment") fn fwidthFine(f32) -> f32
@stage("fragment") fn fwidthFine<N: num>(vec<N, f32>) -> vec<N, f32> @must_use @stage("fragment") fn fwidthFine<N: num>(vec<N, f32>) -> vec<N, f32>
@const fn insertBits<T: iu32>(T, T, u32, u32) -> T @must_use @const fn insertBits<T: iu32>(T, T, u32, u32) -> T
@const fn insertBits<N: num, T: iu32>(vec<N, T>, vec<N, T>, u32, u32) -> vec<N, T> @must_use @const fn insertBits<N: num, T: iu32>(vec<N, T>, vec<N, T>, u32, u32) -> vec<N, T>
@const fn inverseSqrt<T: fa_f32_f16>(T) -> T @must_use @const fn inverseSqrt<T: fa_f32_f16>(T) -> T
@const fn inverseSqrt<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T> @must_use @const fn inverseSqrt<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
@const fn ldexp<T: fa_f32_f16, U: ia_i32>(T, U) -> T @must_use @const fn ldexp<T: fa_f32_f16, U: ia_i32>(T, U) -> T
@const fn ldexp<N: num, T: fa_f32_f16, U: ia_i32>(vec<N, T>, vec<N, U>) -> vec<N, T> @must_use @const fn ldexp<N: num, T: fa_f32_f16, U: ia_i32>(vec<N, T>, vec<N, U>) -> vec<N, T>
@const fn length<T: fa_f32_f16>(@test_value(0.0) T) -> T @must_use @const fn length<T: fa_f32_f16>(@test_value(0.0) T) -> T
@const fn length<N: num, T: fa_f32_f16>(@test_value(0.0) vec<N, T>) -> T @must_use @const fn length<N: num, T: fa_f32_f16>(@test_value(0.0) vec<N, T>) -> T
@const fn log<T: fa_f32_f16>(T) -> T @must_use @const fn log<T: fa_f32_f16>(T) -> T
@const fn log<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T> @must_use @const fn log<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
@const fn log2<T: fa_f32_f16>(T) -> T @must_use @const fn log2<T: fa_f32_f16>(T) -> T
@const fn log2<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T> @must_use @const fn log2<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
@const fn max<T: fia_fiu32_f16>(T, T) -> T @must_use @const fn max<T: fia_fiu32_f16>(T, T) -> T
@const fn max<N: num, T: fia_fiu32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T> @must_use @const fn max<N: num, T: fia_fiu32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T>
@const fn min<T: fia_fiu32_f16>(T, T) -> T @must_use @const fn min<T: fia_fiu32_f16>(T, T) -> T
@const fn min<N: num, T: fia_fiu32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T> @must_use @const fn min<N: num, T: fia_fiu32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T>
@const fn mix<T: fa_f32_f16>(T, T, T) -> T @must_use @const fn mix<T: fa_f32_f16>(T, T, T) -> T
@const fn mix<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> @must_use @const fn mix<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T>
@const fn mix<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>, T) -> vec<N, T> @must_use @const fn mix<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>, T) -> vec<N, T>
@const fn modf<T: fa_f32_f16>(@test_value(-1.5) T) -> __modf_result<T> @must_use @const fn modf<T: fa_f32_f16>(@test_value(-1.5) T) -> __modf_result<T>
@const fn modf<N: num, T: fa_f32_f16>(@test_value(-1.5) vec<N, T>) -> __modf_result_vec<N, T> @must_use @const fn modf<N: num, T: fa_f32_f16>(@test_value(-1.5) vec<N, T>) -> __modf_result_vec<N, T>
@const fn normalize<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T> @must_use @const fn normalize<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
@const fn pack2x16float(vec2<f32>) -> u32 @must_use @const fn pack2x16float(vec2<f32>) -> u32
@const fn pack2x16snorm(vec2<f32>) -> u32 @must_use @const fn pack2x16snorm(vec2<f32>) -> u32
@const fn pack2x16unorm(vec2<f32>) -> u32 @must_use @const fn pack2x16unorm(vec2<f32>) -> u32
@const fn pack4x8snorm(vec4<f32>) -> u32 @must_use @const fn pack4x8snorm(vec4<f32>) -> u32
@const fn pack4x8unorm(vec4<f32>) -> u32 @must_use @const fn pack4x8unorm(vec4<f32>) -> u32
@const fn pow<T: fa_f32_f16>(T, T) -> T @must_use @const fn pow<T: fa_f32_f16>(T, T) -> T
@const fn pow<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T> @must_use @const fn pow<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T>
@const fn quantizeToF16(f32) -> f32 @must_use @const fn quantizeToF16(f32) -> f32
@const fn quantizeToF16<N: num>(vec<N, f32>) -> vec<N, f32> @must_use @const fn quantizeToF16<N: num>(vec<N, f32>) -> vec<N, f32>
@const fn radians<T: fa_f32_f16>(T) -> T @must_use @const fn radians<T: fa_f32_f16>(T) -> T
@const fn radians<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T> @must_use @const fn radians<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
@const fn reflect<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T> @must_use @const fn reflect<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T>
@const fn refract<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>, T) -> vec<N, T> @must_use @const fn refract<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>, T) -> vec<N, T>
@const fn reverseBits<T: iu32>(T) -> T @must_use @const fn reverseBits<T: iu32>(T) -> T
@const fn reverseBits<N: num, T: iu32>(vec<N, T>) -> vec<N, T> @must_use @const fn reverseBits<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
@const fn round<T: fa_f32_f16>(@test_value(3.4) T) -> T @must_use @const fn round<T: fa_f32_f16>(@test_value(3.4) T) -> T
@const fn round<N: num, T: fa_f32_f16>(@test_value(3.4) vec<N, T>) -> vec<N, T> @must_use @const fn round<N: num, T: fa_f32_f16>(@test_value(3.4) vec<N, T>) -> vec<N, T>
@const fn saturate<T: fa_f32_f16>(@test_value(2) T) -> T @must_use @const fn saturate<T: fa_f32_f16>(@test_value(2) T) -> T
@const fn saturate<T: fa_f32_f16, N: num>(@test_value(2) vec<N, T>) -> vec<N, T> @must_use @const fn saturate<T: fa_f32_f16, N: num>(@test_value(2) vec<N, T>) -> vec<N, T>
@const("select_bool") fn select<T: scalar>(T, T, bool) -> T @must_use @const("select_bool") fn select<T: scalar>(T, T, bool) -> T
@const("select_bool") fn select<T: scalar, N: num>(vec<N, T>, vec<N, T>, bool) -> vec<N, T> @must_use @const("select_bool") fn select<T: scalar, N: num>(vec<N, T>, vec<N, T>, bool) -> vec<N, T>
@const("select_boolvec") fn select<N: num, T: scalar>(vec<N, T>, vec<N, T>, vec<N, bool>) -> vec<N, T> @must_use @const("select_boolvec") fn select<N: num, T: scalar>(vec<N, T>, vec<N, T>, vec<N, bool>) -> vec<N, T>
@const fn sign<T: fia_fi32_f16>(T) -> T @must_use @const fn sign<T: fia_fi32_f16>(T) -> T
@const fn sign<N: num, T: fia_fi32_f16>(vec<N, T>) -> vec<N, T> @must_use @const fn sign<N: num, T: fia_fi32_f16>(vec<N, T>) -> vec<N, T>
@const fn sin<T: fa_f32_f16>(T) -> T @must_use @const fn sin<T: fa_f32_f16>(T) -> T
@const fn sin<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T> @must_use @const fn sin<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
@const fn sinh<T: fa_f32_f16>(T) -> T @must_use @const fn sinh<T: fa_f32_f16>(T) -> T
@const fn sinh<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T> @must_use @const fn sinh<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
@const fn smoothstep<T: fa_f32_f16>(@test_value(2) T, @test_value(4) T, @test_value(3) T) -> T @must_use @const fn smoothstep<T: fa_f32_f16>(@test_value(2) T, @test_value(4) T, @test_value(3) T) -> T
@const fn smoothstep<N: num, T: fa_f32_f16>(@test_value(2) vec<N, T>, @test_value(4) vec<N, T>, @test_value(3) vec<N, T>) -> vec<N, T> @must_use @const fn smoothstep<N: num, T: fa_f32_f16>(@test_value(2) vec<N, T>, @test_value(4) vec<N, T>, @test_value(3) vec<N, T>) -> vec<N, T>
@const fn sqrt<T: fa_f32_f16>(T) -> T @must_use @const fn sqrt<T: fa_f32_f16>(T) -> T
@const fn sqrt<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T> @must_use @const fn sqrt<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
@const fn step<T: fa_f32_f16>(T, T) -> T @must_use @const fn step<T: fa_f32_f16>(T, T) -> T
@const fn step<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T> @must_use @const fn step<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T>
@stage("compute") fn storageBarrier() @stage("compute") fn storageBarrier()
@const fn tan<T: fa_f32_f16>(T) -> T @must_use @const fn tan<T: fa_f32_f16>(T) -> T
@const fn tan<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T> @must_use @const fn tan<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
@const fn tanh<T: fa_f32_f16>(T) -> T @must_use @const fn tanh<T: fa_f32_f16>(T) -> T
@const fn tanh<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T> @must_use @const fn tanh<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
@const fn transpose<M: num, N: num, T: fa_f32_f16>(mat<M, N, T>) -> mat<N, M, T> @must_use @const fn transpose<M: num, N: num, T: fa_f32_f16>(mat<M, N, T>) -> mat<N, M, T>
@const fn trunc<T: fa_f32_f16>(@test_value(1.5) T) -> T @must_use @const fn trunc<T: fa_f32_f16>(@test_value(1.5) T) -> T
@const fn trunc<N: num, T: fa_f32_f16>(@test_value(1.5) vec<N, T>) -> vec<N, T> @must_use @const fn trunc<N: num, T: fa_f32_f16>(@test_value(1.5) vec<N, T>) -> vec<N, T>
@const fn unpack2x16float(u32) -> vec2<f32> @must_use @const fn unpack2x16float(u32) -> vec2<f32>
@const fn unpack2x16snorm(u32) -> vec2<f32> @must_use @const fn unpack2x16snorm(u32) -> vec2<f32>
@const fn unpack2x16unorm(u32) -> vec2<f32> @must_use @const fn unpack2x16unorm(u32) -> vec2<f32>
@const fn unpack4x8snorm(u32) -> vec4<f32> @must_use @const fn unpack4x8snorm(u32) -> vec4<f32>
@const fn unpack4x8unorm(u32) -> vec4<f32> @must_use @const fn unpack4x8unorm(u32) -> vec4<f32>
@stage("compute") fn workgroupBarrier() @stage("compute") fn workgroupBarrier()
@stage("compute") fn workgroupUniformLoad<T>(ptr<workgroup, T, read_write>) -> T @must_use @stage("compute") fn workgroupUniformLoad<T>(ptr<workgroup, T, read_write>) -> T
fn textureDimensions<T: fiu32>(texture: texture_1d<T>) -> u32 @must_use fn textureDimensions<T: fiu32>(texture: texture_1d<T>) -> u32
fn textureDimensions<T: fiu32, L: iu32>(texture: texture_1d<T>, level: L) -> u32 @must_use fn textureDimensions<T: fiu32, L: iu32>(texture: texture_1d<T>, level: L) -> u32
fn textureDimensions<T: fiu32>(texture: texture_2d<T>) -> vec2<u32> @must_use fn textureDimensions<T: fiu32>(texture: texture_2d<T>) -> vec2<u32>
fn textureDimensions<T: fiu32, L: iu32>(texture: texture_2d<T>, level: L) -> vec2<u32> @must_use fn textureDimensions<T: fiu32, L: iu32>(texture: texture_2d<T>, level: L) -> vec2<u32>
fn textureDimensions<T: fiu32>(texture: texture_2d_array<T>) -> vec2<u32> @must_use fn textureDimensions<T: fiu32>(texture: texture_2d_array<T>) -> vec2<u32>
fn textureDimensions<T: fiu32, L: iu32>(texture: texture_2d_array<T>, level: L) -> vec2<u32> @must_use fn textureDimensions<T: fiu32, L: iu32>(texture: texture_2d_array<T>, level: L) -> vec2<u32>
fn textureDimensions<T: fiu32>(texture: texture_3d<T>) -> vec3<u32> @must_use fn textureDimensions<T: fiu32>(texture: texture_3d<T>) -> vec3<u32>
fn textureDimensions<T: fiu32, L: iu32>(texture: texture_3d<T>, level: L) -> vec3<u32> @must_use fn textureDimensions<T: fiu32, L: iu32>(texture: texture_3d<T>, level: L) -> vec3<u32>
fn textureDimensions<T: fiu32>(texture: texture_cube<T>) -> vec2<u32> @must_use fn textureDimensions<T: fiu32>(texture: texture_cube<T>) -> vec2<u32>
fn textureDimensions<T: fiu32, L: iu32>(texture: texture_cube<T>, level: L) -> vec2<u32> @must_use fn textureDimensions<T: fiu32, L: iu32>(texture: texture_cube<T>, level: L) -> vec2<u32>
fn textureDimensions<T: fiu32>(texture: texture_cube_array<T>) -> vec2<u32> @must_use fn textureDimensions<T: fiu32>(texture: texture_cube_array<T>) -> vec2<u32>
fn textureDimensions<T: fiu32, L: iu32>(texture: texture_cube_array<T>, level: L) -> vec2<u32> @must_use fn textureDimensions<T: fiu32, L: iu32>(texture: texture_cube_array<T>, level: L) -> vec2<u32>
fn textureDimensions<T: fiu32>(texture: texture_multisampled_2d<T>) -> vec2<u32> @must_use fn textureDimensions<T: fiu32>(texture: texture_multisampled_2d<T>) -> vec2<u32>
fn textureDimensions(texture: texture_depth_2d) -> vec2<u32> @must_use fn textureDimensions(texture: texture_depth_2d) -> vec2<u32>
fn textureDimensions<L: iu32>(texture: texture_depth_2d, level: L) -> vec2<u32> @must_use fn textureDimensions<L: iu32>(texture: texture_depth_2d, level: L) -> vec2<u32>
fn textureDimensions(texture: texture_depth_2d_array) -> vec2<u32> @must_use fn textureDimensions(texture: texture_depth_2d_array) -> vec2<u32>
fn textureDimensions<L: iu32>(texture: texture_depth_2d_array, level: L) -> vec2<u32> @must_use fn textureDimensions<L: iu32>(texture: texture_depth_2d_array, level: L) -> vec2<u32>
fn textureDimensions(texture: texture_depth_cube) -> vec2<u32> @must_use fn textureDimensions(texture: texture_depth_cube) -> vec2<u32>
fn textureDimensions<L: iu32>(texture: texture_depth_cube, level: L) -> vec2<u32> @must_use fn textureDimensions<L: iu32>(texture: texture_depth_cube, level: L) -> vec2<u32>
fn textureDimensions(texture: texture_depth_cube_array) -> vec2<u32> @must_use fn textureDimensions(texture: texture_depth_cube_array) -> vec2<u32>
fn textureDimensions<L: iu32>(texture: texture_depth_cube_array, level: L) -> vec2<u32> @must_use fn textureDimensions<L: iu32>(texture: texture_depth_cube_array, level: L) -> vec2<u32>
fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<u32> @must_use fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<u32>
fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_1d<F, A>) -> u32 @must_use fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_1d<F, A>) -> u32
fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_2d<F, A>) -> vec2<u32> @must_use fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_2d<F, A>) -> vec2<u32>
fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_2d_array<F, A>) -> vec2<u32> @must_use fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_2d_array<F, A>) -> vec2<u32>
fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_3d<F, A>) -> vec3<u32> @must_use fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_3d<F, A>) -> vec3<u32>
fn textureDimensions(texture: texture_external) -> vec2<u32> @must_use fn textureDimensions(texture: texture_external) -> vec2<u32>
fn textureGather<T: fiu32, C: iu32>(@const component: C, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T> @must_use fn textureGather<T: fiu32, C: iu32>(@const component: C, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T>
fn textureGather<T: fiu32, C: iu32>(@const component: C, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<T> @must_use fn textureGather<T: fiu32, C: iu32>(@const component: C, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<T>
fn textureGather<T: fiu32, C: iu32, A: iu32>(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<T> @must_use fn textureGather<T: fiu32, C: iu32, A: iu32>(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<T>
fn textureGather<T: fiu32, C: iu32, A: iu32>(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> vec4<T> @must_use fn textureGather<T: fiu32, C: iu32, A: iu32>(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> vec4<T>
fn textureGather<T: fiu32, C: iu32>(@const component: C, texture: texture_cube<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T> @must_use fn textureGather<T: fiu32, C: iu32>(@const component: C, texture: texture_cube<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T>
fn textureGather<T: fiu32, C: iu32, A: iu32>(@const component: C, texture: texture_cube_array<T>, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<T> @must_use fn textureGather<T: fiu32, C: iu32, A: iu32>(@const component: C, texture: texture_cube_array<T>, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<T>
fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> vec4<f32> @must_use fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> @must_use fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
fn textureGather<A: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<f32> @must_use fn textureGather<A: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<f32>
fn textureGather<A: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> vec4<f32> @must_use fn textureGather<A: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> vec4<f32>
fn textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> vec4<f32> @must_use fn textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
fn textureGather<A: iu32>(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<f32> @must_use fn textureGather<A: iu32>(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<f32>
fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> vec4<f32> @must_use fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> vec4<f32>
fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32> @must_use fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32>
fn textureGatherCompare<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> vec4<f32> @must_use fn textureGatherCompare<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> vec4<f32>
fn textureGatherCompare<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32> @must_use fn textureGatherCompare<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32>
fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> vec4<f32> @must_use fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> vec4<f32>
fn textureGatherCompare<A: iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: A, depth_ref: f32) -> vec4<f32> @must_use fn textureGatherCompare<A: iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: A, depth_ref: f32) -> vec4<f32>
fn textureNumLayers<T: fiu32>(texture: texture_2d_array<T>) -> u32 @must_use fn textureNumLayers<T: fiu32>(texture: texture_2d_array<T>) -> u32
fn textureNumLayers<T: fiu32>(texture: texture_cube_array<T>) -> u32 @must_use fn textureNumLayers<T: fiu32>(texture: texture_cube_array<T>) -> u32
fn textureNumLayers(texture: texture_depth_2d_array) -> u32 @must_use fn textureNumLayers(texture: texture_depth_2d_array) -> u32
fn textureNumLayers(texture: texture_depth_cube_array) -> u32 @must_use fn textureNumLayers(texture: texture_depth_cube_array) -> u32
fn textureNumLayers<F: texel_format, A: write>(texture: texture_storage_2d_array<F, A>) -> u32 @must_use fn textureNumLayers<F: texel_format, A: write>(texture: texture_storage_2d_array<F, A>) -> u32
fn textureNumLevels<T: fiu32>(texture: texture_1d<T>) -> u32 @must_use fn textureNumLevels<T: fiu32>(texture: texture_1d<T>) -> u32
fn textureNumLevels<T: fiu32>(texture: texture_2d<T>) -> u32 @must_use fn textureNumLevels<T: fiu32>(texture: texture_2d<T>) -> u32
fn textureNumLevels<T: fiu32>(texture: texture_2d_array<T>) -> u32 @must_use fn textureNumLevels<T: fiu32>(texture: texture_2d_array<T>) -> u32
fn textureNumLevels<T: fiu32>(texture: texture_3d<T>) -> u32 @must_use fn textureNumLevels<T: fiu32>(texture: texture_3d<T>) -> u32
fn textureNumLevels<T: fiu32>(texture: texture_cube<T>) -> u32 @must_use fn textureNumLevels<T: fiu32>(texture: texture_cube<T>) -> u32
fn textureNumLevels<T: fiu32>(texture: texture_cube_array<T>) -> u32 @must_use fn textureNumLevels<T: fiu32>(texture: texture_cube_array<T>) -> u32
fn textureNumLevels(texture: texture_depth_2d) -> u32 @must_use fn textureNumLevels(texture: texture_depth_2d) -> u32
fn textureNumLevels(texture: texture_depth_2d_array) -> u32 @must_use fn textureNumLevels(texture: texture_depth_2d_array) -> u32
fn textureNumLevels(texture: texture_depth_cube) -> u32 @must_use fn textureNumLevels(texture: texture_depth_cube) -> u32
fn textureNumLevels(texture: texture_depth_cube_array) -> u32 @must_use fn textureNumLevels(texture: texture_depth_cube_array) -> u32
fn textureNumSamples<T: fiu32>(texture: texture_multisampled_2d<T>) -> u32 @must_use fn textureNumSamples<T: fiu32>(texture: texture_multisampled_2d<T>) -> u32
fn textureNumSamples(texture: texture_depth_multisampled_2d) -> u32 @must_use fn textureNumSamples(texture: texture_depth_multisampled_2d) -> u32
@stage("fragment") fn textureSample(texture: texture_1d<f32>, sampler: sampler, coords: f32) -> vec4<f32> @must_use @stage("fragment") fn textureSample(texture: texture_1d<f32>, sampler: sampler, coords: f32) -> vec4<f32>
@stage("fragment") fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32> @must_use @stage("fragment") fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
@stage("fragment") fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> @must_use @stage("fragment") fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
@stage("fragment") fn textureSample<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<f32> @must_use @stage("fragment") fn textureSample<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<f32>
@stage("fragment") fn textureSample<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> vec4<f32> @must_use @stage("fragment") fn textureSample<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> vec4<f32>
@stage("fragment") fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32> @must_use @stage("fragment") fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
@stage("fragment") fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, @const offset: vec3<i32>) -> vec4<f32> @must_use @stage("fragment") fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, @const offset: vec3<i32>) -> vec4<f32>
@stage("fragment") fn textureSample(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32> @must_use @stage("fragment") fn textureSample(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
@stage("fragment") fn textureSample<A: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<f32> @must_use @stage("fragment") fn textureSample<A: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<f32>
@stage("fragment") fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> f32 @must_use @stage("fragment") fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> f32
@stage("fragment") fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> f32 @must_use @stage("fragment") fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> f32
@stage("fragment") fn textureSample<A: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A) -> f32 @must_use @stage("fragment") fn textureSample<A: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A) -> f32
@stage("fragment") fn textureSample<A: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> f32 @must_use @stage("fragment") fn textureSample<A: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> f32
@stage("fragment") fn textureSample(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> f32 @must_use @stage("fragment") fn textureSample(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> f32
@stage("fragment") fn textureSample<A: iu32>(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: A) -> f32 @must_use @stage("fragment") fn textureSample<A: iu32>(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: A) -> f32
@stage("fragment") fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32) -> vec4<f32> @must_use @stage("fragment") fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32) -> vec4<f32>
@stage("fragment") fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32, @const offset: vec2<i32>) -> vec4<f32> @must_use @stage("fragment") fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32, @const offset: vec2<i32>) -> vec4<f32>
@stage("fragment") fn textureSampleBias<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, bias: f32) -> vec4<f32> @must_use @stage("fragment") fn textureSampleBias<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, bias: f32) -> vec4<f32>
@stage("fragment") fn textureSampleBias<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, bias: f32, @const offset: vec2<i32>) -> vec4<f32> @must_use @stage("fragment") fn textureSampleBias<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, bias: f32, @const offset: vec2<i32>) -> vec4<f32>
@stage("fragment") fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32> @must_use @stage("fragment") fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32>
@stage("fragment") fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32, @const offset: vec3<i32>) -> vec4<f32> @must_use @stage("fragment") fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32, @const offset: vec3<i32>) -> vec4<f32>
@stage("fragment") fn textureSampleBias(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32> @must_use @stage("fragment") fn textureSampleBias(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32>
@stage("fragment") fn textureSampleBias<A: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A, bias: f32) -> vec4<f32> @must_use @stage("fragment") fn textureSampleBias<A: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A, bias: f32) -> vec4<f32>
@stage("fragment") fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32 @must_use @stage("fragment") fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32
@stage("fragment") fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32 @must_use @stage("fragment") fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32
@stage("fragment") fn textureSampleCompare<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> f32 @must_use @stage("fragment") fn textureSampleCompare<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> f32
@stage("fragment") fn textureSampleCompare<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32, @const offset: vec2<i32>) -> f32 @must_use @stage("fragment") fn textureSampleCompare<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32, @const offset: vec2<i32>) -> f32
@stage("fragment") fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32 @must_use @stage("fragment") fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
@stage("fragment") fn textureSampleCompare<A: iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: A, depth_ref: f32) -> f32 @must_use @stage("fragment") fn textureSampleCompare<A: iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: A, depth_ref: f32) -> f32
fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32 @must_use fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32
fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32 @must_use fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32
fn textureSampleCompareLevel<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> f32 @must_use fn textureSampleCompareLevel<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> f32
fn textureSampleCompareLevel<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32, @const offset: vec2<i32>) -> f32 @must_use fn textureSampleCompareLevel<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32, @const offset: vec2<i32>) -> f32
fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32 @must_use fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
fn textureSampleCompareLevel<A: iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: A, depth_ref: f32) -> f32 @must_use fn textureSampleCompareLevel<A: iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: A, depth_ref: f32) -> f32
fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32> @must_use fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> @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>
fn textureSampleGrad<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32> @must_use fn textureSampleGrad<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
fn textureSampleGrad<A: iu32>(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> @must_use fn textureSampleGrad<A: iu32>(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>
fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32> @must_use fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>, @const offset: vec3<i32>) -> vec4<f32> @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>
fn textureSampleGrad(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32> @must_use fn textureSampleGrad(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
fn textureSampleGrad<A: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32> @must_use fn textureSampleGrad<A: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32) -> vec4<f32> @must_use fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32) -> vec4<f32>
fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32, @const offset: vec2<i32>) -> vec4<f32> @must_use fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32, @const offset: vec2<i32>) -> vec4<f32>
fn textureSampleLevel<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, level: f32) -> vec4<f32> @must_use fn textureSampleLevel<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, level: f32) -> vec4<f32>
fn textureSampleLevel<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, level: f32, @const offset: vec2<i32>) -> vec4<f32> @must_use fn textureSampleLevel<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, level: f32, @const offset: vec2<i32>) -> vec4<f32>
fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32> @must_use fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32>
fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32, @const offset: vec3<i32>) -> vec4<f32> @must_use fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32, @const offset: vec3<i32>) -> vec4<f32>
fn textureSampleLevel(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32> @must_use fn textureSampleLevel(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32>
fn textureSampleLevel<A: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A, level: f32) -> vec4<f32> @must_use fn textureSampleLevel<A: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A, level: f32) -> vec4<f32>
fn textureSampleLevel<L: iu32>(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: L) -> f32 @must_use fn textureSampleLevel<L: iu32>(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: L) -> f32
fn textureSampleLevel<L: iu32>(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: L, @const offset: vec2<i32>) -> f32 @must_use fn textureSampleLevel<L: iu32>(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: L, @const offset: vec2<i32>) -> f32
fn textureSampleLevel<A: iu32, L: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, level: L) -> f32 @must_use fn textureSampleLevel<A: iu32, L: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, level: L) -> f32
fn textureSampleLevel<A: iu32, L: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, level: L, @const offset: vec2<i32>) -> f32 @must_use fn textureSampleLevel<A: iu32, L: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, level: L, @const offset: vec2<i32>) -> f32
fn textureSampleLevel<L: iu32>(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: L) -> f32 @must_use fn textureSampleLevel<L: iu32>(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: L) -> f32
fn textureSampleLevel<A: iu32, L: iu32>(texture: texture_depth_cube_array,sampler: sampler, coords: vec3<f32>, array_index: A, level: L) -> f32 @must_use fn textureSampleLevel<A: iu32, L: iu32>(texture: texture_depth_cube_array,sampler: sampler, coords: vec3<f32>, array_index: A, level: L) -> f32
fn textureSampleBaseClampToEdge(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32> @must_use fn textureSampleBaseClampToEdge(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
fn textureSampleBaseClampToEdge(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32> @must_use fn textureSampleBaseClampToEdge(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
fn textureStore<C: iu32>(texture: texture_storage_1d<f32_texel_format, write>, coords: C, value: vec4<f32>) fn textureStore<C: iu32>(texture: texture_storage_1d<f32_texel_format, write>, coords: C, value: vec4<f32>)
fn textureStore<C: iu32>(texture: texture_storage_2d<f32_texel_format, write>, coords: vec2<C>, value: vec4<f32>) fn textureStore<C: iu32>(texture: texture_storage_2d<f32_texel_format, write>, coords: vec2<C>, value: vec4<f32>)
fn textureStore<C: iu32, A: iu32>(texture: texture_storage_2d_array<f32_texel_format, write>, coords: vec2<C>, array_index: A, value: vec4<f32>) fn textureStore<C: iu32, A: iu32>(texture: texture_storage_2d_array<f32_texel_format, write>, coords: vec2<C>, array_index: A, value: vec4<f32>)
@ -797,15 +797,15 @@ fn textureStore<C: iu32>(texture: texture_storage_1d<u32_texel_format, write>, c
fn textureStore<C: iu32>(texture: texture_storage_2d<u32_texel_format, write>, coords: vec2<C>, value: vec4<u32>) fn textureStore<C: iu32>(texture: texture_storage_2d<u32_texel_format, write>, coords: vec2<C>, value: vec4<u32>)
fn textureStore<C: iu32, A: iu32>(texture: texture_storage_2d_array<u32_texel_format, write>, coords: vec2<C>, array_index: A, value: vec4<u32>) fn textureStore<C: iu32, A: iu32>(texture: texture_storage_2d_array<u32_texel_format, write>, coords: vec2<C>, array_index: A, value: vec4<u32>)
fn textureStore(texture: texture_storage_3d<u32_texel_format, write>, coords: vec3<i32>, value: vec4<u32>) fn textureStore(texture: texture_storage_3d<u32_texel_format, write>, coords: vec3<i32>, value: vec4<u32>)
fn textureLoad<T: fiu32, C: iu32, L: iu32>(texture: texture_1d<T>, coords: C, level: L) -> vec4<T> @must_use fn textureLoad<T: fiu32, C: iu32, L: iu32>(texture: texture_1d<T>, coords: C, level: L) -> vec4<T>
fn textureLoad<T: fiu32, C: iu32, L: iu32>(texture: texture_2d<T>, coords: vec2<C>, level: L) -> vec4<T> @must_use fn textureLoad<T: fiu32, C: iu32, L: iu32>(texture: texture_2d<T>, coords: vec2<C>, level: L) -> vec4<T>
fn textureLoad<T: fiu32, C: iu32, A: iu32, L: iu32>(texture: texture_2d_array<T>, coords: vec2<C>, array_index: A, level: L) -> vec4<T> @must_use fn textureLoad<T: fiu32, C: iu32, A: iu32, L: iu32>(texture: texture_2d_array<T>, coords: vec2<C>, array_index: A, level: L) -> vec4<T>
fn textureLoad<T: fiu32, C: iu32, L: iu32>(texture: texture_3d<T>, coords: vec3<C>, level: L) -> vec4<T> @must_use fn textureLoad<T: fiu32, C: iu32, L: iu32>(texture: texture_3d<T>, coords: vec3<C>, level: L) -> vec4<T>
fn textureLoad<T: fiu32, C: iu32, S: iu32>(texture: texture_multisampled_2d<T>, coords: vec2<C>, sample_index: S) -> vec4<T> @must_use fn textureLoad<T: fiu32, C: iu32, S: iu32>(texture: texture_multisampled_2d<T>, coords: vec2<C>, sample_index: S) -> vec4<T>
fn textureLoad<C: iu32, L: iu32>(texture: texture_depth_2d, coords: vec2<C>, level: L) -> f32 @must_use fn textureLoad<C: iu32, L: iu32>(texture: texture_depth_2d, coords: vec2<C>, level: L) -> f32
fn textureLoad<C: iu32, A: iu32, L: iu32>(texture: texture_depth_2d_array, coords: vec2<C>, array_index: A, level: L) -> f32 @must_use fn textureLoad<C: iu32, A: iu32, L: iu32>(texture: texture_depth_2d_array, coords: vec2<C>, array_index: A, level: L) -> f32
fn textureLoad<C: iu32, S: iu32>(texture: texture_depth_multisampled_2d, coords: vec2<C>, sample_index: S) -> f32 @must_use fn textureLoad<C: iu32, S: iu32>(texture: texture_depth_multisampled_2d, coords: vec2<C>, sample_index: S) -> f32
fn textureLoad<C: iu32>(texture: texture_external, coords: vec2<C>) -> vec4<f32> @must_use fn textureLoad<C: iu32>(texture: texture_external, coords: vec2<C>) -> vec4<f32>
@stage("fragment", "compute") fn atomicLoad<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>) -> T @stage("fragment", "compute") fn atomicLoad<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>) -> T
@stage("fragment", "compute") fn atomicStore<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) @stage("fragment", "compute") fn atomicStore<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T)
@ -824,166 +824,157 @@ fn textureLoad<C: iu32>(texture: texture_external, coords: vec2<C>) -> vec4<f32>
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Zero value initializers // Zero value initializers
@const("Zero") init i32() -> i32 @must_use @const("Zero") init i32() -> i32
@const("Zero") init u32() -> u32 @must_use @const("Zero") init u32() -> u32
@const("Zero") init f32() -> f32 @must_use @const("Zero") init f32() -> f32
@const("Zero") init f16() -> f16 @must_use @const("Zero") init f16() -> f16
@const("Zero") init bool() -> bool @must_use @const("Zero") init bool() -> bool
@const("Zero") init vec2<T: concrete_scalar>() -> vec2<T> @must_use @const("Zero") init vec2<T: concrete_scalar>() -> vec2<T>
@const("Zero") init vec3<T: concrete_scalar>() -> vec3<T> @must_use @const("Zero") init vec3<T: concrete_scalar>() -> vec3<T>
@const("Zero") init vec4<T: concrete_scalar>() -> vec4<T> @must_use @const("Zero") init vec4<T: concrete_scalar>() -> vec4<T>
@const("Zero") init mat2x2<T: f32_f16>() -> mat2x2<T> @must_use @const("Zero") init mat2x2<T: f32_f16>() -> mat2x2<T>
@const("Zero") init mat2x3<T: f32_f16>() -> mat2x3<T> @must_use @const("Zero") init mat2x3<T: f32_f16>() -> mat2x3<T>
@const("Zero") init mat2x4<T: f32_f16>() -> mat2x4<T> @must_use @const("Zero") init mat2x4<T: f32_f16>() -> mat2x4<T>
@const("Zero") init mat3x2<T: f32_f16>() -> mat3x2<T> @must_use @const("Zero") init mat3x2<T: f32_f16>() -> mat3x2<T>
@const("Zero") init mat3x3<T: f32_f16>() -> mat3x3<T> @must_use @const("Zero") init mat3x3<T: f32_f16>() -> mat3x3<T>
@const("Zero") init mat3x4<T: f32_f16>() -> mat3x4<T> @must_use @const("Zero") init mat3x4<T: f32_f16>() -> mat3x4<T>
@const("Zero") init mat4x2<T: f32_f16>() -> mat4x2<T> @must_use @const("Zero") init mat4x2<T: f32_f16>() -> mat4x2<T>
@const("Zero") init mat4x3<T: f32_f16>() -> mat4x3<T> @must_use @const("Zero") init mat4x3<T: f32_f16>() -> mat4x3<T>
@const("Zero") init mat4x4<T: f32_f16>() -> mat4x4<T> @must_use @const("Zero") init mat4x4<T: f32_f16>() -> mat4x4<T>
// Identity initializers // Identity initializers
@const("Identity") init i32(i32) -> i32 @must_use @const("Identity") init i32(i32) -> i32
@const("Identity") init u32(u32) -> u32 @must_use @const("Identity") init u32(u32) -> u32
@const("Identity") init f32(f32) -> f32 @must_use @const("Identity") init f32(f32) -> f32
@const("Identity") init f16(f16) -> f16 @must_use @const("Identity") init f16(f16) -> f16
@const("Identity") init bool(bool) -> bool @must_use @const("Identity") init bool(bool) -> bool
@const("Identity") init vec2<T: scalar>(vec2<T>) -> vec2<T> @must_use @const("Identity") init vec2<T: scalar>(vec2<T>) -> vec2<T>
@const("Identity") init vec3<T: scalar>(vec3<T>) -> vec3<T> @must_use @const("Identity") init vec3<T: scalar>(vec3<T>) -> vec3<T>
@const("Identity") init vec4<T: scalar>(vec4<T>) -> vec4<T> @must_use @const("Identity") init vec4<T: scalar>(vec4<T>) -> vec4<T>
@const("Identity") init mat2x2<T: f32_f16>(mat2x2<T>) -> mat2x2<T> @must_use @const("Identity") init mat2x2<T: f32_f16>(mat2x2<T>) -> mat2x2<T>
@const("Identity") init mat2x3<T: f32_f16>(mat2x3<T>) -> mat2x3<T> @must_use @const("Identity") init mat2x3<T: f32_f16>(mat2x3<T>) -> mat2x3<T>
@const("Identity") init mat2x4<T: f32_f16>(mat2x4<T>) -> mat2x4<T> @must_use @const("Identity") init mat2x4<T: f32_f16>(mat2x4<T>) -> mat2x4<T>
@const("Identity") init mat3x2<T: f32_f16>(mat3x2<T>) -> mat3x2<T> @must_use @const("Identity") init mat3x2<T: f32_f16>(mat3x2<T>) -> mat3x2<T>
@const("Identity") init mat3x3<T: f32_f16>(mat3x3<T>) -> mat3x3<T> @must_use @const("Identity") init mat3x3<T: f32_f16>(mat3x3<T>) -> mat3x3<T>
@const("Identity") init mat3x4<T: f32_f16>(mat3x4<T>) -> mat3x4<T> @must_use @const("Identity") init mat3x4<T: f32_f16>(mat3x4<T>) -> mat3x4<T>
@const("Identity") init mat4x2<T: f32_f16>(mat4x2<T>) -> mat4x2<T> @must_use @const("Identity") init mat4x2<T: f32_f16>(mat4x2<T>) -> mat4x2<T>
@const("Identity") init mat4x3<T: f32_f16>(mat4x3<T>) -> mat4x3<T> @must_use @const("Identity") init mat4x3<T: f32_f16>(mat4x3<T>) -> mat4x3<T>
@const("Identity") init mat4x4<T: f32_f16>(mat4x4<T>) -> mat4x4<T> @must_use @const("Identity") init mat4x4<T: f32_f16>(mat4x4<T>) -> mat4x4<T>
// Vector initializers (splat) // Vector initializers (splat)
@const("VecSplat") init vec2<T: scalar>(T) -> vec2<T> @must_use @const("VecSplat") init vec2<T: scalar>(T) -> vec2<T>
@const("VecSplat") init vec3<T: scalar>(T) -> vec3<T> @must_use @const("VecSplat") init vec3<T: scalar>(T) -> vec3<T>
@const("VecSplat") init vec4<T: scalar>(T) -> vec4<T> @must_use @const("VecSplat") init vec4<T: scalar>(T) -> vec4<T>
// Vector initializers (scalar) // Vector initializers (scalar)
@const("VecInitS") init vec2<T: scalar>(x: T, y: T) -> vec2<T> @must_use @const("VecInitS") init vec2<T: scalar>(x: T, y: T) -> vec2<T>
@const("VecInitS") init vec3<T: scalar>(x: T, y: T, z: T) -> vec3<T> @must_use @const("VecInitS") init vec3<T: scalar>(x: T, y: T, z: T) -> vec3<T>
@const("VecInitS") init vec4<T: scalar>(x: T, y: T, z: T, w: T) -> vec4<T> @must_use @const("VecInitS") init vec4<T: scalar>(x: T, y: T, z: T, w: T) -> vec4<T>
// Vector initializers (mixed) // Vector initializers (mixed)
@const("VecInitM") init vec3<T: scalar>(xy: vec2<T>, z: T) -> vec3<T> @must_use @const("VecInitM") init vec3<T: scalar>(xy: vec2<T>, z: T) -> vec3<T>
@const("VecInitM") init vec3<T: scalar>(x: T, yz: vec2<T>) -> vec3<T> @must_use @const("VecInitM") init vec3<T: scalar>(x: T, yz: vec2<T>) -> vec3<T>
@const("VecInitM") init vec4<T: scalar>(xy: vec2<T>, z: T, w: T) -> vec4<T> @must_use @const("VecInitM") init vec4<T: scalar>(xy: vec2<T>, z: T, w: T) -> vec4<T>
@const("VecInitM") init vec4<T: scalar>(x: T, yz: vec2<T>, w: T) -> vec4<T> @must_use @const("VecInitM") init vec4<T: scalar>(x: T, yz: vec2<T>, w: T) -> vec4<T>
@const("VecInitM") init vec4<T: scalar>(x: T, y: T, zw: vec2<T>) -> vec4<T> @must_use @const("VecInitM") init vec4<T: scalar>(x: T, y: T, zw: vec2<T>) -> vec4<T>
@const("VecInitM") init vec4<T: scalar>(xy: vec2<T>, zw: vec2<T>) -> vec4<T> @must_use @const("VecInitM") init vec4<T: scalar>(xy: vec2<T>, zw: vec2<T>) -> vec4<T>
@const("VecInitM") init vec4<T: scalar>(xyz: vec3<T>, w: T) -> vec4<T> @must_use @const("VecInitM") init vec4<T: scalar>(xyz: vec3<T>, w: T) -> vec4<T>
@const("VecInitM") init vec4<T: scalar>(x: T, zyw: vec3<T>) -> vec4<T> @must_use @const("VecInitM") init vec4<T: scalar>(x: T, zyw: vec3<T>) -> vec4<T>
// Matrix initializers (scalar) // Matrix initializers (scalar)
@const("MatInitS") @must_use @const("MatInitS")
init mat2x2<T: fa_f32_f16>(T, T, init mat2x2<T: fa_f32_f16>(T, T,
T, T) -> mat2x2<T> T, T) -> mat2x2<T>
@const("MatInitS") @must_use @const("MatInitS")
init mat2x3<T: fa_f32_f16>(T, T, T, init mat2x3<T: fa_f32_f16>(T, T, T,
T, T, T) -> mat2x3<T> T, T, T) -> mat2x3<T>
@const("MatInitS") @must_use @const("MatInitS")
init mat2x4<T: fa_f32_f16>(T, T, T, T, init mat2x4<T: fa_f32_f16>(T, T, T, T,
T, T, T, T) -> mat2x4<T> T, T, T, T) -> mat2x4<T>
@const("MatInitS") @must_use @const("MatInitS")
init mat3x2<T: fa_f32_f16>(T, T, init mat3x2<T: fa_f32_f16>(T, T,
T, T, T, T,
T, T) -> mat3x2<T> T, T) -> mat3x2<T>
@const("MatInitS") @must_use @const("MatInitS")
init mat3x3<T: fa_f32_f16>(T, T, T, init mat3x3<T: fa_f32_f16>(T, T, T,
T, T, T, T, T, T,
T, T, T) -> mat3x3<T> T, T, T) -> mat3x3<T>
@const("MatInitS") @must_use @const("MatInitS")
init mat3x4<T: fa_f32_f16>(T, T, T, T, init mat3x4<T: fa_f32_f16>(T, T, T, T,
T, T, T, T, T, T, T, T,
T, T, T, T) -> mat3x4<T> T, T, T, T) -> mat3x4<T>
@const("MatInitS") @must_use @const("MatInitS")
init mat4x2<T: fa_f32_f16>(T, T, init mat4x2<T: fa_f32_f16>(T, T,
T, T, T, T,
T, T, T, T,
T, T) -> mat4x2<T> T, T) -> mat4x2<T>
@const("MatInitS") @must_use @const("MatInitS")
init mat4x3<T: fa_f32_f16>(T, T, T, init mat4x3<T: fa_f32_f16>(T, T, T,
T, T, T, T, T, T,
T, T, T, T, T, T,
T, T, T) -> mat4x3<T> T, T, T) -> mat4x3<T>
@const("MatInitS") @must_use @const("MatInitS")
init mat4x4<T: fa_f32_f16>(T, T, T, T, init mat4x4<T: fa_f32_f16>(T, T, T, T,
T, T, T, T, T, T, T, T,
T, T, T, T, T, T, T, T,
T, T, T, T) -> mat4x4<T> T, T, T, T) -> mat4x4<T>
// Matrix initializers (column vectors) // Matrix initializers (column vectors)
@const("MatInitV") @must_use @const("MatInitV") init mat2x2<T: fa_f32_f16>(vec2<T>, vec2<T>) -> mat2x2<T>
init mat2x2<T: fa_f32_f16>(vec2<T>, vec2<T>) -> mat2x2<T> @must_use @const("MatInitV") init mat2x3<T: fa_f32_f16>(vec3<T>, vec3<T>) -> mat2x3<T>
@const("MatInitV") @must_use @const("MatInitV") init mat2x4<T: fa_f32_f16>(vec4<T>, vec4<T>) -> mat2x4<T>
init mat2x3<T: fa_f32_f16>(vec3<T>, vec3<T>) -> mat2x3<T> @must_use @const("MatInitV") init mat3x2<T: fa_f32_f16>(vec2<T>, vec2<T>, vec2<T>) -> mat3x2<T>
@const("MatInitV") @must_use @const("MatInitV") init mat3x3<T: fa_f32_f16>(vec3<T>, vec3<T>, vec3<T>) -> mat3x3<T>
init mat2x4<T: fa_f32_f16>(vec4<T>, vec4<T>) -> mat2x4<T> @must_use @const("MatInitV") init mat3x4<T: fa_f32_f16>(vec4<T>, vec4<T>, vec4<T>) -> mat3x4<T>
@const("MatInitV") @must_use @const("MatInitV") init mat4x2<T: fa_f32_f16>(vec2<T>, vec2<T>, vec2<T>, vec2<T>) -> mat4x2<T>
init mat3x2<T: fa_f32_f16>(vec2<T>, vec2<T>, vec2<T>) -> mat3x2<T> @must_use @const("MatInitV") init mat4x3<T: fa_f32_f16>(vec3<T>, vec3<T>, vec3<T>, vec3<T>) -> mat4x3<T>
@const("MatInitV") @must_use @const("MatInitV") init mat4x4<T: fa_f32_f16>(vec4<T>, vec4<T>, vec4<T>, vec4<T>) -> mat4x4<T>
init mat3x3<T: fa_f32_f16>(vec3<T>, vec3<T>, vec3<T>) -> mat3x3<T>
@const("MatInitV")
init mat3x4<T: fa_f32_f16>(vec4<T>, vec4<T>, vec4<T>) -> mat3x4<T>
@const("MatInitV")
init mat4x2<T: fa_f32_f16>(vec2<T>, vec2<T>, vec2<T>, vec2<T>) -> mat4x2<T>
@const("MatInitV")
init mat4x3<T: fa_f32_f16>(vec3<T>, vec3<T>, vec3<T>, vec3<T>) -> mat4x3<T>
@const("MatInitV")
init mat4x4<T: fa_f32_f16>(vec4<T>, vec4<T>, vec4<T>, vec4<T>) -> mat4x4<T>
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Type conversions // // Type conversions //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@const conv f32<T: scalar_no_f32>(T) -> f32 @must_use @const conv f32<T: scalar_no_f32>(T) -> f32
@const conv f16<T: scalar_no_f16>(T) -> f16 @must_use @const conv f16<T: scalar_no_f16>(T) -> f16
@const conv i32<T: scalar_no_i32>(T) -> i32 @must_use @const conv i32<T: scalar_no_i32>(T) -> i32
@const conv u32<T: scalar_no_u32>(T) -> u32 @must_use @const conv u32<T: scalar_no_u32>(T) -> u32
@const conv bool<T: scalar_no_bool>(T) -> bool @must_use @const conv bool<T: scalar_no_bool>(T) -> bool
@const conv vec2<T: f32, U: scalar_no_f32>(vec2<U>) -> vec2<f32> @must_use @const conv vec2<T: f32, U: scalar_no_f32>(vec2<U>) -> vec2<f32>
@const conv vec2<T: f16, U: scalar_no_f16>(vec2<U>) -> vec2<f16> @must_use @const conv vec2<T: f16, U: scalar_no_f16>(vec2<U>) -> vec2<f16>
@const conv vec2<T: i32, U: scalar_no_i32>(vec2<U>) -> vec2<i32> @must_use @const conv vec2<T: i32, U: scalar_no_i32>(vec2<U>) -> vec2<i32>
@const conv vec2<T: u32, U: scalar_no_u32>(vec2<U>) -> vec2<u32> @must_use @const conv vec2<T: u32, U: scalar_no_u32>(vec2<U>) -> vec2<u32>
@const conv vec2<T: bool, U: scalar_no_bool>(vec2<U>) -> vec2<bool> @must_use @const conv vec2<T: bool, U: scalar_no_bool>(vec2<U>) -> vec2<bool>
@const conv vec3<T: f32, U: scalar_no_f32>(vec3<U>) -> vec3<f32> @must_use @const conv vec3<T: f32, U: scalar_no_f32>(vec3<U>) -> vec3<f32>
@const conv vec3<T: f16, U: scalar_no_f16>(vec3<U>) -> vec3<f16> @must_use @const conv vec3<T: f16, U: scalar_no_f16>(vec3<U>) -> vec3<f16>
@const conv vec3<T: i32, U: scalar_no_i32>(vec3<U>) -> vec3<i32> @must_use @const conv vec3<T: i32, U: scalar_no_i32>(vec3<U>) -> vec3<i32>
@const conv vec3<T: u32, U: scalar_no_u32>(vec3<U>) -> vec3<u32> @must_use @const conv vec3<T: u32, U: scalar_no_u32>(vec3<U>) -> vec3<u32>
@const conv vec3<T: bool, U: scalar_no_bool>(vec3<U>) -> vec3<bool> @must_use @const conv vec3<T: bool, U: scalar_no_bool>(vec3<U>) -> vec3<bool>
@const conv vec4<T: f32, U: scalar_no_f32>(vec4<U>) -> vec4<f32> @must_use @const conv vec4<T: f32, U: scalar_no_f32>(vec4<U>) -> vec4<f32>
@const conv vec4<T: f16, U: scalar_no_f16>(vec4<U>) -> vec4<f16> @must_use @const conv vec4<T: f16, U: scalar_no_f16>(vec4<U>) -> vec4<f16>
@const conv vec4<T: i32, U: scalar_no_i32>(vec4<U>) -> vec4<i32> @must_use @const conv vec4<T: i32, U: scalar_no_i32>(vec4<U>) -> vec4<i32>
@const conv vec4<T: u32, U: scalar_no_u32>(vec4<U>) -> vec4<u32> @must_use @const conv vec4<T: u32, U: scalar_no_u32>(vec4<U>) -> vec4<u32>
@const conv vec4<T: bool, U: scalar_no_bool>(vec4<U>) -> vec4<bool> @must_use @const conv vec4<T: bool, U: scalar_no_bool>(vec4<U>) -> vec4<bool>
@const conv mat2x2<T: f16>(mat2x2<f32>) -> mat2x2<f16> @must_use @const conv mat2x2<T: f16>(mat2x2<f32>) -> mat2x2<f16>
@const conv mat2x2<T: f32>(mat2x2<f16>) -> mat2x2<f32> @must_use @const conv mat2x2<T: f32>(mat2x2<f16>) -> mat2x2<f32>
@const conv mat2x3<T: f16>(mat2x3<f32>) -> mat2x3<f16> @must_use @const conv mat2x3<T: f16>(mat2x3<f32>) -> mat2x3<f16>
@const conv mat2x3<T: f32>(mat2x3<f16>) -> mat2x3<f32> @must_use @const conv mat2x3<T: f32>(mat2x3<f16>) -> mat2x3<f32>
@const conv mat2x4<T: f16>(mat2x4<f32>) -> mat2x4<f16> @must_use @const conv mat2x4<T: f16>(mat2x4<f32>) -> mat2x4<f16>
@const conv mat2x4<T: f32>(mat2x4<f16>) -> mat2x4<f32> @must_use @const conv mat2x4<T: f32>(mat2x4<f16>) -> mat2x4<f32>
@const conv mat3x2<T: f16>(mat3x2<f32>) -> mat3x2<f16> @must_use @const conv mat3x2<T: f16>(mat3x2<f32>) -> mat3x2<f16>
@const conv mat3x2<T: f32>(mat3x2<f16>) -> mat3x2<f32> @must_use @const conv mat3x2<T: f32>(mat3x2<f16>) -> mat3x2<f32>
@const conv mat3x3<T: f16>(mat3x3<f32>) -> mat3x3<f16> @must_use @const conv mat3x3<T: f16>(mat3x3<f32>) -> mat3x3<f16>
@const conv mat3x3<T: f32>(mat3x3<f16>) -> mat3x3<f32> @must_use @const conv mat3x3<T: f32>(mat3x3<f16>) -> mat3x3<f32>
@const conv mat3x4<T: f16>(mat3x4<f32>) -> mat3x4<f16> @must_use @const conv mat3x4<T: f16>(mat3x4<f32>) -> mat3x4<f16>
@const conv mat3x4<T: f32>(mat3x4<f16>) -> mat3x4<f32> @must_use @const conv mat3x4<T: f32>(mat3x4<f16>) -> mat3x4<f32>
@const conv mat4x2<T: f16>(mat4x2<f32>) -> mat4x2<f16> @must_use @const conv mat4x2<T: f16>(mat4x2<f32>) -> mat4x2<f16>
@const conv mat4x2<T: f32>(mat4x2<f16>) -> mat4x2<f32> @must_use @const conv mat4x2<T: f32>(mat4x2<f16>) -> mat4x2<f32>
@const conv mat4x3<T: f16>(mat4x3<f32>) -> mat4x3<f16> @must_use @const conv mat4x3<T: f16>(mat4x3<f32>) -> mat4x3<f16>
@const conv mat4x3<T: f32>(mat4x3<f16>) -> mat4x3<f32> @must_use @const conv mat4x3<T: f32>(mat4x3<f16>) -> mat4x3<f32>
@const conv mat4x4<T: f16>(mat4x4<f32>) -> mat4x4<f16> @must_use @const conv mat4x4<T: f16>(mat4x4<f32>) -> mat4x4<f16>
@const conv mat4x4<T: f32>(mat4x4<f16>) -> mat4x4<f32> @must_use @const conv mat4x4<T: f32>(mat4x4<f16>) -> mat4x4<f32>
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Operators // // Operators //
@ -1001,89 +992,89 @@ init mat4x4<T: fa_f32_f16>(vec4<T>, vec4<T>, vec4<T>, vec4<T>) -> mat4x4<T>
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Unary Operators // // Unary Operators //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@const op ! (bool) -> bool @must_use @const op ! (bool) -> bool
@const op ! <N: num> (vec<N, bool>) -> vec<N, bool> @must_use @const op ! <N: num> (vec<N, bool>) -> vec<N, bool>
@const op ~ <T: ia_iu32>(T) -> T @must_use @const op ~ <T: ia_iu32>(T) -> T
@const op ~ <T: ia_iu32, N: num> (vec<N, T>) -> vec<N, T> @must_use @const op ~ <T: ia_iu32, N: num> (vec<N, T>) -> vec<N, T>
@const("UnaryMinus") op - <T: fia_fi32_f16>(T) -> T @must_use @const("UnaryMinus") op - <T: fia_fi32_f16>(T) -> T
@const("UnaryMinus") op - <T: fia_fi32_f16, N: num> (vec<N, T>) -> vec<N, T> @must_use @const("UnaryMinus") op - <T: fia_fi32_f16, N: num> (vec<N, T>) -> vec<N, T>
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Binary Operators // // Binary Operators //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@const op + <T: fia_fiu32_f16>(T, T) -> T @must_use @const op + <T: fia_fiu32_f16>(T, T) -> T
@const op + <T: fia_fiu32_f16, N: num> (vec<N, T>, vec<N, T>) -> vec<N, T> @must_use @const op + <T: fia_fiu32_f16, N: num> (vec<N, T>, vec<N, T>) -> vec<N, T>
@const op + <T: fia_fiu32_f16, N: num> (vec<N, T>, T) -> vec<N, T> @must_use @const op + <T: fia_fiu32_f16, N: num> (vec<N, T>, T) -> vec<N, T>
@const op + <T: fia_fiu32_f16, N: num> (T, vec<N, T>) -> vec<N, T> @must_use @const op + <T: fia_fiu32_f16, N: num> (T, vec<N, T>) -> vec<N, T>
@const op + <T: fa_f32_f16, N: num, M: num> (mat<N, M, T>, mat<N, M, T>) -> mat<N, M, T> @must_use @const op + <T: fa_f32_f16, N: num, M: num> (mat<N, M, T>, mat<N, M, T>) -> mat<N, M, T>
@const op - <T: fia_fiu32_f16>(T, T) -> T @must_use @const op - <T: fia_fiu32_f16>(T, T) -> T
@const op - <T: fia_fiu32_f16, N: num> (vec<N, T>, vec<N, T>) -> vec<N, T> @must_use @const op - <T: fia_fiu32_f16, N: num> (vec<N, T>, vec<N, T>) -> vec<N, T>
@const op - <T: fia_fiu32_f16, N: num> (vec<N, T>, T) -> vec<N, T> @must_use @const op - <T: fia_fiu32_f16, N: num> (vec<N, T>, T) -> vec<N, T>
@const op - <T: fia_fiu32_f16, N: num> (T, vec<N, T>) -> vec<N, T> @must_use @const op - <T: fia_fiu32_f16, N: num> (T, vec<N, T>) -> vec<N, T>
@const op - <T: fa_f32_f16, N: num, M: num> (mat<N, M, T>, mat<N, M, T>) -> mat<N, M, T> @must_use @const op - <T: fa_f32_f16, N: num, M: num> (mat<N, M, T>, mat<N, M, T>) -> mat<N, M, T>
@const("Multiply") op * <T: fia_fiu32_f16>(T, T) -> T @must_use @const("Multiply") op * <T: fia_fiu32_f16>(T, T) -> T
@const("Multiply") op * <T: fia_fiu32_f16, N: num> (vec<N, T>, vec<N, T>) -> vec<N, T> @must_use @const("Multiply") op * <T: fia_fiu32_f16, N: num> (vec<N, T>, vec<N, T>) -> vec<N, T>
@const("Multiply") op * <T: fia_fiu32_f16, N: num> (vec<N, T>, T) -> vec<N, T> @must_use @const("Multiply") op * <T: fia_fiu32_f16, N: num> (vec<N, T>, T) -> vec<N, T>
@const("Multiply") op * <T: fia_fiu32_f16, N: num> (T, vec<N, T>) -> vec<N, T> @must_use @const("Multiply") op * <T: fia_fiu32_f16, N: num> (T, vec<N, T>) -> vec<N, T>
@const("Multiply") op * <T: fa_f32_f16, N: num, M: num> (T, mat<N, M, T>) -> mat<N, M, T> @must_use @const("Multiply") op * <T: fa_f32_f16, N: num, M: num> (T, mat<N, M, T>) -> mat<N, M, T>
@const("Multiply") op * <T: fa_f32_f16, N: num, M: num> (mat<N, M, T>, T) -> mat<N, M, T> @must_use @const("Multiply") op * <T: fa_f32_f16, N: num, M: num> (mat<N, M, T>, T) -> mat<N, M, T>
@const("MultiplyMatVec") op * <T: fa_f32_f16, C: num, R: num> (mat<C, R, T>, vec<C, T>) -> vec<R, T> @must_use @const("MultiplyMatVec") op * <T: fa_f32_f16, C: num, R: num> (mat<C, R, T>, vec<C, T>) -> vec<R, T>
@const("MultiplyVecMat") op * <T: fa_f32_f16, C: num, R: num> (vec<R, T>, mat<C, R, T>) -> vec<C, T> @must_use @const("MultiplyVecMat") op * <T: fa_f32_f16, C: num, R: num> (vec<R, T>, mat<C, R, T>) -> vec<C, T>
@const("MultiplyMatMat") op * <T: fa_f32_f16, K: num, C: num, R: num> (mat<K, R, T>, mat<C, K, T>) -> mat<C, R, T> @must_use @const("MultiplyMatMat") op * <T: fa_f32_f16, K: num, C: num, R: num> (mat<K, R, T>, mat<C, K, T>) -> mat<C, R, T>
@const op / <T: fia_fiu32_f16>(T, T) -> T @must_use @const op / <T: fia_fiu32_f16>(T, T) -> T
@const op / <T: fia_fiu32_f16, N: num> (vec<N, T>, vec<N, T>) -> vec<N, T> @must_use @const op / <T: fia_fiu32_f16, N: num> (vec<N, T>, vec<N, T>) -> vec<N, T>
@const op / <T: fia_fiu32_f16, N: num> (vec<N, T>, T) -> vec<N, T> @must_use @const op / <T: fia_fiu32_f16, N: num> (vec<N, T>, T) -> vec<N, T>
@const op / <T: fia_fiu32_f16, N: num> (T, vec<N, T>) -> vec<N, T> @must_use @const op / <T: fia_fiu32_f16, N: num> (T, vec<N, T>) -> vec<N, T>
@const op % <T: fia_fiu32_f16>(T, T) -> T @must_use @const op % <T: fia_fiu32_f16>(T, T) -> T
@const op % <T: fia_fiu32_f16, N: num> (vec<N, T>, vec<N, T>) -> vec<N, T> @must_use @const op % <T: fia_fiu32_f16, N: num> (vec<N, T>, vec<N, T>) -> vec<N, T>
@const op % <T: fia_fiu32_f16, N: num> (vec<N, T>, T) -> vec<N, T> @must_use @const op % <T: fia_fiu32_f16, N: num> (vec<N, T>, T) -> vec<N, T>
@const op % <T: fia_fiu32_f16, N: num> (T, vec<N, T>) -> vec<N, T> @must_use @const op % <T: fia_fiu32_f16, N: num> (T, vec<N, T>) -> vec<N, T>
@const op ^ <T: ia_iu32>(T, T) -> T @must_use @const op ^ <T: ia_iu32>(T, T) -> T
@const op ^ <T: ia_iu32, N: num> (vec<N, T>, vec<N, T>) -> vec<N, T> @must_use @const op ^ <T: ia_iu32, N: num> (vec<N, T>, vec<N, T>) -> vec<N, T>
@const op & (bool, bool) -> bool @must_use @const op & (bool, bool) -> bool
@const op & <N: num> (vec<N, bool>, vec<N, bool>) -> vec<N, bool> @must_use @const op & <N: num> (vec<N, bool>, vec<N, bool>) -> vec<N, bool>
@const op & <T: ia_iu32>(T, T) -> T @must_use @const op & <T: ia_iu32>(T, T) -> T
@const op & <T: ia_iu32, N: num> (vec<N, T>, vec<N, T>) -> vec<N, T> @must_use @const op & <T: ia_iu32, N: num> (vec<N, T>, vec<N, T>) -> vec<N, T>
@const op | (bool, bool) -> bool @must_use @const op | (bool, bool) -> bool
@const op | <N: num> (vec<N, bool>, vec<N, bool>) -> vec<N, bool> @must_use @const op | <N: num> (vec<N, bool>, vec<N, bool>) -> vec<N, bool>
@const op | <T: ia_iu32>(T, T) -> T @must_use @const op | <T: ia_iu32>(T, T) -> T
@const op | <T: ia_iu32, N: num> (vec<N, T>, vec<N, T>) -> vec<N, T> @must_use @const op | <T: ia_iu32, N: num> (vec<N, T>, vec<N, T>) -> vec<N, T>
@const op && (bool, bool) -> bool @must_use @const op && (bool, bool) -> bool
@const op || (bool, bool) -> bool @must_use @const op || (bool, bool) -> bool
@const op == <T: scalar>(T, T) -> bool @must_use @const op == <T: scalar>(T, T) -> bool
@const op == <T: scalar, N: num> (vec<N, T>, vec<N, T>) -> vec<N, bool> @must_use @const op == <T: scalar, N: num> (vec<N, T>, vec<N, T>) -> vec<N, bool>
@const op != <T: scalar>(T, T) -> bool @must_use @const op != <T: scalar>(T, T) -> bool
@const op != <T: scalar, N: num> (vec<N, T>, vec<N, T>) -> vec<N, bool> @must_use @const op != <T: scalar, N: num> (vec<N, T>, vec<N, T>) -> vec<N, bool>
@const op < <T: fia_fiu32_f16>(T, T) -> bool @must_use @const op < <T: fia_fiu32_f16>(T, T) -> bool
@const op < <T: fia_fiu32_f16, N: num> (vec<N, T>, vec<N, T>) -> vec<N, bool> @must_use @const op < <T: fia_fiu32_f16, N: num> (vec<N, T>, vec<N, T>) -> vec<N, bool>
@const op > <T: fia_fiu32_f16>(T, T) -> bool @must_use @const op > <T: fia_fiu32_f16>(T, T) -> bool
@const op > <T: fia_fiu32_f16, N: num> (vec<N, T>, vec<N, T>) -> vec<N, bool> @must_use @const op > <T: fia_fiu32_f16, N: num> (vec<N, T>, vec<N, T>) -> vec<N, bool>
@const op <= <T: fia_fiu32_f16>(T, T) -> bool @must_use @const op <= <T: fia_fiu32_f16>(T, T) -> bool
@const op <= <T: fia_fiu32_f16, N: num> (vec<N, T>, vec<N, T>) -> vec<N, bool> @must_use @const op <= <T: fia_fiu32_f16, N: num> (vec<N, T>, vec<N, T>) -> vec<N, bool>
@const op >= <T: fia_fiu32_f16>(T, T) -> bool @must_use @const op >= <T: fia_fiu32_f16>(T, T) -> bool
@const op >= <T: fiu32_f16, N: num> (vec<N, T>, vec<N, T>) -> vec<N, bool> @must_use @const op >= <T: fiu32_f16, N: num> (vec<N, T>, vec<N, T>) -> vec<N, bool>
@const op << <T: ia_iu32>(T, u32) -> T @must_use @const op << <T: ia_iu32>(T, u32) -> T
@const op << <T: ia_iu32, N: num> (vec<N, T>, vec<N, u32>) -> vec<N, T> @must_use @const op << <T: ia_iu32, N: num> (vec<N, T>, vec<N, u32>) -> vec<N, T>
@const op >> <T: ia_iu32>(T, u32) -> T @must_use @const op >> <T: ia_iu32>(T, u32) -> T
@const op >> <T: ia_iu32, N: num> (vec<N, T>, vec<N, u32>) -> vec<N, T> @must_use @const op >> <T: ia_iu32, N: num> (vec<N, T>, vec<N, u32>) -> vec<N, T>
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Tint internal builtins // // Tint internal builtins //

View File

@ -343,6 +343,7 @@ enum class OverloadFlag {
kSupportsVertexPipeline, // The overload can be used in vertex shaders kSupportsVertexPipeline, // The overload can be used in vertex shaders
kSupportsFragmentPipeline, // The overload can be used in fragment shaders kSupportsFragmentPipeline, // The overload can be used in fragment shaders
kSupportsComputePipeline, // The overload can be used in compute shaders kSupportsComputePipeline, // The overload can be used in compute shaders
kMustUse, // The overload cannot be called as a statement
kIsDeprecated, // The overload is deprecated kIsDeprecated, // The overload is deprecated
}; };

File diff suppressed because it is too large Load Diff

View File

@ -104,7 +104,9 @@ constexpr OverloadInfo kOverloads[] = {
{{- range $i, $u := $o.CanBeUsedInStage.List -}} {{- range $i, $u := $o.CanBeUsedInStage.List -}}
, OverloadFlag::kSupports{{Title $u}}Pipeline , OverloadFlag::kSupports{{Title $u}}Pipeline
{{- end }} {{- end }}
{{- if $o.IsDeprecated}}, OverloadFlag::kIsDeprecated{{end }}), {{- if $o.MustUse}}, OverloadFlag::kMustUse{{end}}
{{- if $o.IsDeprecated}}, OverloadFlag::kIsDeprecated{{end -}}
),
/* const eval */ /* const eval */
{{- if $o.ConstEvalFunction }} {{template "ConstEvalFn" $o}}, {{- if $o.ConstEvalFunction }} {{template "ConstEvalFn" $o}},
{{- else }} nullptr, {{- else }} nullptr,

View File

@ -106,6 +106,8 @@ type Overload struct {
ReturnMatcherIndicesOffset *int ReturnMatcherIndicesOffset *int
// StageUses describes the stages an overload can be used in // StageUses describes the stages an overload can be used in
CanBeUsedInStage sem.StageUses CanBeUsedInStage sem.StageUses
// True if the overload is marked as @must_use
MustUse bool
// True if the overload is marked as deprecated // True if the overload is marked as deprecated
IsDeprecated bool IsDeprecated bool
// The kind of overload // The kind of overload
@ -211,6 +213,7 @@ func (b *IntrinsicTableBuilder) buildOverload(o *sem.Overload) (Overload, error)
ParametersOffset: b.lut.parameters.Add(ob.parameters), ParametersOffset: b.lut.parameters.Add(ob.parameters),
ReturnMatcherIndicesOffset: ob.returnTypeMatcherIndicesOffset, ReturnMatcherIndicesOffset: ob.returnTypeMatcherIndicesOffset,
CanBeUsedInStage: o.CanBeUsedInStage, CanBeUsedInStage: o.CanBeUsedInStage,
MustUse: o.MustUse,
IsDeprecated: o.IsDeprecated, IsDeprecated: o.IsDeprecated,
Kind: string(o.Decl.Kind), Kind: string(o.Decl.Kind),
ConstEvalFunction: o.ConstEvalFunction, ConstEvalFunction: o.ConstEvalFunction,

View File

@ -345,6 +345,15 @@ func (r *resolver) intrinsic(
Compute: true, Compute: true,
} }
} }
if mustUse := a.Attributes.Take("must_use"); mustUse != nil {
if len(mustUse.Values) > 0 {
return fmt.Errorf("%v @must_use does not accept any arguments", mustUse.Source)
}
if a.ReturnType == nil {
return fmt.Errorf("%v @must_use can only be used on a function with a return type", mustUse.Source)
}
overload.MustUse = true
}
if constEvalFn := a.Attributes.Take("const"); constEvalFn != nil { if constEvalFn := a.Attributes.Take("const"); constEvalFn != nil {
switch len(constEvalFn.Values) { switch len(constEvalFn.Values) {
case 0: case 0:

View File

@ -177,6 +177,11 @@ type f32
type T<x> type T<x>
conv f32(T<f32>)`, conv f32(T<f32>)`,
success, success,
}, {
`
type f32
@must_use fn f() -> f32`,
success,
}, { }, {
`enum E {A A}`, `enum E {A A}`,
` `
@ -518,6 +523,10 @@ type P<T>
match m: f32 match m: f32
fn f(P<m>)`, fn f(P<m>)`,
`file.txt:4:8 type matcher cannot be used directly here. Use a matcher constrained template argument`, `file.txt:4:8 type matcher cannot be used directly here. Use a matcher constrained template argument`,
}, {
`
@must_use fn f()`,
`file.txt:1:2 @must_use can only be used on a function with a return type`,
}, },
} { } {

View File

@ -182,6 +182,7 @@ type Overload struct {
ReturnType *FullyQualifiedName ReturnType *FullyQualifiedName
Parameters []Parameter Parameters []Parameter
CanBeUsedInStage StageUses CanBeUsedInStage StageUses
MustUse bool // True if function cannot be used as a statement
IsDeprecated bool // True if this overload is deprecated IsDeprecated bool // True if this overload is deprecated
ConstEvalFunction string // Name of the function used to evaluate the intrinsic at shader creation time ConstEvalFunction string // Name of the function used to evaluate the intrinsic at shader creation time
} }