From b2d106ead5c33538ddf56a76fb99ce304f68c8b8 Mon Sep 17 00:00:00 2001 From: James Price Date: Thu, 22 Aug 2024 21:20:34 +0000 Subject: [PATCH] [msl] Regenerate E2E expectations Bug: 42251016 No-Try: True Change-Id: I965c82133c75c29bd10ada078e0dfeeb1c205785 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/203634 Reviewed-by: dan sinclair Auto-Submit: James Price Commit-Queue: James Price --- .../80e579.wgsl.expected.ir.msl | 4 +- .../9dbb51.wgsl.expected.ir.msl | 4 +- .../eed7c4.wgsl.expected.ir.msl | 4 +- .../1116ed.wgsl.expected.ir.msl | 4 +- .../4cf3a2.wgsl.expected.ir.msl | 4 +- .../b6e47c.wgsl.expected.ir.msl | 4 +- .../2ecd8f.wgsl.expected.ir.msl | 4 +- .../d65515.wgsl.expected.ir.msl | 4 +- .../e383db.wgsl.expected.ir.msl | 4 +- .../0bdd9a.wgsl.expected.ir.msl | 4 +- .../1bf73e.wgsl.expected.ir.msl | 4 +- .../2974eb.wgsl.expected.ir.msl | 4 +- .../302be4.wgsl.expected.ir.msl | 4 +- .../36780e.wgsl.expected.ir.msl | 4 +- .../36f0d3.wgsl.expected.ir.msl | 4 +- .../a12142.wgsl.expected.ir.msl | 4 +- .../ae5e39.wgsl.expected.ir.msl | 4 +- .../b7c55c.wgsl.expected.ir.msl | 4 +- .../dot4I8Packed/881e62.wgsl.expected.ir.msl | 2 +- .../80e579.wgsl.expected.ir.msl | 6 +-- .../9dbb51.wgsl.expected.ir.msl | 6 +-- .../eed7c4.wgsl.expected.ir.msl | 6 +-- .../1116ed.wgsl.expected.ir.msl | 11 ++--- .../4cf3a2.wgsl.expected.ir.msl | 11 ++--- .../b6e47c.wgsl.expected.ir.msl | 11 ++--- .../2ecd8f.wgsl.expected.ir.msl | 11 +++-- .../d65515.wgsl.expected.ir.msl | 11 +++-- .../e383db.wgsl.expected.ir.msl | 11 +++-- .../0bdd9a.wgsl.expected.ir.msl | 6 +-- .../1bf73e.wgsl.expected.ir.msl | 6 +-- .../2974eb.wgsl.expected.ir.msl | 6 +-- .../302be4.wgsl.expected.ir.msl | 6 +-- .../36780e.wgsl.expected.ir.msl | 6 +-- .../36f0d3.wgsl.expected.ir.msl | 6 +-- .../a12142.wgsl.expected.ir.msl | 6 +-- .../ae5e39.wgsl.expected.ir.msl | 6 +-- .../b7c55c.wgsl.expected.ir.msl | 6 +-- ...clip_distances_size_1.wgsl.expected.ir.msl | 42 +++++++++++++++++++ ...clip_distances_size_4.wgsl.expected.ir.msl | 42 +++++++++++++++++++ ...clip_distances_size_8.wgsl.expected.ir.msl | 42 +++++++++++++++++++ .../divide_by_zero.wgsl.expected.ir.msl | 2 - 41 files changed, 232 insertions(+), 108 deletions(-) create mode 100644 test/tint/extensions/clip_distances/clip_distances_size_1.wgsl.expected.ir.msl create mode 100644 test/tint/extensions/clip_distances/clip_distances_size_4.wgsl.expected.ir.msl create mode 100644 test/tint/extensions/clip_distances/clip_distances_size_8.wgsl.expected.ir.msl diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.msl index 7ef023b954d..d7a327df1b6 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.msl @@ -8,8 +8,8 @@ struct tint_module_vars_struct { }; float4 textureSampleBias_80e579(tint_module_vars_struct tint_module_vars) { - int const v = max(1, 0); - float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), v, bias(1.0f)); + bias const v = bias(1.0f); + float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v); return res; } diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.msl index 3b41a41055b..19948af3415 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.msl @@ -8,8 +8,8 @@ struct tint_module_vars_struct { }; float4 textureSampleBias_9dbb51(tint_module_vars_struct tint_module_vars) { - int const v = max(1, 0); - float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), v, bias(1.0f), int2(1)); + bias const v = bias(1.0f); + float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v, int2(1)); return res; } diff --git a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.msl index a7912994cc3..7d34af6b66a 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.msl @@ -8,8 +8,8 @@ struct tint_module_vars_struct { }; float4 textureSampleBias_eed7c4(tint_module_vars_struct tint_module_vars) { - int const v = max(1, 0); - float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), v, bias(1.0f)); + bias const v = bias(1.0f); + float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), max(1, 0), v); return res; } diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl index f0ff71fbab7..056cb8d6815 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl @@ -18,8 +18,8 @@ struct vertex_main_outputs { }; float textureSampleCompareLevel_1116ed(tint_module_vars_struct tint_module_vars) { - int const v = max(1, 0); - float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, float2(1.0f), v, 1.0f, level(0u)); + level const v = level(0u); + float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, float2(1.0f), max(1, 0), 1.0f, v); return res; } diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl index 41e918db3ef..6369286ec72 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl @@ -18,8 +18,8 @@ struct vertex_main_outputs { }; float textureSampleCompareLevel_4cf3a2(tint_module_vars_struct tint_module_vars) { - int const v = max(1, 0); - float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, float3(1.0f), v, 1.0f, level(0u)); + level const v = level(0u); + float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, float3(1.0f), max(1, 0), 1.0f, v); return res; } diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl index 194c2d1c0ef..01342f92bd4 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl @@ -18,8 +18,8 @@ struct vertex_main_outputs { }; float textureSampleCompareLevel_b6e47c(tint_module_vars_struct tint_module_vars) { - int const v = max(1, 0); - float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, float2(1.0f), v, 1.0f, level(0u), int2(1)); + level const v = level(0u); + float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, float2(1.0f), max(1, 0), 1.0f, v, int2(1)); return res; } diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl index 8212c1f1567..71ca935f5e3 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl @@ -18,8 +18,8 @@ struct vertex_main_outputs { }; float4 textureSampleGrad_2ecd8f(tint_module_vars_struct tint_module_vars) { - int const v = max(1, 0); - float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), v, gradient2d(float2(1.0f), float2(1.0f))); + gradient2d const v = gradient2d(float2(1.0f), float2(1.0f)); + float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v); return res; } diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.ir.msl index 0d3db3964ac..5d353faa580 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.ir.msl @@ -18,8 +18,8 @@ struct vertex_main_outputs { }; float4 textureSampleGrad_d65515(tint_module_vars_struct tint_module_vars) { - int const v = max(1, 0); - float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), v, gradient2d(float2(1.0f), float2(1.0f)), int2(1)); + gradient2d const v = gradient2d(float2(1.0f), float2(1.0f)); + float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v, int2(1)); return res; } diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.ir.msl index cb9670c8252..68b8bb5a052 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.ir.msl @@ -18,8 +18,8 @@ struct vertex_main_outputs { }; float4 textureSampleGrad_e383db(tint_module_vars_struct tint_module_vars) { - int const v = max(1, 0); - float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), v, gradientcube(float3(1.0f), float3(1.0f))); + gradientcube const v = gradientcube(float3(1.0f), float3(1.0f)); + float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), max(1, 0), v); return res; } diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl index b775340f0cd..419b44b3bdb 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl @@ -18,8 +18,8 @@ struct vertex_main_outputs { }; float4 textureSampleLevel_0bdd9a(tint_module_vars_struct tint_module_vars) { - int const v = max(1, 0); - float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), v, level(1.0f)); + level const v = level(1.0f); + float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), max(1, 0), v); return res; } diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.ir.msl index 58d8a05f288..5ea0757dc57 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.ir.msl @@ -18,8 +18,8 @@ struct vertex_main_outputs { }; float textureSampleLevel_1bf73e(tint_module_vars_struct tint_module_vars) { - int const v = max(1, 0); - float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), v, level(1)); + level const v = level(1); + float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v); return res; } diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.ir.msl index 5a0bcef2f37..1dab9db746e 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.ir.msl @@ -18,8 +18,8 @@ struct vertex_main_outputs { }; float textureSampleLevel_2974eb(tint_module_vars_struct tint_module_vars) { - int const v = max(1, 0); - float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), v, level(1u)); + level const v = level(1u); + float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v); return res; } diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.ir.msl index 201bdd9eda5..3a02ab5084a 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.ir.msl @@ -18,8 +18,8 @@ struct vertex_main_outputs { }; float4 textureSampleLevel_302be4(tint_module_vars_struct tint_module_vars) { - int const v = max(1, 0); - float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), v, level(1.0f)); + level const v = level(1.0f); + float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v); return res; } diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.ir.msl index af202e6e643..8be06dc39a1 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.ir.msl @@ -18,8 +18,8 @@ struct vertex_main_outputs { }; float textureSampleLevel_36780e(tint_module_vars_struct tint_module_vars) { - int const v = max(1, 0); - float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), v, level(1), int2(1)); + level const v = level(1); + float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v, int2(1)); return res; } diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.ir.msl index 231410928c3..d11fc31354e 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.ir.msl @@ -18,8 +18,8 @@ struct vertex_main_outputs { }; float textureSampleLevel_36f0d3(tint_module_vars_struct tint_module_vars) { - int const v = max(1, 0); - float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), v, level(1u), int2(1)); + level const v = level(1u); + float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v, int2(1)); return res; } diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.ir.msl index 1b983271335..d77437d8b17 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.ir.msl @@ -18,8 +18,8 @@ struct vertex_main_outputs { }; float textureSampleLevel_a12142(tint_module_vars_struct tint_module_vars) { - int const v = max(1, 0); - float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), v, level(1u)); + level const v = level(1u); + float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), max(1, 0), v); return res; } diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.ir.msl index 4a60915b82f..fcb972825f4 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.ir.msl @@ -18,8 +18,8 @@ struct vertex_main_outputs { }; float textureSampleLevel_ae5e39(tint_module_vars_struct tint_module_vars) { - int const v = max(1, 0); - float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), v, level(1)); + level const v = level(1); + float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), max(1, 0), v); return res; } diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.ir.msl index f63c2e69ca0..606d24f36d0 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.ir.msl @@ -18,8 +18,8 @@ struct vertex_main_outputs { }; float4 textureSampleLevel_b7c55c(tint_module_vars_struct tint_module_vars) { - int const v = max(1, 0); - float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), v, level(1.0f), int2(1)); + level const v = level(1.0f); + float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v, int2(1)); return res; } diff --git a/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.ir.msl index c6f910a9862..5c70565c0e6 100644 --- a/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.ir.msl @@ -15,7 +15,7 @@ struct vertex_main_outputs { int VertexOutput_prevent_dce [[user(locn0)]] [[flat]]; }; -int tint_packed_8bit_dot(int lhs, int rhs) { +int tint_packed_8bit_dot(uint lhs, uint rhs) { char4 const v = as_type(lhs); char4 const v_1 = as_type(rhs); return int(((((v[0u] * v_1[0u]) + (v[1u] * v_1[1u])) + (v[2u] * v_1[2u])) + (v[3u] * v_1[3u]))); diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.msl index 655309fa088..1a35485cc6e 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.msl @@ -12,9 +12,9 @@ float4 textureSampleBias_80e579(tint_module_vars_struct tint_module_vars) { int arg_3 = 1; float arg_4 = 1.0f; float2 const v = arg_2; - float const v_1 = arg_4; - int const v_2 = max(arg_3, 0); - float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, v_2, bias(v_1)); + int const v_1 = arg_3; + bias const v_2 = bias(arg_4); + float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2); return res; } diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.msl index f5de1474614..21295edff7c 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.msl @@ -12,9 +12,9 @@ float4 textureSampleBias_9dbb51(tint_module_vars_struct tint_module_vars) { int arg_3 = 1; float arg_4 = 1.0f; float2 const v = arg_2; - float const v_1 = arg_4; - int const v_2 = max(arg_3, 0); - float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, v_2, bias(v_1), int2(1)); + int const v_1 = arg_3; + bias const v_2 = bias(arg_4); + float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2, int2(1)); return res; } diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.msl index 2c470799e5e..8c0e76df142 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.msl @@ -12,9 +12,9 @@ float4 textureSampleBias_eed7c4(tint_module_vars_struct tint_module_vars) { int arg_3 = 1; float arg_4 = 1.0f; float3 const v = arg_2; - float const v_1 = arg_4; - int const v_2 = max(arg_3, 0); - float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, v_2, bias(v_1)); + int const v_1 = arg_3; + bias const v_2 = bias(arg_4); + float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2); return res; } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl index 620253eb2c9..864f9fde842 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl @@ -22,9 +22,10 @@ float textureSampleCompareLevel_1116ed(tint_module_vars_struct tint_module_vars) int arg_3 = 1; float arg_4 = 1.0f; float2 const v = arg_2; - float const v_1 = arg_4; - int const v_2 = max(arg_3, 0); - float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, v, v_2, v_1, level(0u)); + int const v_1 = arg_3; + float const v_2 = arg_4; + level const v_3 = level(0u); + float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, v, max(v_1, 0), v_2, v_3); return res; } @@ -47,6 +48,6 @@ VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) { vertex vertex_main_outputs vertex_main(depth2d_array arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1}; - VertexOutput const v_3 = vertex_main_inner(tint_module_vars); - return vertex_main_outputs{.VertexOutput_pos=v_3.pos, .VertexOutput_prevent_dce=v_3.prevent_dce}; + VertexOutput const v_4 = vertex_main_inner(tint_module_vars); + return vertex_main_outputs{.VertexOutput_pos=v_4.pos, .VertexOutput_prevent_dce=v_4.prevent_dce}; } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl index 5ac1bc10590..a978b3933d3 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl @@ -22,9 +22,10 @@ float textureSampleCompareLevel_4cf3a2(tint_module_vars_struct tint_module_vars) int arg_3 = 1; float arg_4 = 1.0f; float3 const v = arg_2; - float const v_1 = arg_4; - int const v_2 = max(arg_3, 0); - float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, v, v_2, v_1, level(0u)); + int const v_1 = arg_3; + float const v_2 = arg_4; + level const v_3 = level(0u); + float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, v, max(v_1, 0), v_2, v_3); return res; } @@ -47,6 +48,6 @@ VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) { vertex vertex_main_outputs vertex_main(depthcube_array arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1}; - VertexOutput const v_3 = vertex_main_inner(tint_module_vars); - return vertex_main_outputs{.VertexOutput_pos=v_3.pos, .VertexOutput_prevent_dce=v_3.prevent_dce}; + VertexOutput const v_4 = vertex_main_inner(tint_module_vars); + return vertex_main_outputs{.VertexOutput_pos=v_4.pos, .VertexOutput_prevent_dce=v_4.prevent_dce}; } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl index 87be381cd61..9e5a78282c0 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl @@ -22,9 +22,10 @@ float textureSampleCompareLevel_b6e47c(tint_module_vars_struct tint_module_vars) int arg_3 = 1; float arg_4 = 1.0f; float2 const v = arg_2; - float const v_1 = arg_4; - int const v_2 = max(arg_3, 0); - float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, v, v_2, v_1, level(0u), int2(1)); + int const v_1 = arg_3; + float const v_2 = arg_4; + level const v_3 = level(0u); + float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, v, max(v_1, 0), v_2, v_3, int2(1)); return res; } @@ -47,6 +48,6 @@ VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) { vertex vertex_main_outputs vertex_main(depth2d_array arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1}; - VertexOutput const v_3 = vertex_main_inner(tint_module_vars); - return vertex_main_outputs{.VertexOutput_pos=v_3.pos, .VertexOutput_prevent_dce=v_3.prevent_dce}; + VertexOutput const v_4 = vertex_main_inner(tint_module_vars); + return vertex_main_outputs{.VertexOutput_pos=v_4.pos, .VertexOutput_prevent_dce=v_4.prevent_dce}; } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl index bcb88b5bcdd..bc7b5312e1d 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl @@ -23,10 +23,9 @@ float4 textureSampleGrad_2ecd8f(tint_module_vars_struct tint_module_vars) { float2 arg_4 = float2(1.0f); float2 arg_5 = float2(1.0f); float2 const v = arg_2; - float2 const v_1 = arg_4; - float2 const v_2 = arg_5; - int const v_3 = max(arg_3, 0); - float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, v_3, gradient2d(v_1, v_2)); + int const v_1 = arg_3; + gradient2d const v_2 = gradient2d(arg_4, arg_5); + float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2); return res; } @@ -49,6 +48,6 @@ VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) { vertex vertex_main_outputs vertex_main(texture2d_array arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1}; - VertexOutput const v_4 = vertex_main_inner(tint_module_vars); - return vertex_main_outputs{.VertexOutput_pos=v_4.pos, .VertexOutput_prevent_dce=v_4.prevent_dce}; + VertexOutput const v_3 = vertex_main_inner(tint_module_vars); + return vertex_main_outputs{.VertexOutput_pos=v_3.pos, .VertexOutput_prevent_dce=v_3.prevent_dce}; } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.ir.msl index 0f720638a8c..4a896660214 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.ir.msl @@ -23,10 +23,9 @@ float4 textureSampleGrad_d65515(tint_module_vars_struct tint_module_vars) { float2 arg_4 = float2(1.0f); float2 arg_5 = float2(1.0f); float2 const v = arg_2; - float2 const v_1 = arg_4; - float2 const v_2 = arg_5; - int const v_3 = max(arg_3, 0); - float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, v_3, gradient2d(v_1, v_2), int2(1)); + int const v_1 = arg_3; + gradient2d const v_2 = gradient2d(arg_4, arg_5); + float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2, int2(1)); return res; } @@ -49,6 +48,6 @@ VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) { vertex vertex_main_outputs vertex_main(texture2d_array arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1}; - VertexOutput const v_4 = vertex_main_inner(tint_module_vars); - return vertex_main_outputs{.VertexOutput_pos=v_4.pos, .VertexOutput_prevent_dce=v_4.prevent_dce}; + VertexOutput const v_3 = vertex_main_inner(tint_module_vars); + return vertex_main_outputs{.VertexOutput_pos=v_3.pos, .VertexOutput_prevent_dce=v_3.prevent_dce}; } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.ir.msl index a3b3dfff993..fcd45d9aa39 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.ir.msl @@ -23,10 +23,9 @@ float4 textureSampleGrad_e383db(tint_module_vars_struct tint_module_vars) { float3 arg_4 = float3(1.0f); float3 arg_5 = float3(1.0f); float3 const v = arg_2; - float3 const v_1 = arg_4; - float3 const v_2 = arg_5; - int const v_3 = max(arg_3, 0); - float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, v_3, gradientcube(v_1, v_2)); + int const v_1 = arg_3; + gradientcube const v_2 = gradientcube(arg_4, arg_5); + float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2); return res; } @@ -49,6 +48,6 @@ VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) { vertex vertex_main_outputs vertex_main(texturecube_array arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1}; - VertexOutput const v_4 = vertex_main_inner(tint_module_vars); - return vertex_main_outputs{.VertexOutput_pos=v_4.pos, .VertexOutput_prevent_dce=v_4.prevent_dce}; + VertexOutput const v_3 = vertex_main_inner(tint_module_vars); + return vertex_main_outputs{.VertexOutput_pos=v_3.pos, .VertexOutput_prevent_dce=v_3.prevent_dce}; } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl index 6a54f8165df..e8cba45204f 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl @@ -22,9 +22,9 @@ float4 textureSampleLevel_0bdd9a(tint_module_vars_struct tint_module_vars) { int arg_3 = 1; float arg_4 = 1.0f; float3 const v = arg_2; - float const v_1 = arg_4; - int const v_2 = max(arg_3, 0); - float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, v_2, level(v_1)); + int const v_1 = arg_3; + level const v_2 = level(arg_4); + float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2); return res; } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.ir.msl index 0854d5a203c..ffffb6a321f 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.ir.msl @@ -22,9 +22,9 @@ float textureSampleLevel_1bf73e(tint_module_vars_struct tint_module_vars) { int arg_3 = 1; int arg_4 = 1; float2 const v = arg_2; - int const v_1 = arg_4; - int const v_2 = max(arg_3, 0); - float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, v_2, level(v_1)); + int const v_1 = arg_3; + level const v_2 = level(arg_4); + float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2); return res; } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.ir.msl index 88a16277665..03d6546cba2 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.ir.msl @@ -22,9 +22,9 @@ float textureSampleLevel_2974eb(tint_module_vars_struct tint_module_vars) { int arg_3 = 1; uint arg_4 = 1u; float2 const v = arg_2; - uint const v_1 = arg_4; - int const v_2 = max(arg_3, 0); - float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, v_2, level(v_1)); + int const v_1 = arg_3; + level const v_2 = level(arg_4); + float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2); return res; } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.ir.msl index 6e4bbba2cd8..3fc32937ff9 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.ir.msl @@ -22,9 +22,9 @@ float4 textureSampleLevel_302be4(tint_module_vars_struct tint_module_vars) { int arg_3 = 1; float arg_4 = 1.0f; float2 const v = arg_2; - float const v_1 = arg_4; - int const v_2 = max(arg_3, 0); - float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, v_2, level(v_1)); + int const v_1 = arg_3; + level const v_2 = level(arg_4); + float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2); return res; } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.ir.msl index 0fcba23455f..58accec5fc3 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.ir.msl @@ -22,9 +22,9 @@ float textureSampleLevel_36780e(tint_module_vars_struct tint_module_vars) { int arg_3 = 1; int arg_4 = 1; float2 const v = arg_2; - int const v_1 = arg_4; - int const v_2 = max(arg_3, 0); - float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, v_2, level(v_1), int2(1)); + int const v_1 = arg_3; + level const v_2 = level(arg_4); + float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2, int2(1)); return res; } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.ir.msl index 41c72c22823..35ed070263a 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.ir.msl @@ -22,9 +22,9 @@ float textureSampleLevel_36f0d3(tint_module_vars_struct tint_module_vars) { int arg_3 = 1; uint arg_4 = 1u; float2 const v = arg_2; - uint const v_1 = arg_4; - int const v_2 = max(arg_3, 0); - float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, v_2, level(v_1), int2(1)); + int const v_1 = arg_3; + level const v_2 = level(arg_4); + float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2, int2(1)); return res; } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.ir.msl index 25528c7532c..2cb717fa5f2 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.ir.msl @@ -22,9 +22,9 @@ float textureSampleLevel_a12142(tint_module_vars_struct tint_module_vars) { int arg_3 = 1; uint arg_4 = 1u; float3 const v = arg_2; - uint const v_1 = arg_4; - int const v_2 = max(arg_3, 0); - float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, v_2, level(v_1)); + int const v_1 = arg_3; + level const v_2 = level(arg_4); + float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2); return res; } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.ir.msl index db55e544978..f46b44b0ceb 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.ir.msl @@ -22,9 +22,9 @@ float textureSampleLevel_ae5e39(tint_module_vars_struct tint_module_vars) { int arg_3 = 1; int arg_4 = 1; float3 const v = arg_2; - int const v_1 = arg_4; - int const v_2 = max(arg_3, 0); - float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, v_2, level(v_1)); + int const v_1 = arg_3; + level const v_2 = level(arg_4); + float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2); return res; } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.ir.msl index 301b77bcf69..aece32fa9c7 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.ir.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.ir.msl @@ -22,9 +22,9 @@ float4 textureSampleLevel_b7c55c(tint_module_vars_struct tint_module_vars) { int arg_3 = 1; float arg_4 = 1.0f; float2 const v = arg_2; - float const v_1 = arg_4; - int const v_2 = max(arg_3, 0); - float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, v_2, level(v_1), int2(1)); + int const v_1 = arg_3; + level const v_2 = level(arg_4); + float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2, int2(1)); return res; } diff --git a/test/tint/extensions/clip_distances/clip_distances_size_1.wgsl.expected.ir.msl b/test/tint/extensions/clip_distances/clip_distances_size_1.wgsl.expected.ir.msl new file mode 100644 index 00000000000..10e52d9f517 --- /dev/null +++ b/test/tint/extensions/clip_distances/clip_distances_size_1.wgsl.expected.ir.msl @@ -0,0 +1,42 @@ +SKIP: FAILED + +#include +using namespace metal; + +template +struct tint_array { + const constant T& operator[](size_t i) const constant { return elements[i]; } + device T& operator[](size_t i) device { return elements[i]; } + const device T& operator[](size_t i) const device { return elements[i]; } + thread T& operator[](size_t i) thread { return elements[i]; } + const thread T& operator[](size_t i) const thread { return elements[i]; } + threadgroup T& operator[](size_t i) threadgroup { return elements[i]; } + const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; } + T elements[N]; +}; + +struct VertexOutputs { + float4 position; + tint_array clipDistance; +}; + +struct tint_symbol_outputs { + float4 VertexOutputs_position [[position]]; + tint_array VertexOutputs_clipDistance [[clip_distance]]; +}; + +VertexOutputs tint_symbol_inner() { + return VertexOutputs{.position=float4(1.0f, 2.0f, 3.0f, 4.0f), .clipDistance=tint_array{}}; +} + +vertex tint_symbol_outputs tint_symbol() { + VertexOutputs const v = tint_symbol_inner(); + return tint_symbol_outputs{.VertexOutputs_position=v.position, .VertexOutputs_clipDistance=v.clipDistance}; +} +program_source:23:53: error: type 'tint_array' is not valid for attribute 'clip_distance' + tint_array VertexOutputs_clipDistance [[clip_distance]]; + ^~~~~~~~~~~~~ +program_source:30:8: error: invalid return type 'tint_symbol_outputs' for vertex function +vertex tint_symbol_outputs tint_symbol() { + ^ + diff --git a/test/tint/extensions/clip_distances/clip_distances_size_4.wgsl.expected.ir.msl b/test/tint/extensions/clip_distances/clip_distances_size_4.wgsl.expected.ir.msl new file mode 100644 index 00000000000..917e0b241b4 --- /dev/null +++ b/test/tint/extensions/clip_distances/clip_distances_size_4.wgsl.expected.ir.msl @@ -0,0 +1,42 @@ +SKIP: FAILED + +#include +using namespace metal; + +template +struct tint_array { + const constant T& operator[](size_t i) const constant { return elements[i]; } + device T& operator[](size_t i) device { return elements[i]; } + const device T& operator[](size_t i) const device { return elements[i]; } + thread T& operator[](size_t i) thread { return elements[i]; } + const thread T& operator[](size_t i) const thread { return elements[i]; } + threadgroup T& operator[](size_t i) threadgroup { return elements[i]; } + const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; } + T elements[N]; +}; + +struct VertexOutputs { + float4 position; + tint_array clipDistance; +}; + +struct tint_symbol_outputs { + float4 VertexOutputs_position [[position]]; + tint_array VertexOutputs_clipDistance [[clip_distance]]; +}; + +VertexOutputs tint_symbol_inner() { + return VertexOutputs{.position=float4(1.0f, 2.0f, 3.0f, 4.0f), .clipDistance=tint_array{}}; +} + +vertex tint_symbol_outputs tint_symbol() { + VertexOutputs const v = tint_symbol_inner(); + return tint_symbol_outputs{.VertexOutputs_position=v.position, .VertexOutputs_clipDistance=v.clipDistance}; +} +program_source:23:53: error: type 'tint_array' is not valid for attribute 'clip_distance' + tint_array VertexOutputs_clipDistance [[clip_distance]]; + ^~~~~~~~~~~~~ +program_source:30:8: error: invalid return type 'tint_symbol_outputs' for vertex function +vertex tint_symbol_outputs tint_symbol() { + ^ + diff --git a/test/tint/extensions/clip_distances/clip_distances_size_8.wgsl.expected.ir.msl b/test/tint/extensions/clip_distances/clip_distances_size_8.wgsl.expected.ir.msl new file mode 100644 index 00000000000..9df70b1ec9a --- /dev/null +++ b/test/tint/extensions/clip_distances/clip_distances_size_8.wgsl.expected.ir.msl @@ -0,0 +1,42 @@ +SKIP: FAILED + +#include +using namespace metal; + +template +struct tint_array { + const constant T& operator[](size_t i) const constant { return elements[i]; } + device T& operator[](size_t i) device { return elements[i]; } + const device T& operator[](size_t i) const device { return elements[i]; } + thread T& operator[](size_t i) thread { return elements[i]; } + const thread T& operator[](size_t i) const thread { return elements[i]; } + threadgroup T& operator[](size_t i) threadgroup { return elements[i]; } + const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; } + T elements[N]; +}; + +struct VertexOutputs { + float4 position; + tint_array clipDistance; +}; + +struct tint_symbol_outputs { + float4 VertexOutputs_position [[position]]; + tint_array VertexOutputs_clipDistance [[clip_distance]]; +}; + +VertexOutputs tint_symbol_inner() { + return VertexOutputs{.position=float4(1.0f, 2.0f, 3.0f, 4.0f), .clipDistance=tint_array{}}; +} + +vertex tint_symbol_outputs tint_symbol() { + VertexOutputs const v = tint_symbol_inner(); + return tint_symbol_outputs{.VertexOutputs_position=v.position, .VertexOutputs_clipDistance=v.clipDistance}; +} +program_source:23:53: error: type 'tint_array' is not valid for attribute 'clip_distance' + tint_array VertexOutputs_clipDistance [[clip_distance]]; + ^~~~~~~~~~~~~ +program_source:30:8: error: invalid return type 'tint_symbol_outputs' for vertex function +vertex tint_symbol_outputs tint_symbol() { + ^ + diff --git a/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.ir.msl index 7ebf422d2e4..29c27e72e23 100644 --- a/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.ir.msl +++ b/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.ir.msl @@ -22,8 +22,6 @@ int tint_div_i32(int lhs, int rhs) { } void foo(int maybe_zero, tint_module_vars_struct tint_module_vars) { - (*tint_module_vars.a) = tint_div_i32((*tint_module_vars.a), 0); - (*tint_module_vars.a) = tint_mod_i32((*tint_module_vars.a), 0); (*tint_module_vars.a) = tint_div_i32((*tint_module_vars.a), maybe_zero); (*tint_module_vars.a) = tint_mod_i32((*tint_module_vars.a), maybe_zero); (*tint_module_vars.b) = ((*tint_module_vars.b) / 0.0f);