Format core.def file. Wrap many of the lines in the core.def file and make it more consistent on how it adds annotations vs definitions. Change-Id: I2f7860833b2022f1a8aaae36b374158e346c7820 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/289177 Commit-Queue: dan sinclair <dsinclair@chromium.org> Auto-Submit: dan sinclair <dsinclair@chromium.org> Reviewed-by: James Price <jrprice@google.com>
diff --git a/src/tint/lang/core/core.def b/src/tint/lang/core/core.def index 8a89dc6..9df9062 100644 --- a/src/tint/lang/core/core.def +++ b/src/tint/lang/core/core.def
@@ -475,459 +475,1286 @@ //////////////////////////////////////////////////////////////////////////////// // https://gpuweb.github.io/gpuweb/wgsl/#builtin-functions -@must_use @const implicit(T: fiu32_f16) fn abs(T) -> T -@must_use @const implicit(N: num, T: fiu32_f16) fn abs(vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn acos(@test_value(0.96891242171) T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn acos(@test_value(0.96891242171) vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn acosh(@test_value(1.5430806348) T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn acosh(@test_value(1.5430806348) vec<N, T>) -> vec<N, T> -@must_use @const fn all(bool) -> bool -@must_use @const implicit(N: num) fn all(vec<N, bool>) -> bool -@must_use @const fn any(bool) -> bool -@must_use @const implicit(N: num) fn any(vec<N, bool>) -> bool -@must_use implicit(T, A: access) fn arrayLength(ptr<storage, runtime_array<T>, A>) -> u32 -@must_use @const implicit(T: f32_f16) fn asin(@test_value(0.479425538604) T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn asin(@test_value(0.479425538604) vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn asinh(T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn asinh(vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn atan(T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn atan(vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn atan2(T, T) -> T -@must_use @const implicit(T: f32_f16, N: num) fn atan2(vec<N, T>, vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn atanh(@test_value(0.5) T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn atanh(@test_value(0.5) vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn ceil(@test_value(1.5) T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn ceil(@test_value(1.5) vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: fiu32_f16) fn clamp(T, T, T) -> T -@must_use @const implicit(T: fiu32_f16, N: num) fn clamp(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn cos(@test_value(0) T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn cos(@test_value(0) vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn cosh(@test_value(0) T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn cosh(@test_value(0) vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: iu32) fn countLeadingZeros(T) -> T -@must_use @const implicit(N: num, T: iu32) fn countLeadingZeros(vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: iu32) fn countOneBits(T) -> T -@must_use @const implicit(N: num, T: iu32) fn countOneBits(vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: iu32) fn countTrailingZeros(T) -> T -@must_use @const implicit(N: num, T: iu32) fn countTrailingZeros(vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn cross(vec3<T>, vec3<T>) -> vec3<T> -@must_use @const implicit(T: f32_f16) fn degrees(T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn degrees(vec<N, T>) -> vec<N, T> -@must_use @const implicit(N: num, T: f32_f16) fn determinant(mat<N, N, T>) -> T -@must_use @const implicit(T: f32_f16) fn distance(T, T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn distance(vec<N, T>, vec<N, T>) -> T -@must_use @const implicit(N: num, T: fiu32_f16) fn dot(vec<N, T>, vec<N, T>) -> T -@must_use @const fn dot4I8Packed(u32, u32) -> i32 -@must_use @const fn dot4U8Packed(u32, u32) -> u32 -@must_use @stage("fragment") fn dpdx(f32) -> f32 -@must_use @stage("fragment") implicit(N: num) fn dpdx(vec<N, f32>) -> vec<N, f32> -@must_use @stage("fragment") fn dpdxCoarse(f32) -> f32 -@must_use @stage("fragment") implicit(N: num) fn dpdxCoarse(vec<N, f32>) -> vec<N, f32> -@must_use @stage("fragment") fn dpdxFine(f32) -> f32 -@must_use @stage("fragment") implicit(N: num) fn dpdxFine(vec<N, f32>) -> vec<N, f32> -@must_use @stage("fragment") fn dpdy(f32) -> f32 -@must_use @stage("fragment") implicit(N: num) fn dpdy(vec<N, f32>) -> vec<N, f32> -@must_use @stage("fragment") fn dpdyCoarse(f32) -> f32 -@must_use @stage("fragment") implicit(N: num) fn dpdyCoarse(vec<N, f32>) -> vec<N, f32> -@must_use @stage("fragment") fn dpdyFine(f32) -> f32 -@must_use @stage("fragment") implicit(N: num) fn dpdyFine(vec<N, f32>) -> vec<N, f32> -@must_use @const implicit(T: f32_f16) fn exp(T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn exp(vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn exp2(T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn exp2(vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: iu32) fn extractBits(T, u32, u32) -> T -@must_use @const implicit(N: num, T: iu32) fn extractBits(vec<N, T>, u32, u32) -> vec<N, T> -@must_use @const implicit(N: num, T: f32_f16) fn faceForward(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: iu32) fn firstLeadingBit(T) -> T -@must_use @const implicit(N: num, T: iu32) fn firstLeadingBit(vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: iu32) fn firstTrailingBit(T) -> T -@must_use @const implicit(N: num, T: iu32) fn firstTrailingBit(vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn floor(@test_value(1.5) T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn floor(@test_value(1.5) vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn fma(T, T, T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn fma(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn fract(@test_value(1.25) T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn fract(@test_value(1.25) vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn frexp(T) -> __frexp_result<T> -@must_use @const implicit(N: num, T: f32_f16) fn frexp(vec<N, T>) -> __frexp_result_vec<N, T> -@must_use @stage("fragment") fn fwidth(f32) -> f32 -@must_use @stage("fragment") implicit(N: num) fn fwidth(vec<N, f32>) -> vec<N, f32> -@must_use @stage("fragment") fn fwidthCoarse(f32) -> f32 -@must_use @stage("fragment") implicit(N: num) fn fwidthCoarse(vec<N, f32>) -> vec<N, f32> -@must_use @stage("fragment") fn fwidthFine(f32) -> f32 -@must_use @stage("fragment") implicit(N: num) fn fwidthFine(vec<N, f32>) -> vec<N, f32> -@must_use @const implicit(T: iu32) fn insertBits(T, T, u32, u32) -> T -@must_use @const implicit(N: num, T: iu32) fn insertBits(vec<N, T>, vec<N, T>, u32, u32) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn inverseSqrt(T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn inverseSqrt(vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16, U: i32) fn ldexp(T, U) -> T -@must_use @const implicit(N: num, T: f32_f16, U: i32) fn ldexp(vec<N, T>, vec<N, U>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn length(@test_value(0.0) T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn length(@test_value(0.0) vec<N, T>) -> T -@must_use @const implicit(T: f32_f16) fn log(T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn log(vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn log2(T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn log2(vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: fiu32_f16) fn max(T, T) -> T -@must_use @const implicit(N: num, T: fiu32_f16) fn max(vec<N, T>, vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: fiu32_f16) fn min(T, T) -> T -@must_use @const implicit(N: num, T: fiu32_f16) fn min(vec<N, T>, vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn mix(T, T, T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn mix(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> -@must_use @const implicit(N: num, T: f32_f16) fn mix(vec<N, T>, vec<N, T>, T) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn modf(@test_value(-1.5) T) -> __modf_result<T> -@must_use @const implicit(N: num, T: f32_f16) fn modf(@test_value(-1.5) vec<N, T>) -> __modf_result_vec<N, T> -@must_use @const implicit(N: num, T: f32_f16) fn normalize(vec<N, T>) -> vec<N, T> -@must_use @const fn pack2x16float(vec2<f32>) -> u32 -@must_use @const fn pack2x16snorm(vec2<f32>) -> u32 -@must_use @const fn pack2x16unorm(vec2<f32>) -> u32 -@must_use @const fn pack4x8snorm(vec4<f32>) -> u32 -@must_use @const fn pack4x8unorm(vec4<f32>) -> u32 -@must_use @const fn pack4xI8(vec4<i32>) -> u32 -@must_use @const fn pack4xU8(vec4<u32>) -> u32 -@must_use @const fn pack4xI8Clamp(vec4<i32>) -> u32 -@must_use @const fn pack4xU8Clamp(vec4<u32>) -> u32 -@must_use @const implicit(T: f32_f16) fn pow(T, T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn pow(vec<N, T>, vec<N, T>) -> vec<N, T> -@must_use @const fn quantizeToF16(f32) -> f32 -@must_use @const implicit(N: num) fn quantizeToF16(vec<N, f32>) -> vec<N, f32> -@must_use @const implicit(T: f32_f16) fn radians(T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn radians(vec<N, T>) -> vec<N, T> -@must_use @const implicit(N: num, T: f32_f16) fn reflect(vec<N, T>, vec<N, T>) -> vec<N, T> -@must_use @const implicit(N: num, T: f32_f16) fn refract(vec<N, T>, vec<N, T>, T) -> vec<N, T> -@must_use @const implicit(T: iu32) fn reverseBits(T) -> T -@must_use @const implicit(N: num, T: iu32) fn reverseBits(vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn round(@test_value(3.5) T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn round(@test_value(3.5) vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn saturate(@test_value(2) T) -> T -@must_use @const implicit(T: f32_f16, N: num) fn saturate(@test_value(2) vec<N, T>) -> vec<N, T> -@must_use @const("select_bool") implicit(T: scalar) fn select(T, T, bool) -> T -@must_use @const("select_bool") implicit(T: scalar, N: num) fn select(vec<N, T>, vec<N, T>, bool) -> vec<N, T> -@must_use @const("select_boolvec") implicit(N: num, T: scalar) fn select(vec<N, T>, vec<N, T>, vec<N, bool>) -> vec<N, T> -@must_use @const implicit(T: fi32_f16) fn sign(T) -> T -@must_use @const implicit(N: num, T: fi32_f16) fn sign(vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn sin(@test_value(1.57079632679) T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn sin(@test_value(1.57079632679) vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn sinh(T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn sinh(vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn smoothstep(@test_value(2) T, @test_value(4) T, @test_value(3) T) -> T -@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> -@must_use @const implicit(T: f32_f16) fn sqrt(T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn sqrt(vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn step(T, T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn step(vec<N, T>, vec<N, T>) -> vec<N, T> +@must_use @const implicit(T: fiu32_f16) + fn abs(T) -> T +@must_use @const implicit(N: num, T: fiu32_f16) + fn abs(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn acos(@test_value(0.96891242171) T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn acos(@test_value(0.96891242171) vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn acosh(@test_value(1.5430806348) T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn acosh(@test_value(1.5430806348) vec<N, T>) -> vec<N, T> + +@must_use @const + fn all(bool) -> bool +@must_use @const implicit(N: num) + fn all(vec<N, bool>) -> bool + +@must_use @const + fn any(bool) -> bool +@must_use @const implicit(N: num) + fn any(vec<N, bool>) -> bool + +@must_use implicit(T, A: access) + fn arrayLength(ptr<storage, runtime_array<T>, A>) -> u32 + +@must_use @const implicit(T: f32_f16) + fn asin(@test_value(0.479425538604) T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn asin(@test_value(0.479425538604) vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn asinh(T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn asinh(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn atan(T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn atan(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn atan2(T, T) -> T +@must_use @const implicit(T: f32_f16, N: num) + fn atan2(vec<N, T>, vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn atanh(@test_value(0.5) T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn atanh(@test_value(0.5) vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn ceil(@test_value(1.5) T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn ceil(@test_value(1.5) vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: fiu32_f16) + fn clamp(T, T, T) -> T +@must_use @const implicit(T: fiu32_f16, N: num) + fn clamp(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn cos(@test_value(0) T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn cos(@test_value(0) vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn cosh(@test_value(0) T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn cosh(@test_value(0) vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: iu32) + fn countLeadingZeros(T) -> T +@must_use @const implicit(N: num, T: iu32) + fn countLeadingZeros(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: iu32) + fn countOneBits(T) -> T +@must_use @const implicit(N: num, T: iu32) + fn countOneBits(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: iu32) + fn countTrailingZeros(T) -> T +@must_use @const implicit(N: num, T: iu32) + fn countTrailingZeros(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn cross(vec3<T>, vec3<T>) -> vec3<T> + +@must_use @const implicit(T: f32_f16) + fn degrees(T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn degrees(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(N: num, T: f32_f16) + fn determinant(mat<N, N, T>) -> T + +@must_use @const implicit(T: f32_f16) + fn distance(T, T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn distance(vec<N, T>, vec<N, T>) -> T + +@must_use @const implicit(N: num, T: fiu32_f16) + fn dot(vec<N, T>, vec<N, T>) -> T + +@must_use @const + fn dot4I8Packed(u32, u32) -> i32 +@must_use @const + fn dot4U8Packed(u32, u32) -> u32 + +@must_use @stage("fragment") + fn dpdx(f32) -> f32 +@must_use @stage("fragment") implicit(N: num) + fn dpdx(vec<N, f32>) -> vec<N, f32> + +@must_use @stage("fragment") + fn dpdxCoarse(f32) -> f32 +@must_use @stage("fragment") implicit(N: num) + fn dpdxCoarse(vec<N, f32>) -> vec<N, f32> + +@must_use @stage("fragment") + fn dpdxFine(f32) -> f32 +@must_use @stage("fragment") implicit(N: num) + fn dpdxFine(vec<N, f32>) -> vec<N, f32> + +@must_use @stage("fragment") + fn dpdy(f32) -> f32 +@must_use @stage("fragment") implicit(N: num) + fn dpdy(vec<N, f32>) -> vec<N, f32> + +@must_use @stage("fragment") + fn dpdyCoarse(f32) -> f32 +@must_use @stage("fragment") implicit(N: num) + fn dpdyCoarse(vec<N, f32>) -> vec<N, f32> + +@must_use @stage("fragment") + fn dpdyFine(f32) -> f32 +@must_use @stage("fragment") implicit(N: num) + fn dpdyFine(vec<N, f32>) -> vec<N, f32> + +@must_use @const implicit(T: f32_f16) + fn exp(T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn exp(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn exp2(T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn exp2(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: iu32) + fn extractBits(T, u32, u32) -> T +@must_use @const implicit(N: num, T: iu32) + fn extractBits(vec<N, T>, u32, u32) -> vec<N, T> + +@must_use @const implicit(N: num, T: f32_f16) + fn faceForward(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: iu32) + fn firstLeadingBit(T) -> T +@must_use @const implicit(N: num, T: iu32) + fn firstLeadingBit(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: iu32) + fn firstTrailingBit(T) -> T +@must_use @const implicit(N: num, T: iu32) + fn firstTrailingBit(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn floor(@test_value(1.5) T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn floor(@test_value(1.5) vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn fma(T, T, T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn fma(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn fract(@test_value(1.25) T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn fract(@test_value(1.25) vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn frexp(T) -> __frexp_result<T> +@must_use @const implicit(N: num, T: f32_f16) + fn frexp(vec<N, T>) -> __frexp_result_vec<N, T> + +@must_use @stage("fragment") + fn fwidth(f32) -> f32 +@must_use @stage("fragment") implicit(N: num) + fn fwidth(vec<N, f32>) -> vec<N, f32> + +@must_use @stage("fragment") + fn fwidthCoarse(f32) -> f32 +@must_use @stage("fragment") implicit(N: num) + fn fwidthCoarse(vec<N, f32>) -> vec<N, f32> + +@must_use @stage("fragment") + fn fwidthFine(f32) -> f32 +@must_use @stage("fragment") implicit(N: num) + fn fwidthFine(vec<N, f32>) -> vec<N, f32> + +@must_use @const implicit(T: iu32) + fn insertBits(T, T, u32, u32) -> T +@must_use @const implicit(N: num, T: iu32) + fn insertBits(vec<N, T>, vec<N, T>, u32, u32) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn inverseSqrt(T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn inverseSqrt(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16, U: i32) + fn ldexp(T, U) -> T +@must_use @const implicit(N: num, T: f32_f16, U: i32) + fn ldexp(vec<N, T>, vec<N, U>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn length(@test_value(0.0) T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn length(@test_value(0.0) vec<N, T>) -> T + +@must_use @const implicit(T: f32_f16) + fn log(T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn log(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn log2(T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn log2(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: fiu32_f16) + fn max(T, T) -> T +@must_use @const implicit(N: num, T: fiu32_f16) + fn max(vec<N, T>, vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: fiu32_f16) + fn min(T, T) -> T +@must_use @const implicit(N: num, T: fiu32_f16) + fn min(vec<N, T>, vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn mix(T, T, T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn mix(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> +@must_use @const implicit(N: num, T: f32_f16) + fn mix(vec<N, T>, vec<N, T>, T) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn modf(@test_value(-1.5) T) -> __modf_result<T> +@must_use @const implicit(N: num, T: f32_f16) + fn modf(@test_value(-1.5) vec<N, T>) -> __modf_result_vec<N, T> + +@must_use @const implicit(N: num, T: f32_f16) + fn normalize(vec<N, T>) -> vec<N, T> + +@must_use @const + fn pack2x16float(vec2<f32>) -> u32 +@must_use @const + fn pack2x16snorm(vec2<f32>) -> u32 +@must_use @const + fn pack2x16unorm(vec2<f32>) -> u32 +@must_use @const + fn pack4x8snorm(vec4<f32>) -> u32 +@must_use @const + fn pack4x8unorm(vec4<f32>) -> u32 +@must_use @const + fn pack4xI8(vec4<i32>) -> u32 +@must_use @const + fn pack4xU8(vec4<u32>) -> u32 +@must_use @const + fn pack4xI8Clamp(vec4<i32>) -> u32 +@must_use @const + fn pack4xU8Clamp(vec4<u32>) -> u32 + +@must_use @const implicit(T: f32_f16) + fn pow(T, T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn pow(vec<N, T>, vec<N, T>) -> vec<N, T> + +@must_use @const + fn quantizeToF16(f32) -> f32 +@must_use @const implicit(N: num) + fn quantizeToF16(vec<N, f32>) -> vec<N, f32> + +@must_use @const implicit(T: f32_f16) + fn radians(T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn radians(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(N: num, T: f32_f16) + fn reflect(vec<N, T>, vec<N, T>) -> vec<N, T> +@must_use @const implicit(N: num, T: f32_f16) + fn refract(vec<N, T>, vec<N, T>, T) -> vec<N, T> + +@must_use @const implicit(T: iu32) + fn reverseBits(T) -> T +@must_use @const implicit(N: num, T: iu32) + fn reverseBits(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn round(@test_value(3.5) T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn round(@test_value(3.5) vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn saturate(@test_value(2) T) -> T +@must_use @const implicit(T: f32_f16, N: num) + fn saturate(@test_value(2) vec<N, T>) -> vec<N, T> + +@must_use @const("select_bool") implicit(T: scalar) + fn select(T, T, bool) -> T +@must_use @const("select_bool") implicit(T: scalar, N: num) + fn select(vec<N, T>, vec<N, T>, bool) -> vec<N, T> +@must_use @const("select_boolvec") implicit(N: num, T: scalar) + fn select(vec<N, T>, vec<N, T>, vec<N, bool>) -> vec<N, T> + +@must_use @const implicit(T: fi32_f16) + fn sign(T) -> T +@must_use @const implicit(N: num, T: fi32_f16) + fn sign(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn sin(@test_value(1.57079632679) T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn sin(@test_value(1.57079632679) vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn sinh(T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn sinh(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn smoothstep(@test_value(2) T, @test_value(4) T, @test_value(3) T) -> T +@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> + +@must_use @const implicit(T: f32_f16) + fn sqrt(T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn sqrt(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn step(T, T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn step(vec<N, T>, vec<N, T>) -> vec<N, T> + + +@must_use @const implicit(T: f32_f16) + fn tan(T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn tan(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(T: f32_f16) + fn tanh(T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn tanh(vec<N, T>) -> vec<N, T> + +@must_use @const implicit(M: num, N: num, T: f32_f16) + fn transpose(mat<M, N, T>) -> mat<N, M, T> + +@must_use @const implicit(T: f32_f16) + fn trunc(@test_value(1.5) T) -> T +@must_use @const implicit(N: num, T: f32_f16) + fn trunc(@test_value(1.5) vec<N, T>) -> vec<N, T> + +@must_use @const + fn unpack2x16float(u32) -> vec2<f32> +@must_use @const + fn unpack2x16snorm(u32) -> vec2<f32> +@must_use @const + fn unpack2x16unorm(u32) -> vec2<f32> +@must_use @const + fn unpack4x8snorm(u32) -> vec4<f32> +@must_use @const + fn unpack4x8unorm(u32) -> vec4<f32> +@must_use @const + fn unpack4xI8(u32) -> vec4<i32> +@must_use @const + fn unpack4xU8(u32) -> vec4<u32> + +/////////////////////////////////////////// +// Barriers +////////////////////////////////////////// + @stage("compute") fn storageBarrier() -@must_use @const implicit(T: f32_f16) fn tan(T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn tan(vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16) fn tanh(T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn tanh(vec<N, T>) -> vec<N, T> -@must_use @const implicit(M: num, N: num, T: f32_f16) fn transpose(mat<M, N, T>) -> mat<N, M, T> -@must_use @const implicit(T: f32_f16) fn trunc(@test_value(1.5) T) -> T -@must_use @const implicit(N: num, T: f32_f16) fn trunc(@test_value(1.5) vec<N, T>) -> vec<N, T> -@must_use @const fn unpack2x16float(u32) -> vec2<f32> -@must_use @const fn unpack2x16snorm(u32) -> vec2<f32> -@must_use @const fn unpack2x16unorm(u32) -> vec2<f32> -@must_use @const fn unpack4x8snorm(u32) -> vec4<f32> -@must_use @const fn unpack4x8unorm(u32) -> vec4<f32> -@must_use @const fn unpack4xI8(u32) -> vec4<i32> -@must_use @const fn unpack4xU8(u32) -> vec4<u32> @stage("compute") fn workgroupBarrier() - @stage("compute") fn textureBarrier() -@must_use implicit(T: fiu32) fn textureDimensions(texture: texture_1d<T>) -> u32 -@must_use implicit(T: fiu32, L: iu32) fn textureDimensions(texture: texture_1d<T>, level: L) -> u32 -@must_use implicit(T: fiu32) fn textureDimensions(texture: texture_2d<T>) -> vec2<u32> -@must_use implicit(T: fiu32, L: iu32) fn textureDimensions(texture: texture_2d<T>, level: L) -> vec2<u32> -@must_use implicit(T: fiu32) fn textureDimensions(texture: texture_2d_array<T>) -> vec2<u32> -@must_use implicit(T: fiu32, L: iu32) fn textureDimensions(texture: texture_2d_array<T>, level: L) -> vec2<u32> -@must_use implicit(T: fiu32) fn textureDimensions(texture: texture_3d<T>) -> vec3<u32> -@must_use implicit(T: fiu32, L: iu32) fn textureDimensions(texture: texture_3d<T>, level: L) -> vec3<u32> -@must_use implicit(T: fiu32) fn textureDimensions(texture: texture_cube<T>) -> vec2<u32> -@must_use implicit(T: fiu32, L: iu32) fn textureDimensions(texture: texture_cube<T>, level: L) -> vec2<u32> -@must_use implicit(T: fiu32) fn textureDimensions(texture: texture_cube_array<T>) -> vec2<u32> -@must_use implicit(T: fiu32, L: iu32) fn textureDimensions(texture: texture_cube_array<T>, level: L) -> vec2<u32> -@must_use implicit(T: fiu32) fn textureDimensions(texture: texture_multisampled_2d<T>) -> vec2<u32> -@must_use fn textureDimensions(texture: texture_depth_2d) -> vec2<u32> -@must_use implicit(L: iu32) fn textureDimensions(texture: texture_depth_2d, level: L) -> vec2<u32> -@must_use fn textureDimensions(texture: texture_depth_2d_array) -> vec2<u32> -@must_use implicit(L: iu32) fn textureDimensions(texture: texture_depth_2d_array, level: L) -> vec2<u32> -@must_use fn textureDimensions(texture: texture_depth_cube) -> vec2<u32> -@must_use implicit(L: iu32) fn textureDimensions(texture: texture_depth_cube, level: L) -> vec2<u32> -@must_use fn textureDimensions(texture: texture_depth_cube_array) -> vec2<u32> -@must_use implicit(L: iu32) fn textureDimensions(texture: texture_depth_cube_array, level: L) -> vec2<u32> -@must_use fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<u32> -@must_use implicit(F: texel_format, A: access) fn textureDimensions(texture: texture_storage_1d<F, A>) -> u32 -@must_use implicit(F: texel_format, A: access) fn textureDimensions(texture: texture_storage_2d<F, A>) -> vec2<u32> -@must_use implicit(F: texel_format, A: access) fn textureDimensions(texture: texture_storage_2d_array<F, A>) -> vec2<u32> -@must_use implicit(F: texel_format, A: access) fn textureDimensions(texture: texture_storage_3d<F, A>) -> vec3<u32> -@must_use implicit(F: texel_format, A: access) fn textureDimensions(texture: texel_buffer<F, A>) -> u32 -@must_use fn textureDimensions(texture: texture_external) -> vec2<u32> -@must_use implicit(T: fiu32, C: iu32) fn textureGather(@const component: C, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T> -@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> -@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> -@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> -@must_use implicit(T: fiu32, C: iu32) fn textureGather(@const component: C, texture: texture_cube<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T> -@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> -@must_use 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>, @const offset: vec2<i32>) -> vec4<f32> -@must_use implicit(A: iu32) fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<f32> -@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> -@must_use fn textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> vec4<f32> -@must_use implicit(A: iu32) fn textureGather(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<f32> -@must_use 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, @const offset: vec2<i32>) -> vec4<f32> -@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> -@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> -@must_use fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> vec4<f32> -@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> -@must_use implicit(T: fiu32) fn textureNumLayers(texture: texture_2d_array<T>) -> u32 -@must_use implicit(T: fiu32) fn textureNumLayers(texture: texture_cube_array<T>) -> u32 -@must_use fn textureNumLayers(texture: texture_depth_2d_array) -> u32 -@must_use fn textureNumLayers(texture: texture_depth_cube_array) -> u32 -@must_use implicit(F: texel_format, A: access) fn textureNumLayers(texture: texture_storage_2d_array<F, A>) -> u32 -@must_use implicit(T: fiu32) fn textureNumLevels(texture: texture_1d<T>) -> u32 -@must_use implicit(T: fiu32) fn textureNumLevels(texture: texture_2d<T>) -> u32 -@must_use implicit(T: fiu32) fn textureNumLevels(texture: texture_2d_array<T>) -> u32 -@must_use implicit(T: fiu32) fn textureNumLevels(texture: texture_3d<T>) -> u32 -@must_use implicit(T: fiu32) fn textureNumLevels(texture: texture_cube<T>) -> u32 -@must_use implicit(T: fiu32) fn textureNumLevels(texture: texture_cube_array<T>) -> u32 -@must_use fn textureNumLevels(texture: texture_depth_2d) -> u32 -@must_use fn textureNumLevels(texture: texture_depth_2d_array) -> u32 -@must_use fn textureNumLevels(texture: texture_depth_cube) -> u32 -@must_use fn textureNumLevels(texture: texture_depth_cube_array) -> u32 -@must_use implicit(T: fiu32) fn textureNumSamples(texture: texture_multisampled_2d<T>) -> u32 -@must_use fn textureNumSamples(texture: texture_depth_multisampled_2d) -> u32 -@must_use @stage("fragment") fn textureSample(texture: texture_1d<f32>, sampler: sampler, coords: f32) -> vec4<f32> -@must_use @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>, @const offset: vec2<i32>) -> vec4<f32> -@must_use @stage("fragment") implicit(A: iu32) fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<f32> -@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> -@must_use @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>, @const offset: vec3<i32>) -> vec4<f32> -@must_use @stage("fragment") fn textureSample(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32> -@must_use @stage("fragment") implicit(A: iu32) fn textureSample(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<f32> -@must_use @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>, @const offset: vec2<i32>) -> f32 -@must_use @stage("fragment") implicit(A: iu32) fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A) -> f32 -@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 -@must_use @stage("fragment") fn textureSample(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> f32 -@must_use @stage("fragment") implicit(A: iu32) fn textureSample(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: A) -> f32 -@must_use @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, @const offset: vec2<i32>) -> vec4<f32> -@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> -@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> -@must_use @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, @const offset: vec3<i32>) -> vec4<f32> -@must_use @stage("fragment") fn textureSampleBias(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32> -@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> -@must_use @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, @const offset: vec2<i32>) -> f32 -@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 -@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 -@must_use @stage("fragment") fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32 -@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 -@must_use 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, @const offset: vec2<i32>) -> f32 -@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 -@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 -@must_use fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32 -@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 -@must_use 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>, @const offset: vec2<i32>) -> vec4<f32> -@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> -@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> -@must_use 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>, @const offset: vec3<i32>) -> vec4<f32> -@must_use fn textureSampleGrad(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32> -@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> -@must_use fn textureSampleLevel(texture: texture_1d<f32>, sampler: sampler, coords: f32, level: f32) -> vec4<f32> -@must_use 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, @const offset: vec2<i32>) -> vec4<f32> -@must_use implicit(A: iu32) fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, level: f32) -> vec4<f32> -@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> -@must_use 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, @const offset: vec3<i32>) -> vec4<f32> -@must_use fn textureSampleLevel(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32> -@must_use implicit(A: iu32) fn textureSampleLevel(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A, level: f32) -> vec4<f32> -@must_use implicit(L: iu32) fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: L) -> f32 -@must_use implicit(L: iu32) fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: L, @const offset: vec2<i32>) -> f32 -@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 -@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 -@must_use implicit(L: iu32) fn textureSampleLevel(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: L) -> f32 -@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 -@must_use fn textureSampleBaseClampToEdge(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32> -@must_use fn textureSampleBaseClampToEdge(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32> -implicit(C: iu32) fn textureStore(texture: texture_storage_1d<f32_texel_format, writable>, coords: C, value: vec4<f32>) -implicit(C: iu32) fn textureStore(texture: texture_storage_2d<f32_texel_format, writable>, coords: vec2<C>, value: vec4<f32>) -implicit(C: iu32, A: iu32) fn textureStore(texture: texture_storage_2d_array<f32_texel_format, writable>, coords: vec2<C>, array_index: A, value: vec4<f32>) -implicit(C: iu32) fn textureStore(texture: texture_storage_3d<f32_texel_format, writable>, coords: vec3<C>, value: vec4<f32>) -implicit(C: iu32) fn textureStore(texture: texel_buffer<f32_texel_format, read_write>, coords: C, value: vec4<f32>) -implicit(C: iu32) fn textureStore(texture: texture_storage_1d<i32_texel_format, writable>, coords: C, value: vec4<i32>) -implicit(C: iu32) fn textureStore(texture: texture_storage_2d<i32_texel_format, writable>, coords: vec2<C>, value: vec4<i32>) -implicit(C: iu32, A: iu32) fn textureStore(texture: texture_storage_2d_array<i32_texel_format, writable>, coords: vec2<C>, array_index: A, value: vec4<i32>) -implicit(C: iu32) fn textureStore(texture: texture_storage_3d<i32_texel_format, writable>, coords: vec3<C>, value: vec4<i32>) -implicit(C: iu32) fn textureStore(texture: texel_buffer<i32_texel_format, read_write>, coords: C, value: vec4<i32>) -implicit(C: iu32) fn textureStore(texture: texture_storage_1d<u32_texel_format, writable>, coords: C, value: vec4<u32>) -implicit(C: iu32) fn textureStore(texture: texture_storage_2d<u32_texel_format, writable>, coords: vec2<C>, value: vec4<u32>) -implicit(C: iu32, A: iu32) fn textureStore(texture: texture_storage_2d_array<u32_texel_format, writable>, coords: vec2<C>, array_index: A, value: vec4<u32>) -implicit(C: iu32) fn textureStore(texture: texture_storage_3d<u32_texel_format, writable>, coords: vec3<C>, value: vec4<u32>) -implicit(C: iu32) fn textureStore(texture: texel_buffer<u32_texel_format, read_write>, coords: C, value: vec4<u32>) -@must_use implicit(T: fiu32, C: iu32, L: iu32) fn textureLoad(texture: texture_1d<T>, coords: C, level: L) -> vec4<T> -@must_use implicit(T: fiu32, C: iu32, L: iu32) fn textureLoad(texture: texture_2d<T>, coords: vec2<C>, level: L) -> vec4<T> -@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> -@must_use implicit(T: fiu32, C: iu32, L: iu32) fn textureLoad(texture: texture_3d<T>, coords: vec3<C>, level: L) -> vec4<T> -@must_use implicit(T: fiu32, C: iu32, S: iu32) fn textureLoad(texture: texture_multisampled_2d<T>, coords: vec2<C>, sample_index: S) -> vec4<T> -@must_use implicit(C: iu32, L: iu32) fn textureLoad(texture: texture_depth_2d, coords: vec2<C>, level: L) -> f32 -@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 -@must_use implicit(C: iu32, S: iu32) fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2<C>, sample_index: S) -> f32 -@must_use implicit(C: iu32) fn textureLoad(texture: texture_external, coords: vec2<C>) -> vec4<f32> -@must_use implicit(C: iu32) fn textureLoad(texture: texture_storage_1d<f32_texel_format, readable>, coords: C) -> vec4<f32> -@must_use implicit(C: iu32) fn textureLoad(texture: texture_storage_1d<i32_texel_format, readable>, coords: C) -> vec4<i32> -@must_use implicit(C: iu32) fn textureLoad(texture: texture_storage_1d<u32_texel_format, readable>, coords: C) -> vec4<u32> -@must_use implicit(C: iu32) fn textureLoad(texture: texture_storage_2d<f32_texel_format, readable>, coords: vec2<C>) -> vec4<f32> -@must_use implicit(C: iu32) fn textureLoad(texture: texture_storage_2d<i32_texel_format, readable>, coords: vec2<C>) -> vec4<i32> -@must_use implicit(C: iu32) fn textureLoad(texture: texture_storage_2d<u32_texel_format, readable>, coords: vec2<C>) -> vec4<u32> -@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> -@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> -@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> -@must_use implicit(C: iu32) fn textureLoad(texture: texture_storage_3d<f32_texel_format, readable>, coords: vec3<C>) -> vec4<f32> -@must_use implicit(C: iu32) fn textureLoad(texture: texture_storage_3d<i32_texel_format, readable>, coords: vec3<C>) -> vec4<i32> -@must_use implicit(C: iu32) fn textureLoad(texture: texture_storage_3d<u32_texel_format, readable>, coords: vec3<C>) -> vec4<u32> -@must_use implicit(C: iu32) fn textureLoad(texture: texel_buffer<f32_texel_format, readable>, coords: C) -> vec4<f32> -@must_use implicit(C: iu32) fn textureLoad(texture: texel_buffer<i32_texel_format, readable>, coords: C) -> vec4<i32> -@must_use implicit(C: iu32) fn textureLoad(texture: texel_buffer<u32_texel_format, readable>, coords: C) -> vec4<u32> -@stage("fragment") implicit(T: fiu32) fn inputAttachmentLoad(input_attachment: input_attachment<T>) -> vec4<T> +////////////////////////////////////////// +// Textures +///////////////////////////////////////// -@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicLoad(ptr<S, atomic<T>, read_write>) -> T -@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicStore(ptr<S, atomic<T>, read_write>, T) -@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicAdd(ptr<S, atomic<T>, read_write>, T) -> T -@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicSub(ptr<S, atomic<T>, read_write>, T) -> T -@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicMax(ptr<S, atomic<T>, read_write>, T) -> T -@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicMin(ptr<S, atomic<T>, read_write>, T) -> T -@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicAnd(ptr<S, atomic<T>, read_write>, T) -> T -@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicOr(ptr<S, atomic<T>, read_write>, T) -> T -@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicXor(ptr<S, atomic<T>, read_write>, T) -> T -@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) fn atomicExchange(ptr<S, atomic<T>, read_write>, T) -> T -@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> +@must_use implicit(T: fiu32) + fn textureDimensions(texture: texture_1d<T>) -> u32 +@must_use implicit(T: fiu32, L: iu32) + fn textureDimensions(texture: texture_1d<T>, level: L) -> u32 +@must_use implicit(T: fiu32) + fn textureDimensions(texture: texture_2d<T>) -> vec2<u32> +@must_use implicit(T: fiu32, L: iu32) + fn textureDimensions(texture: texture_2d<T>, level: L) -> vec2<u32> +@must_use implicit(T: fiu32) + fn textureDimensions(texture: texture_2d_array<T>) -> vec2<u32> +@must_use implicit(T: fiu32, L: iu32) + fn textureDimensions(texture: texture_2d_array<T>, level: L) -> vec2<u32> +@must_use implicit(T: fiu32) + fn textureDimensions(texture: texture_3d<T>) -> vec3<u32> +@must_use implicit(T: fiu32, L: iu32) + fn textureDimensions(texture: texture_3d<T>, level: L) -> vec3<u32> +@must_use implicit(T: fiu32) + fn textureDimensions(texture: texture_cube<T>) -> vec2<u32> +@must_use implicit(T: fiu32, L: iu32) + fn textureDimensions(texture: texture_cube<T>, level: L) -> vec2<u32> +@must_use implicit(T: fiu32) + fn textureDimensions(texture: texture_cube_array<T>) -> vec2<u32> +@must_use implicit(T: fiu32, L: iu32) + fn textureDimensions(texture: texture_cube_array<T>, level: L) -> vec2<u32> +@must_use implicit(T: fiu32) + fn textureDimensions(texture: texture_multisampled_2d<T>) -> vec2<u32> +@must_use + fn textureDimensions(texture: texture_depth_2d) -> vec2<u32> +@must_use implicit(L: iu32) + fn textureDimensions(texture: texture_depth_2d, level: L) -> vec2<u32> +@must_use + fn textureDimensions(texture: texture_depth_2d_array) -> vec2<u32> +@must_use implicit(L: iu32) + fn textureDimensions(texture: texture_depth_2d_array, level: L) -> vec2<u32> +@must_use + fn textureDimensions(texture: texture_depth_cube) -> vec2<u32> +@must_use implicit(L: iu32) + fn textureDimensions(texture: texture_depth_cube, level: L) -> vec2<u32> +@must_use + fn textureDimensions(texture: texture_depth_cube_array) -> vec2<u32> +@must_use implicit(L: iu32) + fn textureDimensions(texture: texture_depth_cube_array, level: L) -> vec2<u32> +@must_use + fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<u32> +@must_use implicit(F: texel_format, A: access) + fn textureDimensions(texture: texture_storage_1d<F, A>) -> u32 +@must_use implicit(F: texel_format, A: access) + fn textureDimensions(texture: texture_storage_2d<F, A>) -> vec2<u32> +@must_use implicit(F: texel_format, A: access) + fn textureDimensions(texture: texture_storage_2d_array<F, A>) -> vec2<u32> +@must_use implicit(F: texel_format, A: access) + fn textureDimensions(texture: texture_storage_3d<F, A>) -> vec3<u32> +@must_use implicit(F: texel_format, A: access) + fn textureDimensions(texture: texel_buffer<F, A>) -> u32 +@must_use + fn textureDimensions(texture: texture_external) -> vec2<u32> -@must_use @stage("fragment", "compute") fn subgroupBallot(bool) -> vec4<u32> -@must_use @stage("fragment", "compute") fn subgroupElect() -> bool -@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupBroadcast(value: T, @const sourceLaneIndex: iu32) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupBroadcast(value: vec<N, T>, @const sourceLaneIndex: iu32) -> vec<N, T> -@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupBroadcastFirst(value: T) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupBroadcastFirst(value: vec<N, T>) -> vec<N, T> -@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupShuffle(value: T, sourceLaneIndex: iu32) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupShuffle(value: vec<N, T>, sourceLaneIndex: iu32) -> vec<N, T> -@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupShuffleXor(value: T, mask: u32) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupShuffleXor(value: vec<N, T>, mask: u32) -> vec<N, T> -@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupShuffleUp(value: T, delta: u32) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupShuffleUp(value: vec<N, T>, delta: u32) -> vec<N, T> -@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupShuffleDown(value: T, delta: u32) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupShuffleDown(value: vec<N, T>, delta: u32) -> vec<N, T> -@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupAdd(value: T) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupAdd(value: vec<N, T>) -> vec<N, T> -@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupInclusiveAdd(value: T) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupInclusiveAdd(value: vec<N, T>) -> vec<N, T> -@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupExclusiveAdd(value: T) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupExclusiveAdd(value: vec<N, T>) -> vec<N, T> -@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupMul(value: T) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupMul(value: vec<N, T>) -> vec<N, T> -@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupInclusiveMul(value: T) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupInclusiveMul(value: vec<N, T>) -> vec<N, T> -@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupExclusiveMul(value: T) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupExclusiveMul(value: vec<N, T>) -> vec<N, T> -@must_use @stage("fragment", "compute") implicit(T: iu32) fn subgroupAnd(value: T) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: iu32) fn subgroupAnd(value: vec<N, T>) -> vec<N, T> -@must_use @stage("fragment", "compute") implicit(T: iu32) fn subgroupOr(value: T) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: iu32) fn subgroupOr(value: vec<N, T>) -> vec<N, T> -@must_use @stage("fragment", "compute") implicit(T: iu32) fn subgroupXor(value: T) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: iu32) fn subgroupXor(value: vec<N, T>) -> vec<N, T> -@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupMin(value: T) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupMin(value: vec<N, T>) -> vec<N, T> -@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn subgroupMax(value: T) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn subgroupMax(value: vec<N, T>) -> vec<N, T> -@must_use @stage("fragment", "compute") fn subgroupAll(bool) -> bool -@must_use @stage("fragment", "compute") fn subgroupAny(bool) -> bool -@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn quadBroadcast(e: T, @const id: iu32) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn quadBroadcast(e: vec<N, T>, @const id: iu32) -> vec<N, T> -@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn quadSwapX(e: T) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn quadSwapX(e: vec<N, T>) -> vec<N, T> -@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn quadSwapY(e: T) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn quadSwapY(e: vec<N, T>) -> vec<N, T> -@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) fn quadSwapDiagonal(e: T) -> T -@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) fn quadSwapDiagonal(e: vec<N, T>) -> vec<N, T> +@must_use implicit(T: fiu32, C: iu32) + fn textureGather(@const component: C, + texture: texture_2d<T>, + sampler: sampler, + coords: vec2<f32>) -> vec4<T> +@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> +@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> +@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> +@must_use implicit(T: fiu32, C: iu32) + fn textureGather(@const component: C, + texture: texture_cube<T>, + sampler: sampler, + coords: vec3<f32>) -> vec4<T> +@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> +@must_use + 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>, + @const offset: vec2<i32>) -> vec4<f32> +@must_use implicit(A: iu32) + fn textureGather(texture: texture_depth_2d_array, + sampler: sampler, + coords: vec2<f32>, + array_index: A) -> vec4<f32> +@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> +@must_use + fn textureGather(texture: texture_depth_cube, + sampler: sampler, + coords: vec3<f32>) -> vec4<f32> +@must_use implicit(A: iu32) + fn textureGather(texture: texture_depth_cube_array, + sampler: sampler, + coords: vec3<f32>, + array_index: A) -> vec4<f32> + +@must_use + 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, + @const offset: vec2<i32>) -> vec4<f32> +@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> +@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> +@must_use + fn textureGatherCompare(texture: texture_depth_cube, + sampler: sampler_comparison, + coords: vec3<f32>, + depth_ref: f32) -> vec4<f32> +@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> + +@must_use implicit(T: fiu32) + fn textureNumLayers(texture: texture_2d_array<T>) -> u32 +@must_use implicit(T: fiu32) + fn textureNumLayers(texture: texture_cube_array<T>) -> u32 +@must_use + fn textureNumLayers(texture: texture_depth_2d_array) -> u32 +@must_use + fn textureNumLayers(texture: texture_depth_cube_array) -> u32 +@must_use implicit(F: texel_format, A: access) + fn textureNumLayers(texture: texture_storage_2d_array<F, A>) -> u32 + +@must_use implicit(T: fiu32) + fn textureNumLevels(texture: texture_1d<T>) -> u32 +@must_use implicit(T: fiu32) + fn textureNumLevels(texture: texture_2d<T>) -> u32 +@must_use implicit(T: fiu32) + fn textureNumLevels(texture: texture_2d_array<T>) -> u32 +@must_use implicit(T: fiu32) + fn textureNumLevels(texture: texture_3d<T>) -> u32 +@must_use implicit(T: fiu32) + fn textureNumLevels(texture: texture_cube<T>) -> u32 +@must_use implicit(T: fiu32) + fn textureNumLevels(texture: texture_cube_array<T>) -> u32 +@must_use + fn textureNumLevels(texture: texture_depth_2d) -> u32 +@must_use + fn textureNumLevels(texture: texture_depth_2d_array) -> u32 +@must_use + fn textureNumLevels(texture: texture_depth_cube) -> u32 +@must_use + fn textureNumLevels(texture: texture_depth_cube_array) -> u32 + +@must_use implicit(T: fiu32) + fn textureNumSamples(texture: texture_multisampled_2d<T>) -> u32 +@must_use + fn textureNumSamples(texture: texture_depth_multisampled_2d) -> u32 + +@must_use @stage("fragment") + fn textureSample(texture: texture_1d<f32>, + sampler: sampler, + coords: f32) -> vec4<f32> +@must_use @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>, + @const offset: vec2<i32>) -> vec4<f32> +@must_use @stage("fragment") implicit(A: iu32) + fn textureSample(texture: texture_2d_array<f32>, + sampler: sampler, + coords: vec2<f32>, + array_index: A) -> vec4<f32> +@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> +@must_use @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>, + @const offset: vec3<i32>) -> vec4<f32> +@must_use @stage("fragment") + fn textureSample(texture: texture_cube<f32>, + sampler: sampler, + coords: vec3<f32>) -> vec4<f32> +@must_use @stage("fragment") implicit(A: iu32) + fn textureSample(texture: texture_cube_array<f32>, + sampler: sampler, + coords: vec3<f32>, + array_index: A) -> vec4<f32> +@must_use @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>, + @const offset: vec2<i32>) -> f32 +@must_use @stage("fragment") implicit(A: iu32) + fn textureSample(texture: texture_depth_2d_array, + sampler: sampler, + coords: vec2<f32>, + array_index: A) -> f32 +@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 +@must_use @stage("fragment") + fn textureSample(texture: texture_depth_cube, + sampler: sampler, + coords: vec3<f32>) -> f32 +@must_use @stage("fragment") implicit(A: iu32) + fn textureSample(texture: texture_depth_cube_array, + sampler: sampler, + coords: vec3<f32>, + array_index: A) -> f32 + +@must_use @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, + @const offset: vec2<i32>) -> vec4<f32> +@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> +@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> +@must_use @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, + @const offset: vec3<i32>) -> vec4<f32> +@must_use @stage("fragment") + fn textureSampleBias(texture: texture_cube<f32>, + sampler: sampler, + coords: vec3<f32>, + bias: f32) -> vec4<f32> +@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> + +@must_use @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, + @const offset: vec2<i32>) -> f32 +@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 +@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 +@must_use @stage("fragment") + fn textureSampleCompare(texture: texture_depth_cube, + sampler: sampler_comparison, + coords: vec3<f32>, + depth_ref: f32) -> f32 +@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 + +@must_use + 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, + @const offset: vec2<i32>) -> f32 +@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 +@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 +@must_use + fn textureSampleCompareLevel(texture: texture_depth_cube, + sampler: sampler_comparison, + coords: vec3<f32>, + depth_ref: f32) -> f32 +@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 + +@must_use + 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>, + @const offset: vec2<i32>) -> vec4<f32> +@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> +@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> +@must_use + 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>, + @const offset: vec3<i32>) -> vec4<f32> +@must_use + fn textureSampleGrad(texture: texture_cube<f32>, + sampler: sampler, + coords: vec3<f32>, + ddx: vec3<f32>, + ddy: vec3<f32>) -> vec4<f32> +@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> + +@must_use + fn textureSampleLevel(texture: texture_1d<f32>, + sampler: sampler, + coords: f32, + level: f32) -> vec4<f32> +@must_use + 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, + @const offset: vec2<i32>) -> vec4<f32> +@must_use implicit(A: iu32) + fn textureSampleLevel(texture: texture_2d_array<f32>, + sampler: sampler, + coords: vec2<f32>, + array_index: A, + level: f32) -> vec4<f32> +@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> +@must_use + 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, + @const offset: vec3<i32>) -> vec4<f32> +@must_use + fn textureSampleLevel(texture: texture_cube<f32>, + sampler: sampler, + coords: vec3<f32>, + level: f32) -> vec4<f32> +@must_use implicit(A: iu32) + fn textureSampleLevel(texture: texture_cube_array<f32>, + sampler: sampler, + coords: vec3<f32>, + array_index: A, + level: f32) -> vec4<f32> +@must_use implicit(L: iu32) + fn textureSampleLevel(texture: texture_depth_2d, + sampler: sampler, + coords: vec2<f32>, + level: L) -> f32 +@must_use implicit(L: iu32) + fn textureSampleLevel(texture: texture_depth_2d, + sampler: sampler, + coords: vec2<f32>, + level: L, + @const offset: vec2<i32>) -> f32 +@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 +@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 +@must_use implicit(L: iu32) + fn textureSampleLevel(texture: texture_depth_cube, + sampler: sampler, + coords: vec3<f32>, + level: L) -> f32 +@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 + +@must_use + fn textureSampleBaseClampToEdge(texture: texture_2d<f32>, + sampler: sampler, + coords: vec2<f32>) -> vec4<f32> +@must_use + fn textureSampleBaseClampToEdge(texture: texture_external, + sampler: sampler, + coords: vec2<f32>) -> vec4<f32> +implicit(C: iu32) + fn textureStore(texture: texture_storage_1d<f32_texel_format, writable>, coords: C, value: vec4<f32>) +implicit(C: iu32) + fn textureStore(texture: texture_storage_2d<f32_texel_format, writable>, coords: vec2<C>, value: vec4<f32>) +implicit(C: iu32, A: iu32) + fn textureStore(texture: texture_storage_2d_array<f32_texel_format, writable>, + coords: vec2<C>, + array_index: A, + value: vec4<f32>) +implicit(C: iu32) + fn textureStore(texture: texture_storage_3d<f32_texel_format, writable>, coords: vec3<C>, value: vec4<f32>) +implicit(C: iu32) + fn textureStore(texture: texel_buffer<f32_texel_format, read_write>, coords: C, value: vec4<f32>) +implicit(C: iu32) + fn textureStore(texture: texture_storage_1d<i32_texel_format, writable>, coords: C, value: vec4<i32>) +implicit(C: iu32) + fn textureStore(texture: texture_storage_2d<i32_texel_format, writable>, coords: vec2<C>, value: vec4<i32>) +implicit(C: iu32, A: iu32) + fn textureStore(texture: texture_storage_2d_array<i32_texel_format, writable>, + coords: vec2<C>, + array_index: A, + value: vec4<i32>) +implicit(C: iu32) + fn textureStore(texture: texture_storage_3d<i32_texel_format, writable>, coords: vec3<C>, value: vec4<i32>) +implicit(C: iu32) + fn textureStore(texture: texel_buffer<i32_texel_format, read_write>, coords: C, value: vec4<i32>) +implicit(C: iu32) + fn textureStore(texture: texture_storage_1d<u32_texel_format, writable>, coords: C, value: vec4<u32>) +implicit(C: iu32) + fn textureStore(texture: texture_storage_2d<u32_texel_format, writable>, coords: vec2<C>, value: vec4<u32>) +implicit(C: iu32, A: iu32) + fn textureStore(texture: texture_storage_2d_array<u32_texel_format, writable>, + coords: vec2<C>, + array_index: A, + value: vec4<u32>) +implicit(C: iu32) + fn textureStore(texture: texture_storage_3d<u32_texel_format, writable>, coords: vec3<C>, value: vec4<u32>) +implicit(C: iu32) + fn textureStore(texture: texel_buffer<u32_texel_format, read_write>, coords: C, value: vec4<u32>) + +@must_use implicit(T: fiu32, C: iu32, L: iu32) + fn textureLoad(texture: texture_1d<T>, coords: C, level: L) -> vec4<T> +@must_use implicit(T: fiu32, C: iu32, L: iu32) + fn textureLoad(texture: texture_2d<T>, coords: vec2<C>, level: L) -> vec4<T> +@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> +@must_use implicit(T: fiu32, C: iu32, L: iu32) + fn textureLoad(texture: texture_3d<T>, coords: vec3<C>, level: L) -> vec4<T> +@must_use implicit(T: fiu32, C: iu32, S: iu32) + fn textureLoad(texture: texture_multisampled_2d<T>, coords: vec2<C>, sample_index: S) -> vec4<T> +@must_use implicit(C: iu32, L: iu32) + fn textureLoad(texture: texture_depth_2d, coords: vec2<C>, level: L) -> f32 +@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 +@must_use implicit(C: iu32, S: iu32) + fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2<C>, sample_index: S) -> f32 +@must_use implicit(C: iu32) + fn textureLoad(texture: texture_external, coords: vec2<C>) -> vec4<f32> +@must_use implicit(C: iu32) + fn textureLoad(texture: texture_storage_1d<f32_texel_format, readable>, coords: C) -> vec4<f32> +@must_use implicit(C: iu32) + fn textureLoad(texture: texture_storage_1d<i32_texel_format, readable>, coords: C) -> vec4<i32> +@must_use implicit(C: iu32) + fn textureLoad(texture: texture_storage_1d<u32_texel_format, readable>, coords: C) -> vec4<u32> +@must_use implicit(C: iu32) + fn textureLoad(texture: texture_storage_2d<f32_texel_format, readable>, coords: vec2<C>) -> vec4<f32> +@must_use implicit(C: iu32) + fn textureLoad(texture: texture_storage_2d<i32_texel_format, readable>, coords: vec2<C>) -> vec4<i32> +@must_use implicit(C: iu32) + fn textureLoad(texture: texture_storage_2d<u32_texel_format, readable>, coords: vec2<C>) -> vec4<u32> +@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> +@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> +@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> +@must_use implicit(C: iu32) + fn textureLoad(texture: texture_storage_3d<f32_texel_format, readable>, coords: vec3<C>) -> vec4<f32> +@must_use implicit(C: iu32) + fn textureLoad(texture: texture_storage_3d<i32_texel_format, readable>, coords: vec3<C>) -> vec4<i32> +@must_use implicit(C: iu32) + fn textureLoad(texture: texture_storage_3d<u32_texel_format, readable>, coords: vec3<C>) -> vec4<u32> +@must_use implicit(C: iu32) + fn textureLoad(texture: texel_buffer<f32_texel_format, readable>, coords: C) -> vec4<f32> +@must_use implicit(C: iu32) + fn textureLoad(texture: texel_buffer<i32_texel_format, readable>, coords: C) -> vec4<i32> +@must_use implicit(C: iu32) + fn textureLoad(texture: texel_buffer<u32_texel_format, readable>, coords: C) -> vec4<u32> + +@stage("fragment") implicit(T: fiu32) + fn inputAttachmentLoad(input_attachment: input_attachment<T>) -> vec4<T> + +////////////////////////////////////////// +// atomics +////////////////////////////////////////// + +@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) + fn atomicLoad(ptr<S, atomic<T>, read_write>) -> T +@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) + fn atomicStore(ptr<S, atomic<T>, read_write>, T) +@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) + fn atomicAdd(ptr<S, atomic<T>, read_write>, T) -> T +@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) + fn atomicSub(ptr<S, atomic<T>, read_write>, T) -> T +@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) + fn atomicMax(ptr<S, atomic<T>, read_write>, T) -> T +@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) + fn atomicMin(ptr<S, atomic<T>, read_write>, T) -> T +@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) + fn atomicAnd(ptr<S, atomic<T>, read_write>, T) -> T +@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) + fn atomicOr(ptr<S, atomic<T>, read_write>, T) -> T +@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) + fn atomicXor(ptr<S, atomic<T>, read_write>, T) -> T +@stage("fragment", "compute") implicit(T: iu32, S: workgroup_or_storage) + fn atomicExchange(ptr<S, atomic<T>, read_write>, T) -> T +@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> + +////////////////////////////////////////// +// subgroups +////////////////////////////////////////// + +@must_use @stage("fragment", "compute") + fn subgroupBallot(bool) -> vec4<u32> + +@must_use @stage("fragment", "compute") + fn subgroupElect() -> bool + +@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) + fn subgroupBroadcast(value: T, @const sourceLaneIndex: iu32) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) + fn subgroupBroadcast(value: vec<N, T>, @const sourceLaneIndex: iu32) -> vec<N, T> + +@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) + fn subgroupBroadcastFirst(value: T) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) + fn subgroupBroadcastFirst(value: vec<N, T>) -> vec<N, T> + +@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) + fn subgroupShuffle(value: T, sourceLaneIndex: iu32) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) + fn subgroupShuffle(value: vec<N, T>, sourceLaneIndex: iu32) -> vec<N, T> + +@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) + fn subgroupShuffleXor(value: T, mask: u32) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) + fn subgroupShuffleXor(value: vec<N, T>, mask: u32) -> vec<N, T> + +@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) + fn subgroupShuffleUp(value: T, delta: u32) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) + fn subgroupShuffleUp(value: vec<N, T>, delta: u32) -> vec<N, T> + +@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) + fn subgroupShuffleDown(value: T, delta: u32) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) + fn subgroupShuffleDown(value: vec<N, T>, delta: u32) -> vec<N, T> + +@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) + fn subgroupAdd(value: T) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) + fn subgroupAdd(value: vec<N, T>) -> vec<N, T> + +@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) + fn subgroupInclusiveAdd(value: T) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) + fn subgroupInclusiveAdd(value: vec<N, T>) -> vec<N, T> +@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) + fn subgroupExclusiveAdd(value: T) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) + fn subgroupExclusiveAdd(value: vec<N, T>) -> vec<N, T> + +@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) + fn subgroupMul(value: T) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) + fn subgroupMul(value: vec<N, T>) -> vec<N, T> + +@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) + fn subgroupInclusiveMul(value: T) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) + fn subgroupInclusiveMul(value: vec<N, T>) -> vec<N, T> + +@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) + fn subgroupExclusiveMul(value: T) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) + fn subgroupExclusiveMul(value: vec<N, T>) -> vec<N, T> + +@must_use @stage("fragment", "compute") implicit(T: iu32) + fn subgroupAnd(value: T) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: iu32) + fn subgroupAnd(value: vec<N, T>) -> vec<N, T> + +@must_use @stage("fragment", "compute") implicit(T: iu32) + fn subgroupOr(value: T) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: iu32) + fn subgroupOr(value: vec<N, T>) -> vec<N, T> + +@must_use @stage("fragment", "compute") implicit(T: iu32) + fn subgroupXor(value: T) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: iu32) + fn subgroupXor(value: vec<N, T>) -> vec<N, T> + +@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) + fn subgroupMin(value: T) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) + fn subgroupMin(value: vec<N, T>) -> vec<N, T> + +@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) + fn subgroupMax(value: T) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) + fn subgroupMax(value: vec<N, T>) -> vec<N, T> + +@must_use @stage("fragment", "compute") + fn subgroupAll(bool) -> bool + +@must_use @stage("fragment", "compute") + fn subgroupAny(bool) -> bool + +@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) + fn quadBroadcast(e: T, @const id: iu32) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) + fn quadBroadcast(e: vec<N, T>, @const id: iu32) -> vec<N, T> + +@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) + fn quadSwapX(e: T) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) + fn quadSwapX(e: vec<N, T>) -> vec<N, T> + +@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) + fn quadSwapY(e: T) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) + fn quadSwapY(e: vec<N, T>) -> vec<N, T> + +@must_use @stage("fragment", "compute") implicit(T: fiu32_f16) + fn quadSwapDiagonal(e: T) -> T +@must_use @stage("fragment", "compute") implicit(N: num, T: fiu32_f16) + fn quadSwapDiagonal(e: vec<N, T>) -> vec<N, T> //////////////////////////////////////// // Subgroup matrix //////////////////////////////////////// @stage("compute") implicit(K: subgroup_matrix_kind, S: fiu32_f16, C: num, R: num) - fn subgroupMatrixLoad<T: subgroup_matrix<K, S, C, R> >(ptr<storage, runtime_array<S>, readable>, offset: u32, @const col_major: bool, stride: u32) -> T + fn subgroupMatrixLoad<T: subgroup_matrix<K, S, C, R> >(ptr<storage, runtime_array<S>, readable>, + offset: u32, + @const col_major: bool, stride: u32) -> T @stage("compute") implicit(K: subgroup_matrix_kind, S: fiu32_f16, C: num, R: num, AC: num) - fn subgroupMatrixLoad<T: subgroup_matrix<K, S, C, R> >(ptr<workgroup_or_storage, array<S, AC>, readable>, offset: u32, @const col_major: bool, stride: u32) -> T + fn subgroupMatrixLoad<T: subgroup_matrix<K, S, C, R> >(ptr<workgroup_or_storage, array<S, AC>, readable>, + offset: u32, + @const col_major: bool, + stride: u32) -> T @stage("compute") implicit(K: subgroup_matrix_kind, S: i8, C: num, R: num) - fn subgroupMatrixLoad<T: subgroup_matrix<K, S, C, R> >(ptr<storage, runtime_array<i32>, readable>, offset: u32, @const col_major: bool, stride: u32) -> T + fn subgroupMatrixLoad<T: subgroup_matrix<K, S, C, R> >(ptr<storage, runtime_array<i32>, readable>, + offset: u32, + @const col_major: bool, + stride: u32) -> T @stage("compute") implicit(K: subgroup_matrix_kind, S: u8, C: num, R: num) - fn subgroupMatrixLoad<T: subgroup_matrix<K, S, C, R> >(ptr<storage, runtime_array<u32>, readable>, offset: u32, @const col_major: bool, stride: u32) -> T + fn subgroupMatrixLoad<T: subgroup_matrix<K, S, C, R> >(ptr<storage, runtime_array<u32>, readable>, + offset: u32, + @const col_major: bool, + stride: u32) -> T @stage("compute") implicit(K: subgroup_matrix_kind, S: i8, C: num, R: num, AC: num) - fn subgroupMatrixLoad<T: subgroup_matrix<K, S, C, R> >(ptr<workgroup_or_storage, array<i32, AC>, readable>, offset: u32, @const col_major: bool, stride: u32) -> T + fn subgroupMatrixLoad<T: subgroup_matrix<K, S, C, R> >(ptr<workgroup_or_storage, array<i32, AC>, readable>, + offset: u32, + @const col_major: bool, + stride: u32) -> T @stage("compute") implicit(K: subgroup_matrix_kind, S: u8, C: num, R: num, AC: num) - fn subgroupMatrixLoad<T: subgroup_matrix<K, S, C, R> >(ptr<workgroup_or_storage, array<u32, AC>, readable>, offset: u32, @const col_major: bool, stride: u32) -> T + fn subgroupMatrixLoad<T: subgroup_matrix<K, S, C, R> >(ptr<workgroup_or_storage, array<u32, AC>, readable>, + offset: u32, + @const col_major: bool, + stride: u32) -> T @stage("compute") implicit(K: subgroup_matrix_kind, S: fiu32_f16, C: num, R: num) - fn subgroupMatrixStore(ptr<storage, runtime_array<S>, writable>, u32, subgroup_matrix<K, S, C, R>, @const col_major: bool, stride: u32) + fn subgroupMatrixStore(ptr<storage, runtime_array<S>, writable>, + offset: u32, + subgroup_matrix<K, S, C, R>, + @const col_major: bool, + stride: u32) @stage("compute") implicit(K: subgroup_matrix_kind, S: fiu32_f16, C: num, R: num, AC: num) - fn subgroupMatrixStore(ptr<workgroup_or_storage, array<S, AC>, writable>, u32, subgroup_matrix<K, S, C, R>, @const col_major: bool, stride: u32) + fn subgroupMatrixStore(ptr<workgroup_or_storage, array<S, AC>, writable>, + offset: u32, + subgroup_matrix<K, S, C, R>, + @const col_major: bool, + stride: u32) @stage("compute") implicit(K: subgroup_matrix_kind, S: i8, C: num, R: num) - fn subgroupMatrixStore(ptr<storage, runtime_array<i32>, writable>, u32, subgroup_matrix<K, S, C, R>, @const col_major: bool, stride: u32) + fn subgroupMatrixStore(ptr<storage, runtime_array<i32>, writable>, + offset: u32, + subgroup_matrix<K, S, C, R>, + @const col_major: bool, + stride: u32) @stage("compute") implicit(K: subgroup_matrix_kind, S: u8, C: num, R: num) - fn subgroupMatrixStore(ptr<storage, runtime_array<u32>, writable>, u32, subgroup_matrix<K, S, C, R>, @const col_major: bool, stride: u32) + fn subgroupMatrixStore(ptr<storage, runtime_array<u32>, writable>, + offset: u32, + subgroup_matrix<K, S, C, R>, + @const col_major: bool, + stride: u32) @stage("compute") implicit(K: subgroup_matrix_kind, S: i8, C: num, R: num, AC: num) - fn subgroupMatrixStore(ptr<workgroup_or_storage, array<i32, AC>, writable>, u32, subgroup_matrix<K, S, C, R>, @const col_major: bool, stride: u32) + fn subgroupMatrixStore(ptr<workgroup_or_storage, array<i32, AC>, writable>, + offset: u32, + subgroup_matrix<K, S, C, R>, + @const col_major: bool, + stride: u32) @stage("compute") implicit(K: subgroup_matrix_kind, S: u8, C: num, R: num, AC: num) - fn subgroupMatrixStore(ptr<workgroup_or_storage, array<u32, AC>, writable>, u32, subgroup_matrix<K, S, C, R>, @const col_major: bool, stride: u32) + fn subgroupMatrixStore(ptr<workgroup_or_storage, array<u32, AC>, writable>, + offset: u32, + subgroup_matrix<K, S, C, R>, + @const col_major: bool, + stride: u32) @must_use @stage("compute") implicit(T: f16, C: num, R: num, K: num) - fn subgroupMatrixMultiply<TR: f32_f16>( - subgroup_matrix<subgroup_matrix_kind_left, T, K, R>, subgroup_matrix<subgroup_matrix_kind_right, T, C, K>) - -> subgroup_matrix<subgroup_matrix_kind_result, TR, C, R> + fn subgroupMatrixMultiply<TR: f32_f16>(subgroup_matrix<subgroup_matrix_kind_left, T, K, R>, + subgroup_matrix<subgroup_matrix_kind_right, T, C, K>) + -> subgroup_matrix<subgroup_matrix_kind_result, TR, C, R> @must_use @stage("compute") implicit(T: f32, C: num, R: num, K: num) - fn subgroupMatrixMultiply<TR: f32>( - subgroup_matrix<subgroup_matrix_kind_left, T, K, R>, subgroup_matrix<subgroup_matrix_kind_right, T, C, K>) - -> subgroup_matrix<subgroup_matrix_kind_result, TR, C, R> + fn subgroupMatrixMultiply<TR: f32>(subgroup_matrix<subgroup_matrix_kind_left, T, K, R>, + subgroup_matrix<subgroup_matrix_kind_right, T, C, K>) + -> subgroup_matrix<subgroup_matrix_kind_result, TR, C, R> @must_use @stage("compute") implicit(T: iu8, C: num, R: num, K: num) - fn subgroupMatrixMultiply<TR: iu32_iu8>( - subgroup_matrix<subgroup_matrix_kind_left, T, K, R>, subgroup_matrix<subgroup_matrix_kind_right, T, C, K>) - -> subgroup_matrix<subgroup_matrix_kind_result, TR, C, R> + fn subgroupMatrixMultiply<TR: iu32_iu8>(subgroup_matrix<subgroup_matrix_kind_left, T, K, R>, + subgroup_matrix<subgroup_matrix_kind_right, T, C, K>) + -> subgroup_matrix<subgroup_matrix_kind_result, TR, C, R> @must_use @stage("compute") implicit(T: iu32, C: num, R: num, K: num) - fn subgroupMatrixMultiply<TR: iu32>( - subgroup_matrix<subgroup_matrix_kind_left, T, K, R>, subgroup_matrix<subgroup_matrix_kind_right, T, C, K>) - -> subgroup_matrix<subgroup_matrix_kind_result, TR, C, R> + fn subgroupMatrixMultiply<TR: iu32>(subgroup_matrix<subgroup_matrix_kind_left, T, K, R>, + subgroup_matrix<subgroup_matrix_kind_right, T, C, K>) + -> subgroup_matrix<subgroup_matrix_kind_result, TR, C, R> @must_use @stage("compute") implicit(T: f16, TR: f32_f16, C: num, R: num, K: num) - fn subgroupMatrixMultiplyAccumulate( - subgroup_matrix<subgroup_matrix_kind_left, T, K, R>, - subgroup_matrix<subgroup_matrix_kind_right, T, C, K>, - subgroup_matrix<subgroup_matrix_kind_result, TR, C, R>) - -> subgroup_matrix<subgroup_matrix_kind_result, TR, C, R> + fn subgroupMatrixMultiplyAccumulate(subgroup_matrix<subgroup_matrix_kind_left, T, K, R>, + subgroup_matrix<subgroup_matrix_kind_right, T, C, K>, + subgroup_matrix<subgroup_matrix_kind_result, TR, C, R>) + -> subgroup_matrix<subgroup_matrix_kind_result, TR, C, R> @must_use @stage("compute") implicit(T: f32, TR: f32, C: num, R: num, K: num) - fn subgroupMatrixMultiplyAccumulate( - subgroup_matrix<subgroup_matrix_kind_left, T, K, R>, - subgroup_matrix<subgroup_matrix_kind_right, T, C, K>, - subgroup_matrix<subgroup_matrix_kind_result, TR, C, R>) - -> subgroup_matrix<subgroup_matrix_kind_result, TR, C, R> + fn subgroupMatrixMultiplyAccumulate(subgroup_matrix<subgroup_matrix_kind_left, T, K, R>, + subgroup_matrix<subgroup_matrix_kind_right, T, C, K>, + subgroup_matrix<subgroup_matrix_kind_result, TR, C, R>) + -> subgroup_matrix<subgroup_matrix_kind_result, TR, C, R> @must_use @stage("compute") implicit(T: iu8, TR: iu32_iu8, C: num, R: num, K: num) - fn subgroupMatrixMultiplyAccumulate( - subgroup_matrix<subgroup_matrix_kind_left, T, K, R>, - subgroup_matrix<subgroup_matrix_kind_right, T, C, K>, - subgroup_matrix<subgroup_matrix_kind_result, TR, C, R>) - -> subgroup_matrix<subgroup_matrix_kind_result, TR, C, R> + fn subgroupMatrixMultiplyAccumulate(subgroup_matrix<subgroup_matrix_kind_left, T, K, R>, + subgroup_matrix<subgroup_matrix_kind_right, T, C, K>, + subgroup_matrix<subgroup_matrix_kind_result, TR, C, R>) + -> subgroup_matrix<subgroup_matrix_kind_result, TR, C, R> @must_use @stage("compute") implicit(T: iu32, TR: iu32, C: num, R: num, K: num) - fn subgroupMatrixMultiplyAccumulate( - subgroup_matrix<subgroup_matrix_kind_left, T, K, R>, - subgroup_matrix<subgroup_matrix_kind_right, T, C, K>, - subgroup_matrix<subgroup_matrix_kind_result, TR, C, R>) - -> subgroup_matrix<subgroup_matrix_kind_result, TR, C, R> + fn subgroupMatrixMultiplyAccumulate(subgroup_matrix<subgroup_matrix_kind_left, T, K, R>, + subgroup_matrix<subgroup_matrix_kind_right, T, C, K>, + subgroup_matrix<subgroup_matrix_kind_result, TR, C, R>) + -> subgroup_matrix<subgroup_matrix_kind_result, TR, C, R> @must_use @stage("compute") implicit(K: subgroup_matrix_kind, T: fiu32_f16, C: num, R: num) fn subgroupMatrixScalarAdd(m: subgroup_matrix<K, T, C, R>, s: T) -> subgroup_matrix<K, T, C, R> @@ -972,8 +1799,10 @@ fn bufferLength(ptr<AS, buffer<N>, W>) -> u32 // chromium_experimental_print -implicit(T: scalar) fn print(T) -implicit(N: num, T: scalar) fn print(vec<N, T>) +implicit(T: scalar) + fn print(T) +implicit(N: num, T: scalar) + fn print(vec<N, T>) //////////////////////////////////////////////////////////////////////////////// // Value constructors // @@ -998,9 +1827,15 @@ @must_use @const("Zero") ctor mat4x3<T: f32_f16>() -> mat4x3<T> @must_use @const("Zero") ctor mat4x4<T: f32_f16>() -> mat4x4<T> -@must_use @stage("compute") ctor subgroup_matrix_left<T: subgroup_matrix_elements, K: num, R: num>() -> subgroup_matrix<subgroup_matrix_kind_left, T, K, R> -@must_use @stage("compute") ctor subgroup_matrix_right<T: subgroup_matrix_elements, C: num, K: num>() -> subgroup_matrix<subgroup_matrix_kind_right, T, C, K> -@must_use @stage("compute") ctor subgroup_matrix_result<T: subgroup_matrix_elements, C: num, R: num>() -> subgroup_matrix<subgroup_matrix_kind_result, T, C, R> +@must_use @stage("compute") + ctor subgroup_matrix_left<T: subgroup_matrix_elements, K: num, R: num>() + -> subgroup_matrix<subgroup_matrix_kind_left, T, K, R> +@must_use @stage("compute") + ctor subgroup_matrix_right<T: subgroup_matrix_elements, C: num, K: num>() + -> subgroup_matrix<subgroup_matrix_kind_right, T, C, K> +@must_use @stage("compute") + ctor subgroup_matrix_result<T: subgroup_matrix_elements, C: num, R: num>() + -> subgroup_matrix<subgroup_matrix_kind_result, T, C, R> // Identity constructors @must_use @const("Identity") ctor i32(i32) -> i32 @@ -1126,22 +1961,22 @@ @must_use @const implicit(U: scalar_no_bool) conv vec4<T: bool>(vec4<U>) -> vec4<T> @must_use @const conv mat2x2<T: f16>(mat2x2<f32>) -> mat2x2<T> -@must_use @const conv mat2x2<T: f32>(mat2x2<f16>) -> mat2x2<T> @must_use @const conv mat2x3<T: f16>(mat2x3<f32>) -> mat2x3<T> -@must_use @const conv mat2x3<T: f32>(mat2x3<f16>) -> mat2x3<T> @must_use @const conv mat2x4<T: f16>(mat2x4<f32>) -> mat2x4<T> -@must_use @const conv mat2x4<T: f32>(mat2x4<f16>) -> mat2x4<T> @must_use @const conv mat3x2<T: f16>(mat3x2<f32>) -> mat3x2<T> -@must_use @const conv mat3x2<T: f32>(mat3x2<f16>) -> mat3x2<T> @must_use @const conv mat3x3<T: f16>(mat3x3<f32>) -> mat3x3<T> -@must_use @const conv mat3x3<T: f32>(mat3x3<f16>) -> mat3x3<T> @must_use @const conv mat3x4<T: f16>(mat3x4<f32>) -> mat3x4<T> -@must_use @const conv mat3x4<T: f32>(mat3x4<f16>) -> mat3x4<T> @must_use @const conv mat4x2<T: f16>(mat4x2<f32>) -> mat4x2<T> -@must_use @const conv mat4x2<T: f32>(mat4x2<f16>) -> mat4x2<T> @must_use @const conv mat4x3<T: f16>(mat4x3<f32>) -> mat4x3<T> -@must_use @const conv mat4x3<T: f32>(mat4x3<f16>) -> mat4x3<T> @must_use @const conv mat4x4<T: f16>(mat4x4<f32>) -> mat4x4<T> +@must_use @const conv mat2x2<T: f32>(mat2x2<f16>) -> mat2x2<T> +@must_use @const conv mat2x3<T: f32>(mat2x3<f16>) -> mat2x3<T> +@must_use @const conv mat2x4<T: f32>(mat2x4<f16>) -> mat2x4<T> +@must_use @const conv mat3x2<T: f32>(mat3x2<f16>) -> mat3x2<T> +@must_use @const conv mat3x3<T: f32>(mat3x3<f16>) -> mat3x3<T> +@must_use @const conv mat3x4<T: f32>(mat3x4<f16>) -> mat3x4<T> +@must_use @const conv mat4x2<T: f32>(mat4x2<f16>) -> mat4x2<T> +@must_use @const conv mat4x3<T: f32>(mat4x3<f16>) -> mat4x3<T> @must_use @const conv mat4x4<T: f32>(mat4x4<f16>) -> mat4x4<T> //////////////////////////////////////////////////////////////////////////////// @@ -1159,108 +1994,191 @@ //////////////////////////////////////////////////////////////////////////////// // Binary Operators // //////////////////////////////////////////////////////////////////////////////// -@must_use @const implicit(T: fiu32_f16) op + (T, T) -> T -@must_use @const implicit(T: fiu32_f16, N: num) op + (vec<N, T>, vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: fiu32_f16, N: num) op + (vec<N, T>, T) -> vec<N, T> -@must_use @const implicit(T: fiu32_f16, N: num) op + (T, vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16, N: num, M: num) op + (mat<N, M, T>, mat<N, M, T>) -> mat<N, M, T> +@must_use @const implicit(T: fiu32_f16) + op + (T, T) -> T +@must_use @const implicit(T: fiu32_f16, N: num) + op + (vec<N, T>, vec<N, T>) -> vec<N, T> +@must_use @const implicit(T: fiu32_f16, N: num) + op + (vec<N, T>, T) -> vec<N, T> +@must_use @const implicit(T: fiu32_f16, N: num) + op + (T, vec<N, T>) -> vec<N, T> +@must_use @const implicit(T: f32_f16, N: num, M: num) + op + (mat<N, M, T>, mat<N, M, T>) -> mat<N, M, T> -@must_use @const implicit(T: fiu32_f16) op - (T, T) -> T -@must_use @const implicit(T: fiu32_f16, N: num) op - (vec<N, T>, vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: fiu32_f16, N: num) op - (vec<N, T>, T) -> vec<N, T> -@must_use @const implicit(T: fiu32_f16, N: num) op - (T, vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: f32_f16, N: num, M: num) op - (mat<N, M, T>, mat<N, M, T>) -> mat<N, M, T> +@must_use @const implicit(T: fiu32_f16) + op - (T, T) -> T +@must_use @const implicit(T: fiu32_f16, N: num) + op - (vec<N, T>, vec<N, T>) -> vec<N, T> +@must_use @const implicit(T: fiu32_f16, N: num) + op - (vec<N, T>, T) -> vec<N, T> +@must_use @const implicit(T: fiu32_f16, N: num) + op - (T, vec<N, T>) -> vec<N, T> +@must_use @const implicit(T: f32_f16, N: num, M: num) + op - (mat<N, M, T>, mat<N, M, T>) -> mat<N, M, T> -@must_use @const("Multiply") implicit(T: fiu32_f16) op * (T, T) -> T -@must_use @const("Multiply") implicit(T: fiu32_f16, N: num) op * (vec<N, T>, vec<N, T>) -> vec<N, T> -@must_use @const("Multiply") implicit(T: fiu32_f16, N: num) op * (vec<N, T>, T) -> vec<N, T> -@must_use @const("Multiply") implicit(T: fiu32_f16, N: num) op * (T, vec<N, T>) -> vec<N, T> -@must_use @const("Multiply") implicit(T: f32_f16, N: num, M: num) op * (T, mat<N, M, T>) -> mat<N, M, T> -@must_use @const("Multiply") implicit(T: f32_f16, N: num, M: num) op * (mat<N, M, T>, T) -> mat<N, M, T> -@must_use @const("MultiplyMatVec") implicit(T: f32_f16, C: num, R: num) op * (mat<C, R, T>, vec<C, T>) -> vec<R, T> -@must_use @const("MultiplyVecMat") implicit(T: f32_f16, C: num, R: num) op * (vec<R, T>, mat<C, R, T>) -> vec<C, T> -@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> +@must_use @const("Multiply") implicit(T: fiu32_f16) + op * (T, T) -> T +@must_use @const("Multiply") implicit(T: fiu32_f16, N: num) + op * (vec<N, T>, vec<N, T>) -> vec<N, T> +@must_use @const("Multiply") implicit(T: fiu32_f16, N: num) + op * (vec<N, T>, T) -> vec<N, T> +@must_use @const("Multiply") implicit(T: fiu32_f16, N: num) + op * (T, vec<N, T>) -> vec<N, T> +@must_use @const("Multiply") implicit(T: f32_f16, N: num, M: num) + op * (T, mat<N, M, T>) -> mat<N, M, T> +@must_use @const("Multiply") implicit(T: f32_f16, N: num, M: num) + op * (mat<N, M, T>, T) -> mat<N, M, T> +@must_use @const("MultiplyMatVec") implicit(T: f32_f16, C: num, R: num) + op * (mat<C, R, T>, vec<C, T>) -> vec<R, T> +@must_use @const("MultiplyVecMat") implicit(T: f32_f16, C: num, R: num) + op * (vec<R, T>, mat<C, R, T>) -> vec<C, T> +@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> -@must_use @const implicit(T: fiu32_f16) op / (T, T) -> T -@must_use @const implicit(T: fiu32_f16, N: num) op / (vec<N, T>, vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: fiu32_f16, N: num) op / (vec<N, T>, T) -> vec<N, T> -@must_use @const implicit(T: fiu32_f16, N: num) op / (T, vec<N, T>) -> vec<N, T> +@must_use @const implicit(T: fiu32_f16) + op / (T, T) -> T +@must_use @const implicit(T: fiu32_f16, N: num) + op / (vec<N, T>, vec<N, T>) -> vec<N, T> +@must_use @const implicit(T: fiu32_f16, N: num) + op / (vec<N, T>, T) -> vec<N, T> +@must_use @const implicit(T: fiu32_f16, N: num) + op / (T, vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: fiu32_f16) op % (T, T) -> T -@must_use @const implicit(T: fiu32_f16, N: num) op % (vec<N, T>, vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: fiu32_f16, N: num) op % (vec<N, T>, T) -> vec<N, T> -@must_use @const implicit(T: fiu32_f16, N: num) op % (T, vec<N, T>) -> vec<N, T> +@must_use @const implicit(T: fiu32_f16) + op % (T, T) -> T +@must_use @const implicit(T: fiu32_f16, N: num) + op % (vec<N, T>, vec<N, T>) -> vec<N, T> +@must_use @const implicit(T: fiu32_f16, N: num) + op % (vec<N, T>, T) -> vec<N, T> +@must_use @const implicit(T: fiu32_f16, N: num) + op % (T, vec<N, T>) -> vec<N, T> -@must_use @const implicit(T: iu32) op ^ (T, T) -> T -@must_use @const implicit(T: iu32, N: num) op ^ (vec<N, T>, vec<N, T>) -> vec<N, T> +@must_use @const implicit(T: iu32) + op ^ (T, T) -> T +@must_use @const implicit(T: iu32, N: num) + op ^ (vec<N, T>, vec<N, T>) -> vec<N, T> -@must_use @const op & (bool, bool) -> bool -@must_use @const implicit(N: num) op & (vec<N, bool>, vec<N, bool>) -> vec<N, bool> -@must_use @const implicit(T: iu32) op & (T, T) -> T -@must_use @const implicit(T: iu32, N: num) op & (vec<N, T>, vec<N, T>) -> vec<N, T> +@must_use @const + op & (bool, bool) -> bool +@must_use @const implicit(N: num) + op & (vec<N, bool>, vec<N, bool>) -> vec<N, bool> +@must_use @const implicit(T: iu32) + op & (T, T) -> T +@must_use @const implicit(T: iu32, N: num) + op & (vec<N, T>, vec<N, T>) -> vec<N, T> -@must_use @const op | (bool, bool) -> bool -@must_use @const implicit(N: num) op | (vec<N, bool>, vec<N, bool>) -> vec<N, bool> -@must_use @const implicit(T: iu32) op | (T, T) -> T -@must_use @const implicit(T: iu32, N: num) op | (vec<N, T>, vec<N, T>) -> vec<N, T> +@must_use @const + op | (bool, bool) -> bool +@must_use @const implicit(N: num) + op | (vec<N, bool>, vec<N, bool>) -> vec<N, bool> +@must_use @const implicit(T: iu32) + op | (T, T) -> T +@must_use @const implicit(T: iu32, N: num) + op | (vec<N, T>, vec<N, T>) -> vec<N, T> -@must_use @const op && (bool, bool) -> bool -@must_use @const op || (bool, bool) -> bool +@must_use @const + op && (bool, bool) -> bool +@must_use @const + op || (bool, bool) -> bool -@must_use @const implicit(T: scalar) op == (T, T) -> bool -@must_use @const implicit(T: scalar, N: num) op == (vec<N, T>, vec<N, T>) -> vec<N, bool> +@must_use @const implicit(T: scalar) + op == (T, T) -> bool +@must_use @const implicit(T: scalar, N: num) + op == (vec<N, T>, vec<N, T>) -> vec<N, bool> -@must_use @const implicit(T: scalar) op != (T, T) -> bool -@must_use @const implicit(T: scalar, N: num) op != (vec<N, T>, vec<N, T>) -> vec<N, bool> +@must_use @const implicit(T: scalar) + op != (T, T) -> bool +@must_use @const implicit(T: scalar, N: num) + op != (vec<N, T>, vec<N, T>) -> vec<N, bool> -@must_use @const implicit(T: fiu32_f16) op < (T, T) -> bool -@must_use @const implicit(T: fiu32_f16, N: num) op < (vec<N, T>, vec<N, T>) -> vec<N, bool> +@must_use @const implicit(T: fiu32_f16) + op < (T, T) -> bool +@must_use @const implicit(T: fiu32_f16, N: num) + op < (vec<N, T>, vec<N, T>) -> vec<N, bool> -@must_use @const implicit(T: fiu32_f16) op > (T, T) -> bool -@must_use @const implicit(T: fiu32_f16, N: num) op > (vec<N, T>, vec<N, T>) -> vec<N, bool> +@must_use @const implicit(T: fiu32_f16) + op > (T, T) -> bool +@must_use @const implicit(T: fiu32_f16, N: num) + op > (vec<N, T>, vec<N, T>) -> vec<N, bool> -@must_use @const implicit(T: fiu32_f16) op <= (T, T) -> bool -@must_use @const implicit(T: fiu32_f16, N: num) op <= (vec<N, T>, vec<N, T>) -> vec<N, bool> +@must_use @const implicit(T: fiu32_f16) + op <= (T, T) -> bool +@must_use @const implicit(T: fiu32_f16, N: num) + op <= (vec<N, T>, vec<N, T>) -> vec<N, bool> -@must_use @const implicit(T: fiu32_f16) op >= (T, T) -> bool -@must_use @const implicit(T: fiu32_f16, N: num) op >= (vec<N, T>, vec<N, T>) -> vec<N, bool> +@must_use @const implicit(T: fiu32_f16) + op >= (T, T) -> bool +@must_use @const implicit(T: fiu32_f16, N: num) + op >= (vec<N, T>, vec<N, T>) -> vec<N, bool> -@must_use @const implicit(T: iu32) op << (T, u32) -> T -@must_use @const implicit(T: iu32, N: num) op << (vec<N, T>, vec<N, u32>) -> vec<N, T> +@must_use @const implicit(T: iu32) + op << (T, u32) -> T +@must_use @const implicit(T: iu32, N: num) + op << (vec<N, T>, vec<N, u32>) -> vec<N, T> -@must_use @const implicit(T: iu32) op >> (T, u32) -> T -@must_use @const implicit(T: iu32, N: num) op >> (vec<N, T>, vec<N, u32>) -> vec<N, T> +@must_use @const implicit(T: iu32) + op >> (T, u32) -> T +@must_use @const implicit(T: iu32, N: num) + op >> (vec<N, T>, vec<N, u32>) -> vec<N, T> //////////////////////////////////////////////////////////////////////////////// // chromium_experimental_resource_table // //////////////////////////////////////////////////////////////////////////////// -@must_use implicit(K: fiu32, I: iu32) fn hasResource<T: texture_1d<K> >(index: I) -> bool -@must_use implicit(K: fiu32, I: iu32) fn hasResource<T: texture_2d<K> >(index: I) -> bool -@must_use implicit(K: fiu32, I: iu32) fn hasResource<T: texture_2d_array<K> >(index: I) -> bool -@must_use implicit(K: fiu32, I: iu32) fn hasResource<T: texture_3d<K> >(index: I) -> bool -@must_use implicit(K: fiu32, I: iu32) fn hasResource<T: texture_cube<K> >(index: I) -> bool -@must_use implicit(K: fiu32, I: iu32) fn hasResource<T: texture_cube_array<K> >(index: I) -> bool -@must_use implicit(K: fiu32, I: iu32) fn hasResource<T: texture_multisampled_2d<K> >(index: I) -> bool -@must_use implicit(I: iu32) fn hasResource<T: texture_depth_2d>(index: I) -> bool -@must_use implicit(I: iu32) fn hasResource<T: texture_depth_2d_array>(index: I) -> bool -@must_use implicit(I: iu32) fn hasResource<T: texture_depth_cube>(index: I) -> bool -@must_use implicit(I: iu32) fn hasResource<T: texture_depth_cube_array>(index: I) -> bool -@must_use implicit(I: iu32) fn hasResource<T: texture_depth_multisampled_2d>(index: I) -> bool -@must_use implicit(I: iu32) fn hasResource<S: sampler>(index: I) -> bool -@must_use implicit(I: iu32) fn hasResource<S: sampler_comparison>(index: I) -> bool +@must_use implicit(K: fiu32, I: iu32) + fn hasResource<T: texture_1d<K> >(index: I) -> bool +@must_use implicit(K: fiu32, I: iu32) + fn hasResource<T: texture_2d<K> >(index: I) -> bool +@must_use implicit(K: fiu32, I: iu32) + fn hasResource<T: texture_2d_array<K> >(index: I) -> bool +@must_use implicit(K: fiu32, I: iu32) + fn hasResource<T: texture_3d<K> >(index: I) -> bool +@must_use implicit(K: fiu32, I: iu32) + fn hasResource<T: texture_cube<K> >(index: I) -> bool +@must_use implicit(K: fiu32, I: iu32) + fn hasResource<T: texture_cube_array<K> >(index: I) -> bool +@must_use implicit(K: fiu32, I: iu32) + fn hasResource<T: texture_multisampled_2d<K> >(index: I) -> bool +@must_use implicit(I: iu32) + fn hasResource<T: texture_depth_2d>(index: I) -> bool +@must_use implicit(I: iu32) + fn hasResource<T: texture_depth_2d_array>(index: I) -> bool +@must_use implicit(I: iu32) + fn hasResource<T: texture_depth_cube>(index: I) -> bool +@must_use implicit(I: iu32) + fn hasResource<T: texture_depth_cube_array>(index: I) -> bool +@must_use implicit(I: iu32) + fn hasResource<T: texture_depth_multisampled_2d>(index: I) -> bool +@must_use implicit(I: iu32) + fn hasResource<S: sampler>(index: I) -> bool +@must_use implicit(I: iu32) + fn hasResource<S: sampler_comparison>(index: I) -> bool -@must_use implicit(K: fiu32, I: iu32) fn getResource<T: texture_1d<K> >(index: I) -> T -@must_use implicit(K: fiu32, I: iu32) fn getResource<T: texture_2d<K> >(index: I) -> T -@must_use implicit(K: fiu32, I: iu32) fn getResource<T: texture_2d_array<K> >(index: I) -> T -@must_use implicit(K: fiu32, I: iu32) fn getResource<T: texture_3d<K> >(index: I) -> T -@must_use implicit(K: fiu32, I: iu32) fn getResource<T: texture_cube<K> >(index: I) -> T -@must_use implicit(K: fiu32, I: iu32) fn getResource<T: texture_cube_array<K> >(index: I) -> T -@must_use implicit(K: fiu32, I: iu32) fn getResource<T: texture_multisampled_2d<K> >(index: I) -> T -@must_use implicit(I: iu32) fn getResource<T: texture_depth_2d>(index: I) -> T -@must_use implicit(I: iu32) fn getResource<T: texture_depth_2d_array>(index: I) -> T -@must_use implicit(I: iu32) fn getResource<T: texture_depth_cube>(index: I) -> T -@must_use implicit(I: iu32) fn getResource<T: texture_depth_cube_array>(index: I) -> T -@must_use implicit(I: iu32) fn getResource<T: texture_depth_multisampled_2d>(index: I) -> T -@must_use implicit(I: iu32) fn getResource<S: sampler>(index: I) -> S -@must_use implicit(I: iu32) fn getResource<S: sampler_comparison>(index: I) -> S +@must_use implicit(K: fiu32, I: iu32) + fn getResource<T: texture_1d<K> >(index: I) -> T +@must_use implicit(K: fiu32, I: iu32) + fn getResource<T: texture_2d<K> >(index: I) -> T +@must_use implicit(K: fiu32, I: iu32) + fn getResource<T: texture_2d_array<K> >(index: I) -> T +@must_use implicit(K: fiu32, I: iu32) + fn getResource<T: texture_3d<K> >(index: I) -> T +@must_use implicit(K: fiu32, I: iu32) + fn getResource<T: texture_cube<K> >(index: I) -> T +@must_use implicit(K: fiu32, I: iu32) + fn getResource<T: texture_cube_array<K> >(index: I) -> T +@must_use implicit(K: fiu32, I: iu32) + fn getResource<T: texture_multisampled_2d<K> >(index: I) -> T +@must_use implicit(I: iu32) + fn getResource<T: texture_depth_2d>(index: I) -> T +@must_use implicit(I: iu32) + fn getResource<T: texture_depth_2d_array>(index: I) -> T +@must_use implicit(I: iu32) + fn getResource<T: texture_depth_cube>(index: I) -> T +@must_use implicit(I: iu32) + fn getResource<T: texture_depth_cube_array>(index: I) -> T +@must_use implicit(I: iu32) + fn getResource<T: texture_depth_multisampled_2d>(index: I) -> T +@must_use implicit(I: iu32) + fn getResource<S: sampler>(index: I) -> S +@must_use implicit(I: iu32) + fn getResource<S: sampler_comparison>(index: I) -> S
diff --git a/src/tint/lang/core/enums.cc b/src/tint/lang/core/enums.cc index 95065bf..badcf50 100644 --- a/src/tint/lang/core/enums.cc +++ b/src/tint/lang/core/enums.cc
@@ -1639,9 +1639,6 @@ if (name == "step") { return BuiltinFn::kStep; } - if (name == "storageBarrier") { - return BuiltinFn::kStorageBarrier; - } if (name == "tan") { return BuiltinFn::kTan; } @@ -1675,6 +1672,9 @@ if (name == "unpack4xU8") { return BuiltinFn::kUnpack4XU8; } + if (name == "storageBarrier") { + return BuiltinFn::kStorageBarrier; + } if (name == "workgroupBarrier") { return BuiltinFn::kWorkgroupBarrier; } @@ -2038,8 +2038,6 @@ return "sqrt"; case BuiltinFn::kStep: return "step"; - case BuiltinFn::kStorageBarrier: - return "storageBarrier"; case BuiltinFn::kTan: return "tan"; case BuiltinFn::kTanh: @@ -2062,6 +2060,8 @@ return "unpack4xI8"; case BuiltinFn::kUnpack4XU8: return "unpack4xU8"; + case BuiltinFn::kStorageBarrier: + return "storageBarrier"; case BuiltinFn::kWorkgroupBarrier: return "workgroupBarrier"; case BuiltinFn::kTextureBarrier:
diff --git a/src/tint/lang/core/enums.h b/src/tint/lang/core/enums.h index 5391ebc..4ff8af0 100644 --- a/src/tint/lang/core/enums.h +++ b/src/tint/lang/core/enums.h
@@ -954,7 +954,6 @@ kSmoothstep, kSqrt, kStep, - kStorageBarrier, kTan, kTanh, kTranspose, @@ -966,6 +965,7 @@ kUnpack4X8Unorm, kUnpack4XI8, kUnpack4XU8, + kStorageBarrier, kWorkgroupBarrier, kTextureBarrier, kTextureDimensions, @@ -1134,7 +1134,6 @@ BuiltinFn::kSmoothstep, BuiltinFn::kSqrt, BuiltinFn::kStep, - BuiltinFn::kStorageBarrier, BuiltinFn::kTan, BuiltinFn::kTanh, BuiltinFn::kTranspose, @@ -1146,6 +1145,7 @@ BuiltinFn::kUnpack4X8Unorm, BuiltinFn::kUnpack4XI8, BuiltinFn::kUnpack4XU8, + BuiltinFn::kStorageBarrier, BuiltinFn::kWorkgroupBarrier, BuiltinFn::kTextureBarrier, BuiltinFn::kTextureDimensions, @@ -1295,7 +1295,6 @@ "smoothstep", "sqrt", "step", - "storageBarrier", "tan", "tanh", "transpose", @@ -1307,6 +1306,7 @@ "unpack4x8unorm", "unpack4xI8", "unpack4xU8", + "storageBarrier", "workgroupBarrier", "textureBarrier", "textureDimensions",
diff --git a/src/tint/lang/core/intrinsic/data.cc b/src/tint/lang/core/intrinsic/data.cc index c06cf9f..a92a74d 100644 --- a/src/tint/lang/core/intrinsic/data.cc +++ b/src/tint/lang/core/intrinsic/data.cc
@@ -3270,7 +3270,7 @@ }, { /* [150] */ - /* usage */ core::ParameterUsage::kNone, + /* usage */ core::ParameterUsage::kOffset, /* is_const */ false, /* matcher_indices */ MatcherIndicesIndex(13), }, @@ -3300,7 +3300,7 @@ }, { /* [155] */ - /* usage */ core::ParameterUsage::kNone, + /* usage */ core::ParameterUsage::kOffset, /* is_const */ false, /* matcher_indices */ MatcherIndicesIndex(13), }, @@ -3330,7 +3330,7 @@ }, { /* [160] */ - /* usage */ core::ParameterUsage::kNone, + /* usage */ core::ParameterUsage::kOffset, /* is_const */ false, /* matcher_indices */ MatcherIndicesIndex(13), }, @@ -3360,7 +3360,7 @@ }, { /* [165] */ - /* usage */ core::ParameterUsage::kNone, + /* usage */ core::ParameterUsage::kOffset, /* is_const */ false, /* matcher_indices */ MatcherIndicesIndex(13), }, @@ -3390,7 +3390,7 @@ }, { /* [170] */ - /* usage */ core::ParameterUsage::kNone, + /* usage */ core::ParameterUsage::kOffset, /* is_const */ false, /* matcher_indices */ MatcherIndicesIndex(13), }, @@ -3420,7 +3420,7 @@ }, { /* [175] */ - /* usage */ core::ParameterUsage::kNone, + /* usage */ core::ParameterUsage::kOffset, /* is_const */ false, /* matcher_indices */ MatcherIndicesIndex(13), }, @@ -12582,17 +12582,6 @@ }, { /* [533] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 0, - /* num_explicit_templates */ 0, - /* num_templates */ 0, - /* templates */ TemplateIndex(/* invalid */), - /* parameters */ ParameterIndex(/* invalid */), - /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [534] */ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse), /* num_parameters */ 1, /* num_explicit_templates */ 0, @@ -12603,7 +12592,7 @@ /* const_eval_fn */ ConstEvalFunctionIndex(72), }, { - /* [535] */ + /* [534] */ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse), /* num_parameters */ 1, /* num_explicit_templates */ 0, @@ -12614,7 +12603,7 @@ /* const_eval_fn */ ConstEvalFunctionIndex(74), }, { - /* [536] */ + /* [535] */ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse), /* num_parameters */ 1, /* num_explicit_templates */ 0, @@ -12625,7 +12614,7 @@ /* const_eval_fn */ ConstEvalFunctionIndex(75), }, { - /* [537] */ + /* [536] */ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse), /* num_parameters */ 1, /* num_explicit_templates */ 0, @@ -12636,7 +12625,7 @@ /* const_eval_fn */ ConstEvalFunctionIndex(76), }, { - /* [538] */ + /* [537] */ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse), /* num_parameters */ 1, /* num_explicit_templates */ 0, @@ -12647,7 +12636,7 @@ /* const_eval_fn */ ConstEvalFunctionIndex(77), }, { - /* [539] */ + /* [538] */ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse), /* num_parameters */ 1, /* num_explicit_templates */ 0, @@ -12658,7 +12647,7 @@ /* const_eval_fn */ ConstEvalFunctionIndex(78), }, { - /* [540] */ + /* [539] */ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse), /* num_parameters */ 1, /* num_explicit_templates */ 0, @@ -12669,7 +12658,7 @@ /* const_eval_fn */ ConstEvalFunctionIndex(79), }, { - /* [541] */ + /* [540] */ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse), /* num_parameters */ 1, /* num_explicit_templates */ 0, @@ -12680,6 +12669,17 @@ /* const_eval_fn */ ConstEvalFunctionIndex(80), }, { + /* [541] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 0, + /* num_explicit_templates */ 0, + /* num_templates */ 0, + /* templates */ TemplateIndex(/* invalid */), + /* parameters */ ParameterIndex(/* invalid */), + /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { /* [542] */ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline), /* num_parameters */ 1, @@ -13366,76 +13366,76 @@ }, { /* [79] */ - /* fn storageBarrier() */ - /* num overloads */ 1, - /* overloads */ OverloadIndex(533), - }, - { - /* [80] */ /* fn tan[T : f32_f16](T) -> T */ /* fn tan[N : num, T : f32_f16](vec<N, T>) -> vec<N, T> */ /* num overloads */ 2, /* overloads */ OverloadIndex(462), }, { - /* [81] */ + /* [80] */ /* fn tanh[T : f32_f16](T) -> T */ /* fn tanh[N : num, T : f32_f16](vec<N, T>) -> vec<N, T> */ /* num overloads */ 2, /* overloads */ OverloadIndex(464), }, { - /* [82] */ + /* [81] */ /* fn transpose[M : num, N : num, T : f32_f16](mat<M, N, T>) -> mat<N, M, T> */ /* num overloads */ 1, - /* overloads */ OverloadIndex(534), + /* overloads */ OverloadIndex(533), }, { - /* [83] */ + /* [82] */ /* fn trunc[T : f32_f16](@test_value(1.5) T) -> T */ /* fn trunc[N : num, T : f32_f16](@test_value(1.5) vec<N, T>) -> vec<N, T> */ /* num overloads */ 2, /* overloads */ OverloadIndex(466), }, { - /* [84] */ + /* [83] */ /* fn unpack2x16float(u32) -> vec2<f32> */ /* num overloads */ 1, + /* overloads */ OverloadIndex(534), + }, + { + /* [84] */ + /* fn unpack2x16snorm(u32) -> vec2<f32> */ + /* num overloads */ 1, /* overloads */ OverloadIndex(535), }, { /* [85] */ - /* fn unpack2x16snorm(u32) -> vec2<f32> */ + /* fn unpack2x16unorm(u32) -> vec2<f32> */ /* num overloads */ 1, /* overloads */ OverloadIndex(536), }, { /* [86] */ - /* fn unpack2x16unorm(u32) -> vec2<f32> */ + /* fn unpack4x8snorm(u32) -> vec4<f32> */ /* num overloads */ 1, /* overloads */ OverloadIndex(537), }, { /* [87] */ - /* fn unpack4x8snorm(u32) -> vec4<f32> */ + /* fn unpack4x8unorm(u32) -> vec4<f32> */ /* num overloads */ 1, /* overloads */ OverloadIndex(538), }, { /* [88] */ - /* fn unpack4x8unorm(u32) -> vec4<f32> */ + /* fn unpack4xI8(u32) -> vec4<i32> */ /* num overloads */ 1, /* overloads */ OverloadIndex(539), }, { /* [89] */ - /* fn unpack4xI8(u32) -> vec4<i32> */ + /* fn unpack4xU8(u32) -> vec4<u32> */ /* num overloads */ 1, /* overloads */ OverloadIndex(540), }, { /* [90] */ - /* fn unpack4xU8(u32) -> vec4<u32> */ + /* fn storageBarrier() */ /* num overloads */ 1, /* overloads */ OverloadIndex(541), }, @@ -13443,13 +13443,13 @@ /* [91] */ /* fn workgroupBarrier() */ /* num overloads */ 1, - /* overloads */ OverloadIndex(533), + /* overloads */ OverloadIndex(541), }, { /* [92] */ /* fn textureBarrier() */ /* num overloads */ 1, - /* overloads */ OverloadIndex(533), + /* overloads */ OverloadIndex(541), }, { /* [93] */ @@ -13944,12 +13944,12 @@ }, { /* [146] */ - /* fn subgroupMatrixStore[K : subgroup_matrix_kind, S : fiu32_f16, C : num, R : num](ptr<storage, runtime_array<S>, writable>, u32, subgroup_matrix<K, S, C, R>, @const col_major: bool, stride: u32) */ - /* fn subgroupMatrixStore[K : subgroup_matrix_kind, S : fiu32_f16, C : num, R : num, AC : num](ptr<workgroup_or_storage, array<S, AC>, writable>, u32, subgroup_matrix<K, S, C, R>, @const col_major: bool, stride: u32) */ - /* fn subgroupMatrixStore[K : subgroup_matrix_kind, S : i8, C : num, R : num](ptr<storage, runtime_array<i32>, writable>, u32, subgroup_matrix<K, S, C, R>, @const col_major: bool, stride: u32) */ - /* fn subgroupMatrixStore[K : subgroup_matrix_kind, S : u8, C : num, R : num](ptr<storage, runtime_array<u32>, writable>, u32, subgroup_matrix<K, S, C, R>, @const col_major: bool, stride: u32) */ - /* fn subgroupMatrixStore[K : subgroup_matrix_kind, S : i8, C : num, R : num, AC : num](ptr<workgroup_or_storage, array<i32, AC>, writable>, u32, subgroup_matrix<K, S, C, R>, @const col_major: bool, stride: u32) */ - /* fn subgroupMatrixStore[K : subgroup_matrix_kind, S : u8, C : num, R : num, AC : num](ptr<workgroup_or_storage, array<u32, AC>, writable>, u32, subgroup_matrix<K, S, C, R>, @const col_major: bool, stride: u32) */ + /* fn subgroupMatrixStore[K : subgroup_matrix_kind, S : fiu32_f16, C : num, R : num](ptr<storage, runtime_array<S>, writable>, offset: u32, subgroup_matrix<K, S, C, R>, @const col_major: bool, stride: u32) */ + /* fn subgroupMatrixStore[K : subgroup_matrix_kind, S : fiu32_f16, C : num, R : num, AC : num](ptr<workgroup_or_storage, array<S, AC>, writable>, offset: u32, subgroup_matrix<K, S, C, R>, @const col_major: bool, stride: u32) */ + /* fn subgroupMatrixStore[K : subgroup_matrix_kind, S : i8, C : num, R : num](ptr<storage, runtime_array<i32>, writable>, offset: u32, subgroup_matrix<K, S, C, R>, @const col_major: bool, stride: u32) */ + /* fn subgroupMatrixStore[K : subgroup_matrix_kind, S : u8, C : num, R : num](ptr<storage, runtime_array<u32>, writable>, offset: u32, subgroup_matrix<K, S, C, R>, @const col_major: bool, stride: u32) */ + /* fn subgroupMatrixStore[K : subgroup_matrix_kind, S : i8, C : num, R : num, AC : num](ptr<workgroup_or_storage, array<i32, AC>, writable>, offset: u32, subgroup_matrix<K, S, C, R>, @const col_major: bool, stride: u32) */ + /* fn subgroupMatrixStore[K : subgroup_matrix_kind, S : u8, C : num, R : num, AC : num](ptr<workgroup_or_storage, array<u32, AC>, writable>, offset: u32, subgroup_matrix<K, S, C, R>, @const col_major: bool, stride: u32) */ /* num overloads */ 6, /* overloads */ OverloadIndex(231), },