[msl] Use the output of FlattenBindings
We were using the original AST program instead of this, which meant
that non-zero binding groups were being used. This fixes many E2E
tests.
Bug: 42251016
Change-Id: I360e21ddf2bd4b7b27ea1f34d6c9c74ff2c0bf00
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/192000
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
diff --git a/test/tint/array/assign_to_storage_var.wgsl.expected.ir.msl b/test/tint/array/assign_to_storage_var.wgsl.expected.ir.msl
index ae88516..4e654ab 100644
--- a/test/tint/array/assign_to_storage_var.wgsl.expected.ir.msl
+++ b/test/tint/array/assign_to_storage_var.wgsl.expected.ir.msl
@@ -72,7 +72,7 @@
tint_array<int4, 4> const ary = tint_array<int4, 4>{};
foo(ary, tint_module_vars);
}
-kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_2 [[threadgroup(0)]], const constant S* src_uniform [[buffer(0)]], device S* src_storage [[buffer(1)]], device S* dst [[buffer(2)]], device S_nested* dst_nested [[buffer(3)]]) {
+kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_2 [[threadgroup(0)]], const constant S* src_uniform [[buffer(0)]], device S* src_storage [[buffer(2)]], device S* dst [[buffer(1)]], device S_nested* dst_nested [[buffer(3)]]) {
thread tint_array<int4, 4> src_private = {};
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.src_private=(&src_private), .src_workgroup=(&(*v_2).tint_symbol_1), .src_uniform=src_uniform, .src_storage=src_storage, .dst=dst, .dst_nested=dst_nested};
tint_symbol_inner(tint_local_index, tint_module_vars);
diff --git a/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.ir.msl b/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.ir.msl
index bcf0cf1..151b7b3 100644
--- a/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.ir.msl
@@ -89,7 +89,7 @@
int const v_16 = (v_15 + tint_f32_to_i32(mat4x4_f32[0][0u]));
(*tint_module_vars.s) = (v_16 + tint_f32_to_i32(arr2_vec3_f32[0][0u]));
}
-kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], const device S* sb [[buffer(0)]], device int* s [[buffer(1)]]) {
+kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], const device S* sb [[buffer(1)]], device int* s [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb=sb, .s=s};
tint_symbol_inner(idx, tint_module_vars);
}
diff --git a/test/tint/buffer/storage/dynamic_index/read_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/dynamic_index/read_f16.wgsl.expected.ir.msl
index 0ad8507..f604f28 100644
--- a/test/tint/buffer/storage/dynamic_index/read_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/dynamic_index/read_f16.wgsl.expected.ir.msl
@@ -134,7 +134,7 @@
int const v_30 = (v_29 + tint_f16_to_i32(arr2_mat4x2_f16[0][0][0u]));
(*tint_module_vars.s) = (v_30 + tint_f32_to_i32(arr2_vec3_f32[0][0u]));
}
-kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], const device S* sb [[buffer(0)]], device int* s [[buffer(1)]]) {
+kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], const device S* sb [[buffer(1)]], device int* s [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb=sb, .s=s};
tint_symbol_inner(idx, tint_module_vars);
}
diff --git a/test/tint/buffer/storage/static_index/read.wgsl.expected.ir.msl b/test/tint/buffer/storage/static_index/read.wgsl.expected.ir.msl
index 2daaefc..09fa7fc 100644
--- a/test/tint/buffer/storage/static_index/read.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/static_index/read.wgsl.expected.ir.msl
@@ -50,7 +50,7 @@
int tint_f32_to_i32(float value) {
return select(2147483647, select((-2147483647 - 1), int(value), (value >= -2147483648.0f)), (value <= 2147483520.0f));
}
-kernel void tint_symbol(const device S* sb [[buffer(0)]], device int* s [[buffer(1)]]) {
+kernel void tint_symbol(const device S* sb [[buffer(1)]], device int* s [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb=sb, .s=s};
float const scalar_f32 = (*tint_module_vars.sb).scalar_f32;
int const scalar_i32 = (*tint_module_vars.sb).scalar_i32;
diff --git a/test/tint/buffer/storage/static_index/read_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/static_index/read_f16.wgsl.expected.ir.msl
index d730a84..c90ad6e 100644
--- a/test/tint/buffer/storage/static_index/read_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/static_index/read_f16.wgsl.expected.ir.msl
@@ -68,7 +68,7 @@
int tint_f32_to_i32(float value) {
return select(2147483647, select((-2147483647 - 1), int(value), (value >= -2147483648.0f)), (value <= 2147483520.0f));
}
-kernel void tint_symbol(const device S* sb [[buffer(0)]], device int* s [[buffer(1)]]) {
+kernel void tint_symbol(const device S* sb [[buffer(1)]], device int* s [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb=sb, .s=s};
float const scalar_f32 = (*tint_module_vars.sb).scalar_f32;
int const scalar_i32 = (*tint_module_vars.sb).scalar_i32;
diff --git a/test/tint/buffer/storage/types/array4_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/array4_f16.wgsl.expected.ir.msl
index d34f267..2df2fea 100644
--- a/test/tint/buffer/storage/types/array4_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/array4_f16.wgsl.expected.ir.msl
@@ -17,7 +17,7 @@
device tint_array<half, 4>* out;
};
-kernel void tint_symbol(const device tint_array<half, 4>* in [[buffer(0)]], device tint_array<half, 4>* out [[buffer(1)]]) {
+kernel void tint_symbol(const device tint_array<half, 4>* in [[buffer(1)]], device tint_array<half, 4>* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/array4_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/array4_f32.wgsl.expected.ir.msl
index e776fb1..a1b236d 100644
--- a/test/tint/buffer/storage/types/array4_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/array4_f32.wgsl.expected.ir.msl
@@ -17,7 +17,7 @@
device tint_array<float, 4>* out;
};
-kernel void tint_symbol(const device tint_array<float, 4>* in [[buffer(0)]], device tint_array<float, 4>* out [[buffer(1)]]) {
+kernel void tint_symbol(const device tint_array<float, 4>* in [[buffer(1)]], device tint_array<float, 4>* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/f16.wgsl.expected.ir.msl
index 117bb6d..5a193ed 100644
--- a/test/tint/buffer/storage/types/f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/f16.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device half* out;
};
-kernel void tint_symbol(const device half* in [[buffer(0)]], device half* out [[buffer(1)]]) {
+kernel void tint_symbol(const device half* in [[buffer(1)]], device half* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/f32.wgsl.expected.ir.msl
index da38f6f..41c08fd 100644
--- a/test/tint/buffer/storage/types/f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/f32.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device float* out;
};
-kernel void tint_symbol(const device float* in [[buffer(0)]], device float* out [[buffer(1)]]) {
+kernel void tint_symbol(const device float* in [[buffer(1)]], device float* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/i32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/i32.wgsl.expected.ir.msl
index e2e30f9..7c6a4e9 100644
--- a/test/tint/buffer/storage/types/i32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/i32.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device int* out;
};
-kernel void tint_symbol(const device int* in [[buffer(0)]], device int* out [[buffer(1)]]) {
+kernel void tint_symbol(const device int* in [[buffer(1)]], device int* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.ir.msl
index a9d9baa..683b045 100644
--- a/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device half2x2* out;
};
-kernel void tint_symbol(const device half2x2* in [[buffer(0)]], device half2x2* out [[buffer(1)]]) {
+kernel void tint_symbol(const device half2x2* in [[buffer(1)]], device half2x2* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.msl
index 958d79b..7de8471 100644
--- a/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device float2x2* out;
};
-kernel void tint_symbol(const device float2x2* in [[buffer(0)]], device float2x2* out [[buffer(1)]]) {
+kernel void tint_symbol(const device float2x2* in [[buffer(1)]], device float2x2* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.msl
index 507ddead..d13b51e 100644
--- a/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.msl
@@ -9,7 +9,7 @@
(*target)[0u] = value_param[0u];
(*target)[1u] = value_param[1u];
}
-kernel void tint_symbol(const device half2x3* in [[buffer(0)]], device half2x3* out [[buffer(1)]]) {
+kernel void tint_symbol(const device half2x3* in [[buffer(1)]], device half2x3* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.in));
}
diff --git a/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.msl
index 30a2504..1a9b90d 100644
--- a/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.msl
@@ -9,7 +9,7 @@
(*target)[0u] = value_param[0u];
(*target)[1u] = value_param[1u];
}
-kernel void tint_symbol(const device float2x3* in [[buffer(0)]], device float2x3* out [[buffer(1)]]) {
+kernel void tint_symbol(const device float2x3* in [[buffer(1)]], device float2x3* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.in));
}
diff --git a/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.ir.msl
index a40d290..58206fa 100644
--- a/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device half2x4* out;
};
-kernel void tint_symbol(const device half2x4* in [[buffer(0)]], device half2x4* out [[buffer(1)]]) {
+kernel void tint_symbol(const device half2x4* in [[buffer(1)]], device half2x4* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.msl
index 363a695..4844b6e 100644
--- a/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device float2x4* out;
};
-kernel void tint_symbol(const device float2x4* in [[buffer(0)]], device float2x4* out [[buffer(1)]]) {
+kernel void tint_symbol(const device float2x4* in [[buffer(1)]], device float2x4* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.ir.msl
index d3c7461..79536b1 100644
--- a/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device half3x2* out;
};
-kernel void tint_symbol(const device half3x2* in [[buffer(0)]], device half3x2* out [[buffer(1)]]) {
+kernel void tint_symbol(const device half3x2* in [[buffer(1)]], device half3x2* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.msl
index a1056c8..d40bc4d 100644
--- a/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device float3x2* out;
};
-kernel void tint_symbol(const device float3x2* in [[buffer(0)]], device float3x2* out [[buffer(1)]]) {
+kernel void tint_symbol(const device float3x2* in [[buffer(1)]], device float3x2* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.msl
index 051fd71..91ca596 100644
--- a/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.msl
@@ -10,7 +10,7 @@
(*target)[1u] = value_param[1u];
(*target)[2u] = value_param[2u];
}
-kernel void tint_symbol(const device half3x3* in [[buffer(0)]], device half3x3* out [[buffer(1)]]) {
+kernel void tint_symbol(const device half3x3* in [[buffer(1)]], device half3x3* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.in));
}
diff --git a/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.msl
index fa16f45..44e3d6e 100644
--- a/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.msl
@@ -10,7 +10,7 @@
(*target)[1u] = value_param[1u];
(*target)[2u] = value_param[2u];
}
-kernel void tint_symbol(const device float3x3* in [[buffer(0)]], device float3x3* out [[buffer(1)]]) {
+kernel void tint_symbol(const device float3x3* in [[buffer(1)]], device float3x3* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.in));
}
diff --git a/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.ir.msl
index 95e7825..d4deb2a 100644
--- a/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device half3x4* out;
};
-kernel void tint_symbol(const device half3x4* in [[buffer(0)]], device half3x4* out [[buffer(1)]]) {
+kernel void tint_symbol(const device half3x4* in [[buffer(1)]], device half3x4* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.msl
index eef01c3..75bfc6f 100644
--- a/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device float3x4* out;
};
-kernel void tint_symbol(const device float3x4* in [[buffer(0)]], device float3x4* out [[buffer(1)]]) {
+kernel void tint_symbol(const device float3x4* in [[buffer(1)]], device float3x4* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.ir.msl
index b040ef5..7e89498 100644
--- a/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device half4x2* out;
};
-kernel void tint_symbol(const device half4x2* in [[buffer(0)]], device half4x2* out [[buffer(1)]]) {
+kernel void tint_symbol(const device half4x2* in [[buffer(1)]], device half4x2* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.msl
index 357aacc..f89efbf 100644
--- a/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device float4x2* out;
};
-kernel void tint_symbol(const device float4x2* in [[buffer(0)]], device float4x2* out [[buffer(1)]]) {
+kernel void tint_symbol(const device float4x2* in [[buffer(1)]], device float4x2* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.msl
index c222f1a..866a869 100644
--- a/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.msl
@@ -11,7 +11,7 @@
(*target)[2u] = value_param[2u];
(*target)[3u] = value_param[3u];
}
-kernel void tint_symbol(const device half4x3* in [[buffer(0)]], device half4x3* out [[buffer(1)]]) {
+kernel void tint_symbol(const device half4x3* in [[buffer(1)]], device half4x3* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.in));
}
diff --git a/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.msl
index d4ae9f6..99d5d96 100644
--- a/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.msl
@@ -11,7 +11,7 @@
(*target)[2u] = value_param[2u];
(*target)[3u] = value_param[3u];
}
-kernel void tint_symbol(const device float4x3* in [[buffer(0)]], device float4x3* out [[buffer(1)]]) {
+kernel void tint_symbol(const device float4x3* in [[buffer(1)]], device float4x3* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.in));
}
diff --git a/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.ir.msl
index 9b45119..35c36a2 100644
--- a/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device half4x4* out;
};
-kernel void tint_symbol(const device half4x4* in [[buffer(0)]], device half4x4* out [[buffer(1)]]) {
+kernel void tint_symbol(const device half4x4* in [[buffer(1)]], device half4x4* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.msl
index c9d56f8..a9cb31b 100644
--- a/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device float4x4* out;
};
-kernel void tint_symbol(const device float4x4* in [[buffer(0)]], device float4x4* out [[buffer(1)]]) {
+kernel void tint_symbol(const device float4x4* in [[buffer(1)]], device float4x4* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/runtime_array_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/runtime_array_f16.wgsl.expected.ir.msl
index 257fdd50..14963ee 100644
--- a/test/tint/buffer/storage/types/runtime_array_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/runtime_array_f16.wgsl.expected.ir.msl
@@ -17,7 +17,7 @@
device tint_array<half, 1>* out;
};
-kernel void tint_symbol(const device tint_array<half, 1>* in [[buffer(0)]], device tint_array<half, 1>* out [[buffer(1)]]) {
+kernel void tint_symbol(const device tint_array<half, 1>* in [[buffer(1)]], device tint_array<half, 1>* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out)[0] = (*tint_module_vars.in)[0];
}
diff --git a/test/tint/buffer/storage/types/runtime_array_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/runtime_array_f32.wgsl.expected.ir.msl
index 5c9d579..c9abe01 100644
--- a/test/tint/buffer/storage/types/runtime_array_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/runtime_array_f32.wgsl.expected.ir.msl
@@ -17,7 +17,7 @@
device tint_array<float, 1>* out;
};
-kernel void tint_symbol(const device tint_array<float, 1>* in [[buffer(0)]], device tint_array<float, 1>* out [[buffer(1)]]) {
+kernel void tint_symbol(const device tint_array<float, 1>* in [[buffer(1)]], device tint_array<float, 1>* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out)[0] = (*tint_module_vars.in)[0];
}
diff --git a/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.msl
index 3f5a81d..943e6dc 100644
--- a/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.msl
@@ -21,7 +21,7 @@
void tint_store_and_preserve_padding(device S* const target, S value_param) {
tint_store_and_preserve_padding_1((&(*target).inner), value_param.inner);
}
-kernel void tint_symbol(const device S* in [[buffer(0)]], device S* out [[buffer(1)]]) {
+kernel void tint_symbol(const device S* in [[buffer(1)]], device S* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
S const t = (*tint_module_vars.in);
tint_store_and_preserve_padding(tint_module_vars.out, t);
diff --git a/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.msl
index 561bd74..5156ee9 100644
--- a/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.msl
@@ -21,7 +21,7 @@
void tint_store_and_preserve_padding(device S* const target, S value_param) {
tint_store_and_preserve_padding_1((&(*target).inner), value_param.inner);
}
-kernel void tint_symbol(const device S* in [[buffer(0)]], device S* out [[buffer(1)]]) {
+kernel void tint_symbol(const device S* in [[buffer(1)]], device S* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
S const t = (*tint_module_vars.in);
tint_store_and_preserve_padding(tint_module_vars.out, t);
diff --git a/test/tint/buffer/storage/types/u32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/u32.wgsl.expected.ir.msl
index 4fcd1da..89f93b3 100644
--- a/test/tint/buffer/storage/types/u32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/u32.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device uint* out;
};
-kernel void tint_symbol(const device uint* in [[buffer(0)]], device uint* out [[buffer(1)]]) {
+kernel void tint_symbol(const device uint* in [[buffer(1)]], device uint* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/vec2_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec2_f16.wgsl.expected.ir.msl
index 29ecf51..6e9f69f 100644
--- a/test/tint/buffer/storage/types/vec2_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/vec2_f16.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device half2* out;
};
-kernel void tint_symbol(const device half2* in [[buffer(0)]], device half2* out [[buffer(1)]]) {
+kernel void tint_symbol(const device half2* in [[buffer(1)]], device half2* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/vec2_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec2_f32.wgsl.expected.ir.msl
index 59707c4..b3b631a 100644
--- a/test/tint/buffer/storage/types/vec2_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/vec2_f32.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device float2* out;
};
-kernel void tint_symbol(const device float2* in [[buffer(0)]], device float2* out [[buffer(1)]]) {
+kernel void tint_symbol(const device float2* in [[buffer(1)]], device float2* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/vec2_i32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec2_i32.wgsl.expected.ir.msl
index edca838..ce62515 100644
--- a/test/tint/buffer/storage/types/vec2_i32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/vec2_i32.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device int2* out;
};
-kernel void tint_symbol(const device int2* in [[buffer(0)]], device int2* out [[buffer(1)]]) {
+kernel void tint_symbol(const device int2* in [[buffer(1)]], device int2* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/vec2_u32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec2_u32.wgsl.expected.ir.msl
index 8c4d30b..674b4f4 100644
--- a/test/tint/buffer/storage/types/vec2_u32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/vec2_u32.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device uint2* out;
};
-kernel void tint_symbol(const device uint2* in [[buffer(0)]], device uint2* out [[buffer(1)]]) {
+kernel void tint_symbol(const device uint2* in [[buffer(1)]], device uint2* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/vec3_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec3_f16.wgsl.expected.ir.msl
index cf9c899..1ce6a2f 100644
--- a/test/tint/buffer/storage/types/vec3_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/vec3_f16.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device half3* out;
};
-kernel void tint_symbol(const device half3* in [[buffer(0)]], device half3* out [[buffer(1)]]) {
+kernel void tint_symbol(const device half3* in [[buffer(1)]], device half3* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/vec3_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec3_f32.wgsl.expected.ir.msl
index 8c72ff0..62b0299 100644
--- a/test/tint/buffer/storage/types/vec3_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/vec3_f32.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device float3* out;
};
-kernel void tint_symbol(const device float3* in [[buffer(0)]], device float3* out [[buffer(1)]]) {
+kernel void tint_symbol(const device float3* in [[buffer(1)]], device float3* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/vec3_i32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec3_i32.wgsl.expected.ir.msl
index fd8a03f..05bde63 100644
--- a/test/tint/buffer/storage/types/vec3_i32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/vec3_i32.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device int3* out;
};
-kernel void tint_symbol(const device int3* in [[buffer(0)]], device int3* out [[buffer(1)]]) {
+kernel void tint_symbol(const device int3* in [[buffer(1)]], device int3* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/vec3_u32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec3_u32.wgsl.expected.ir.msl
index c364121..a998c41 100644
--- a/test/tint/buffer/storage/types/vec3_u32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/vec3_u32.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device uint3* out;
};
-kernel void tint_symbol(const device uint3* in [[buffer(0)]], device uint3* out [[buffer(1)]]) {
+kernel void tint_symbol(const device uint3* in [[buffer(1)]], device uint3* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/vec4_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec4_f16.wgsl.expected.ir.msl
index eae15ee..bce8dda 100644
--- a/test/tint/buffer/storage/types/vec4_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/vec4_f16.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device half4* out;
};
-kernel void tint_symbol(const device half4* in [[buffer(0)]], device half4* out [[buffer(1)]]) {
+kernel void tint_symbol(const device half4* in [[buffer(1)]], device half4* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/vec4_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec4_f32.wgsl.expected.ir.msl
index c746527..23c9b47 100644
--- a/test/tint/buffer/storage/types/vec4_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/vec4_f32.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device float4* out;
};
-kernel void tint_symbol(const device float4* in [[buffer(0)]], device float4* out [[buffer(1)]]) {
+kernel void tint_symbol(const device float4* in [[buffer(1)]], device float4* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/vec4_i32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec4_i32.wgsl.expected.ir.msl
index 180f906..b514563 100644
--- a/test/tint/buffer/storage/types/vec4_i32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/vec4_i32.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device int4* out;
};
-kernel void tint_symbol(const device int4* in [[buffer(0)]], device int4* out [[buffer(1)]]) {
+kernel void tint_symbol(const device int4* in [[buffer(1)]], device int4* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/buffer/storage/types/vec4_u32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec4_u32.wgsl.expected.ir.msl
index 737319d..393cbd0 100644
--- a/test/tint/buffer/storage/types/vec4_u32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/vec4_u32.wgsl.expected.ir.msl
@@ -5,7 +5,7 @@
device uint4* out;
};
-kernel void tint_symbol(const device uint4* in [[buffer(0)]], device uint4* out [[buffer(1)]]) {
+kernel void tint_symbol(const device uint4* in [[buffer(1)]], device uint4* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/bug/chromium/1273230.wgsl.expected.ir.msl b/test/tint/bug/chromium/1273230.wgsl.expected.ir.msl
index 74faf92..767740f 100644
--- a/test/tint/bug/chromium/1273230.wgsl.expected.ir.msl
+++ b/test/tint/bug/chromium/1273230.wgsl.expected.ir.msl
@@ -1,300 +1,124 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint numTriangles;
+ uint gridSize;
+ uint puuuuuuuuuuuuuuuuad1;
+ uint pad2;
+ float3 bbMin;
+ float3 bbMax;
+};
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(16) {
- numTriangles:u32 @offset(0)
- gridSize:u32 @offset(4)
- puuuuuuuuuuuuuuuuad1:u32 @offset(8)
- pad2:u32 @offset(12)
- bbMin:vec3<f32> @offset(16)
- bbMax:vec3<f32> @offset(32)
-}
+struct U32s {
+ tint_array<uint, 1> values;
+};
+struct F32s {
+ tint_array<float, 1> values;
+};
+struct AU32s {
+ tint_array<atomic_uint, 1> values;
+};
+struct AI32s {
+ tint_array<atomic_int, 1> values;
+};
+struct Dbg {
+ atomic_uint offsetCounter;
+ uint pad0;
+ uint pad1;
+ uint pad2;
+ uint value0;
+ uint value1;
+ uint value2;
+ uint value3;
+ float value_f32_0;
+ float value_f32_1;
+ float value_f32_2;
+ float value_f32_3;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+ device U32s* indices;
+ device F32s* positions;
+ device AU32s* counters;
+ device AI32s* LUT;
+ device Dbg* dbg;
+};
-U32s = struct @align(4) {
- values:array<u32> @offset(0)
+void marg8uintin() {
}
-
-F32s = struct @align(4) {
- values:array<f32> @offset(0)
+float3 toVoxelPos(float3 position, tint_module_vars_struct tint_module_vars) {
+ float3 bbMin = float3((*tint_module_vars.uniforms).bbMin[0u], (*tint_module_vars.uniforms).bbMin[1u], (*tint_module_vars.uniforms).bbMin[2u]);
+ float3 bbMax = float3((*tint_module_vars.uniforms).bbMax[0u], (*tint_module_vars.uniforms).bbMax[1u], (*tint_module_vars.uniforms).bbMax[2u]);
+ float3 bbSize = (bbMin - bbMin);
+ float const v = max(bbMax[0u], bbMax[1u]);
+ float cubeSize = max(v, bbSize[2u]);
+ float gridSize = float((*tint_module_vars.uniforms).gridSize);
+ float gx = ((cubeSize * (position[0u] - (*tint_module_vars.uniforms).bbMin[0u])) / cubeSize);
+ float gy = ((gx * (position[1u] - (*tint_module_vars.uniforms).bbMin[1u])) / gridSize);
+ float gz = ((gridSize * (position[2u] - (*tint_module_vars.uniforms).bbMin[2u])) / gridSize);
+ return float3(gz, gz, gz);
}
-
-AU32s = struct @align(4) {
- values:array<atomic<u32>> @offset(0)
+uint3 tint_v3f32_to_v3u32(float3 value) {
+ return select(uint3(4294967295u), select(uint3(0u), uint3(value), (value >= float3(0.0f))), (value <= float3(4294967040.0f)));
}
-
-AI32s = struct @align(4) {
- values:array<atomic<i32>> @offset(0)
+uint toIndex1D(uint gridSize, float3 voxelPos) {
+ uint3 icoord = tint_v3f32_to_v3u32(voxelPos);
+ return ((icoord[0u] + (gridSize * icoord[1u])) + ((gridSize * gridSize) * icoord[2u]));
}
-
-Dbg = struct @align(4) {
- offsetCounter:atomic<u32> @offset(0)
- pad0:u32 @offset(4)
- pad1:u32 @offset(8)
- pad2:u32 @offset(12)
- value0:u32 @offset(16)
- value1:u32 @offset(20)
- value2:u32 @offset(24)
- value3:u32 @offset(28)
- value_f32_0:f32 @offset(32)
- value_f32_1:f32 @offset(36)
- value_f32_2:f32 @offset(40)
- value_f32_3:f32 @offset(44)
+uint tint_mod_u32(uint lhs, uint rhs) {
+ uint const v_1 = select(rhs, 1u, (rhs == 0u));
+ return (lhs - ((lhs / v_1) * v_1));
}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(0, 0)
- %indices:ptr<storage, U32s, read_write> = var @binding_point(0, 10)
- %positions:ptr<storage, F32s, read_write> = var @binding_point(0, 11)
- %counters:ptr<storage, AU32s, read_write> = var @binding_point(0, 20)
- %LUT:ptr<storage, AI32s, read_write> = var @binding_point(0, 21)
- %dbg:ptr<storage, Dbg, read_write> = var @binding_point(0, 50)
+uint tint_div_u32(uint lhs, uint rhs) {
+ return (lhs / select(rhs, 1u, (rhs == 0u)));
}
-
-%marg8uintin = func():void {
- $B2: {
- ret
+uint3 toIndex4D(uint gridSize, uint index) {
+ uint z = tint_div_u32(gridSize, (index * index));
+ uint y = tint_div_u32((gridSize - ((gridSize * gridSize) * z)), gridSize);
+ uint x = tint_mod_u32(index, gridSize);
+ return uint3(z, y, y);
+}
+float3 loadPosition(uint vertexIndex, tint_module_vars_struct tint_module_vars) {
+ float3 position = float3((*tint_module_vars.positions).values[((3u * vertexIndex) + 0u)], (*tint_module_vars.positions).values[((3u * vertexIndex) + 1u)], (*tint_module_vars.positions).values[((3u * vertexIndex) + 2u)]);
+ return position;
+}
+void doIgnore(tint_module_vars_struct tint_module_vars) {
+ uint g43 = (*tint_module_vars.uniforms).numTriangles;
+ uint kj6 = (*tint_module_vars.dbg).value1;
+ uint b53 = atomic_load_explicit((&(*tint_module_vars.counters).values[0]), memory_order_relaxed);
+ uint rwg = (*tint_module_vars.indices).values[0];
+ float rb5 = (*tint_module_vars.positions).values[0];
+ int g55 = atomic_load_explicit((&(*tint_module_vars.LUT).values[0]), memory_order_relaxed);
+}
+void main_count_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_module_vars) {
+ uint triangleIndex = GlobalInvocationID[0u];
+ if ((triangleIndex >= (*tint_module_vars.uniforms).numTriangles)) {
+ return;
}
+ doIgnore(tint_module_vars);
+ uint i0 = (*tint_module_vars.indices).values[((3u * triangleIndex) + 0u)];
+ uint i1 = (*tint_module_vars.indices).values[((3u * i0) + 1u)];
+ uint i2 = (*tint_module_vars.indices).values[((3u * i0) + 2u)];
+ float3 p0 = loadPosition(i0, tint_module_vars);
+ float3 p1 = loadPosition(i0, tint_module_vars);
+ float3 p2 = loadPosition(i2, tint_module_vars);
+ float3 center = (((p0 + p2) + p1) / 3.0f);
+ float3 voxelPos = toVoxelPos(p1, tint_module_vars);
+ uint lIndex = toIndex1D((*tint_module_vars.uniforms).gridSize, p0);
+ int triangleOffset = atomic_fetch_add_explicit((&(*tint_module_vars.LUT).values[i1]), 1, memory_order_relaxed);
}
-%toVoxelPos = func(%position:vec3<f32>):vec3<f32> {
- $B3: {
- %10:ptr<uniform, vec3<f32>, read> = access %uniforms, 4u
- %11:f32 = load_vector_element %10, 0u
- %12:ptr<uniform, vec3<f32>, read> = access %uniforms, 4u
- %13:f32 = load_vector_element %12, 1u
- %14:ptr<uniform, vec3<f32>, read> = access %uniforms, 4u
- %15:f32 = load_vector_element %14, 2u
- %16:vec3<f32> = construct %11, %13, %15
- %bbMin:ptr<function, vec3<f32>, read_write> = var, %16
- %18:ptr<uniform, vec3<f32>, read> = access %uniforms, 5u
- %19:f32 = load_vector_element %18, 0u
- %20:ptr<uniform, vec3<f32>, read> = access %uniforms, 5u
- %21:f32 = load_vector_element %20, 1u
- %22:ptr<uniform, vec3<f32>, read> = access %uniforms, 5u
- %23:f32 = load_vector_element %22, 2u
- %24:vec3<f32> = construct %19, %21, %23
- %bbMax:ptr<function, vec3<f32>, read_write> = var, %24
- %26:vec3<f32> = load %bbMin
- %27:vec3<f32> = load %bbMin
- %28:vec3<f32> = sub %26, %27
- %bbSize:ptr<function, vec3<f32>, read_write> = var, %28
- %30:f32 = load_vector_element %bbMax, 0u
- %31:f32 = load_vector_element %bbMax, 1u
- %32:f32 = max %30, %31
- %33:f32 = load_vector_element %bbSize, 2u
- %34:f32 = max %32, %33
- %cubeSize:ptr<function, f32, read_write> = var, %34
- %36:ptr<uniform, u32, read> = access %uniforms, 1u
- %37:u32 = load %36
- %38:f32 = convert %37
- %gridSize:ptr<function, f32, read_write> = var, %38
- %40:f32 = load %cubeSize
- %41:f32 = access %position, 0u
- %42:ptr<uniform, vec3<f32>, read> = access %uniforms, 4u
- %43:f32 = load_vector_element %42, 0u
- %44:f32 = sub %41, %43
- %45:f32 = mul %40, %44
- %46:f32 = load %cubeSize
- %47:f32 = div %45, %46
- %gx:ptr<function, f32, read_write> = var, %47
- %49:f32 = load %gx
- %50:f32 = access %position, 1u
- %51:ptr<uniform, vec3<f32>, read> = access %uniforms, 4u
- %52:f32 = load_vector_element %51, 1u
- %53:f32 = sub %50, %52
- %54:f32 = mul %49, %53
- %55:f32 = load %gridSize
- %56:f32 = div %54, %55
- %gy:ptr<function, f32, read_write> = var, %56
- %58:f32 = load %gridSize
- %59:f32 = access %position, 2u
- %60:ptr<uniform, vec3<f32>, read> = access %uniforms, 4u
- %61:f32 = load_vector_element %60, 2u
- %62:f32 = sub %59, %61
- %63:f32 = mul %58, %62
- %64:f32 = load %gridSize
- %65:f32 = div %63, %64
- %gz:ptr<function, f32, read_write> = var, %65
- %67:f32 = load %gz
- %68:f32 = load %gz
- %69:f32 = load %gz
- %70:vec3<f32> = construct %67, %68, %69
- ret %70
- }
+kernel void main_count(uint3 GlobalInvocationID [[thread_position_in_grid]], const constant Uniforms* uniforms [[buffer(0)]], device U32s* indices [[buffer(3)]], device F32s* positions [[buffer(4)]], device AU32s* counters [[buffer(2)]], device AI32s* LUT [[buffer(5)]], device Dbg* dbg [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms, .indices=indices, .positions=positions, .counters=counters, .LUT=LUT, .dbg=dbg};
+ main_count_inner(GlobalInvocationID, tint_module_vars);
}
-%toIndex1D = func(%gridSize_1:u32, %voxelPos:vec3<f32>):u32 { # %gridSize_1: 'gridSize'
- $B4: {
- %74:vec3<u32> = call %tint_v3f32_to_v3u32, %voxelPos
- %icoord:ptr<function, vec3<u32>, read_write> = var, %74
- %77:u32 = load_vector_element %icoord, 0u
- %78:u32 = load_vector_element %icoord, 1u
- %79:u32 = mul %gridSize_1, %78
- %80:u32 = add %77, %79
- %81:u32 = mul %gridSize_1, %gridSize_1
- %82:u32 = load_vector_element %icoord, 2u
- %83:u32 = mul %81, %82
- %84:u32 = add %80, %83
- ret %84
- }
-}
-%toIndex4D = func(%gridSize_2:u32, %index:u32):vec3<u32> { # %gridSize_2: 'gridSize'
- $B5: {
- %88:u32 = mul %index, %index
- %89:u32 = call %tint_div_u32, %gridSize_2, %88
- %z:ptr<function, u32, read_write> = var, %89
- %92:u32 = mul %gridSize_2, %gridSize_2
- %93:u32 = load %z
- %94:u32 = mul %92, %93
- %95:u32 = sub %gridSize_2, %94
- %96:u32 = call %tint_div_u32, %95, %gridSize_2
- %y:ptr<function, u32, read_write> = var, %96
- %98:u32 = call %tint_mod_u32, %index, %gridSize_2
- %x:ptr<function, u32, read_write> = var, %98
- %101:u32 = load %z
- %102:u32 = load %y
- %103:u32 = load %y
- %104:vec3<u32> = construct %101, %102, %103
- ret %104
- }
-}
-%loadPosition = func(%vertexIndex:u32):vec3<f32> {
- $B6: {
- %107:u32 = mul 3u, %vertexIndex
- %108:u32 = add %107, 0u
- %109:ptr<storage, f32, read_write> = access %positions, 0u, %108
- %110:f32 = load %109
- %111:u32 = mul 3u, %vertexIndex
- %112:u32 = add %111, 1u
- %113:ptr<storage, f32, read_write> = access %positions, 0u, %112
- %114:f32 = load %113
- %115:u32 = mul 3u, %vertexIndex
- %116:u32 = add %115, 2u
- %117:ptr<storage, f32, read_write> = access %positions, 0u, %116
- %118:f32 = load %117
- %119:vec3<f32> = construct %110, %114, %118
- %position_1:ptr<function, vec3<f32>, read_write> = var, %119 # %position_1: 'position'
- %121:vec3<f32> = load %position_1
- ret %121
- }
-}
-%doIgnore = func():void {
- $B7: {
- %123:ptr<uniform, u32, read> = access %uniforms, 0u
- %124:u32 = load %123
- %g43:ptr<function, u32, read_write> = var, %124
- %126:ptr<storage, u32, read_write> = access %dbg, 5u
- %127:u32 = load %126
- %kj6:ptr<function, u32, read_write> = var, %127
- %129:ptr<storage, atomic<u32>, read_write> = access %counters, 0u, 0i
- %130:u32 = atomicLoad %129
- %b53:ptr<function, u32, read_write> = var, %130
- %132:ptr<storage, u32, read_write> = access %indices, 0u, 0i
- %133:u32 = load %132
- %rwg:ptr<function, u32, read_write> = var, %133
- %135:ptr<storage, f32, read_write> = access %positions, 0u, 0i
- %136:f32 = load %135
- %rb5:ptr<function, f32, read_write> = var, %136
- %138:ptr<storage, atomic<i32>, read_write> = access %LUT, 0u, 0i
- %139:i32 = atomicLoad %138
- %g55:ptr<function, i32, read_write> = var, %139
- ret
- }
-}
-%main_count = @compute @workgroup_size(128, 1, 1) func(%GlobalInvocationID:vec3<u32> [@global_invocation_id]):void {
- $B8: {
- %143:u32 = access %GlobalInvocationID, 0u
- %triangleIndex:ptr<function, u32, read_write> = var, %143
- %145:u32 = load %triangleIndex
- %146:ptr<uniform, u32, read> = access %uniforms, 0u
- %147:u32 = load %146
- %148:bool = gte %145, %147
- if %148 [t: $B9] { # if_1
- $B9: { # true
- ret
- }
- }
- %149:void = call %doIgnore
- %150:u32 = load %triangleIndex
- %151:u32 = mul 3u, %150
- %152:u32 = add %151, 0u
- %153:ptr<storage, u32, read_write> = access %indices, 0u, %152
- %154:u32 = load %153
- %i0:ptr<function, u32, read_write> = var, %154
- %156:u32 = load %i0
- %157:u32 = mul 3u, %156
- %158:u32 = add %157, 1u
- %159:ptr<storage, u32, read_write> = access %indices, 0u, %158
- %160:u32 = load %159
- %i1:ptr<function, u32, read_write> = var, %160
- %162:u32 = load %i0
- %163:u32 = mul 3u, %162
- %164:u32 = add %163, 2u
- %165:ptr<storage, u32, read_write> = access %indices, 0u, %164
- %166:u32 = load %165
- %i2:ptr<function, u32, read_write> = var, %166
- %168:u32 = load %i0
- %169:vec3<f32> = call %loadPosition, %168
- %p0:ptr<function, vec3<f32>, read_write> = var, %169
- %171:u32 = load %i0
- %172:vec3<f32> = call %loadPosition, %171
- %p1:ptr<function, vec3<f32>, read_write> = var, %172
- %174:u32 = load %i2
- %175:vec3<f32> = call %loadPosition, %174
- %p2:ptr<function, vec3<f32>, read_write> = var, %175
- %177:vec3<f32> = load %p0
- %178:vec3<f32> = load %p2
- %179:vec3<f32> = add %177, %178
- %180:vec3<f32> = load %p1
- %181:vec3<f32> = add %179, %180
- %182:vec3<f32> = div %181, 3.0f
- %center:ptr<function, vec3<f32>, read_write> = var, %182
- %184:vec3<f32> = load %p1
- %185:vec3<f32> = call %toVoxelPos, %184
- %voxelPos_1:ptr<function, vec3<f32>, read_write> = var, %185 # %voxelPos_1: 'voxelPos'
- %187:ptr<uniform, u32, read> = access %uniforms, 1u
- %188:u32 = load %187
- %189:vec3<f32> = load %p0
- %190:u32 = call %toIndex1D, %188, %189
- %lIndex:ptr<function, u32, read_write> = var, %190
- %192:u32 = load %i1
- %193:ptr<storage, atomic<i32>, read_write> = access %LUT, 0u, %192
- %194:i32 = atomicAdd %193, 1i
- %triangleOffset:ptr<function, i32, read_write> = var, %194
- ret
- }
-}
-%tint_div_u32 = func(%lhs:u32, %rhs:u32):u32 {
- $B10: {
- %198:bool = eq %rhs, 0u
- %199:u32 = select %rhs, 1u, %198
- %200:u32 = div %lhs, %199
- ret %200
- }
-}
-%tint_mod_u32 = func(%lhs_1:u32, %rhs_1:u32):u32 { # %lhs_1: 'lhs', %rhs_1: 'rhs'
- $B11: {
- %203:bool = eq %rhs_1, 0u
- %204:u32 = select %rhs_1, 1u, %203
- %205:u32 = let %204
- %206:u32 = div %lhs_1, %205
- %207:u32 = mul %206, %205
- %208:u32 = sub %lhs_1, %207
- ret %208
- }
-}
-%tint_v3f32_to_v3u32 = func(%value:vec3<f32>):vec3<u32> {
- $B12: {
- %210:vec3<u32> = convert %value
- %211:vec3<bool> = gte %value, vec3<f32>(0.0f)
- %212:vec3<u32> = select vec3<u32>(0u), %210, %211
- %213:vec3<bool> = lte %value, vec3<f32>(4294967040.0f)
- %214:vec3<u32> = select vec3<u32>(4294967295u), %212, %213
- ret %214
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/bug/fxc/dyn_array_idx/read/storage.wgsl.expected.ir.msl b/test/tint/bug/fxc/dyn_array_idx/read/storage.wgsl.expected.ir.msl
index b6f0210..77adec0 100644
--- a/test/tint/bug/fxc/dyn_array_idx/read/storage.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/dyn_array_idx/read/storage.wgsl.expected.ir.msl
@@ -27,7 +27,7 @@
device SSBO* ssbo;
};
-kernel void f(const constant UBO* ubo [[buffer(0)]], device Result* result [[buffer(2)]], device SSBO* ssbo [[buffer(1)]]) {
+kernel void f(const constant UBO* ubo [[buffer(0)]], device Result* result [[buffer(1)]], device SSBO* ssbo [[buffer(2)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.ubo=ubo, .result=result, .ssbo=ssbo};
(*tint_module_vars.result).out = (*tint_module_vars.ssbo).data[(*tint_module_vars.ubo).dynamic_idx];
}
diff --git a/test/tint/bug/fxc/dyn_array_idx/read/uniform.wgsl.expected.ir.msl b/test/tint/bug/fxc/dyn_array_idx/read/uniform.wgsl.expected.ir.msl
index 7595941..e858ed4 100644
--- a/test/tint/bug/fxc/dyn_array_idx/read/uniform.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/dyn_array_idx/read/uniform.wgsl.expected.ir.msl
@@ -24,7 +24,7 @@
device Result* result;
};
-kernel void f(const constant UBO* ubo [[buffer(0)]], device Result* result [[buffer(2)]]) {
+kernel void f(const constant UBO* ubo [[buffer(0)]], device Result* result [[buffer(1)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.ubo=ubo, .result=result};
(*tint_module_vars.result).out = (*tint_module_vars.ubo).data[(*tint_module_vars.ubo).dynamic_idx][0u];
}
diff --git a/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.msl b/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.msl
index 71ac128..eff95db 100644
--- a/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.msl
@@ -1,46 +1,36 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Particle = struct @align(16) {
- position:array<vec3<f32>, 8> @offset(0)
- lifetime:f32 @offset(128)
- color:vec4<f32> @offset(144)
- velocity:vec3<f32> @offset(160)
+struct Particle {
+ tint_array<float3, 8> position;
+ float lifetime;
+ float4 color;
+ float3 velocity;
+};
+struct Particles {
+ tint_array<Particle, 1> p;
+};
+struct Simulation {
+ uint i;
+};
+struct tint_module_vars_struct {
+ const device Particles* particles;
+ const constant Simulation* sim;
+};
+
+kernel void tint_symbol(const device Particles* particles [[buffer(1)]], const constant Simulation* sim [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.particles=particles, .sim=sim};
+ Particle particle = (*tint_module_vars.particles).p[0];
+ particle.position[(*tint_module_vars.sim).i] = particle.position[(*tint_module_vars.sim).i];
}
-
-Particles = struct @align(16) {
- p:array<Particle> @offset(0)
-}
-
-Simulation = struct @align(4) {
- i:u32 @offset(0)
-}
-
-$B1: { # root
- %particles:ptr<storage, Particles, read> = var @binding_point(1, 3)
- %sim:ptr<uniform, Simulation, read> = var @binding_point(1, 4)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:ptr<storage, Particle, read> = access %particles, 0u, 0i
- %5:Particle = load %4
- %particle:ptr<function, Particle, read_write> = var, %5
- %7:ptr<uniform, u32, read> = access %sim, 0u
- %8:u32 = load %7
- %9:ptr<function, vec3<f32>, read_write> = access %particle, 0u, %8
- %10:ptr<uniform, u32, read> = access %sim, 0u
- %11:u32 = load %10
- %12:ptr<function, vec3<f32>, read_write> = access %particle, 0u, %11
- %13:vec3<f32> = load %12
- store %9, %13
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl.expected.ir.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl.expected.ir.msl
index 12171f2..f49a06e 100644
--- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl.expected.ir.msl
@@ -1,29 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+ uint j;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
- j:u32 @offset(4)
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms};
+ float2x4 m1 = float2x4(0.0f);
+ m1[(*tint_module_vars.uniforms).i][0] = 1.0f;
}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m1:ptr<function, mat2x4<f32>, read_write> = var
- %4:ptr<uniform, u32, read> = access %uniforms, 0u
- %5:u32 = load %4
- %6:ptr<function, vec4<f32>, read_write> = access %m1, %5
- store_vector_element %6, 0i, 1.0f
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl.expected.ir.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl.expected.ir.msl
index 366bee8..7e9e7e0 100644
--- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+ uint j;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
- j:u32 @offset(4)
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms};
+ float2x4 m1 = float2x4(0.0f);
+ m1[(*tint_module_vars.uniforms).i][(*tint_module_vars.uniforms).j] = 1.0f;
}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m1:ptr<function, mat2x4<f32>, read_write> = var
- %4:ptr<uniform, u32, read> = access %uniforms, 0u
- %5:u32 = load %4
- %6:ptr<function, vec4<f32>, read_write> = access %m1, %5
- %7:ptr<uniform, u32, read> = access %uniforms, 1u
- %8:u32 = load %7
- store_vector_element %6, %8, 1.0f
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.ir.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.ir.msl
index 12bd65d..4f1cbad 100644
--- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.ir.msl
@@ -1,29 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+ uint j;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+ thread float2x4* m1;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
- j:u32 @offset(4)
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ thread float2x4 m1 = float2x4(0.0f);
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms, .m1=(&m1)};
+ (*tint_module_vars.m1)[0][(*tint_module_vars.uniforms).j] = 1.0f;
}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
- %m1:ptr<private, mat2x4<f32>, read_write> = var
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:ptr<private, vec4<f32>, read_write> = access %m1, 0i
- %5:ptr<uniform, u32, read> = access %uniforms, 1u
- %6:u32 = load %5
- store_vector_element %4, %6, 1.0f
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl.expected.ir.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl.expected.ir.msl
index 718291b..a4e4989 100644
--- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl.expected.ir.msl
@@ -1,29 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+ uint j;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
- j:u32 @offset(4)
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms};
+ float2x4 m1 = float2x4(0.0f);
+ m1[(*tint_module_vars.uniforms).i] = float4(1.0f);
}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m1:ptr<function, mat2x4<f32>, read_write> = var
- %4:ptr<uniform, u32, read> = access %uniforms, 0u
- %5:u32 = load %4
- %6:ptr<function, vec4<f32>, read_write> = access %m1, %5
- store %6, vec4<f32>(1.0f)
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.ir.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.ir.msl
index d8ed7c3..27892ea 100644
--- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.ir.msl
@@ -1,29 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+ uint j;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+ thread float2x4* m1;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
- j:u32 @offset(4)
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ thread float2x4 m1 = float2x4(0.0f);
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms, .m1=(&m1)};
+ (*tint_module_vars.m1)[(*tint_module_vars.uniforms).i][0] = 1.0f;
}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
- %m1:ptr<private, mat2x4<f32>, read_write> = var
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:ptr<uniform, u32, read> = access %uniforms, 0u
- %5:u32 = load %4
- %6:ptr<private, vec4<f32>, read_write> = access %m1, %5
- store_vector_element %6, 0i, 1.0f
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.ir.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.ir.msl
index ed64108..e83b572 100644
--- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.ir.msl
@@ -1,31 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+ uint j;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+ thread float2x4* m1;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
- j:u32 @offset(4)
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ thread float2x4 m1 = float2x4(0.0f);
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms, .m1=(&m1)};
+ (*tint_module_vars.m1)[(*tint_module_vars.uniforms).i][(*tint_module_vars.uniforms).j] = 1.0f;
}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
- %m1:ptr<private, mat2x4<f32>, read_write> = var
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:ptr<uniform, u32, read> = access %uniforms, 0u
- %5:u32 = load %4
- %6:ptr<private, vec4<f32>, read_write> = access %m1, %5
- %7:ptr<uniform, u32, read> = access %uniforms, 1u
- %8:u32 = load %7
- store_vector_element %6, %8, 1.0f
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.ir.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.ir.msl
index 12bd65d..4f1cbad 100644
--- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.ir.msl
@@ -1,29 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+ uint j;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+ thread float2x4* m1;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
- j:u32 @offset(4)
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ thread float2x4 m1 = float2x4(0.0f);
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms, .m1=(&m1)};
+ (*tint_module_vars.m1)[0][(*tint_module_vars.uniforms).j] = 1.0f;
}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
- %m1:ptr<private, mat2x4<f32>, read_write> = var
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:ptr<private, vec4<f32>, read_write> = access %m1, 0i
- %5:ptr<uniform, u32, read> = access %uniforms, 1u
- %6:u32 = load %5
- store_vector_element %4, %6, 1.0f
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.ir.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.ir.msl
index eafa77b..ebb686f 100644
--- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.ir.msl
@@ -1,29 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+ uint j;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+ thread float2x4* m1;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
- j:u32 @offset(4)
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ thread float2x4 m1 = float2x4(0.0f);
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms, .m1=(&m1)};
+ (*tint_module_vars.m1)[(*tint_module_vars.uniforms).i] = float4(1.0f);
}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
- %m1:ptr<private, mat2x4<f32>, read_write> = var
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:ptr<uniform, u32, read> = access %uniforms, 0u
- %5:u32 = load %4
- %6:ptr<private, vec4<f32>, read_write> = access %m1, %5
- store %6, vec4<f32>(1.0f)
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/bug/tint/1088.spvasm.expected.ir.msl b/test/tint/bug/tint/1088.spvasm.expected.ir.msl
index ffc5ee7..bf32f28 100644
--- a/test/tint/bug/tint/1088.spvasm.expected.ir.msl
+++ b/test/tint/bug/tint/1088.spvasm.expected.ir.msl
@@ -1,96 +1,76 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: strided_arr = struct @align(4) {
- el:f32 @offset(0)
-}
+struct strided_arr {
+ float el;
+};
+struct LeftOver {
+ float4x4 worldViewProjection;
+ float time;
+ tint_array<float4x4, 2> test2;
+ tint_array<strided_arr, 4> test;
+};
+struct tint_module_vars_struct {
+ thread float3* position_1;
+ const constant LeftOver* x_14;
+ thread float2* vUV;
+ thread float2* uv;
+ thread float3* normal;
+ thread float4* gl_Position;
+};
+struct main_out {
+ float4 gl_Position;
+ float2 vUV_1;
+};
+struct tint_symbol_outputs {
+ float4 main_out_gl_Position [[position]];
+ float2 main_out_vUV_1 [[user(locn0)]];
+};
+struct tint_symbol_inputs {
+ float3 position_1_param [[attribute(0)]];
+ float2 uv_param [[attribute(2)]];
+ float3 normal_param [[attribute(1)]];
+};
-LeftOver = struct @align(16) {
- worldViewProjection:mat4x4<f32> @offset(0)
- time:f32 @offset(64)
- test2:array<mat4x4<f32>, 2> @offset(80)
- test:array<strided_arr, 4> @offset(208)
+void main_1(tint_module_vars_struct tint_module_vars) {
+ float4 q = 0.0f;
+ float3 p = 0.0f;
+ q = float4((*tint_module_vars.position_1)[0u], (*tint_module_vars.position_1)[1u], (*tint_module_vars.position_1)[2u], 1.0f);
+ p = q.xyz;
+ float const v = p[0u];
+ p[0u] = (v + sin((((*tint_module_vars.x_14).test[0].el * (*tint_module_vars.position_1)[1u]) + (*tint_module_vars.x_14).time)));
+ float const v_1 = p[1u];
+ p[1u] = (v_1 + sin(((*tint_module_vars.x_14).time + 4.0f)));
+ float4x4 const v_2 = (*tint_module_vars.x_14).worldViewProjection;
+ (*tint_module_vars.gl_Position) = (v_2 * float4(p[0u], p[1u], p[2u], 1.0f));
+ (*tint_module_vars.vUV) = (*tint_module_vars.uv);
+ (*tint_module_vars.gl_Position)[1u] = ((*tint_module_vars.gl_Position)[1u] * -1.0f);
}
-
-main_out = struct @align(16) {
- gl_Position:vec4<f32> @offset(0), @builtin(position)
- vUV_1:vec2<f32> @offset(16), @location(0)
+main_out tint_symbol_inner(float3 position_1_param, float2 uv_param, float3 normal_param, tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.position_1) = position_1_param;
+ (*tint_module_vars.uv) = uv_param;
+ (*tint_module_vars.normal) = normal_param;
+ main_1(tint_module_vars);
+ return main_out{.gl_Position=(*tint_module_vars.gl_Position), .vUV_1=(*tint_module_vars.vUV)};
}
-
-$B1: { # root
- %position_1:ptr<private, vec3<f32>, read_write> = var
- %x_14:ptr<uniform, LeftOver, read> = var @binding_point(2, 2)
- %vUV:ptr<private, vec2<f32>, read_write> = var
- %uv:ptr<private, vec2<f32>, read_write> = var
- %normal:ptr<private, vec3<f32>, read_write> = var
- %gl_Position:ptr<private, vec4<f32>, read_write> = var
+vertex tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]], const constant LeftOver* x_14 [[buffer(0)]]) {
+ thread float3 position_1 = 0.0f;
+ thread float2 vUV = 0.0f;
+ thread float2 uv = 0.0f;
+ thread float3 normal = 0.0f;
+ thread float4 gl_Position = 0.0f;
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.position_1=(&position_1), .x_14=x_14, .vUV=(&vUV), .uv=(&uv), .normal=(&normal), .gl_Position=(&gl_Position)};
+ main_out const v_3 = tint_symbol_inner(inputs.position_1_param, inputs.uv_param, inputs.normal_param, tint_module_vars);
+ return tint_symbol_outputs{.main_out_gl_Position=v_3.gl_Position, .main_out_vUV_1=v_3.vUV_1};
}
-
-%main_1 = func():void {
- $B2: {
- %q:ptr<function, vec4<f32>, read_write> = var
- %p:ptr<function, vec3<f32>, read_write> = var
- %10:f32 = load_vector_element %position_1, 0u
- %11:f32 = load_vector_element %position_1, 1u
- %12:f32 = load_vector_element %position_1, 2u
- %13:vec4<f32> = construct %10, %11, %12, 1.0f
- store %q, %13
- %14:vec4<f32> = load %q
- %15:vec3<f32> = swizzle %14, xyz
- store %p, %15
- %16:f32 = load_vector_element %p, 0u
- %17:f32 = let %16
- %18:ptr<uniform, f32, read> = access %x_14, 3u, 0i, 0u
- %19:f32 = load %18
- %20:f32 = load_vector_element %position_1, 1u
- %21:f32 = mul %19, %20
- %22:ptr<uniform, f32, read> = access %x_14, 1u
- %23:f32 = load %22
- %24:f32 = add %21, %23
- %25:f32 = sin %24
- %26:f32 = add %17, %25
- store_vector_element %p, 0u, %26
- %27:f32 = load_vector_element %p, 1u
- %28:f32 = let %27
- %29:ptr<uniform, f32, read> = access %x_14, 1u
- %30:f32 = load %29
- %31:f32 = add %30, 4.0f
- %32:f32 = sin %31
- %33:f32 = add %28, %32
- store_vector_element %p, 1u, %33
- %34:ptr<uniform, mat4x4<f32>, read> = access %x_14, 0u
- %35:mat4x4<f32> = load %34
- %36:mat4x4<f32> = let %35
- %37:f32 = load_vector_element %p, 0u
- %38:f32 = load_vector_element %p, 1u
- %39:f32 = load_vector_element %p, 2u
- %40:vec4<f32> = construct %37, %38, %39, 1.0f
- %41:vec4<f32> = mul %36, %40
- store %gl_Position, %41
- %42:vec2<f32> = load %uv
- store %vUV, %42
- %43:f32 = load_vector_element %gl_Position, 1u
- %44:f32 = mul %43, -1.0f
- store_vector_element %gl_Position, 1u, %44
- ret
- }
-}
-%tint_symbol = @vertex func(%position_1_param:vec3<f32> [@location(0)], %uv_param:vec2<f32> [@location(2)], %normal_param:vec3<f32> [@location(1)]):main_out {
- $B3: {
- store %position_1, %position_1_param
- store %uv, %uv_param
- store %normal, %normal_param
- %49:void = call %main_1
- %50:vec4<f32> = load %gl_Position
- %51:vec2<f32> = load %vUV
- %52:main_out = construct %50, %51
- ret %52
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/bug/tint/1113.wgsl.expected.ir.msl b/test/tint/bug/tint/1113.wgsl.expected.ir.msl
index 6d4edfb..df5a737 100644
--- a/test/tint/bug/tint/1113.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1113.wgsl.expected.ir.msl
@@ -1,424 +1,167 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint numTriangles;
+ uint gridSize;
+ uint pad1;
+ uint pad2;
+ float3 bbMin;
+ float3 bbMax;
+};
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(16) {
- numTriangles:u32 @offset(0)
- gridSize:u32 @offset(4)
- pad1:u32 @offset(8)
- pad2:u32 @offset(12)
- bbMin:vec3<f32> @offset(16)
- bbMax:vec3<f32> @offset(32)
-}
+struct U32s {
+ tint_array<uint, 1> values;
+};
+struct F32s {
+ tint_array<float, 1> values;
+};
+struct AU32s {
+ tint_array<atomic_uint, 1> values;
+};
+struct AI32s {
+ tint_array<atomic_int, 1> values;
+};
+struct Dbg {
+ atomic_uint offsetCounter;
+ uint pad0;
+ uint pad1;
+ uint pad2;
+ uint value0;
+ uint value1;
+ uint value2;
+ uint value3;
+ float value_f32_0;
+ float value_f32_1;
+ float value_f32_2;
+ float value_f32_3;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+ device U32s* indices;
+ device F32s* positions;
+ device AU32s* counters;
+ device AI32s* LUT;
+ device Dbg* dbg;
+};
-U32s = struct @align(4) {
- values:array<u32> @offset(0)
+float3 toVoxelPos(float3 position, tint_module_vars_struct tint_module_vars) {
+ float3 bbMin = float3((*tint_module_vars.uniforms).bbMin[0u], (*tint_module_vars.uniforms).bbMin[1u], (*tint_module_vars.uniforms).bbMin[2u]);
+ float3 bbMax = float3((*tint_module_vars.uniforms).bbMax[0u], (*tint_module_vars.uniforms).bbMax[1u], (*tint_module_vars.uniforms).bbMax[2u]);
+ float3 bbSize = (bbMax - bbMin);
+ float const v = max(bbSize[0u], bbSize[1u]);
+ float cubeSize = max(v, bbSize[2u]);
+ float gridSize = float((*tint_module_vars.uniforms).gridSize);
+ float gx = ((gridSize * (position[0u] - (*tint_module_vars.uniforms).bbMin[0u])) / cubeSize);
+ float gy = ((gridSize * (position[1u] - (*tint_module_vars.uniforms).bbMin[1u])) / cubeSize);
+ float gz = ((gridSize * (position[2u] - (*tint_module_vars.uniforms).bbMin[2u])) / cubeSize);
+ return float3(gx, gy, gz);
}
-
-F32s = struct @align(4) {
- values:array<f32> @offset(0)
+uint3 tint_v3f32_to_v3u32(float3 value) {
+ return select(uint3(4294967295u), select(uint3(0u), uint3(value), (value >= float3(0.0f))), (value <= float3(4294967040.0f)));
}
-
-AU32s = struct @align(4) {
- values:array<atomic<u32>> @offset(0)
+uint toIndex1D(uint gridSize, float3 voxelPos) {
+ uint3 icoord = tint_v3f32_to_v3u32(voxelPos);
+ return ((icoord[0u] + (gridSize * icoord[1u])) + ((gridSize * gridSize) * icoord[2u]));
}
-
-AI32s = struct @align(4) {
- values:array<atomic<i32>> @offset(0)
+uint tint_mod_u32(uint lhs, uint rhs) {
+ uint const v_1 = select(rhs, 1u, (rhs == 0u));
+ return (lhs - ((lhs / v_1) * v_1));
}
-
-Dbg = struct @align(4) {
- offsetCounter:atomic<u32> @offset(0)
- pad0:u32 @offset(4)
- pad1:u32 @offset(8)
- pad2:u32 @offset(12)
- value0:u32 @offset(16)
- value1:u32 @offset(20)
- value2:u32 @offset(24)
- value3:u32 @offset(28)
- value_f32_0:f32 @offset(32)
- value_f32_1:f32 @offset(36)
- value_f32_2:f32 @offset(40)
- value_f32_3:f32 @offset(44)
+uint tint_div_u32(uint lhs, uint rhs) {
+ return (lhs / select(rhs, 1u, (rhs == 0u)));
}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(0, 0)
- %indices:ptr<storage, U32s, read_write> = var @binding_point(0, 10)
- %positions:ptr<storage, F32s, read_write> = var @binding_point(0, 11)
- %counters:ptr<storage, AU32s, read_write> = var @binding_point(0, 20)
- %LUT:ptr<storage, AI32s, read_write> = var @binding_point(0, 21)
- %dbg:ptr<storage, Dbg, read_write> = var @binding_point(0, 50)
+uint3 toIndex3D(uint gridSize, uint index) {
+ uint z = tint_div_u32(index, (gridSize * gridSize));
+ uint y = tint_div_u32((index - ((gridSize * gridSize) * z)), gridSize);
+ uint x = tint_mod_u32(index, gridSize);
+ return uint3(x, y, z);
}
-
-%toVoxelPos = func(%position:vec3<f32>):vec3<f32> {
- $B2: {
- %9:ptr<uniform, vec3<f32>, read> = access %uniforms, 4u
- %10:f32 = load_vector_element %9, 0u
- %11:ptr<uniform, vec3<f32>, read> = access %uniforms, 4u
- %12:f32 = load_vector_element %11, 1u
- %13:ptr<uniform, vec3<f32>, read> = access %uniforms, 4u
- %14:f32 = load_vector_element %13, 2u
- %15:vec3<f32> = construct %10, %12, %14
- %bbMin:ptr<function, vec3<f32>, read_write> = var, %15
- %17:ptr<uniform, vec3<f32>, read> = access %uniforms, 5u
- %18:f32 = load_vector_element %17, 0u
- %19:ptr<uniform, vec3<f32>, read> = access %uniforms, 5u
- %20:f32 = load_vector_element %19, 1u
- %21:ptr<uniform, vec3<f32>, read> = access %uniforms, 5u
- %22:f32 = load_vector_element %21, 2u
- %23:vec3<f32> = construct %18, %20, %22
- %bbMax:ptr<function, vec3<f32>, read_write> = var, %23
- %25:vec3<f32> = load %bbMax
- %26:vec3<f32> = load %bbMin
- %27:vec3<f32> = sub %25, %26
- %bbSize:ptr<function, vec3<f32>, read_write> = var, %27
- %29:f32 = load_vector_element %bbSize, 0u
- %30:f32 = load_vector_element %bbSize, 1u
- %31:f32 = max %29, %30
- %32:f32 = load_vector_element %bbSize, 2u
- %33:f32 = max %31, %32
- %cubeSize:ptr<function, f32, read_write> = var, %33
- %35:ptr<uniform, u32, read> = access %uniforms, 1u
- %36:u32 = load %35
- %37:f32 = convert %36
- %gridSize:ptr<function, f32, read_write> = var, %37
- %39:f32 = load %gridSize
- %40:f32 = access %position, 0u
- %41:ptr<uniform, vec3<f32>, read> = access %uniforms, 4u
- %42:f32 = load_vector_element %41, 0u
- %43:f32 = sub %40, %42
- %44:f32 = mul %39, %43
- %45:f32 = load %cubeSize
- %46:f32 = div %44, %45
- %gx:ptr<function, f32, read_write> = var, %46
- %48:f32 = load %gridSize
- %49:f32 = access %position, 1u
- %50:ptr<uniform, vec3<f32>, read> = access %uniforms, 4u
- %51:f32 = load_vector_element %50, 1u
- %52:f32 = sub %49, %51
- %53:f32 = mul %48, %52
- %54:f32 = load %cubeSize
- %55:f32 = div %53, %54
- %gy:ptr<function, f32, read_write> = var, %55
- %57:f32 = load %gridSize
- %58:f32 = access %position, 2u
- %59:ptr<uniform, vec3<f32>, read> = access %uniforms, 4u
- %60:f32 = load_vector_element %59, 2u
- %61:f32 = sub %58, %60
- %62:f32 = mul %57, %61
- %63:f32 = load %cubeSize
- %64:f32 = div %62, %63
- %gz:ptr<function, f32, read_write> = var, %64
- %66:f32 = load %gx
- %67:f32 = load %gy
- %68:f32 = load %gz
- %69:vec3<f32> = construct %66, %67, %68
- ret %69
+float3 loadPosition(uint vertexIndex, tint_module_vars_struct tint_module_vars) {
+ float3 position = float3((*tint_module_vars.positions).values[((3u * vertexIndex) + 0u)], (*tint_module_vars.positions).values[((3u * vertexIndex) + 1u)], (*tint_module_vars.positions).values[((3u * vertexIndex) + 2u)]);
+ return position;
+}
+void doIgnore(tint_module_vars_struct tint_module_vars) {
+ uint g42 = (*tint_module_vars.uniforms).numTriangles;
+ uint kj6 = (*tint_module_vars.dbg).value1;
+ uint b53 = atomic_load_explicit((&(*tint_module_vars.counters).values[0]), memory_order_relaxed);
+ uint rwg = (*tint_module_vars.indices).values[0];
+ float rb5 = (*tint_module_vars.positions).values[0];
+ int g55 = atomic_load_explicit((&(*tint_module_vars.LUT).values[0]), memory_order_relaxed);
+}
+void main_count_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_module_vars) {
+ uint triangleIndex = GlobalInvocationID[0u];
+ if ((triangleIndex >= (*tint_module_vars.uniforms).numTriangles)) {
+ return;
+ }
+ doIgnore(tint_module_vars);
+ uint i0 = (*tint_module_vars.indices).values[((3u * triangleIndex) + 0u)];
+ uint i1 = (*tint_module_vars.indices).values[((3u * triangleIndex) + 1u)];
+ uint i2 = (*tint_module_vars.indices).values[((3u * triangleIndex) + 2u)];
+ float3 p0 = loadPosition(i0, tint_module_vars);
+ float3 p1 = loadPosition(i1, tint_module_vars);
+ float3 p2 = loadPosition(i2, tint_module_vars);
+ float3 center = (((p0 + p1) + p2) / 3.0f);
+ float3 voxelPos = toVoxelPos(center, tint_module_vars);
+ uint voxelIndex = toIndex1D((*tint_module_vars.uniforms).gridSize, voxelPos);
+ uint acefg = atomic_fetch_add_explicit((&(*tint_module_vars.counters).values[voxelIndex]), 1u, memory_order_relaxed);
+ if ((triangleIndex == 0u)) {
+ (*tint_module_vars.dbg).value0 = (*tint_module_vars.uniforms).gridSize;
+ (*tint_module_vars.dbg).value_f32_0 = center[0u];
+ (*tint_module_vars.dbg).value_f32_1 = center[1u];
+ (*tint_module_vars.dbg).value_f32_2 = center[2u];
}
}
-%toIndex1D = func(%gridSize_1:u32, %voxelPos:vec3<f32>):u32 { # %gridSize_1: 'gridSize'
- $B3: {
- %73:vec3<u32> = call %tint_v3f32_to_v3u32, %voxelPos
- %icoord:ptr<function, vec3<u32>, read_write> = var, %73
- %76:u32 = load_vector_element %icoord, 0u
- %77:u32 = load_vector_element %icoord, 1u
- %78:u32 = mul %gridSize_1, %77
- %79:u32 = add %76, %78
- %80:u32 = mul %gridSize_1, %gridSize_1
- %81:u32 = load_vector_element %icoord, 2u
- %82:u32 = mul %80, %81
- %83:u32 = add %79, %82
- ret %83
+void main_create_lut_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_module_vars) {
+ uint voxelIndex = GlobalInvocationID[0u];
+ doIgnore(tint_module_vars);
+ uint maxVoxels = (((*tint_module_vars.uniforms).gridSize * (*tint_module_vars.uniforms).gridSize) * (*tint_module_vars.uniforms).gridSize);
+ if ((voxelIndex >= maxVoxels)) {
+ return;
}
-}
-%toIndex3D = func(%gridSize_2:u32, %index:u32):vec3<u32> { # %gridSize_2: 'gridSize'
- $B4: {
- %87:u32 = mul %gridSize_2, %gridSize_2
- %88:u32 = call %tint_div_u32, %index, %87
- %z:ptr<function, u32, read_write> = var, %88
- %91:u32 = mul %gridSize_2, %gridSize_2
- %92:u32 = load %z
- %93:u32 = mul %91, %92
- %94:u32 = sub %index, %93
- %95:u32 = call %tint_div_u32, %94, %gridSize_2
- %y:ptr<function, u32, read_write> = var, %95
- %97:u32 = call %tint_mod_u32, %index, %gridSize_2
- %x:ptr<function, u32, read_write> = var, %97
- %100:u32 = load %x
- %101:u32 = load %y
- %102:u32 = load %z
- %103:vec3<u32> = construct %100, %101, %102
- ret %103
+ uint numTriangles = atomic_load_explicit((&(*tint_module_vars.counters).values[voxelIndex]), memory_order_relaxed);
+ int offset = -1;
+ if ((numTriangles > 0u)) {
+ offset = int(atomic_fetch_add_explicit((&(*tint_module_vars.dbg).offsetCounter), numTriangles, memory_order_relaxed));
}
+ atomic_store_explicit((&(*tint_module_vars.LUT).values[voxelIndex]), offset, memory_order_relaxed);
}
-%loadPosition = func(%vertexIndex:u32):vec3<f32> {
- $B5: {
- %106:u32 = mul 3u, %vertexIndex
- %107:u32 = add %106, 0u
- %108:ptr<storage, f32, read_write> = access %positions, 0u, %107
- %109:f32 = load %108
- %110:u32 = mul 3u, %vertexIndex
- %111:u32 = add %110, 1u
- %112:ptr<storage, f32, read_write> = access %positions, 0u, %111
- %113:f32 = load %112
- %114:u32 = mul 3u, %vertexIndex
- %115:u32 = add %114, 2u
- %116:ptr<storage, f32, read_write> = access %positions, 0u, %115
- %117:f32 = load %116
- %118:vec3<f32> = construct %109, %113, %117
- %position_1:ptr<function, vec3<f32>, read_write> = var, %118 # %position_1: 'position'
- %120:vec3<f32> = load %position_1
- ret %120
+void main_sort_triangles_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_module_vars) {
+ uint triangleIndex = GlobalInvocationID[0u];
+ doIgnore(tint_module_vars);
+ if ((triangleIndex >= (*tint_module_vars.uniforms).numTriangles)) {
+ return;
}
+ uint i0 = (*tint_module_vars.indices).values[((3u * triangleIndex) + 0u)];
+ uint i1 = (*tint_module_vars.indices).values[((3u * triangleIndex) + 1u)];
+ uint i2 = (*tint_module_vars.indices).values[((3u * triangleIndex) + 2u)];
+ float3 p0 = loadPosition(i0, tint_module_vars);
+ float3 p1 = loadPosition(i1, tint_module_vars);
+ float3 p2 = loadPosition(i2, tint_module_vars);
+ float3 center = (((p0 + p1) + p2) / 3.0f);
+ float3 voxelPos = toVoxelPos(center, tint_module_vars);
+ uint voxelIndex = toIndex1D((*tint_module_vars.uniforms).gridSize, voxelPos);
+ int triangleOffset = atomic_fetch_add_explicit((&(*tint_module_vars.LUT).values[voxelIndex]), 1, memory_order_relaxed);
}
-%doIgnore = func():void {
- $B6: {
- %122:ptr<uniform, u32, read> = access %uniforms, 0u
- %123:u32 = load %122
- %g42:ptr<function, u32, read_write> = var, %123
- %125:ptr<storage, u32, read_write> = access %dbg, 5u
- %126:u32 = load %125
- %kj6:ptr<function, u32, read_write> = var, %126
- %128:ptr<storage, atomic<u32>, read_write> = access %counters, 0u, 0i
- %129:u32 = atomicLoad %128
- %b53:ptr<function, u32, read_write> = var, %129
- %131:ptr<storage, u32, read_write> = access %indices, 0u, 0i
- %132:u32 = load %131
- %rwg:ptr<function, u32, read_write> = var, %132
- %134:ptr<storage, f32, read_write> = access %positions, 0u, 0i
- %135:f32 = load %134
- %rb5:ptr<function, f32, read_write> = var, %135
- %137:ptr<storage, atomic<i32>, read_write> = access %LUT, 0u, 0i
- %138:i32 = atomicLoad %137
- %g55:ptr<function, i32, read_write> = var, %138
- ret
- }
+kernel void main_count(uint3 GlobalInvocationID [[thread_position_in_grid]], const constant Uniforms* uniforms [[buffer(0)]], device U32s* indices [[buffer(3)]], device F32s* positions [[buffer(4)]], device AU32s* counters [[buffer(2)]], device AI32s* LUT [[buffer(5)]], device Dbg* dbg [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms, .indices=indices, .positions=positions, .counters=counters, .LUT=LUT, .dbg=dbg};
+ main_count_inner(GlobalInvocationID, tint_module_vars);
}
-%main_count = @compute @workgroup_size(128, 1, 1) func(%GlobalInvocationID:vec3<u32> [@global_invocation_id]):void {
- $B7: {
- %142:u32 = access %GlobalInvocationID, 0u
- %triangleIndex:ptr<function, u32, read_write> = var, %142
- %144:u32 = load %triangleIndex
- %145:ptr<uniform, u32, read> = access %uniforms, 0u
- %146:u32 = load %145
- %147:bool = gte %144, %146
- if %147 [t: $B8] { # if_1
- $B8: { # true
- ret
- }
- }
- %148:void = call %doIgnore
- %149:u32 = load %triangleIndex
- %150:u32 = mul 3u, %149
- %151:u32 = add %150, 0u
- %152:ptr<storage, u32, read_write> = access %indices, 0u, %151
- %153:u32 = load %152
- %i0:ptr<function, u32, read_write> = var, %153
- %155:u32 = load %triangleIndex
- %156:u32 = mul 3u, %155
- %157:u32 = add %156, 1u
- %158:ptr<storage, u32, read_write> = access %indices, 0u, %157
- %159:u32 = load %158
- %i1:ptr<function, u32, read_write> = var, %159
- %161:u32 = load %triangleIndex
- %162:u32 = mul 3u, %161
- %163:u32 = add %162, 2u
- %164:ptr<storage, u32, read_write> = access %indices, 0u, %163
- %165:u32 = load %164
- %i2:ptr<function, u32, read_write> = var, %165
- %167:u32 = load %i0
- %168:vec3<f32> = call %loadPosition, %167
- %p0:ptr<function, vec3<f32>, read_write> = var, %168
- %170:u32 = load %i1
- %171:vec3<f32> = call %loadPosition, %170
- %p1:ptr<function, vec3<f32>, read_write> = var, %171
- %173:u32 = load %i2
- %174:vec3<f32> = call %loadPosition, %173
- %p2:ptr<function, vec3<f32>, read_write> = var, %174
- %176:vec3<f32> = load %p0
- %177:vec3<f32> = load %p1
- %178:vec3<f32> = add %176, %177
- %179:vec3<f32> = load %p2
- %180:vec3<f32> = add %178, %179
- %181:vec3<f32> = div %180, 3.0f
- %center:ptr<function, vec3<f32>, read_write> = var, %181
- %183:vec3<f32> = load %center
- %184:vec3<f32> = call %toVoxelPos, %183
- %voxelPos_1:ptr<function, vec3<f32>, read_write> = var, %184 # %voxelPos_1: 'voxelPos'
- %186:ptr<uniform, u32, read> = access %uniforms, 1u
- %187:u32 = load %186
- %188:vec3<f32> = load %voxelPos_1
- %189:u32 = call %toIndex1D, %187, %188
- %voxelIndex:ptr<function, u32, read_write> = var, %189
- %191:u32 = load %voxelIndex
- %192:ptr<storage, atomic<u32>, read_write> = access %counters, 0u, %191
- %193:u32 = atomicAdd %192, 1u
- %acefg:ptr<function, u32, read_write> = var, %193
- %195:u32 = load %triangleIndex
- %196:bool = eq %195, 0u
- if %196 [t: $B9] { # if_2
- $B9: { # true
- %197:ptr<storage, u32, read_write> = access %dbg, 4u
- %198:ptr<uniform, u32, read> = access %uniforms, 1u
- %199:u32 = load %198
- store %197, %199
- %200:ptr<storage, f32, read_write> = access %dbg, 8u
- %201:f32 = load_vector_element %center, 0u
- store %200, %201
- %202:ptr<storage, f32, read_write> = access %dbg, 9u
- %203:f32 = load_vector_element %center, 1u
- store %202, %203
- %204:ptr<storage, f32, read_write> = access %dbg, 10u
- %205:f32 = load_vector_element %center, 2u
- store %204, %205
- exit_if # if_2
- }
- }
- ret
- }
+kernel void main_create_lut(uint3 GlobalInvocationID [[thread_position_in_grid]], const constant Uniforms* uniforms [[buffer(0)]], device U32s* indices [[buffer(3)]], device F32s* positions [[buffer(4)]], device AU32s* counters [[buffer(2)]], device AI32s* LUT [[buffer(5)]], device Dbg* dbg [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms, .indices=indices, .positions=positions, .counters=counters, .LUT=LUT, .dbg=dbg};
+ main_create_lut_inner(GlobalInvocationID, tint_module_vars);
}
-%main_create_lut = @compute @workgroup_size(128, 1, 1) func(%GlobalInvocationID_1:vec3<u32> [@global_invocation_id]):void { # %GlobalInvocationID_1: 'GlobalInvocationID'
- $B10: {
- %208:u32 = access %GlobalInvocationID_1, 0u
- %voxelIndex_1:ptr<function, u32, read_write> = var, %208 # %voxelIndex_1: 'voxelIndex'
- %210:void = call %doIgnore
- %211:ptr<uniform, u32, read> = access %uniforms, 1u
- %212:u32 = load %211
- %213:ptr<uniform, u32, read> = access %uniforms, 1u
- %214:u32 = load %213
- %215:u32 = mul %212, %214
- %216:ptr<uniform, u32, read> = access %uniforms, 1u
- %217:u32 = load %216
- %218:u32 = mul %215, %217
- %maxVoxels:ptr<function, u32, read_write> = var, %218
- %220:u32 = load %voxelIndex_1
- %221:u32 = load %maxVoxels
- %222:bool = gte %220, %221
- if %222 [t: $B11] { # if_3
- $B11: { # true
- ret
- }
- }
- %223:u32 = load %voxelIndex_1
- %224:ptr<storage, atomic<u32>, read_write> = access %counters, 0u, %223
- %225:u32 = atomicLoad %224
- %numTriangles:ptr<function, u32, read_write> = var, %225
- %offset:ptr<function, i32, read_write> = var, -1i
- %228:u32 = load %numTriangles
- %229:bool = gt %228, 0u
- if %229 [t: $B12] { # if_4
- $B12: { # true
- %230:ptr<storage, atomic<u32>, read_write> = access %dbg, 0u
- %231:u32 = load %numTriangles
- %232:u32 = atomicAdd %230, %231
- %233:i32 = convert %232
- store %offset, %233
- exit_if # if_4
- }
- }
- %234:u32 = load %voxelIndex_1
- %235:ptr<storage, atomic<i32>, read_write> = access %LUT, 0u, %234
- %236:i32 = load %offset
- %237:void = atomicStore %235, %236
- ret
- }
+kernel void main_sort_triangles(uint3 GlobalInvocationID [[thread_position_in_grid]], const constant Uniforms* uniforms [[buffer(0)]], device U32s* indices [[buffer(3)]], device F32s* positions [[buffer(4)]], device AU32s* counters [[buffer(2)]], device AI32s* LUT [[buffer(5)]], device Dbg* dbg [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms, .indices=indices, .positions=positions, .counters=counters, .LUT=LUT, .dbg=dbg};
+ main_sort_triangles_inner(GlobalInvocationID, tint_module_vars);
}
-%main_sort_triangles = @compute @workgroup_size(128, 1, 1) func(%GlobalInvocationID_2:vec3<u32> [@global_invocation_id]):void { # %GlobalInvocationID_2: 'GlobalInvocationID'
- $B13: {
- %240:u32 = access %GlobalInvocationID_2, 0u
- %triangleIndex_1:ptr<function, u32, read_write> = var, %240 # %triangleIndex_1: 'triangleIndex'
- %242:void = call %doIgnore
- %243:u32 = load %triangleIndex_1
- %244:ptr<uniform, u32, read> = access %uniforms, 0u
- %245:u32 = load %244
- %246:bool = gte %243, %245
- if %246 [t: $B14] { # if_5
- $B14: { # true
- ret
- }
- }
- %247:u32 = load %triangleIndex_1
- %248:u32 = mul 3u, %247
- %249:u32 = add %248, 0u
- %250:ptr<storage, u32, read_write> = access %indices, 0u, %249
- %251:u32 = load %250
- %i0_1:ptr<function, u32, read_write> = var, %251 # %i0_1: 'i0'
- %253:u32 = load %triangleIndex_1
- %254:u32 = mul 3u, %253
- %255:u32 = add %254, 1u
- %256:ptr<storage, u32, read_write> = access %indices, 0u, %255
- %257:u32 = load %256
- %i1_1:ptr<function, u32, read_write> = var, %257 # %i1_1: 'i1'
- %259:u32 = load %triangleIndex_1
- %260:u32 = mul 3u, %259
- %261:u32 = add %260, 2u
- %262:ptr<storage, u32, read_write> = access %indices, 0u, %261
- %263:u32 = load %262
- %i2_1:ptr<function, u32, read_write> = var, %263 # %i2_1: 'i2'
- %265:u32 = load %i0_1
- %266:vec3<f32> = call %loadPosition, %265
- %p0_1:ptr<function, vec3<f32>, read_write> = var, %266 # %p0_1: 'p0'
- %268:u32 = load %i1_1
- %269:vec3<f32> = call %loadPosition, %268
- %p1_1:ptr<function, vec3<f32>, read_write> = var, %269 # %p1_1: 'p1'
- %271:u32 = load %i2_1
- %272:vec3<f32> = call %loadPosition, %271
- %p2_1:ptr<function, vec3<f32>, read_write> = var, %272 # %p2_1: 'p2'
- %274:vec3<f32> = load %p0_1
- %275:vec3<f32> = load %p1_1
- %276:vec3<f32> = add %274, %275
- %277:vec3<f32> = load %p2_1
- %278:vec3<f32> = add %276, %277
- %279:vec3<f32> = div %278, 3.0f
- %center_1:ptr<function, vec3<f32>, read_write> = var, %279 # %center_1: 'center'
- %281:vec3<f32> = load %center_1
- %282:vec3<f32> = call %toVoxelPos, %281
- %voxelPos_2:ptr<function, vec3<f32>, read_write> = var, %282 # %voxelPos_2: 'voxelPos'
- %284:ptr<uniform, u32, read> = access %uniforms, 1u
- %285:u32 = load %284
- %286:vec3<f32> = load %voxelPos_2
- %287:u32 = call %toIndex1D, %285, %286
- %voxelIndex_2:ptr<function, u32, read_write> = var, %287 # %voxelIndex_2: 'voxelIndex'
- %289:u32 = load %voxelIndex_2
- %290:ptr<storage, atomic<i32>, read_write> = access %LUT, 0u, %289
- %291:i32 = atomicAdd %290, 1i
- %triangleOffset:ptr<function, i32, read_write> = var, %291
- ret
- }
-}
-%tint_div_u32 = func(%lhs:u32, %rhs:u32):u32 {
- $B15: {
- %295:bool = eq %rhs, 0u
- %296:u32 = select %rhs, 1u, %295
- %297:u32 = div %lhs, %296
- ret %297
- }
-}
-%tint_mod_u32 = func(%lhs_1:u32, %rhs_1:u32):u32 { # %lhs_1: 'lhs', %rhs_1: 'rhs'
- $B16: {
- %300:bool = eq %rhs_1, 0u
- %301:u32 = select %rhs_1, 1u, %300
- %302:u32 = let %301
- %303:u32 = div %lhs_1, %302
- %304:u32 = mul %303, %302
- %305:u32 = sub %lhs_1, %304
- ret %305
- }
-}
-%tint_v3f32_to_v3u32 = func(%value:vec3<f32>):vec3<u32> {
- $B17: {
- %307:vec3<u32> = convert %value
- %308:vec3<bool> = gte %value, vec3<f32>(0.0f)
- %309:vec3<u32> = select vec3<u32>(0u), %307, %308
- %310:vec3<bool> = lte %value, vec3<f32>(4294967040.0f)
- %311:vec3<u32> = select vec3<u32>(4294967295u), %309, %310
- ret %311
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/bug/tint/1385.wgsl.expected.ir.msl b/test/tint/bug/tint/1385.wgsl.expected.ir.msl
index 3748831..2136b27 100644
--- a/test/tint/bug/tint/1385.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1385.wgsl.expected.ir.msl
@@ -19,7 +19,7 @@
int foo(tint_module_vars_struct tint_module_vars) {
return (*tint_module_vars.data)[0];
}
-kernel void tint_symbol(const device tint_array<int, 1>* data [[buffer(1)]]) {
+kernel void tint_symbol(const device tint_array<int, 1>* data [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.data=data};
foo(tint_module_vars);
}
diff --git a/test/tint/bug/tint/1538.wgsl.expected.ir.msl b/test/tint/bug/tint/1538.wgsl.expected.ir.msl
index f5690bc..a12a76e 100644
--- a/test/tint/bug/tint/1538.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1538.wgsl.expected.ir.msl
@@ -29,7 +29,7 @@
int const o = g();
return 0;
}
-kernel void tint_symbol(device tint_array<uint, 1>* buf [[buffer(1)]]) {
+kernel void tint_symbol(device tint_array<uint, 1>* buf [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.buf=buf};
{
while(true) {
diff --git a/test/tint/bug/tint/1735.wgsl.expected.ir.msl b/test/tint/bug/tint/1735.wgsl.expected.ir.msl
index 96c171e..2850a92 100644
--- a/test/tint/bug/tint/1735.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1735.wgsl.expected.ir.msl
@@ -8,7 +8,7 @@
device S* out;
};
-kernel void tint_symbol(const device S* in [[buffer(0)]], device S* out [[buffer(1)]]) {
+kernel void tint_symbol(const device S* in [[buffer(1)]], device S* out [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out};
(*tint_module_vars.out) = (*tint_module_vars.in);
}
diff --git a/test/tint/bug/tint/1875.wgsl.expected.ir.msl b/test/tint/bug/tint/1875.wgsl.expected.ir.msl
index 4dd0806..d4af831 100644
--- a/test/tint/bug/tint/1875.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1875.wgsl.expected.ir.msl
@@ -24,7 +24,7 @@
(*tint_module_vars.outputs).data[(*tint_module_vars.count)] = value;
(*tint_module_vars.count) = ((*tint_module_vars.count) + 1u);
}
-kernel void tint_symbol(device Outputs* outputs [[buffer(1)]]) {
+kernel void tint_symbol(device Outputs* outputs [[buffer(0)]]) {
thread uint count = 0u;
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.count=(&count), .outputs=outputs};
uint a = 0u;
diff --git a/test/tint/bug/tint/1926.wgsl.expected.ir.msl b/test/tint/bug/tint/1926.wgsl.expected.ir.msl
index d35a412..62fd8c6 100644
--- a/test/tint/bug/tint/1926.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1926.wgsl.expected.ir.msl
@@ -21,7 +21,7 @@
(*tint_module_vars.output) = failed;
}
}
-kernel void tint_symbol(uint3 global_id [[thread_position_in_grid]], uint3 local_id [[thread_position_in_threadgroup]], uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_1 [[threadgroup(0)]], device uint* output [[buffer(4)]]) {
+kernel void tint_symbol(uint3 global_id [[thread_position_in_grid]], uint3 local_id [[thread_position_in_threadgroup]], uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_1 [[threadgroup(0)]], device uint* output [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sh_atomic_failed=(&(*v_1).tint_symbol_1), .output=output};
tint_symbol_inner(global_id, local_id, tint_local_index, tint_module_vars);
}
diff --git a/test/tint/bug/tint/2010.spvasm.expected.ir.msl b/test/tint/bug/tint/2010.spvasm.expected.ir.msl
index ffc59d5..e496ead 100644
--- a/test/tint/bug/tint/2010.spvasm.expected.ir.msl
+++ b/test/tint/bug/tint/2010.spvasm.expected.ir.msl
@@ -161,7 +161,7 @@
(*tint_module_vars.x_3) = x_3_param;
main_1(tint_module_vars);
}
-kernel void tint_symbol(uint3 x_3_param [[thread_position_in_threadgroup]], uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_6* v_5 [[threadgroup(0)]], const constant S_2* x_6 [[buffer(1)]], const device S_3* x_9 [[buffer(2)]], device S_4* x_12 [[buffer(3)]]) {
+kernel void tint_symbol(uint3 x_3_param [[thread_position_in_threadgroup]], uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_6* v_5 [[threadgroup(0)]], const constant S_2* x_6 [[buffer(0)]], const device S_3* x_9 [[buffer(2)]], device S_4* x_12 [[buffer(1)]]) {
thread uint3 x_3 = 0u;
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.x_28=(&(*v_5).tint_symbol_1), .x_34=(&(*v_5).tint_symbol_2), .x_35=(&(*v_5).tint_symbol_3), .x_36=(&(*v_5).tint_symbol_4), .x_37=(&(*v_5).tint_symbol_5), .x_3=(&x_3), .x_6=x_6, .x_9=x_9, .x_12=x_12};
tint_symbol_inner(x_3_param, tint_local_index, tint_module_vars);
diff --git a/test/tint/bug/tint/403.wgsl.expected.ir.msl b/test/tint/bug/tint/403.wgsl.expected.ir.msl
index 9d5da16..f06aeee 100644
--- a/test/tint/bug/tint/403.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/403.wgsl.expected.ir.msl
@@ -1,52 +1,42 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct vertexUniformBuffer1 {
+ float2x2 transform1;
+};
+struct vertexUniformBuffer2 {
+ float2x2 transform2;
+};
+struct tint_module_vars_struct {
+ const constant vertexUniformBuffer1* x_20;
+ const constant vertexUniformBuffer2* x_26;
+};
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: vertexUniformBuffer1 = struct @align(8) {
- transform1:mat2x2<f32> @offset(0)
+struct tint_symbol_outputs {
+ float4 tint_symbol_1 [[position]];
+};
+
+float4 tint_symbol_inner(uint gl_VertexIndex, tint_module_vars_struct tint_module_vars) {
+ tint_array<float2, 3> indexable = {};
+ float2x2 const x_23 = (*tint_module_vars.x_20).transform1;
+ float2x2 const x_28 = (*tint_module_vars.x_26).transform2;
+ uint const x_46 = gl_VertexIndex;
+ indexable = tint_array<float2, 3>{float2(-1.0f, 1.0f), float2(1.0f), float2(-1.0f)};
+ float2 const x_51 = indexable[x_46];
+ float2 const x_52 = (float2x2((x_23[0u] + x_28[0u]), (x_23[1u] + x_28[1u])) * x_51);
+ return float4(x_52[0u], x_52[1u], 0.0f, 1.0f);
}
-
-vertexUniformBuffer2 = struct @align(8) {
- transform2:mat2x2<f32> @offset(0)
+vertex tint_symbol_outputs tint_symbol(uint gl_VertexIndex [[vertex_id]], const constant vertexUniformBuffer1* x_20 [[buffer(0)]], const constant vertexUniformBuffer2* x_26 [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.x_20=x_20, .x_26=x_26};
+ return tint_symbol_outputs{.tint_symbol_1=tint_symbol_inner(gl_VertexIndex, tint_module_vars)};
}
-
-$B1: { # root
- %x_20:ptr<uniform, vertexUniformBuffer1, read> = var @binding_point(0, 0)
- %x_26:ptr<uniform, vertexUniformBuffer2, read> = var @binding_point(1, 0)
-}
-
-%tint_symbol = @vertex func(%gl_VertexIndex:u32 [@vertex_index]):vec4<f32> [@position] {
- $B2: {
- %indexable:ptr<function, array<vec2<f32>, 3>, read_write> = var
- %6:ptr<uniform, mat2x2<f32>, read> = access %x_20, 0u
- %7:mat2x2<f32> = load %6
- %x_23:mat2x2<f32> = let %7
- %9:ptr<uniform, mat2x2<f32>, read> = access %x_26, 0u
- %10:mat2x2<f32> = load %9
- %x_28:mat2x2<f32> = let %10
- %x_46:u32 = let %gl_VertexIndex
- store %indexable, array<vec2<f32>, 3>(vec2<f32>(-1.0f, 1.0f), vec2<f32>(1.0f), vec2<f32>(-1.0f))
- %13:ptr<function, vec2<f32>, read_write> = access %indexable, %x_46
- %14:vec2<f32> = load %13
- %x_51:vec2<f32> = let %14
- %16:vec2<f32> = access %x_23, 0u
- %17:vec2<f32> = access %x_28, 0u
- %18:vec2<f32> = add %16, %17
- %19:vec2<f32> = access %x_23, 1u
- %20:vec2<f32> = access %x_28, 1u
- %21:vec2<f32> = add %19, %20
- %22:mat2x2<f32> = construct %18, %21
- %23:vec2<f32> = mul %22, %x_51
- %x_52:vec2<f32> = let %23
- %25:f32 = access %x_52, 0u
- %26:f32 = access %x_52, 1u
- %27:vec4<f32> = construct %25, %26, 0.0f, 1.0f
- ret %27
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/bug/tint/744.wgsl.expected.ir.msl b/test/tint/bug/tint/744.wgsl.expected.ir.msl
index 34fbae0..e5c3b1b 100644
--- a/test/tint/bug/tint/744.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/744.wgsl.expected.ir.msl
@@ -51,7 +51,7 @@
uint const index = (resultCell[1u] + (resultCell[0u] * dimOutter));
(*tint_module_vars.resultMatrix).numbers[index] = result;
}
-kernel void tint_symbol(uint3 global_id [[thread_position_in_grid]], const device Matrix* firstMatrix [[buffer(0)]], const device Matrix* secondMatrix [[buffer(1)]], device Matrix* resultMatrix [[buffer(2)]], const constant Uniforms* uniforms [[buffer(3)]]) {
+kernel void tint_symbol(uint3 global_id [[thread_position_in_grid]], const device Matrix* firstMatrix [[buffer(2)]], const device Matrix* secondMatrix [[buffer(3)]], device Matrix* resultMatrix [[buffer(1)]], const constant Uniforms* uniforms [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.firstMatrix=firstMatrix, .secondMatrix=secondMatrix, .resultMatrix=resultMatrix, .uniforms=uniforms};
tint_symbol_inner(global_id, tint_module_vars);
}
diff --git a/test/tint/bug/tint/870.spvasm.expected.ir.msl b/test/tint/bug/tint/870.spvasm.expected.ir.msl
index 23890b1..5eeb61b 100644
--- a/test/tint/bug/tint/870.spvasm.expected.ir.msl
+++ b/test/tint/bug/tint/870.spvasm.expected.ir.msl
@@ -35,7 +35,7 @@
orientation[4] = x_23[4u];
orientation[5] = x_23[5u];
}
-fragment void tint_symbol(const device x_B4_BuildInformation* sspp962805860buildInformation [[buffer(2)]]) {
+fragment void tint_symbol(const device x_B4_BuildInformation* sspp962805860buildInformation [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sspp962805860buildInformation=sspp962805860buildInformation};
main_1(tint_module_vars);
}
diff --git a/test/tint/bug/tint/914.wgsl.expected.ir.msl b/test/tint/bug/tint/914.wgsl.expected.ir.msl
index 9d9ab28..7e222d4 100644
--- a/test/tint/bug/tint/914.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/914.wgsl.expected.ir.msl
@@ -277,7 +277,7 @@
}
}
}
-kernel void tint_symbol(uint3 local_id [[thread_position_in_threadgroup]], uint3 global_id [[thread_position_in_grid]], uint tint_local_index [[thread_index_in_threadgroup]], const device Matrix* firstMatrix [[buffer(0)]], const device Matrix* secondMatrix [[buffer(1)]], device Matrix* resultMatrix [[buffer(2)]], const constant Uniforms* uniforms [[buffer(3)]], threadgroup tint_symbol_3* v_6 [[threadgroup(0)]]) {
+kernel void tint_symbol(uint3 local_id [[thread_position_in_threadgroup]], uint3 global_id [[thread_position_in_grid]], uint tint_local_index [[thread_index_in_threadgroup]], const device Matrix* firstMatrix [[buffer(2)]], const device Matrix* secondMatrix [[buffer(3)]], device Matrix* resultMatrix [[buffer(1)]], const constant Uniforms* uniforms [[buffer(0)]], threadgroup tint_symbol_3* v_6 [[threadgroup(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.firstMatrix=firstMatrix, .secondMatrix=secondMatrix, .resultMatrix=resultMatrix, .uniforms=uniforms, .mm_Asub=(&(*v_6).tint_symbol_1), .mm_Bsub=(&(*v_6).tint_symbol_2)};
tint_symbol_inner(local_id, global_id, tint_local_index, tint_module_vars);
}
diff --git a/test/tint/bug/tint/926.wgsl.expected.ir.msl b/test/tint/bug/tint/926.wgsl.expected.ir.msl
index 73e416f..692b92b 100644
--- a/test/tint/bug/tint/926.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/926.wgsl.expected.ir.msl
@@ -11,7 +11,7 @@
void computeMain_inner(uint3 global_id, tint_module_vars_struct tint_module_vars) {
uint const firstVertex = atomic_fetch_add_explicit((&(*tint_module_vars.drawOut).vertexCount), (*tint_module_vars.cubeVerts), memory_order_relaxed);
}
-kernel void computeMain(uint3 global_id [[thread_position_in_grid]], device DrawIndirectArgs* drawOut [[buffer(5)]]) {
+kernel void computeMain(uint3 global_id [[thread_position_in_grid]], device DrawIndirectArgs* drawOut [[buffer(0)]]) {
thread uint cubeVerts = 0u;
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.drawOut=drawOut, .cubeVerts=(&cubeVerts)};
computeMain_inner(global_id, tint_module_vars);
diff --git a/test/tint/bug/tint/959.wgsl.expected.ir.msl b/test/tint/bug/tint/959.wgsl.expected.ir.msl
index 0b29009..63282d5 100644
--- a/test/tint/bug/tint/959.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/959.wgsl.expected.ir.msl
@@ -1,118 +1,59 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ float a;
+};
+struct tint_module_vars_struct {
+ const device S* b0;
+ const device S* b1;
+ const device S* b2;
+ const device S* b3;
+ const device S* b4;
+ const device S* b5;
+ const device S* b6;
+ const device S* b7;
+ const constant S* b8;
+ const constant S* b9;
+ const constant S* b10;
+ const constant S* b11;
+ const constant S* b12;
+ const constant S* b13;
+ const constant S* b14;
+ const constant S* b15;
+ texture2d<float, access::sample> t0;
+ texture2d<float, access::sample> t1;
+ texture2d<float, access::sample> t2;
+ texture2d<float, access::sample> t3;
+ texture2d<float, access::sample> t4;
+ texture2d<float, access::sample> t5;
+ texture2d<float, access::sample> t6;
+ texture2d<float, access::sample> t7;
+ depth2d<float, access::sample> t8;
+ depth2d<float, access::sample> t9;
+ depth2d<float, access::sample> t10;
+ depth2d<float, access::sample> t11;
+ depth2d<float, access::sample> t12;
+ depth2d<float, access::sample> t13;
+ depth2d<float, access::sample> t14;
+ depth2d<float, access::sample> t15;
+ sampler s0;
+ sampler s1;
+ sampler s2;
+ sampler s3;
+ sampler s4;
+ sampler s5;
+ sampler s6;
+ sampler s7;
+ sampler s8;
+ sampler s9;
+ sampler s10;
+ sampler s11;
+ sampler s12;
+ sampler s13;
+ sampler s14;
+ sampler s15;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- a:f32 @offset(0)
+fragment void tint_symbol(const device S* b0 [[buffer(8)]], const device S* b1 [[buffer(9)]], const device S* b2 [[buffer(10)]], const device S* b3 [[buffer(11)]], const device S* b4 [[buffer(12)]], const device S* b5 [[buffer(13)]], const device S* b6 [[buffer(14)]], const device S* b7 [[buffer(15)]], const constant S* b8 [[buffer(0)]], const constant S* b9 [[buffer(1)]], const constant S* b10 [[buffer(2)]], const constant S* b11 [[buffer(3)]], const constant S* b12 [[buffer(4)]], const constant S* b13 [[buffer(5)]], const constant S* b14 [[buffer(6)]], const constant S* b15 [[buffer(7)]], texture2d<float, access::sample> t0 [[texture(0)]], texture2d<float, access::sample> t1 [[texture(1)]], texture2d<float, access::sample> t2 [[texture(2)]], texture2d<float, access::sample> t3 [[texture(3)]], texture2d<float, access::sample> t4 [[texture(4)]], texture2d<float, access::sample> t5 [[texture(5)]], texture2d<float, access::sample> t6 [[texture(6)]], texture2d<float, access::sample> t7 [[texture(7)]], depth2d<float, access::sample> t8 [[texture(8)]], depth2d<float, access::sample> t9 [[texture(9)]], depth2d<float, access::sample> t10 [[texture(10)]], depth2d<float, access::sample> t11 [[texture(11)]], depth2d<float, access::sample> t12 [[texture(12)]], depth2d<float, access::sample> t13 [[texture(13)]], depth2d<float, access::sample> t14 [[texture(14)]], depth2d<float, access::sample> t15 [[texture(15)]], sampler s0 [[sampler(0)]], sampler s1 [[sampler(1)]], sampler s2 [[sampler(2)]], sampler s3 [[sampler(3)]], sampler s4 [[sampler(4)]], sampler s5 [[sampler(5)]], sampler s6 [[sampler(6)]], sampler s7 [[sampler(7)]], sampler s8 [[sampler(8)]], sampler s9 [[sampler(9)]], sampler s10 [[sampler(10)]], sampler s11 [[sampler(11)]], sampler s12 [[sampler(12)]], sampler s13 [[sampler(13)]], sampler s14 [[sampler(14)]], sampler s15 [[sampler(15)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.b0=b0, .b1=b1, .b2=b2, .b3=b3, .b4=b4, .b5=b5, .b6=b6, .b7=b7, .b8=b8, .b9=b9, .b10=b10, .b11=b11, .b12=b12, .b13=b13, .b14=b14, .b15=b15, .t0=t0, .t1=t1, .t2=t2, .t3=t3, .t4=t4, .t5=t5, .t6=t6, .t7=t7, .t8=t8, .t9=t9, .t10=t10, .t11=t11, .t12=t12, .t13=t13, .t14=t14, .t15=t15, .s0=s0, .s1=s1, .s2=s2, .s3=s3, .s4=s4, .s5=s5, .s6=s6, .s7=s7, .s8=s8, .s9=s9, .s10=s10, .s11=s11, .s12=s12, .s13=s13, .s14=s14, .s15=s15};
}
-
-$B1: { # root
- %b0:ptr<storage, S, read> = var @binding_point(0, 0)
- %b1:ptr<storage, S, read> = var @binding_point(1, 0)
- %b2:ptr<storage, S, read> = var @binding_point(2, 0)
- %b3:ptr<storage, S, read> = var @binding_point(3, 0)
- %b4:ptr<storage, S, read> = var @binding_point(4, 0)
- %b5:ptr<storage, S, read> = var @binding_point(5, 0)
- %b6:ptr<storage, S, read> = var @binding_point(6, 0)
- %b7:ptr<storage, S, read> = var @binding_point(7, 0)
- %b8:ptr<uniform, S, read> = var @binding_point(9, 1)
- %b9:ptr<uniform, S, read> = var @binding_point(8, 1)
- %b10:ptr<uniform, S, read> = var @binding_point(10, 1)
- %b11:ptr<uniform, S, read> = var @binding_point(11, 1)
- %b12:ptr<uniform, S, read> = var @binding_point(12, 1)
- %b13:ptr<uniform, S, read> = var @binding_point(13, 1)
- %b14:ptr<uniform, S, read> = var @binding_point(14, 1)
- %b15:ptr<uniform, S, read> = var @binding_point(15, 1)
- %t0:ptr<handle, texture_2d<f32>, read> = var @binding_point(0, 1)
- %t1:ptr<handle, texture_2d<f32>, read> = var @binding_point(1, 1)
- %t2:ptr<handle, texture_2d<f32>, read> = var @binding_point(2, 1)
- %t3:ptr<handle, texture_2d<f32>, read> = var @binding_point(3, 1)
- %t4:ptr<handle, texture_2d<f32>, read> = var @binding_point(4, 1)
- %t5:ptr<handle, texture_2d<f32>, read> = var @binding_point(5, 1)
- %t6:ptr<handle, texture_2d<f32>, read> = var @binding_point(6, 1)
- %t7:ptr<handle, texture_2d<f32>, read> = var @binding_point(7, 1)
- %t8:ptr<handle, texture_depth_2d, read> = var @binding_point(8, 200)
- %t9:ptr<handle, texture_depth_2d, read> = var @binding_point(9, 200)
- %t10:ptr<handle, texture_depth_2d, read> = var @binding_point(10, 200)
- %t11:ptr<handle, texture_depth_2d, read> = var @binding_point(11, 200)
- %t12:ptr<handle, texture_depth_2d, read> = var @binding_point(12, 200)
- %t13:ptr<handle, texture_depth_2d, read> = var @binding_point(13, 200)
- %t14:ptr<handle, texture_depth_2d, read> = var @binding_point(14, 200)
- %t15:ptr<handle, texture_depth_2d, read> = var @binding_point(15, 200)
- %s0:ptr<handle, sampler, read> = var @binding_point(0, 200)
- %s1:ptr<handle, sampler, read> = var @binding_point(1, 200)
- %s2:ptr<handle, sampler, read> = var @binding_point(2, 200)
- %s3:ptr<handle, sampler, read> = var @binding_point(3, 200)
- %s4:ptr<handle, sampler, read> = var @binding_point(4, 200)
- %s5:ptr<handle, sampler, read> = var @binding_point(5, 200)
- %s6:ptr<handle, sampler, read> = var @binding_point(6, 200)
- %s7:ptr<handle, sampler, read> = var @binding_point(7, 200)
- %s8:ptr<handle, sampler_comparison, read> = var @binding_point(8, 300)
- %s9:ptr<handle, sampler_comparison, read> = var @binding_point(9, 300)
- %s10:ptr<handle, sampler_comparison, read> = var @binding_point(10, 300)
- %s11:ptr<handle, sampler_comparison, read> = var @binding_point(11, 300)
- %s12:ptr<handle, sampler_comparison, read> = var @binding_point(12, 300)
- %s13:ptr<handle, sampler_comparison, read> = var @binding_point(13, 300)
- %s14:ptr<handle, sampler_comparison, read> = var @binding_point(14, 300)
- %s15:ptr<handle, sampler_comparison, read> = var @binding_point(15, 300)
-}
-
-%tint_symbol = @fragment func():void {
- $B2: {
- %50:S = load %b0
- %51:S = load %b1
- %52:S = load %b2
- %53:S = load %b3
- %54:S = load %b4
- %55:S = load %b5
- %56:S = load %b6
- %57:S = load %b7
- %58:S = load %b8
- %59:S = load %b9
- %60:S = load %b10
- %61:S = load %b11
- %62:S = load %b12
- %63:S = load %b13
- %64:S = load %b14
- %65:S = load %b15
- %66:texture_2d<f32> = load %t0
- %67:texture_2d<f32> = load %t1
- %68:texture_2d<f32> = load %t2
- %69:texture_2d<f32> = load %t3
- %70:texture_2d<f32> = load %t4
- %71:texture_2d<f32> = load %t5
- %72:texture_2d<f32> = load %t6
- %73:texture_2d<f32> = load %t7
- %74:texture_depth_2d = load %t8
- %75:texture_depth_2d = load %t9
- %76:texture_depth_2d = load %t10
- %77:texture_depth_2d = load %t11
- %78:texture_depth_2d = load %t12
- %79:texture_depth_2d = load %t13
- %80:texture_depth_2d = load %t14
- %81:texture_depth_2d = load %t15
- %82:sampler = load %s0
- %83:sampler = load %s1
- %84:sampler = load %s2
- %85:sampler = load %s3
- %86:sampler = load %s4
- %87:sampler = load %s5
- %88:sampler = load %s6
- %89:sampler = load %s7
- %90:sampler_comparison = load %s8
- %91:sampler_comparison = load %s9
- %92:sampler_comparison = load %s10
- %93:sampler_comparison = load %s11
- %94:sampler_comparison = load %s12
- %95:sampler_comparison = load %s13
- %96:sampler_comparison = load %s14
- %97:sampler_comparison = load %s15
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/bug/tint/993.wgsl.expected.ir.msl b/test/tint/bug/tint/993.wgsl.expected.ir.msl
index f304267..82c2549 100644
--- a/test/tint/bug/tint/993.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/993.wgsl.expected.ir.msl
@@ -1,48 +1,36 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Constants {
+ uint zero;
+};
+struct Result {
+ uint value;
+};
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Constants = struct @align(4) {
- zero:u32 @offset(0)
-}
+struct TestData {
+ tint_array<atomic_int, 3> data;
+};
+struct tint_module_vars_struct {
+ const constant Constants* constants;
+ device Result* result;
+ device TestData* s;
+};
-Result = struct @align(4) {
- value:u32 @offset(0)
+int runTest(tint_module_vars_struct tint_module_vars) {
+ return atomic_load_explicit((&(*tint_module_vars.s).data[(0u + uint((*tint_module_vars.constants).zero))]), memory_order_relaxed);
}
-
-TestData = struct @align(4) {
- data:array<atomic<i32>, 3> @offset(0)
+kernel void tint_symbol(const constant Constants* constants [[buffer(0)]], device Result* result [[buffer(1)]], device TestData* s [[buffer(2)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.constants=constants, .result=result, .s=s};
+ (*tint_module_vars.result).value = uint(runTest(tint_module_vars));
}
-
-$B1: { # root
- %constants:ptr<uniform, Constants, read> = var @binding_point(1, 0)
- %result:ptr<storage, Result, read_write> = var @binding_point(1, 1)
- %s:ptr<storage, TestData, read_write> = var @binding_point(0, 0)
-}
-
-%runTest = func():i32 {
- $B2: {
- %5:ptr<uniform, u32, read> = access %constants, 0u
- %6:u32 = load %5
- %7:u32 = construct %6
- %8:u32 = add 0u, %7
- %9:ptr<storage, atomic<i32>, read_write> = access %s, 0u, %8
- %10:i32 = atomicLoad %9
- ret %10
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %12:ptr<storage, u32, read_write> = access %result, 0u
- %13:i32 = call %runTest
- %14:u32 = convert %13
- store %12, %14
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.ir.msl
index 0731a6e..0a9bfe5 100644
--- a/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void abs_002533(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_002533 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_002533(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %abs_002533
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_002533(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %abs_002533
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_002533(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %abs_002533
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.ir.msl
index 437c147..03736a3 100644
--- a/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void abs_005174(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_005174 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_005174(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %abs_005174
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_005174(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %abs_005174
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_005174(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %abs_005174
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.ir.msl
index cb8d8a9..8a40309 100644
--- a/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void abs_1ce782(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_1ce782 = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_1ce782(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %abs_1ce782
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_1ce782(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %abs_1ce782
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_1ce782(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %abs_1ce782
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.ir.msl
index d119f0a..808d1f1 100644
--- a/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void abs_1e9d53(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_1e9d53 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_1e9d53(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %abs_1e9d53
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_1e9d53(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %abs_1e9d53
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_1e9d53(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %abs_1e9d53
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.ir.msl
index 352c724..f6d7c1d 100644
--- a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void abs_421ca3(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_421ca3 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_421ca3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %abs_421ca3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_421ca3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %abs_421ca3
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_421ca3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %abs_421ca3
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/abs/467cd1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/abs/467cd1.wgsl.expected.ir.msl
index 74cdbfe..122ea33 100644
--- a/test/tint/builtins/gen/literal/abs/467cd1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/abs/467cd1.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void abs_467cd1(tint_module_vars_struct tint_module_vars) {
+ uint res = 1u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_467cd1 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_467cd1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %abs_467cd1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_467cd1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %abs_467cd1
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_467cd1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %abs_467cd1
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/abs/4ad288.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/abs/4ad288.wgsl.expected.ir.msl
index ad04181..7266d2b 100644
--- a/test/tint/builtins/gen/literal/abs/4ad288.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/abs/4ad288.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void abs_4ad288(tint_module_vars_struct tint_module_vars) {
+ int res = 1;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_4ad288 = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_4ad288(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %abs_4ad288
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_4ad288(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %abs_4ad288
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_4ad288(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %abs_4ad288
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.ir.msl
index a6cfc71..ada0d3a 100644
--- a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void abs_538d29(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_538d29 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_538d29(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %abs_538d29
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_538d29(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %abs_538d29
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_538d29(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %abs_538d29
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.ir.msl
index 4816bb5..bb165b7 100644
--- a/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void abs_5ad50a(tint_module_vars_struct tint_module_vars) {
+ int3 res = int3(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_5ad50a = func():void {
- $B2: {
- %res:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_5ad50a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %abs_5ad50a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_5ad50a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %abs_5ad50a
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_5ad50a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %abs_5ad50a
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.ir.msl
index a18628f..a455d83 100644
--- a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void abs_5ae4fe(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_5ae4fe = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_5ae4fe(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %abs_5ae4fe
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_5ae4fe(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %abs_5ae4fe
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_5ae4fe(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %abs_5ae4fe
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.ir.msl
index 9b1b183..cab1b02 100644
--- a/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void abs_7326de(tint_module_vars_struct tint_module_vars) {
+ uint3 res = uint3(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_7326de = func():void {
- $B2: {
- %res:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_7326de(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %abs_7326de
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_7326de(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %abs_7326de
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_7326de(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %abs_7326de
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.ir.msl
index d4b3603..54c9749 100644
--- a/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void abs_7f28e6(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_7f28e6 = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_7f28e6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %abs_7f28e6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_7f28e6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %abs_7f28e6
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_7f28e6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %abs_7f28e6
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.ir.msl
index 327c226..dbacc46 100644
--- a/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void abs_7faa9e(tint_module_vars_struct tint_module_vars) {
+ int2 res = int2(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_7faa9e = func():void {
- $B2: {
- %res:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_7faa9e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %abs_7faa9e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_7faa9e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %abs_7faa9e
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_7faa9e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %abs_7faa9e
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.ir.msl
index 174bf05..196c092 100644
--- a/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void abs_9c80a6(tint_module_vars_struct tint_module_vars) {
+ int4 res = int4(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_9c80a6 = func():void {
- $B2: {
- %res:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_9c80a6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %abs_9c80a6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_9c80a6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %abs_9c80a6
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_9c80a6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %abs_9c80a6
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/abs/b96037.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/abs/b96037.wgsl.expected.ir.msl
index 7d603d9..2225d53 100644
--- a/test/tint/builtins/gen/literal/abs/b96037.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/abs/b96037.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void abs_b96037(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_b96037 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_b96037(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %abs_b96037
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_b96037(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %abs_b96037
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_b96037(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %abs_b96037
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.ir.msl
index d53f0ff..473bcdf 100644
--- a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void abs_fd247f(tint_module_vars_struct tint_module_vars) {
+ half res = 1.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_fd247f = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_fd247f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %abs_fd247f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_fd247f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %abs_fd247f
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_fd247f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %abs_fd247f
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.ir.msl
index 06b25fd..7cc531f 100644
--- a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void acos_004aff(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(0.25048828125h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acos_004aff = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.25048828125h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acos_004aff(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %acos_004aff
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_004aff(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %acos_004aff
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_004aff(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %acos_004aff
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.ir.msl
index b742690..0c53774 100644
--- a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void acos_203628(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(0.25048828125h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acos_203628 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.25048828125h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acos_203628(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %acos_203628
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_203628(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %acos_203628
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_203628(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %acos_203628
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.ir.msl
index 8e6bdd4..88f1a52 100644
--- a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void acos_303e3d(tint_module_vars_struct tint_module_vars) {
+ half res = 0.25048828125h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acos_303e3d = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.25048828125h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acos_303e3d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %acos_303e3d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_303e3d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %acos_303e3d
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_303e3d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %acos_303e3d
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/acos/489247.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/acos/489247.wgsl.expected.ir.msl
index 136a7bb..8a41d81 100644
--- a/test/tint/builtins/gen/literal/acos/489247.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/acos/489247.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void acos_489247(tint_module_vars_struct tint_module_vars) {
+ float res = 0.25f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acos_489247 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.25f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acos_489247(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %acos_489247
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_489247(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %acos_489247
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_489247(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %acos_489247
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.ir.msl
index c302051..739e7ce 100644
--- a/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void acos_8e2acf(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(0.25f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acos_8e2acf = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.25f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acos_8e2acf(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %acos_8e2acf
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_8e2acf(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %acos_8e2acf
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_8e2acf(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %acos_8e2acf
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.ir.msl
index a5c39dc..33dad9e 100644
--- a/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void acos_a610c4(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(0.25f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acos_a610c4 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.25f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acos_a610c4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %acos_a610c4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_a610c4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %acos_a610c4
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_a610c4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %acos_a610c4
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.ir.msl
index 73ad491..5757e94 100644
--- a/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void acos_dfc915(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(0.25f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acos_dfc915 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.25f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acos_dfc915(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %acos_dfc915
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_dfc915(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %acos_dfc915
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_dfc915(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %acos_dfc915
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.ir.msl
index a52f337..3913acb 100644
--- a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void acos_f47057(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(0.25048828125h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acos_f47057 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.25048828125h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acos_f47057(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %acos_f47057
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_f47057(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %acos_f47057
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_f47057(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %acos_f47057
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.ir.msl
index 767cdf8..812fe83 100644
--- a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void acosh_5f49d8(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(0.99951171875h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acosh_5f49d8 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.99951171875h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acosh_5f49d8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %acosh_5f49d8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_5f49d8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %acosh_5f49d8
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_5f49d8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %acosh_5f49d8
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.ir.msl
index ae0ced3..5592c11 100644
--- a/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void acosh_640883(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acosh_640883 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acosh_640883(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %acosh_640883
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_640883(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %acosh_640883
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_640883(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %acosh_640883
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.ir.msl
index f1865f3..1d47f83 100644
--- a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void acosh_a37dfe(tint_module_vars_struct tint_module_vars) {
+ half res = 0.99951171875h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acosh_a37dfe = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.99951171875h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acosh_a37dfe(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %acosh_a37dfe
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_a37dfe(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %acosh_a37dfe
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_a37dfe(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %acosh_a37dfe
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.ir.msl
index e729a16..1c5816b 100644
--- a/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void acosh_d51ccb(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acosh_d51ccb = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acosh_d51ccb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %acosh_d51ccb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_d51ccb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %acosh_d51ccb
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_d51ccb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %acosh_d51ccb
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.ir.msl
index 79e04ce2..b2d3e51 100644
--- a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void acosh_de60d8(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(0.99951171875h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acosh_de60d8 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.99951171875h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acosh_de60d8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %acosh_de60d8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_de60d8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %acosh_de60d8
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_de60d8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %acosh_de60d8
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.ir.msl
index ae5884e..aa18e55 100644
--- a/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void acosh_e38f5c(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acosh_e38f5c = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acosh_e38f5c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %acosh_e38f5c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_e38f5c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %acosh_e38f5c
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_e38f5c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %acosh_e38f5c
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/acosh/ecf2d1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/acosh/ecf2d1.wgsl.expected.ir.msl
index fb27f29..2b6c1fe 100644
--- a/test/tint/builtins/gen/literal/acosh/ecf2d1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/acosh/ecf2d1.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void acosh_ecf2d1(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acosh_ecf2d1 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acosh_ecf2d1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %acosh_ecf2d1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_ecf2d1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %acosh_ecf2d1
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_ecf2d1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %acosh_ecf2d1
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.ir.msl
index 953cc26..f833e19 100644
--- a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void acosh_f56574(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(0.99951171875h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acosh_f56574 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.99951171875h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acosh_f56574(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %acosh_f56574
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_f56574(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %acosh_f56574
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_f56574(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %acosh_f56574
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.ir.msl
index 96f3514..2115582 100644
--- a/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.ir.msl
@@ -1,43 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void all_353d6a(tint_module_vars_struct tint_module_vars) {
+ bool res = true;
+ (*tint_module_vars.prevent_dce) = select(0, 1, all(!(res)));
}
-
-%all_353d6a = func():void {
- $B2: {
- %res:ptr<function, bool, read_write> = var, true
- %4:bool = load %res
- %5:bool = eq %4, false
- %6:bool = all %5
- %7:i32 = select 0i, 1i, %6
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ all_353d6a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %all_353d6a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ all_353d6a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %all_353d6a
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ all_353d6a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %all_353d6a
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.ir.msl
index 6b51625..8f1429f 100644
--- a/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.ir.msl
@@ -1,43 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void all_986c7b(tint_module_vars_struct tint_module_vars) {
+ bool res = true;
+ (*tint_module_vars.prevent_dce) = select(0, 1, all(!(res)));
}
-
-%all_986c7b = func():void {
- $B2: {
- %res:ptr<function, bool, read_write> = var, true
- %4:bool = load %res
- %5:bool = eq %4, false
- %6:bool = all %5
- %7:i32 = select 0i, 1i, %6
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ all_986c7b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %all_986c7b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ all_986c7b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %all_986c7b
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ all_986c7b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %all_986c7b
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.ir.msl
index 6ab4c60..c409cab 100644
--- a/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.ir.msl
@@ -1,43 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void all_bd2dba(tint_module_vars_struct tint_module_vars) {
+ bool res = true;
+ (*tint_module_vars.prevent_dce) = select(0, 1, all(!(res)));
}
-
-%all_bd2dba = func():void {
- $B2: {
- %res:ptr<function, bool, read_write> = var, true
- %4:bool = load %res
- %5:bool = eq %4, false
- %6:bool = all %5
- %7:i32 = select 0i, 1i, %6
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ all_bd2dba(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %all_bd2dba
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ all_bd2dba(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %all_bd2dba
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ all_bd2dba(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %all_bd2dba
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.ir.msl
index 780c535..0b9af7d 100644
--- a/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.ir.msl
@@ -1,43 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void all_f46790(tint_module_vars_struct tint_module_vars) {
+ bool res = true;
+ (*tint_module_vars.prevent_dce) = select(0, 1, all(!(res)));
}
-
-%all_f46790 = func():void {
- $B2: {
- %res:ptr<function, bool, read_write> = var, true
- %4:bool = load %res
- %5:bool = eq %4, false
- %6:bool = all %5
- %7:i32 = select 0i, 1i, %6
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ all_f46790(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %all_f46790
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ all_f46790(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %all_f46790
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ all_f46790(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %all_f46790
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/any/083428.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/any/083428.wgsl.expected.ir.msl
index 098ce1c..323aff1 100644
--- a/test/tint/builtins/gen/literal/any/083428.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/any/083428.wgsl.expected.ir.msl
@@ -1,43 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void any_083428(tint_module_vars_struct tint_module_vars) {
+ bool res = true;
+ (*tint_module_vars.prevent_dce) = select(0, 1, all(!(res)));
}
-
-%any_083428 = func():void {
- $B2: {
- %res:ptr<function, bool, read_write> = var, true
- %4:bool = load %res
- %5:bool = eq %4, false
- %6:bool = all %5
- %7:i32 = select 0i, 1i, %6
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ any_083428(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %any_083428
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ any_083428(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %any_083428
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ any_083428(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %any_083428
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.ir.msl
index 932fcf4..7d24654 100644
--- a/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.ir.msl
@@ -1,43 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void any_0e3e58(tint_module_vars_struct tint_module_vars) {
+ bool res = true;
+ (*tint_module_vars.prevent_dce) = select(0, 1, all(!(res)));
}
-
-%any_0e3e58 = func():void {
- $B2: {
- %res:ptr<function, bool, read_write> = var, true
- %4:bool = load %res
- %5:bool = eq %4, false
- %6:bool = all %5
- %7:i32 = select 0i, 1i, %6
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ any_0e3e58(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %any_0e3e58
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ any_0e3e58(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %any_0e3e58
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ any_0e3e58(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %any_0e3e58
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.ir.msl
index 2149cc4..50fca5d 100644
--- a/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.ir.msl
@@ -1,43 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void any_2ab91a(tint_module_vars_struct tint_module_vars) {
+ bool res = true;
+ (*tint_module_vars.prevent_dce) = select(0, 1, all(!(res)));
}
-
-%any_2ab91a = func():void {
- $B2: {
- %res:ptr<function, bool, read_write> = var, true
- %4:bool = load %res
- %5:bool = eq %4, false
- %6:bool = all %5
- %7:i32 = select 0i, 1i, %6
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ any_2ab91a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %any_2ab91a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ any_2ab91a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %any_2ab91a
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ any_2ab91a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %any_2ab91a
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.ir.msl
index d585dd8..91d5080 100644
--- a/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.ir.msl
@@ -1,43 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void any_e755c1(tint_module_vars_struct tint_module_vars) {
+ bool res = true;
+ (*tint_module_vars.prevent_dce) = select(0, 1, all(!(res)));
}
-
-%any_e755c1 = func():void {
- $B2: {
- %res:ptr<function, bool, read_write> = var, true
- %4:bool = load %res
- %5:bool = eq %4, false
- %6:bool = all %5
- %7:i32 = select 0i, 1i, %6
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ any_e755c1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %any_e755c1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ any_e755c1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %any_e755c1
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ any_e755c1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %any_e755c1
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/arrayLength/1588cd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/arrayLength/1588cd.wgsl.expected.ir.msl
index 6a20a8a..7d67192 100644
--- a/test/tint/builtins/gen/literal/arrayLength/1588cd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/1588cd.wgsl.expected.ir.msl
@@ -1,47 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RO = struct @align(4) {
- arg_0:array<i32> @offset(0)
-}
+struct SB_RO {
+ tint_array<int, 1> arg_0;
+};
+struct tint_module_vars_struct {
+ const device SB_RO* sb_ro;
+ device uint* prevent_dce;
+ const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-$B1: { # root
- %sb_ro:ptr<storage, SB_RO, read> = var @binding_point(0, 1)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void arrayLength_1588cd(tint_module_vars_struct tint_module_vars) {
+ uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 4u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%arrayLength_1588cd = func():void {
- $B2: {
- %4:ptr<storage, array<i32>, read> = access %sb_ro, 0u
- %5:u32 = arrayLength %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ arrayLength_1588cd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %arrayLength_1588cd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_1588cd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %arrayLength_1588cd
- ret
- }
+kernel void compute_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_1588cd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %arrayLength_1588cd
- ret
- }
+vertex vertex_main_outputs vertex_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/arrayLength/61b1c7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/arrayLength/61b1c7.wgsl.expected.ir.msl
index 7f449f6..d569950 100644
--- a/test/tint/builtins/gen/literal/arrayLength/61b1c7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/61b1c7.wgsl.expected.ir.msl
@@ -1,47 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:array<i32> @offset(0)
-}
+struct SB_RW {
+ tint_array<int, 1> arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+ const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void arrayLength_61b1c7(tint_module_vars_struct tint_module_vars) {
+ uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 4u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%arrayLength_61b1c7 = func():void {
- $B2: {
- %4:ptr<storage, array<i32>, read_write> = access %sb_rw, 0u
- %5:u32 = arrayLength %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ arrayLength_61b1c7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %arrayLength_61b1c7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_61b1c7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %arrayLength_61b1c7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_61b1c7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %arrayLength_61b1c7
- ret
- }
+vertex vertex_main_outputs vertex_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.ir.msl
index f062c57..e6afb58 100644
--- a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.ir.msl
@@ -1,47 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RO = struct @align(2) {
- arg_0:array<f16> @offset(0)
-}
+struct SB_RO {
+ tint_array<half, 1> arg_0;
+};
+struct tint_module_vars_struct {
+ const device SB_RO* sb_ro;
+ device uint* prevent_dce;
+ const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-$B1: { # root
- %sb_ro:ptr<storage, SB_RO, read> = var @binding_point(0, 1)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void arrayLength_8421b9(tint_module_vars_struct tint_module_vars) {
+ uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 2u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%arrayLength_8421b9 = func():void {
- $B2: {
- %4:ptr<storage, array<f16>, read> = access %sb_ro, 0u
- %5:u32 = arrayLength %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ arrayLength_8421b9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %arrayLength_8421b9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_8421b9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %arrayLength_8421b9
- ret
- }
+kernel void compute_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_8421b9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %arrayLength_8421b9
- ret
- }
+vertex vertex_main_outputs vertex_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/arrayLength/a0f5ca.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/arrayLength/a0f5ca.wgsl.expected.ir.msl
index a48951d..204ba53 100644
--- a/test/tint/builtins/gen/literal/arrayLength/a0f5ca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/a0f5ca.wgsl.expected.ir.msl
@@ -1,47 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RO = struct @align(4) {
- arg_0:array<f32> @offset(0)
-}
+struct SB_RO {
+ tint_array<float, 1> arg_0;
+};
+struct tint_module_vars_struct {
+ const device SB_RO* sb_ro;
+ device uint* prevent_dce;
+ const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-$B1: { # root
- %sb_ro:ptr<storage, SB_RO, read> = var @binding_point(0, 1)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void arrayLength_a0f5ca(tint_module_vars_struct tint_module_vars) {
+ uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 4u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%arrayLength_a0f5ca = func():void {
- $B2: {
- %4:ptr<storage, array<f32>, read> = access %sb_ro, 0u
- %5:u32 = arrayLength %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ arrayLength_a0f5ca(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %arrayLength_a0f5ca
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_a0f5ca(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %arrayLength_a0f5ca
- ret
- }
+kernel void compute_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_a0f5ca(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %arrayLength_a0f5ca
- ret
- }
+vertex vertex_main_outputs vertex_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.ir.msl
index 818bebf..b610bef 100644
--- a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.ir.msl
@@ -1,47 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(2) {
- arg_0:array<f16> @offset(0)
-}
+struct SB_RW {
+ tint_array<half, 1> arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+ const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void arrayLength_cbd6b5(tint_module_vars_struct tint_module_vars) {
+ uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 2u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%arrayLength_cbd6b5 = func():void {
- $B2: {
- %4:ptr<storage, array<f16>, read_write> = access %sb_rw, 0u
- %5:u32 = arrayLength %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ arrayLength_cbd6b5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %arrayLength_cbd6b5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_cbd6b5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %arrayLength_cbd6b5
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_cbd6b5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %arrayLength_cbd6b5
- ret
- }
+vertex vertex_main_outputs vertex_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/arrayLength/cdd123.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/arrayLength/cdd123.wgsl.expected.ir.msl
index bbdda44..2fa85f7 100644
--- a/test/tint/builtins/gen/literal/arrayLength/cdd123.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/cdd123.wgsl.expected.ir.msl
@@ -1,47 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:array<f32> @offset(0)
-}
+struct SB_RW {
+ tint_array<float, 1> arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+ const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void arrayLength_cdd123(tint_module_vars_struct tint_module_vars) {
+ uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 4u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%arrayLength_cdd123 = func():void {
- $B2: {
- %4:ptr<storage, array<f32>, read_write> = access %sb_rw, 0u
- %5:u32 = arrayLength %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ arrayLength_cdd123(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %arrayLength_cdd123
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_cdd123(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %arrayLength_cdd123
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_cdd123(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %arrayLength_cdd123
- ret
- }
+vertex vertex_main_outputs vertex_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/arrayLength/cfca0a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/arrayLength/cfca0a.wgsl.expected.ir.msl
index f320d12..351baa5 100644
--- a/test/tint/builtins/gen/literal/arrayLength/cfca0a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/cfca0a.wgsl.expected.ir.msl
@@ -1,47 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RO = struct @align(4) {
- arg_0:array<u32> @offset(0)
-}
+struct SB_RO {
+ tint_array<uint, 1> arg_0;
+};
+struct tint_module_vars_struct {
+ const device SB_RO* sb_ro;
+ device uint* prevent_dce;
+ const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-$B1: { # root
- %sb_ro:ptr<storage, SB_RO, read> = var @binding_point(0, 1)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void arrayLength_cfca0a(tint_module_vars_struct tint_module_vars) {
+ uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 4u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%arrayLength_cfca0a = func():void {
- $B2: {
- %4:ptr<storage, array<u32>, read> = access %sb_ro, 0u
- %5:u32 = arrayLength %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ arrayLength_cfca0a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %arrayLength_cfca0a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_cfca0a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %arrayLength_cfca0a
- ret
- }
+kernel void compute_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_cfca0a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %arrayLength_cfca0a
- ret
- }
+vertex vertex_main_outputs vertex_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/arrayLength/eb510f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/arrayLength/eb510f.wgsl.expected.ir.msl
index b07c58a..96cda01 100644
--- a/test/tint/builtins/gen/literal/arrayLength/eb510f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/eb510f.wgsl.expected.ir.msl
@@ -1,47 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:array<u32> @offset(0)
-}
+struct SB_RW {
+ tint_array<uint, 1> arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+ const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void arrayLength_eb510f(tint_module_vars_struct tint_module_vars) {
+ uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 4u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%arrayLength_eb510f = func():void {
- $B2: {
- %4:ptr<storage, array<u32>, read_write> = access %sb_rw, 0u
- %5:u32 = arrayLength %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ arrayLength_eb510f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %arrayLength_eb510f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_eb510f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %arrayLength_eb510f
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_eb510f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %arrayLength_eb510f
- ret
- }
+vertex vertex_main_outputs vertex_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.ir.msl
index 6cac7c5..4c6d8ec 100644
--- a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void asin_064953(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(0.5f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asin_064953 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.5f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asin_064953(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %asin_064953
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_064953(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %asin_064953
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_064953(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %asin_064953
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.ir.msl
index e1e9ad2..ab71209 100644
--- a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void asin_11dfda(tint_module_vars_struct tint_module_vars) {
+ half res = 0.499755859375h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asin_11dfda = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.499755859375h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asin_11dfda(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %asin_11dfda
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_11dfda(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %asin_11dfda
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_11dfda(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %asin_11dfda
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.ir.msl
index c7fd0a9..f1b09c0 100644
--- a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void asin_2d8e29(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(0.499755859375h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asin_2d8e29 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.499755859375h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asin_2d8e29(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %asin_2d8e29
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_2d8e29(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %asin_2d8e29
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_2d8e29(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %asin_2d8e29
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.ir.msl
index 3240bd1..f93fff7 100644
--- a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void asin_3cfbd4(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(0.499755859375h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asin_3cfbd4 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.499755859375h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asin_3cfbd4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %asin_3cfbd4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_3cfbd4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %asin_3cfbd4
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_3cfbd4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %asin_3cfbd4
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.ir.msl
index 3b792c6..f6b4da7 100644
--- a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void asin_7b6a44(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(0.5f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asin_7b6a44 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.5f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asin_7b6a44(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %asin_7b6a44
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_7b6a44(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %asin_7b6a44
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_7b6a44(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %asin_7b6a44
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.ir.msl
index 9451fcd..65fae2c 100644
--- a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void asin_8cd9c9(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(0.5f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asin_8cd9c9 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.5f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asin_8cd9c9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %asin_8cd9c9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_8cd9c9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %asin_8cd9c9
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_8cd9c9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %asin_8cd9c9
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.ir.msl
index 88a1eda..5ed4046 100644
--- a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void asin_b4aced(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(0.499755859375h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asin_b4aced = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.499755859375h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asin_b4aced(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %asin_b4aced
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_b4aced(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %asin_b4aced
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_b4aced(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %asin_b4aced
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.ir.msl
index 2e76028..8031e22 100644
--- a/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void asin_c0c272(tint_module_vars_struct tint_module_vars) {
+ float res = 0.5f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asin_c0c272 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.5f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asin_c0c272(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %asin_c0c272
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_c0c272(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %asin_c0c272
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_c0c272(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %asin_c0c272
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/asinh/157447.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/asinh/157447.wgsl.expected.ir.msl
index 4e55c09..89310be 100644
--- a/test/tint/builtins/gen/literal/asinh/157447.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/asinh/157447.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void asinh_157447(tint_module_vars_struct tint_module_vars) {
+ float res = 0.88137358427047729492f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asinh_157447 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.88137358427047729492f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asinh_157447(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %asinh_157447
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_157447(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %asinh_157447
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_157447(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %asinh_157447
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.ir.msl
index 9cdfce9..ae29361 100644
--- a/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void asinh_2265ee(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(0.88137358427047729492f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asinh_2265ee = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.88137358427047729492f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asinh_2265ee(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %asinh_2265ee
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_2265ee(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %asinh_2265ee
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_2265ee(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %asinh_2265ee
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.ir.msl
index d3d9eb2..defcf93 100644
--- a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void asinh_468a48(tint_module_vars_struct tint_module_vars) {
+ half res = 0.88134765625h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asinh_468a48 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.88134765625h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asinh_468a48(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %asinh_468a48
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_468a48(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %asinh_468a48
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_468a48(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %asinh_468a48
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.ir.msl
index 90087a9..bfd60bb 100644
--- a/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void asinh_4a2226(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(0.88137358427047729492f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asinh_4a2226 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.88137358427047729492f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asinh_4a2226(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %asinh_4a2226
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_4a2226(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %asinh_4a2226
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_4a2226(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %asinh_4a2226
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.ir.msl
index 2b1f246..a92709f 100644
--- a/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void asinh_8d2e51(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(0.88137358427047729492f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asinh_8d2e51 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.88137358427047729492f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asinh_8d2e51(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %asinh_8d2e51
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_8d2e51(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %asinh_8d2e51
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_8d2e51(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %asinh_8d2e51
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.ir.msl
index 8de6cef..8aac302 100644
--- a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void asinh_95ab2b(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(0.88134765625h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asinh_95ab2b = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.88134765625h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asinh_95ab2b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %asinh_95ab2b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_95ab2b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %asinh_95ab2b
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_95ab2b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %asinh_95ab2b
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.ir.msl
index d36b50a..43c14c5 100644
--- a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void asinh_ad8f8b(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(0.88134765625h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asinh_ad8f8b = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.88134765625h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asinh_ad8f8b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %asinh_ad8f8b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_ad8f8b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %asinh_ad8f8b
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_ad8f8b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %asinh_ad8f8b
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.ir.msl
index d342382..348daea 100644
--- a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void asinh_fb5e8c(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(0.88134765625h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asinh_fb5e8c = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.88134765625h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asinh_fb5e8c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %asinh_fb5e8c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_fb5e8c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %asinh_fb5e8c
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_fb5e8c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %asinh_fb5e8c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atan/02979a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atan/02979a.wgsl.expected.ir.msl
index fc16177..d43feae 100644
--- a/test/tint/builtins/gen/literal/atan/02979a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atan/02979a.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void atan_02979a(tint_module_vars_struct tint_module_vars) {
+ float res = 0.78539818525314331055f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan_02979a = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.78539818525314331055f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan_02979a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atan_02979a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_02979a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atan_02979a
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_02979a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atan_02979a
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.ir.msl
index d969133..c3f0512 100644
--- a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void atan_19faea(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(0.78515625h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan_19faea = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.78515625h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan_19faea(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atan_19faea
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_19faea(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atan_19faea
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_19faea(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atan_19faea
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.ir.msl
index 74d783a..0916966 100644
--- a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void atan_1e1764(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(0.78515625h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan_1e1764 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.78515625h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan_1e1764(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atan_1e1764
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_1e1764(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atan_1e1764
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_1e1764(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atan_1e1764
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.ir.msl
index 203fdc1..0486279 100644
--- a/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void atan_331e6d(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(0.78539818525314331055f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan_331e6d = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.78539818525314331055f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan_331e6d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atan_331e6d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_331e6d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atan_331e6d
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_331e6d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atan_331e6d
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.ir.msl
index b9bc08a..5439867 100644
--- a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void atan_a5f421(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(0.78515625h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan_a5f421 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.78515625h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan_a5f421(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atan_a5f421
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_a5f421(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atan_a5f421
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_a5f421(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atan_a5f421
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.ir.msl
index 7cc44ea..c5956dd 100644
--- a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void atan_a7ba61(tint_module_vars_struct tint_module_vars) {
+ half res = 0.78515625h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan_a7ba61 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.78515625h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan_a7ba61(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atan_a7ba61
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_a7ba61(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atan_a7ba61
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_a7ba61(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atan_a7ba61
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.ir.msl
index 649646a..d9b5c34 100644
--- a/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void atan_a8b696(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(0.78539818525314331055f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan_a8b696 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.78539818525314331055f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan_a8b696(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atan_a8b696
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_a8b696(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atan_a8b696
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_a8b696(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atan_a8b696
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.ir.msl
index fabc053..44637ec 100644
--- a/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void atan_ad96e4(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(0.78539818525314331055f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan_ad96e4 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.78539818525314331055f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan_ad96e4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atan_ad96e4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_ad96e4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atan_ad96e4
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_ad96e4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atan_ad96e4
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.ir.msl
index a1b4e14..09182e7 100644
--- a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void atan2_21dfea(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(0.78515625h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan2_21dfea = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.78515625h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan2_21dfea(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atan2_21dfea
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_21dfea(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atan2_21dfea
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_21dfea(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atan2_21dfea
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.ir.msl
index 62027e2..0386c4a 100644
--- a/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void atan2_57fb13(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(0.78539818525314331055f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan2_57fb13 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.78539818525314331055f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan2_57fb13(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atan2_57fb13
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_57fb13(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atan2_57fb13
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_57fb13(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atan2_57fb13
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.ir.msl
index f15080b..02e6dcf 100644
--- a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void atan2_93febc(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(0.78515625h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan2_93febc = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.78515625h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan2_93febc(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atan2_93febc
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_93febc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atan2_93febc
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_93febc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atan2_93febc
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atan2/96057c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atan2/96057c.wgsl.expected.ir.msl
index 0fc831d..373e252 100644
--- a/test/tint/builtins/gen/literal/atan2/96057c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atan2/96057c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void atan2_96057c(tint_module_vars_struct tint_module_vars) {
+ float res = 0.78539818525314331055f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan2_96057c = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.78539818525314331055f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan2_96057c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atan2_96057c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_96057c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atan2_96057c
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_96057c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atan2_96057c
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.ir.msl
index 6d245dd..ba6dec3 100644
--- a/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void atan2_a70d0d(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(0.78539818525314331055f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan2_a70d0d = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.78539818525314331055f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan2_a70d0d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atan2_a70d0d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_a70d0d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atan2_a70d0d
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_a70d0d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atan2_a70d0d
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.ir.msl
index bb1dae7..5c7e907 100644
--- a/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void atan2_ae713e(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(0.78539818525314331055f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan2_ae713e = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.78539818525314331055f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan2_ae713e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atan2_ae713e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_ae713e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atan2_ae713e
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_ae713e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atan2_ae713e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.ir.msl
index 8028639..525cded 100644
--- a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void atan2_ca698e(tint_module_vars_struct tint_module_vars) {
+ half res = 0.78515625h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan2_ca698e = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.78515625h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan2_ca698e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atan2_ca698e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_ca698e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atan2_ca698e
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_ca698e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atan2_ca698e
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.ir.msl
index 0c4fab0..5a8d715 100644
--- a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void atan2_d983ab(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(0.78515625h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan2_d983ab = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.78515625h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan2_d983ab(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atan2_d983ab
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_d983ab(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atan2_d983ab
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_d983ab(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atan2_d983ab
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.ir.msl
index 7467696..0393d06 100644
--- a/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void atanh_440cca(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(0.54930615425109863281f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atanh_440cca = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.54930615425109863281f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atanh_440cca(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atanh_440cca
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_440cca(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atanh_440cca
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_440cca(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atanh_440cca
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.ir.msl
index f6900e9..693f88e 100644
--- a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void atanh_5bf88d(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(0.548828125h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atanh_5bf88d = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.548828125h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atanh_5bf88d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atanh_5bf88d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_5bf88d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atanh_5bf88d
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_5bf88d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atanh_5bf88d
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atanh/7997d8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atanh/7997d8.wgsl.expected.ir.msl
index 9dd2282..f00d1b1 100644
--- a/test/tint/builtins/gen/literal/atanh/7997d8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atanh/7997d8.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void atanh_7997d8(tint_module_vars_struct tint_module_vars) {
+ float res = 0.54930615425109863281f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atanh_7997d8 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.54930615425109863281f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atanh_7997d8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atanh_7997d8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_7997d8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atanh_7997d8
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_7997d8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atanh_7997d8
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.ir.msl
index 2051e59..342d6f9 100644
--- a/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void atanh_c0e634(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(0.54930615425109863281f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atanh_c0e634 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.54930615425109863281f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atanh_c0e634(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atanh_c0e634
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_c0e634(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atanh_c0e634
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_c0e634(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atanh_c0e634
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.ir.msl
index 326cb9e..e95394f 100644
--- a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void atanh_d2d8cd(tint_module_vars_struct tint_module_vars) {
+ half res = 0.548828125h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atanh_d2d8cd = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.548828125h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atanh_d2d8cd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atanh_d2d8cd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_d2d8cd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atanh_d2d8cd
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_d2d8cd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atanh_d2d8cd
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.ir.msl
index 5f5b10b..f4a75a4 100644
--- a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void atanh_e3b450(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(0.548828125h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atanh_e3b450 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.548828125h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atanh_e3b450(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atanh_e3b450
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_e3b450(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atanh_e3b450
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_e3b450(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atanh_e3b450
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.ir.msl
index 94c5e42..99d6c94 100644
--- a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void atanh_ec4b06(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(0.548828125h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atanh_ec4b06 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.548828125h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atanh_ec4b06(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atanh_ec4b06
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_ec4b06(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atanh_ec4b06
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_ec4b06(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atanh_ec4b06
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.ir.msl
index db87360..2ce0736 100644
--- a/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void atanh_f3e01b(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(0.54930615425109863281f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atanh_f3e01b = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.54930615425109863281f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atanh_f3e01b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %atanh_f3e01b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_f3e01b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %atanh_f3e01b
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_f3e01b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %atanh_f3e01b
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicAdd/794055.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicAdd/794055.wgsl.expected.ir.msl
index 2d8ca1e..96b7560 100644
--- a/test/tint/builtins/gen/literal/atomicAdd/794055.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicAdd/794055.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<i32>, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void atomicAdd_794055(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_fetch_add_explicit(tint_module_vars.arg_0, 1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicAdd_794055 = func():void {
- $B2: {
- %4:i32 = atomicAdd %arg_0, 1i
- %res:ptr<function, i32, read_write> = var, %4
- %6:i32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicAdd_794055(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0i
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicAdd_794055
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicAdd/8a199a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicAdd/8a199a.wgsl.expected.ir.msl
index 1f492ef..1e9eb4a 100644
--- a/test/tint/builtins/gen/literal/atomicAdd/8a199a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicAdd/8a199a.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_uint arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<u32> @offset(0)
+void atomicAdd_8a199a(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_fetch_add_explicit((&(*tint_module_vars.sb_rw).arg_0), 1u, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicAdd_8a199a(tint_module_vars);
}
-
-%atomicAdd_8a199a = func():void {
- $B2: {
- %4:ptr<storage, atomic<u32>, read_write> = access %sb_rw, 0u
- %5:u32 = atomicAdd %4, 1u
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicAdd_8a199a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicAdd_8a199a
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicAdd_8a199a
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicAdd/d32fe4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicAdd/d32fe4.wgsl.expected.ir.msl
index 6e2f524..cf6a465 100644
--- a/test/tint/builtins/gen/literal/atomicAdd/d32fe4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicAdd/d32fe4.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_int arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device int* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<i32> @offset(0)
+void atomicAdd_d32fe4(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_fetch_add_explicit((&(*tint_module_vars.sb_rw).arg_0), 1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicAdd_d32fe4(tint_module_vars);
}
-
-%atomicAdd_d32fe4 = func():void {
- $B2: {
- %4:ptr<storage, atomic<i32>, read_write> = access %sb_rw, 0u
- %5:i32 = atomicAdd %4, 1i
- %res:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicAdd_d32fe4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicAdd_d32fe4
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicAdd_d32fe4
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicAdd/d5db1d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicAdd/d5db1d.wgsl.expected.ir.msl
index 9d612a8..0706c9c 100644
--- a/test/tint/builtins/gen/literal/atomicAdd/d5db1d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicAdd/d5db1d.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<u32>, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void atomicAdd_d5db1d(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_fetch_add_explicit(tint_module_vars.arg_0, 1u, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicAdd_d5db1d = func():void {
- $B2: {
- %4:u32 = atomicAdd %arg_0, 1u
- %res:ptr<function, u32, read_write> = var, %4
- %6:u32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0u, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicAdd_d5db1d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0u
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicAdd_d5db1d
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicAnd/152966.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicAnd/152966.wgsl.expected.ir.msl
index 726d92f..88fa134 100644
--- a/test/tint/builtins/gen/literal/atomicAnd/152966.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicAnd/152966.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_int arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device int* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<i32> @offset(0)
+void atomicAnd_152966(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_fetch_and_explicit((&(*tint_module_vars.sb_rw).arg_0), 1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicAnd_152966(tint_module_vars);
}
-
-%atomicAnd_152966 = func():void {
- $B2: {
- %4:ptr<storage, atomic<i32>, read_write> = access %sb_rw, 0u
- %5:i32 = atomicAnd %4, 1i
- %res:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicAnd_152966(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicAnd_152966
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicAnd_152966
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicAnd/34edd3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicAnd/34edd3.wgsl.expected.ir.msl
index 1a92f2a..c2ee90a 100644
--- a/test/tint/builtins/gen/literal/atomicAnd/34edd3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicAnd/34edd3.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<u32>, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void atomicAnd_34edd3(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_fetch_and_explicit(tint_module_vars.arg_0, 1u, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicAnd_34edd3 = func():void {
- $B2: {
- %4:u32 = atomicAnd %arg_0, 1u
- %res:ptr<function, u32, read_write> = var, %4
- %6:u32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0u, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicAnd_34edd3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0u
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicAnd_34edd3
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicAnd/45a819.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicAnd/45a819.wgsl.expected.ir.msl
index e0214cd..37ab510 100644
--- a/test/tint/builtins/gen/literal/atomicAnd/45a819.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicAnd/45a819.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<i32>, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void atomicAnd_45a819(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_fetch_and_explicit(tint_module_vars.arg_0, 1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicAnd_45a819 = func():void {
- $B2: {
- %4:i32 = atomicAnd %arg_0, 1i
- %res:ptr<function, i32, read_write> = var, %4
- %6:i32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicAnd_45a819(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0i
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicAnd_45a819
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicAnd/85a8d9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicAnd/85a8d9.wgsl.expected.ir.msl
index d5f01f1..a48102e 100644
--- a/test/tint/builtins/gen/literal/atomicAnd/85a8d9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicAnd/85a8d9.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_uint arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<u32> @offset(0)
+void atomicAnd_85a8d9(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_fetch_and_explicit((&(*tint_module_vars.sb_rw).arg_0), 1u, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicAnd_85a8d9(tint_module_vars);
}
-
-%atomicAnd_85a8d9 = func():void {
- $B2: {
- %4:ptr<storage, atomic<u32>, read_write> = access %sb_rw, 0u
- %5:u32 = atomicAnd %4, 1u
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicAnd_85a8d9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicAnd_85a8d9
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicAnd_85a8d9
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicExchange/0a5dca.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicExchange/0a5dca.wgsl.expected.ir.msl
index 44b9310..3146619 100644
--- a/test/tint/builtins/gen/literal/atomicExchange/0a5dca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicExchange/0a5dca.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<u32>, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void atomicExchange_0a5dca(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_exchange_explicit(tint_module_vars.arg_0, 1u, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicExchange_0a5dca = func():void {
- $B2: {
- %4:u32 = atomicExchange %arg_0, 1u
- %res:ptr<function, u32, read_write> = var, %4
- %6:u32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0u, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicExchange_0a5dca(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0u
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicExchange_0a5dca
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicExchange/d59712.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicExchange/d59712.wgsl.expected.ir.msl
index 2ae14ff..4f08905 100644
--- a/test/tint/builtins/gen/literal/atomicExchange/d59712.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicExchange/d59712.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_uint arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<u32> @offset(0)
+void atomicExchange_d59712(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_exchange_explicit((&(*tint_module_vars.sb_rw).arg_0), 1u, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicExchange_d59712(tint_module_vars);
}
-
-%atomicExchange_d59712 = func():void {
- $B2: {
- %4:ptr<storage, atomic<u32>, read_write> = access %sb_rw, 0u
- %5:u32 = atomicExchange %4, 1u
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicExchange_d59712(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicExchange_d59712
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicExchange_d59712
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicExchange/e114ba.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicExchange/e114ba.wgsl.expected.ir.msl
index 1c2e377..c234a47 100644
--- a/test/tint/builtins/gen/literal/atomicExchange/e114ba.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicExchange/e114ba.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<i32>, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void atomicExchange_e114ba(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_exchange_explicit(tint_module_vars.arg_0, 1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicExchange_e114ba = func():void {
- $B2: {
- %4:i32 = atomicExchange %arg_0, 1i
- %res:ptr<function, i32, read_write> = var, %4
- %6:i32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicExchange_e114ba(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0i
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicExchange_e114ba
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicExchange/f2e22f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicExchange/f2e22f.wgsl.expected.ir.msl
index be2f686..c85dbe8 100644
--- a/test/tint/builtins/gen/literal/atomicExchange/f2e22f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicExchange/f2e22f.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_int arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device int* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<i32> @offset(0)
+void atomicExchange_f2e22f(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_exchange_explicit((&(*tint_module_vars.sb_rw).arg_0), 1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicExchange_f2e22f(tint_module_vars);
}
-
-%atomicExchange_f2e22f = func():void {
- $B2: {
- %4:ptr<storage, atomic<i32>, read_write> = access %sb_rw, 0u
- %5:i32 = atomicExchange %4, 1i
- %res:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicExchange_f2e22f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicExchange_f2e22f
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicExchange_f2e22f
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicLoad/0806ad.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicLoad/0806ad.wgsl.expected.ir.msl
index b990acb..baed38d 100644
--- a/test/tint/builtins/gen/literal/atomicLoad/0806ad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicLoad/0806ad.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_int arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device int* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<i32> @offset(0)
+void atomicLoad_0806ad(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_load_explicit((&(*tint_module_vars.sb_rw).arg_0), memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicLoad_0806ad(tint_module_vars);
}
-
-%atomicLoad_0806ad = func():void {
- $B2: {
- %4:ptr<storage, atomic<i32>, read_write> = access %sb_rw, 0u
- %5:i32 = atomicLoad %4
- %res:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicLoad_0806ad(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicLoad_0806ad
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicLoad_0806ad
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicLoad/361bf1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicLoad/361bf1.wgsl.expected.ir.msl
index 7ae76ad..f4620b3 100644
--- a/test/tint/builtins/gen/literal/atomicLoad/361bf1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicLoad/361bf1.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<u32>, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void atomicLoad_361bf1(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_load_explicit(tint_module_vars.arg_0, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicLoad_361bf1 = func():void {
- $B2: {
- %4:u32 = atomicLoad %arg_0
- %res:ptr<function, u32, read_write> = var, %4
- %6:u32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0u, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicLoad_361bf1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0u
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicLoad_361bf1
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicLoad/afcc03.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicLoad/afcc03.wgsl.expected.ir.msl
index ee77bef..a06cda4 100644
--- a/test/tint/builtins/gen/literal/atomicLoad/afcc03.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicLoad/afcc03.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<i32>, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void atomicLoad_afcc03(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_load_explicit(tint_module_vars.arg_0, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicLoad_afcc03 = func():void {
- $B2: {
- %4:i32 = atomicLoad %arg_0
- %res:ptr<function, i32, read_write> = var, %4
- %6:i32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicLoad_afcc03(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0i
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicLoad_afcc03
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicLoad/fe6cc3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicLoad/fe6cc3.wgsl.expected.ir.msl
index 0637775..2e72caf 100644
--- a/test/tint/builtins/gen/literal/atomicLoad/fe6cc3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicLoad/fe6cc3.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_uint arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<u32> @offset(0)
+void atomicLoad_fe6cc3(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_load_explicit((&(*tint_module_vars.sb_rw).arg_0), memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicLoad_fe6cc3(tint_module_vars);
}
-
-%atomicLoad_fe6cc3 = func():void {
- $B2: {
- %4:ptr<storage, atomic<u32>, read_write> = access %sb_rw, 0u
- %5:u32 = atomicLoad %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicLoad_fe6cc3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicLoad_fe6cc3
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicLoad_fe6cc3
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicMax/51b9be.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicMax/51b9be.wgsl.expected.ir.msl
index 3d571d0..5fabec6 100644
--- a/test/tint/builtins/gen/literal/atomicMax/51b9be.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicMax/51b9be.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_uint arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<u32> @offset(0)
+void atomicMax_51b9be(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_fetch_max_explicit((&(*tint_module_vars.sb_rw).arg_0), 1u, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicMax_51b9be(tint_module_vars);
}
-
-%atomicMax_51b9be = func():void {
- $B2: {
- %4:ptr<storage, atomic<u32>, read_write> = access %sb_rw, 0u
- %5:u32 = atomicMax %4, 1u
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicMax_51b9be(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicMax_51b9be
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicMax_51b9be
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicMax/92aa72.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicMax/92aa72.wgsl.expected.ir.msl
index 43f6adf..03576f0 100644
--- a/test/tint/builtins/gen/literal/atomicMax/92aa72.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicMax/92aa72.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_int arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device int* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<i32> @offset(0)
+void atomicMax_92aa72(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_fetch_max_explicit((&(*tint_module_vars.sb_rw).arg_0), 1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicMax_92aa72(tint_module_vars);
}
-
-%atomicMax_92aa72 = func():void {
- $B2: {
- %4:ptr<storage, atomic<i32>, read_write> = access %sb_rw, 0u
- %5:i32 = atomicMax %4, 1i
- %res:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicMax_92aa72(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicMax_92aa72
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicMax_92aa72
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicMax/a89cc3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicMax/a89cc3.wgsl.expected.ir.msl
index 6636ef8..a2b8c53 100644
--- a/test/tint/builtins/gen/literal/atomicMax/a89cc3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicMax/a89cc3.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<i32>, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void atomicMax_a89cc3(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_fetch_max_explicit(tint_module_vars.arg_0, 1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicMax_a89cc3 = func():void {
- $B2: {
- %4:i32 = atomicMax %arg_0, 1i
- %res:ptr<function, i32, read_write> = var, %4
- %6:i32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicMax_a89cc3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0i
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicMax_a89cc3
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicMax/beccfc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicMax/beccfc.wgsl.expected.ir.msl
index 6851230..7e55d71 100644
--- a/test/tint/builtins/gen/literal/atomicMax/beccfc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicMax/beccfc.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<u32>, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void atomicMax_beccfc(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_fetch_max_explicit(tint_module_vars.arg_0, 1u, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicMax_beccfc = func():void {
- $B2: {
- %4:u32 = atomicMax %arg_0, 1u
- %res:ptr<function, u32, read_write> = var, %4
- %6:u32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0u, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicMax_beccfc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0u
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicMax_beccfc
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicMin/278235.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicMin/278235.wgsl.expected.ir.msl
index 6cc3781..9214fa3 100644
--- a/test/tint/builtins/gen/literal/atomicMin/278235.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicMin/278235.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<i32>, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void atomicMin_278235(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_fetch_min_explicit(tint_module_vars.arg_0, 1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicMin_278235 = func():void {
- $B2: {
- %4:i32 = atomicMin %arg_0, 1i
- %res:ptr<function, i32, read_write> = var, %4
- %6:i32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicMin_278235(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0i
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicMin_278235
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicMin/69d383.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicMin/69d383.wgsl.expected.ir.msl
index f1be440..981529a 100644
--- a/test/tint/builtins/gen/literal/atomicMin/69d383.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicMin/69d383.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<u32>, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void atomicMin_69d383(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_fetch_min_explicit(tint_module_vars.arg_0, 1u, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicMin_69d383 = func():void {
- $B2: {
- %4:u32 = atomicMin %arg_0, 1u
- %res:ptr<function, u32, read_write> = var, %4
- %6:u32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0u, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicMin_69d383(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0u
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicMin_69d383
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicMin/8e38dc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicMin/8e38dc.wgsl.expected.ir.msl
index 29a3c35..5531069 100644
--- a/test/tint/builtins/gen/literal/atomicMin/8e38dc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicMin/8e38dc.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_int arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device int* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<i32> @offset(0)
+void atomicMin_8e38dc(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_fetch_min_explicit((&(*tint_module_vars.sb_rw).arg_0), 1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicMin_8e38dc(tint_module_vars);
}
-
-%atomicMin_8e38dc = func():void {
- $B2: {
- %4:ptr<storage, atomic<i32>, read_write> = access %sb_rw, 0u
- %5:i32 = atomicMin %4, 1i
- %res:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicMin_8e38dc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicMin_8e38dc
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicMin_8e38dc
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicMin/c67a74.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicMin/c67a74.wgsl.expected.ir.msl
index 2b50bb7..50ba089 100644
--- a/test/tint/builtins/gen/literal/atomicMin/c67a74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicMin/c67a74.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_uint arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<u32> @offset(0)
+void atomicMin_c67a74(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_fetch_min_explicit((&(*tint_module_vars.sb_rw).arg_0), 1u, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicMin_c67a74(tint_module_vars);
}
-
-%atomicMin_c67a74 = func():void {
- $B2: {
- %4:ptr<storage, atomic<u32>, read_write> = access %sb_rw, 0u
- %5:u32 = atomicMin %4, 1u
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicMin_c67a74(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicMin_c67a74
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicMin_c67a74
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicOr/5e3d61.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicOr/5e3d61.wgsl.expected.ir.msl
index 41c65f2..0f55fd4 100644
--- a/test/tint/builtins/gen/literal/atomicOr/5e3d61.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicOr/5e3d61.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<u32>, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void atomicOr_5e3d61(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_fetch_or_explicit(tint_module_vars.arg_0, 1u, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicOr_5e3d61 = func():void {
- $B2: {
- %4:u32 = atomicOr %arg_0, 1u
- %res:ptr<function, u32, read_write> = var, %4
- %6:u32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0u, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicOr_5e3d61(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0u
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicOr_5e3d61
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicOr/5e95d4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicOr/5e95d4.wgsl.expected.ir.msl
index 59f2526..59acb1f 100644
--- a/test/tint/builtins/gen/literal/atomicOr/5e95d4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicOr/5e95d4.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_uint arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<u32> @offset(0)
+void atomicOr_5e95d4(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_fetch_or_explicit((&(*tint_module_vars.sb_rw).arg_0), 1u, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicOr_5e95d4(tint_module_vars);
}
-
-%atomicOr_5e95d4 = func():void {
- $B2: {
- %4:ptr<storage, atomic<u32>, read_write> = access %sb_rw, 0u
- %5:u32 = atomicOr %4, 1u
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicOr_5e95d4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicOr_5e95d4
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicOr_5e95d4
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicOr/8d96a0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicOr/8d96a0.wgsl.expected.ir.msl
index 50c5b04..a8b57c2 100644
--- a/test/tint/builtins/gen/literal/atomicOr/8d96a0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicOr/8d96a0.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_int arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device int* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<i32> @offset(0)
+void atomicOr_8d96a0(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_fetch_or_explicit((&(*tint_module_vars.sb_rw).arg_0), 1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicOr_8d96a0(tint_module_vars);
}
-
-%atomicOr_8d96a0 = func():void {
- $B2: {
- %4:ptr<storage, atomic<i32>, read_write> = access %sb_rw, 0u
- %5:i32 = atomicOr %4, 1i
- %res:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicOr_8d96a0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicOr_8d96a0
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicOr_8d96a0
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicOr/d09248.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicOr/d09248.wgsl.expected.ir.msl
index 11e5fe6..8ba19c1 100644
--- a/test/tint/builtins/gen/literal/atomicOr/d09248.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicOr/d09248.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<i32>, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void atomicOr_d09248(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_fetch_or_explicit(tint_module_vars.arg_0, 1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicOr_d09248 = func():void {
- $B2: {
- %4:i32 = atomicOr %arg_0, 1i
- %res:ptr<function, i32, read_write> = var, %4
- %6:i32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicOr_d09248(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0i
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicOr_d09248
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicSub/051100.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicSub/051100.wgsl.expected.ir.msl
index 589d05f..3ec4016 100644
--- a/test/tint/builtins/gen/literal/atomicSub/051100.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicSub/051100.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_int arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device int* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<i32> @offset(0)
+void atomicSub_051100(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_fetch_sub_explicit((&(*tint_module_vars.sb_rw).arg_0), 1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicSub_051100(tint_module_vars);
}
-
-%atomicSub_051100 = func():void {
- $B2: {
- %4:ptr<storage, atomic<i32>, read_write> = access %sb_rw, 0u
- %5:i32 = atomicSub %4, 1i
- %res:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicSub_051100(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicSub_051100
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicSub_051100
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicSub/0d26c2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicSub/0d26c2.wgsl.expected.ir.msl
index 92edf6f..651592e 100644
--- a/test/tint/builtins/gen/literal/atomicSub/0d26c2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicSub/0d26c2.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<u32>, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void atomicSub_0d26c2(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_fetch_sub_explicit(tint_module_vars.arg_0, 1u, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicSub_0d26c2 = func():void {
- $B2: {
- %4:u32 = atomicSub %arg_0, 1u
- %res:ptr<function, u32, read_write> = var, %4
- %6:u32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0u, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicSub_0d26c2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0u
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicSub_0d26c2
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicSub/15bfc9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicSub/15bfc9.wgsl.expected.ir.msl
index 3f68716..8c4df51 100644
--- a/test/tint/builtins/gen/literal/atomicSub/15bfc9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicSub/15bfc9.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_uint arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<u32> @offset(0)
+void atomicSub_15bfc9(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_fetch_sub_explicit((&(*tint_module_vars.sb_rw).arg_0), 1u, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicSub_15bfc9(tint_module_vars);
}
-
-%atomicSub_15bfc9 = func():void {
- $B2: {
- %4:ptr<storage, atomic<u32>, read_write> = access %sb_rw, 0u
- %5:u32 = atomicSub %4, 1u
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicSub_15bfc9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicSub_15bfc9
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicSub_15bfc9
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicSub/77883a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicSub/77883a.wgsl.expected.ir.msl
index 5501c49..26c3e6d 100644
--- a/test/tint/builtins/gen/literal/atomicSub/77883a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicSub/77883a.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<i32>, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void atomicSub_77883a(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_fetch_sub_explicit(tint_module_vars.arg_0, 1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicSub_77883a = func():void {
- $B2: {
- %4:i32 = atomicSub %arg_0, 1i
- %res:ptr<function, i32, read_write> = var, %4
- %6:i32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicSub_77883a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0i
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicSub_77883a
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicXor/54510e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicXor/54510e.wgsl.expected.ir.msl
index dade502..d3ceb96 100644
--- a/test/tint/builtins/gen/literal/atomicXor/54510e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicXor/54510e.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_uint arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<u32> @offset(0)
+void atomicXor_54510e(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_fetch_xor_explicit((&(*tint_module_vars.sb_rw).arg_0), 1u, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicXor_54510e(tint_module_vars);
}
-
-%atomicXor_54510e = func():void {
- $B2: {
- %4:ptr<storage, atomic<u32>, read_write> = access %sb_rw, 0u
- %5:u32 = atomicXor %4, 1u
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicXor_54510e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicXor_54510e
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicXor_54510e
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicXor/75dc95.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicXor/75dc95.wgsl.expected.ir.msl
index 5201c68..6d70394 100644
--- a/test/tint/builtins/gen/literal/atomicXor/75dc95.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicXor/75dc95.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<i32>, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void atomicXor_75dc95(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_fetch_xor_explicit(tint_module_vars.arg_0, 1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicXor_75dc95 = func():void {
- $B2: {
- %4:i32 = atomicXor %arg_0, 1i
- %res:ptr<function, i32, read_write> = var, %4
- %6:i32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicXor_75dc95(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0i
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicXor_75dc95
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicXor/c1b78c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicXor/c1b78c.wgsl.expected.ir.msl
index 0d5add2..17bcc96 100644
--- a/test/tint/builtins/gen/literal/atomicXor/c1b78c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicXor/c1b78c.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_int arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device int* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<i32> @offset(0)
+void atomicXor_c1b78c(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_fetch_xor_explicit((&(*tint_module_vars.sb_rw).arg_0), 1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicXor_c1b78c(tint_module_vars);
}
-
-%atomicXor_c1b78c = func():void {
- $B2: {
- %4:ptr<storage, atomic<i32>, read_write> = access %sb_rw, 0u
- %5:i32 = atomicXor %4, 1i
- %res:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicXor_c1b78c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicXor_c1b78c
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicXor_c1b78c
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/atomicXor/c8e6be.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicXor/c8e6be.wgsl.expected.ir.msl
index 6622537..45298f3 100644
--- a/test/tint/builtins/gen/literal/atomicXor/c8e6be.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicXor/c8e6be.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<u32>, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void atomicXor_c8e6be(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_fetch_xor_explicit(tint_module_vars.arg_0, 1u, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicXor_c8e6be = func():void {
- $B2: {
- %4:u32 = atomicXor %arg_0, 1u
- %res:ptr<function, u32, read_write> = var, %4
- %6:u32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0u, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicXor_c8e6be(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0u
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicXor_c8e6be
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/0fe0c9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/0fe0c9.wgsl.expected.ir.msl
index 97f9d1e..540ad6e 100644
--- a/test/tint/builtins/gen/literal/bitcast/0fe0c9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/0fe0c9.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_0fe0c9(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.40129846e-45f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_0fe0c9 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.40129846e-45f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_0fe0c9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_0fe0c9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_0fe0c9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_0fe0c9
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_0fe0c9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_0fe0c9
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/160c09.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/160c09.wgsl.expected.ir.msl
index 3bc3ef4..510cc67 100644
--- a/test/tint/builtins/gen/literal/bitcast/160c09.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/160c09.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_160c09(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_160c09 = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_160c09(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_160c09
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_160c09(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_160c09
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_160c09(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_160c09
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/16cba4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/16cba4.wgsl.expected.ir.msl
index 3262b1a..eaba458 100644
--- a/test/tint/builtins/gen/literal/bitcast/16cba4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/16cba4.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void bitcast_16cba4(tint_module_vars_struct tint_module_vars) {
+ int res = 1065353216;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_16cba4 = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 1065353216i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_16cba4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_16cba4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_16cba4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_16cba4
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_16cba4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_16cba4
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/1c3b31.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/1c3b31.wgsl.expected.ir.msl
index 9e49682..77a88e7 100644
--- a/test/tint/builtins/gen/literal/bitcast/1c3b31.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/1c3b31.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_1c3b31(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_1c3b31 = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_1c3b31(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_1c3b31
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_1c3b31(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_1c3b31
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_1c3b31(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_1c3b31
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/1df11f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/1df11f.wgsl.expected.ir.msl
index 9af0b6e..455cd3e 100644
--- a/test/tint/builtins/gen/literal/bitcast/1df11f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/1df11f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void bitcast_1df11f(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_1df11f = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_1df11f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_1df11f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_1df11f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_1df11f
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_1df11f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_1df11f
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/214f23.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/214f23.wgsl.expected.ir.msl
index 389856c..6c085b0 100644
--- a/test/tint/builtins/gen/literal/bitcast/214f23.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/214f23.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_214f23(tint_module_vars_struct tint_module_vars) {
+ int2 res = int2(1006648320);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_214f23 = func():void {
- $B2: {
- %res:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1006648320i)
- %4:vec2<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_214f23(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_214f23
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_214f23(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_214f23
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_214f23(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_214f23
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/23c8bd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/23c8bd.wgsl.expected.ir.msl
index 54715d0..474bfc6 100644
--- a/test/tint/builtins/gen/literal/bitcast/23c8bd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/23c8bd.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void bitcast_23c8bd(tint_module_vars_struct tint_module_vars) {
+ float res = 0.00782680511474609375f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_23c8bd = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.00782680511474609375f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_23c8bd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_23c8bd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_23c8bd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_23c8bd
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_23c8bd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_23c8bd
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/2421c8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/2421c8.wgsl.expected.ir.msl
index ce95bcd..22cff32 100644
--- a/test/tint/builtins/gen/literal/bitcast/2421c8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/2421c8.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_2421c8(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.40129846e-45f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_2421c8 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.40129846e-45f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_2421c8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_2421c8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_2421c8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_2421c8
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_2421c8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_2421c8
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/287bdf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/287bdf.wgsl.expected.ir.msl
index 8b49cfd..6658a3c 100644
--- a/test/tint/builtins/gen/literal/bitcast/287bdf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/287bdf.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_287bdf(tint_module_vars_struct tint_module_vars) {
+ uint3 res = uint3(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_287bdf = func():void {
- $B2: {
- %res:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_287bdf(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_287bdf
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_287bdf(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_287bdf
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_287bdf(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_287bdf
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/2a6e58.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/2a6e58.wgsl.expected.ir.msl
index 6984a0f..652d229 100644
--- a/test/tint/builtins/gen/literal/bitcast/2a6e58.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/2a6e58.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_2a6e58(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(0.00782680511474609375f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_2a6e58 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.00782680511474609375f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_2a6e58(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_2a6e58
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_2a6e58(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_2a6e58
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_2a6e58(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_2a6e58
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/2b05b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/2b05b3.wgsl.expected.ir.msl
index b298814..43bd35f 100644
--- a/test/tint/builtins/gen/literal/bitcast/2b05b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/2b05b3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_2b05b3(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_2b05b3 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_2b05b3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_2b05b3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_2b05b3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_2b05b3
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_2b05b3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_2b05b3
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/2b2738.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/2b2738.wgsl.expected.ir.msl
index ac13230..8b1497a 100644
--- a/test/tint/builtins/gen/literal/bitcast/2b2738.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/2b2738.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_2b2738(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(1065353216u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_2b2738 = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1065353216u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_2b2738(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_2b2738
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_2b2738(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_2b2738
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_2b2738(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_2b2738
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/31c080.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/31c080.wgsl.expected.ir.msl
index d0d470e..24589f6 100644
--- a/test/tint/builtins/gen/literal/bitcast/31c080.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/31c080.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void bitcast_31c080(tint_module_vars_struct tint_module_vars) {
+ uint res = 1u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_31c080 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_31c080(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_31c080
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_31c080(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_31c080
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_31c080(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_31c080
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/332f78.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/332f78.wgsl.expected.ir.msl
index ac5c471..568018f 100644
--- a/test/tint/builtins/gen/literal/bitcast/332f78.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/332f78.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_332f78(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.40129846e-45f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_332f78 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.40129846e-45f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_332f78(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_332f78
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_332f78(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_332f78
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_332f78(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_332f78
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/3e7b47.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/3e7b47.wgsl.expected.ir.msl
index 6c58816..51aea32 100644
--- a/test/tint/builtins/gen/literal/bitcast/3e7b47.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/3e7b47.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void bitcast_3e7b47(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_3e7b47 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_3e7b47(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_3e7b47
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_3e7b47(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_3e7b47
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_3e7b47(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_3e7b47
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/3f7437.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/3f7437.wgsl.expected.ir.msl
index 2821d47..38913bc 100644
--- a/test/tint/builtins/gen/literal/bitcast/3f7437.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/3f7437.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_3f7437(tint_module_vars_struct tint_module_vars) {
+ int4 res = int4(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_3f7437 = func():void {
- $B2: {
- %res:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_3f7437(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_3f7437
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_3f7437(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_3f7437
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_3f7437(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_3f7437
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/3fdacd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/3fdacd.wgsl.expected.ir.msl
index 3394e6e..7455f4a 100644
--- a/test/tint/builtins/gen/literal/bitcast/3fdacd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/3fdacd.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_3fdacd(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.40129846e-45f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_3fdacd = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.40129846e-45f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_3fdacd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_3fdacd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_3fdacd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_3fdacd
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_3fdacd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_3fdacd
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/429d64.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/429d64.wgsl.expected.ir.msl
index 83e50d5..684eb0f 100644
--- a/test/tint/builtins/gen/literal/bitcast/429d64.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/429d64.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void bitcast_429d64(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(0.0h, 1.875h, 0.0h, 1.875h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_429d64 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.0h, 1.875h, 0.0h, 1.875h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_429d64(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_429d64
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_429d64(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_429d64
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_429d64(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_429d64
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/436211.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/436211.wgsl.expected.ir.msl
index 324115c..39348d7 100644
--- a/test/tint/builtins/gen/literal/bitcast/436211.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/436211.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void bitcast_436211(tint_module_vars_struct tint_module_vars) {
+ half res = 1.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_436211 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_436211(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_436211
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_436211(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_436211
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_436211(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_436211
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/5081ed.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/5081ed.wgsl.expected.ir.msl
index 484a59e..ab35e40 100644
--- a/test/tint/builtins/gen/literal/bitcast/5081ed.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/5081ed.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void bitcast_5081ed(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_5081ed = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_5081ed(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_5081ed
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_5081ed(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_5081ed
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_5081ed(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_5081ed
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/56266e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/56266e.wgsl.expected.ir.msl
index 2c01bd2..c88828f 100644
--- a/test/tint/builtins/gen/literal/bitcast/56266e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/56266e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_56266e(tint_module_vars_struct tint_module_vars) {
+ uint3 res = uint3(1065353216u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_56266e = func():void {
- $B2: {
- %res:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1065353216u)
- %4:vec3<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_56266e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_56266e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_56266e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_56266e
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_56266e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_56266e
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/66e93d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/66e93d.wgsl.expected.ir.msl
index a9bfd27..2370ec4 100644
--- a/test/tint/builtins/gen/literal/bitcast/66e93d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/66e93d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void bitcast_66e93d(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(0.00000005960464477539h, 0.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_66e93d = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.00000005960464477539h, 0.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_66e93d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_66e93d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_66e93d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_66e93d
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_66e93d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_66e93d
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/674557.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/674557.wgsl.expected.ir.msl
index 757a1ed..4ffd90f 100644
--- a/test/tint/builtins/gen/literal/bitcast/674557.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/674557.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void bitcast_674557(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(0.00000005960464477539h, 0.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_674557 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.00000005960464477539h, 0.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_674557(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_674557
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_674557(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_674557
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_674557(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_674557
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/6ac6f9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/6ac6f9.wgsl.expected.ir.msl
index ab0d927..0f41aec 100644
--- a/test/tint/builtins/gen/literal/bitcast/6ac6f9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/6ac6f9.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void bitcast_6ac6f9(tint_module_vars_struct tint_module_vars) {
+ int res = 1006648320;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_6ac6f9 = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 1006648320i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_6ac6f9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_6ac6f9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_6ac6f9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_6ac6f9
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_6ac6f9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_6ac6f9
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/6de2bd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/6de2bd.wgsl.expected.ir.msl
index 26ae3e4..aeb27f7 100644
--- a/test/tint/builtins/gen/literal/bitcast/6de2bd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/6de2bd.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_6de2bd(tint_module_vars_struct tint_module_vars) {
+ int4 res = int4(1065353216);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_6de2bd = func():void {
- $B2: {
- %res:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1065353216i)
- %4:vec4<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_6de2bd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_6de2bd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_6de2bd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_6de2bd
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_6de2bd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_6de2bd
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/70b121.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/70b121.wgsl.expected.ir.msl
index 5a11cf6..2238a27 100644
--- a/test/tint/builtins/gen/literal/bitcast/70b121.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/70b121.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_70b121(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_70b121 = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_70b121(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_70b121
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_70b121(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_70b121
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_70b121(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_70b121
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/71c92a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/71c92a.wgsl.expected.ir.msl
index 6ad99f2..292e1ac 100644
--- a/test/tint/builtins/gen/literal/bitcast/71c92a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/71c92a.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void bitcast_71c92a(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(0.00000005960464477539h, 0.0h, 0.00000005960464477539h, 0.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_71c92a = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.00000005960464477539h, 0.0h, 0.00000005960464477539h, 0.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_71c92a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_71c92a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_71c92a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_71c92a
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_71c92a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_71c92a
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/745b27.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/745b27.wgsl.expected.ir.msl
index eb1dd9b..f104664 100644
--- a/test/tint/builtins/gen/literal/bitcast/745b27.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/745b27.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_745b27(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_745b27 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_745b27(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_745b27
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_745b27(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_745b27
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_745b27(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_745b27
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/7e67cc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/7e67cc.wgsl.expected.ir.msl
index 3a818b8..3e25471 100644
--- a/test/tint/builtins/gen/literal/bitcast/7e67cc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/7e67cc.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void bitcast_7e67cc(tint_module_vars_struct tint_module_vars) {
+ int res = 1;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_7e67cc = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_7e67cc(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_7e67cc
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_7e67cc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_7e67cc
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_7e67cc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_7e67cc
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/7ffa9c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/7ffa9c.wgsl.expected.ir.msl
index 785cace..104af05 100644
--- a/test/tint/builtins/gen/literal/bitcast/7ffa9c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/7ffa9c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_7ffa9c(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_7ffa9c = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_7ffa9c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_7ffa9c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_7ffa9c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_7ffa9c
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_7ffa9c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_7ffa9c
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/81c5f5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/81c5f5.wgsl.expected.ir.msl
index 274f9ba..e83a4d4 100644
--- a/test/tint/builtins/gen/literal/bitcast/81c5f5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/81c5f5.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_81c5f5(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(1006648320u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_81c5f5 = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1006648320u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_81c5f5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_81c5f5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_81c5f5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_81c5f5
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_81c5f5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_81c5f5
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/8318a8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/8318a8.wgsl.expected.ir.msl
index 9dcc50e..f6f281a 100644
--- a/test/tint/builtins/gen/literal/bitcast/8318a8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/8318a8.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_8318a8(tint_module_vars_struct tint_module_vars) {
+ uint3 res = uint3(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_8318a8 = func():void {
- $B2: {
- %res:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_8318a8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_8318a8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_8318a8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_8318a8
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_8318a8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_8318a8
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/879dc9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/879dc9.wgsl.expected.ir.msl
index 21f6360..4e4c885 100644
--- a/test/tint/builtins/gen/literal/bitcast/879dc9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/879dc9.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void bitcast_879dc9(tint_module_vars_struct tint_module_vars) {
+ uint res = 1u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_879dc9 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_879dc9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_879dc9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_879dc9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_879dc9
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_879dc9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_879dc9
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/899e50.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/899e50.wgsl.expected.ir.msl
index 5b0f3a3..d1f69ae 100644
--- a/test/tint/builtins/gen/literal/bitcast/899e50.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/899e50.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_899e50(tint_module_vars_struct tint_module_vars) {
+ int2 res = int2(1065353216);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_899e50 = func():void {
- $B2: {
- %res:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1065353216i)
- %4:vec2<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_899e50(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_899e50
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_899e50(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_899e50
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_899e50(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_899e50
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/8d184c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/8d184c.wgsl.expected.ir.msl
index e7e9650..7c03b33 100644
--- a/test/tint/builtins/gen/literal/bitcast/8d184c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/8d184c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_8d184c(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(1065353216u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_8d184c = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1065353216u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_8d184c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_8d184c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_8d184c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_8d184c
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_8d184c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_8d184c
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/9bcf71.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/9bcf71.wgsl.expected.ir.msl
index 7af01da..3c51299 100644
--- a/test/tint/builtins/gen/literal/bitcast/9bcf71.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/9bcf71.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_9bcf71(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_9bcf71 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_9bcf71(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_9bcf71
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_9bcf71(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_9bcf71
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_9bcf71(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_9bcf71
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/9ca42c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/9ca42c.wgsl.expected.ir.msl
index 589e7e1..2c8744f 100644
--- a/test/tint/builtins/gen/literal/bitcast/9ca42c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/9ca42c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void bitcast_9ca42c(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(0.0h, 1.875h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_9ca42c = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.0h, 1.875h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_9ca42c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_9ca42c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_9ca42c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_9ca42c
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_9ca42c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_9ca42c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/9eee21.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/9eee21.wgsl.expected.ir.msl
index 15831c1..2a77be3 100644
--- a/test/tint/builtins/gen/literal/bitcast/9eee21.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/9eee21.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_9eee21(tint_module_vars_struct tint_module_vars) {
+ int3 res = int3(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_9eee21 = func():void {
- $B2: {
- %res:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_9eee21(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_9eee21
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_9eee21(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_9eee21
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_9eee21(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_9eee21
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/a4b290.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/a4b290.wgsl.expected.ir.msl
index 21dd042..d8cbf0c 100644
--- a/test/tint/builtins/gen/literal/bitcast/a4b290.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/a4b290.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_a4b290(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.40129846e-45f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_a4b290 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.40129846e-45f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_a4b290(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_a4b290
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a4b290(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_a4b290
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a4b290(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_a4b290
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/a58b50.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/a58b50.wgsl.expected.ir.msl
index 7ca3d4e..6cf1387 100644
--- a/test/tint/builtins/gen/literal/bitcast/a58b50.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/a58b50.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void bitcast_a58b50(tint_module_vars_struct tint_module_vars) {
+ uint res = 1006648320u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_a58b50 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 1006648320u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_a58b50(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_a58b50
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a58b50(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_a58b50
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a58b50(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_a58b50
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/a5c539.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/a5c539.wgsl.expected.ir.msl
index 834f6ac..a6b1b78 100644
--- a/test/tint/builtins/gen/literal/bitcast/a5c539.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/a5c539.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_a5c539(tint_module_vars_struct tint_module_vars) {
+ int4 res = int4(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_a5c539 = func():void {
- $B2: {
- %res:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_a5c539(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_a5c539
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a5c539(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_a5c539
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a5c539(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_a5c539
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/a8c93f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/a8c93f.wgsl.expected.ir.msl
index 5d1e123..cfb0c60 100644
--- a/test/tint/builtins/gen/literal/bitcast/a8c93f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/a8c93f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_a8c93f(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_a8c93f = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_a8c93f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_a8c93f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a8c93f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_a8c93f
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a8c93f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_a8c93f
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/a8ea1b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/a8ea1b.wgsl.expected.ir.msl
index fb8ada2..719ce52 100644
--- a/test/tint/builtins/gen/literal/bitcast/a8ea1b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/a8ea1b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_a8ea1b(tint_module_vars_struct tint_module_vars) {
+ int3 res = int3(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_a8ea1b = func():void {
- $B2: {
- %res:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_a8ea1b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_a8ea1b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a8ea1b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_a8ea1b
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a8ea1b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_a8ea1b
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/ac09d0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/ac09d0.wgsl.expected.ir.msl
index 54569d7..3e95641 100644
--- a/test/tint/builtins/gen/literal/bitcast/ac09d0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/ac09d0.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void bitcast_ac09d0(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_ac09d0 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_ac09d0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_ac09d0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_ac09d0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_ac09d0
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_ac09d0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_ac09d0
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/ad4b05.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/ad4b05.wgsl.expected.ir.msl
index cf00a70..5cdad93 100644
--- a/test/tint/builtins/gen/literal/bitcast/ad4b05.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/ad4b05.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void bitcast_ad4b05(tint_module_vars_struct tint_module_vars) {
+ float res = 1.40129846e-45f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_ad4b05 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.40129846e-45f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_ad4b05(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_ad4b05
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_ad4b05(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_ad4b05
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_ad4b05(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_ad4b05
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/b28cbd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/b28cbd.wgsl.expected.ir.msl
index 79ffc40..be3c430 100644
--- a/test/tint/builtins/gen/literal/bitcast/b28cbd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/b28cbd.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_b28cbd(tint_module_vars_struct tint_module_vars) {
+ int3 res = int3(1065353216);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_b28cbd = func():void {
- $B2: {
- %res:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1065353216i)
- %4:vec3<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_b28cbd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_b28cbd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_b28cbd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_b28cbd
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_b28cbd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_b28cbd
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/b77573.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/b77573.wgsl.expected.ir.msl
index b7772d8..9dcf0b0 100644
--- a/test/tint/builtins/gen/literal/bitcast/b77573.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/b77573.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_b77573(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.40129846e-45f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_b77573 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.40129846e-45f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_b77573(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_b77573
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_b77573(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_b77573
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_b77573(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_b77573
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/bc3994.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/bc3994.wgsl.expected.ir.msl
index d9edf5d..f263a63 100644
--- a/test/tint/builtins/gen/literal/bitcast/bc3994.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/bc3994.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void bitcast_bc3994(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(0.00000005960464477539h, 0.0h, 0.00000005960464477539h, 0.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_bc3994 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.00000005960464477539h, 0.0h, 0.00000005960464477539h, 0.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_bc3994(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_bc3994
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_bc3994(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_bc3994
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_bc3994(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_bc3994
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/c69aaf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/c69aaf.wgsl.expected.ir.msl
index cd60bfa..ea15d36 100644
--- a/test/tint/builtins/gen/literal/bitcast/c69aaf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/c69aaf.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_c69aaf(tint_module_vars_struct tint_module_vars) {
+ int2 res = int2(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_c69aaf = func():void {
- $B2: {
- %res:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_c69aaf(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_c69aaf
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_c69aaf(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_c69aaf
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_c69aaf(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_c69aaf
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/ca5c3f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/ca5c3f.wgsl.expected.ir.msl
index b0389d8..a78f2b8 100644
--- a/test/tint/builtins/gen/literal/bitcast/ca5c3f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/ca5c3f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void bitcast_ca5c3f(tint_module_vars_struct tint_module_vars) {
+ float res = 1.40129846e-45f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_ca5c3f = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.40129846e-45f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_ca5c3f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_ca5c3f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_ca5c3f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_ca5c3f
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_ca5c3f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_ca5c3f
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/cc7aa7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/cc7aa7.wgsl.expected.ir.msl
index 7f3917e..634beb3 100644
--- a/test/tint/builtins/gen/literal/bitcast/cc7aa7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/cc7aa7.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_cc7aa7(tint_module_vars_struct tint_module_vars) {
+ int2 res = int2(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_cc7aa7 = func():void {
- $B2: {
- %res:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_cc7aa7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_cc7aa7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_cc7aa7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_cc7aa7
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_cc7aa7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_cc7aa7
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/d29765.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/d29765.wgsl.expected.ir.msl
index 0cd2dba..2a5d16d 100644
--- a/test/tint/builtins/gen/literal/bitcast/d29765.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/d29765.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_d29765(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_d29765 = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_d29765(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_d29765
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_d29765(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_d29765
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_d29765(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_d29765
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/dce842.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/dce842.wgsl.expected.ir.msl
index 65e6789..c39449d 100644
--- a/test/tint/builtins/gen/literal/bitcast/dce842.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/dce842.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void bitcast_dce842(tint_module_vars_struct tint_module_vars) {
+ uint res = 1u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_dce842 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_dce842(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_dce842
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_dce842(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_dce842
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_dce842(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_dce842
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/e61c57.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/e61c57.wgsl.expected.ir.msl
index b6e2a13..4248ff5 100644
--- a/test/tint/builtins/gen/literal/bitcast/e61c57.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/e61c57.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void bitcast_e61c57(tint_module_vars_struct tint_module_vars) {
+ int res = 1;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_e61c57 = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_e61c57(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_e61c57
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_e61c57(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_e61c57
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_e61c57(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_e61c57
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/e6c18f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/e6c18f.wgsl.expected.ir.msl
index 5ceb43e..11a2da7 100644
--- a/test/tint/builtins/gen/literal/bitcast/e6c18f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/e6c18f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void bitcast_e6c18f(tint_module_vars_struct tint_module_vars) {
+ uint res = 1065353216u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_e6c18f = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 1065353216u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_e6c18f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_e6c18f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_e6c18f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_e6c18f
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_e6c18f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_e6c18f
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/bitcast/f756cd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/bitcast/f756cd.wgsl.expected.ir.msl
index be39e07..5960258 100644
--- a/test/tint/builtins/gen/literal/bitcast/f756cd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/bitcast/f756cd.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_f756cd(tint_module_vars_struct tint_module_vars) {
+ uint3 res = uint3(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_f756cd = func():void {
- $B2: {
- %res:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_f756cd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_f756cd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_f756cd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_f756cd
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_f756cd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_f756cd
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.ir.msl
index cb0af2e..2045975 100644
--- a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void ceil_09bf52(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(2.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ceil_09bf52 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(2.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ceil_09bf52(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ceil_09bf52
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_09bf52(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ceil_09bf52
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_09bf52(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ceil_09bf52
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.ir.msl
index 450cf52..4ed7546 100644
--- a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void ceil_18c240(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(2.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ceil_18c240 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(2.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ceil_18c240(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ceil_18c240
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_18c240(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ceil_18c240
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_18c240(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ceil_18c240
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.ir.msl
index fc7c7da..5ccdd04 100644
--- a/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void ceil_34064b(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(2.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ceil_34064b = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(2.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ceil_34064b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ceil_34064b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_34064b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ceil_34064b
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_34064b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ceil_34064b
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.ir.msl
index f7dfc07..95fb429 100644
--- a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void ceil_4bca2a(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(2.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ceil_4bca2a = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(2.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ceil_4bca2a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ceil_4bca2a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_4bca2a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ceil_4bca2a
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_4bca2a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ceil_4bca2a
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ceil/678655.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ceil/678655.wgsl.expected.ir.msl
index df6dd2a..cefde75 100644
--- a/test/tint/builtins/gen/literal/ceil/678655.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ceil/678655.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void ceil_678655(tint_module_vars_struct tint_module_vars) {
+ float res = 2.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ceil_678655 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 2.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ceil_678655(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ceil_678655
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_678655(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ceil_678655
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_678655(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ceil_678655
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.ir.msl
index 3fa73e3..4718fe9 100644
--- a/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void ceil_96f597(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(2.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ceil_96f597 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(2.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ceil_96f597(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ceil_96f597
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_96f597(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ceil_96f597
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_96f597(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ceil_96f597
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.ir.msl
index a75e584..a7b7c07 100644
--- a/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void ceil_b74c16(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(2.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ceil_b74c16 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(2.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ceil_b74c16(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ceil_b74c16
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_b74c16(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ceil_b74c16
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_b74c16(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ceil_b74c16
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.ir.msl
index 58d8770..a6df7b9 100644
--- a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void ceil_f3f889(tint_module_vars_struct tint_module_vars) {
+ half res = 2.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ceil_f3f889 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 2.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ceil_f3f889(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ceil_f3f889
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_f3f889(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ceil_f3f889
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_f3f889(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ceil_f3f889
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.ir.msl
index 744722d..cea8b4e 100644
--- a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void clamp_0acf8f(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_0acf8f = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_0acf8f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %clamp_0acf8f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_0acf8f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %clamp_0acf8f
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_0acf8f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %clamp_0acf8f
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.ir.msl
index 8131b61..e21cd92 100644
--- a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void clamp_1a32e3(tint_module_vars_struct tint_module_vars) {
+ int4 res = int4(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_1a32e3 = func():void {
- $B2: {
- %res:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_1a32e3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %clamp_1a32e3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_1a32e3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %clamp_1a32e3
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_1a32e3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %clamp_1a32e3
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.ir.msl
index f8430e1..c70dc5c 100644
--- a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void clamp_235b29(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_235b29 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_235b29(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %clamp_235b29
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_235b29(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %clamp_235b29
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_235b29(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %clamp_235b29
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.ir.msl
index 278d8a5..dbc0ae4 100644
--- a/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void clamp_2bd567(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_2bd567 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_2bd567(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %clamp_2bd567
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_2bd567(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %clamp_2bd567
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_2bd567(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %clamp_2bd567
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.ir.msl
index a3c2507..9c3eff6 100644
--- a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void clamp_2bde41(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_2bde41 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_2bde41(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %clamp_2bde41
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_2bde41(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %clamp_2bde41
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_2bde41(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %clamp_2bde41
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.ir.msl
index a2ed8b1..50311dd 100644
--- a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void clamp_2c251b(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_2c251b = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_2c251b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %clamp_2c251b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_2c251b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %clamp_2c251b
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_2c251b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %clamp_2c251b
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.ir.msl
index cefe9bc..0a0bb09 100644
--- a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void clamp_548fc7(tint_module_vars_struct tint_module_vars) {
+ uint3 res = uint3(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_548fc7 = func():void {
- $B2: {
- %res:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_548fc7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %clamp_548fc7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_548fc7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %clamp_548fc7
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_548fc7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %clamp_548fc7
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.ir.msl
index 3547c96..d59b17d 100644
--- a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void clamp_553ffb(tint_module_vars_struct tint_module_vars) {
+ half res = 1.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_553ffb = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_553ffb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %clamp_553ffb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_553ffb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %clamp_553ffb
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_553ffb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %clamp_553ffb
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.ir.msl
index bc20786..b8d142d 100644
--- a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void clamp_5f0819(tint_module_vars_struct tint_module_vars) {
+ int3 res = int3(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_5f0819 = func():void {
- $B2: {
- %res:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_5f0819(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %clamp_5f0819
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_5f0819(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %clamp_5f0819
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_5f0819(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %clamp_5f0819
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.ir.msl
index 9f66e57..d84db50 100644
--- a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void clamp_6c1749(tint_module_vars_struct tint_module_vars) {
+ int2 res = int2(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_6c1749 = func():void {
- $B2: {
- %res:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_6c1749(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %clamp_6c1749
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_6c1749(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %clamp_6c1749
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_6c1749(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %clamp_6c1749
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.ir.msl
index 5195b7a..fc17186 100644
--- a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void clamp_7706d7(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_7706d7 = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_7706d7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %clamp_7706d7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_7706d7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %clamp_7706d7
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_7706d7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %clamp_7706d7
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.ir.msl
index 1e11eec..dbb32bc 100644
--- a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void clamp_867397(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_867397 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_867397(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %clamp_867397
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_867397(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %clamp_867397
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_867397(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %clamp_867397
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.ir.msl
index d0bbda6..483af36 100644
--- a/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/clamp/a2de25.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void clamp_a2de25(tint_module_vars_struct tint_module_vars) {
+ uint res = 1u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_a2de25 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_a2de25(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %clamp_a2de25
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_a2de25(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %clamp_a2de25
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_a2de25(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %clamp_a2de25
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.ir.msl
index 863bcde..9a91a8e 100644
--- a/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/clamp/b07c65.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void clamp_b07c65(tint_module_vars_struct tint_module_vars) {
+ int res = 1;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_b07c65 = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_b07c65(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %clamp_b07c65
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_b07c65(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %clamp_b07c65
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_b07c65(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %clamp_b07c65
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.ir.msl
index 25bbaa4..67a2d0c 100644
--- a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void clamp_b195eb(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_b195eb = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_b195eb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %clamp_b195eb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_b195eb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %clamp_b195eb
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_b195eb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %clamp_b195eb
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.ir.msl
index 6932a36..71e0b28 100644
--- a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void clamp_bd43ce(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_bd43ce = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_bd43ce(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %clamp_bd43ce
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_bd43ce(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %clamp_bd43ce
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_bd43ce(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %clamp_bd43ce
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.ir.msl
index b323c26..26a41b6 100644
--- a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void cos_0835a8(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cos_0835a8 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cos_0835a8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %cos_0835a8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_0835a8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %cos_0835a8
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_0835a8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %cos_0835a8
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.ir.msl
index 6bd3a28..2107cb1 100644
--- a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void cos_0a89f7(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cos_0a89f7 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cos_0a89f7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %cos_0a89f7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_0a89f7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %cos_0a89f7
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_0a89f7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %cos_0a89f7
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.ir.msl
index 0c91334..5424387 100644
--- a/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void cos_16dc15(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cos_16dc15 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cos_16dc15(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %cos_16dc15
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_16dc15(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %cos_16dc15
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_16dc15(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %cos_16dc15
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.ir.msl
index 5fe42c8..a47d22b 100644
--- a/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void cos_29d66d(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cos_29d66d = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cos_29d66d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %cos_29d66d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_29d66d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %cos_29d66d
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_29d66d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %cos_29d66d
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.ir.msl
index 595285b..c26dc40 100644
--- a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void cos_5bc2c6(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cos_5bc2c6 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cos_5bc2c6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %cos_5bc2c6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_5bc2c6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %cos_5bc2c6
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_5bc2c6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %cos_5bc2c6
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.ir.msl
index d5bee61..dd38a59 100644
--- a/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void cos_c3b486(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cos_c3b486 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cos_c3b486(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %cos_c3b486
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_c3b486(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %cos_c3b486
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_c3b486(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %cos_c3b486
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/cos/c5c28e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/cos/c5c28e.wgsl.expected.ir.msl
index f6f9e7c..be5d5be 100644
--- a/test/tint/builtins/gen/literal/cos/c5c28e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/cos/c5c28e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void cos_c5c28e(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cos_c5c28e = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cos_c5c28e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %cos_c5c28e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_c5c28e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %cos_c5c28e
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_c5c28e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %cos_c5c28e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.ir.msl
index f6a7058..7260e74 100644
--- a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void cos_fc047d(tint_module_vars_struct tint_module_vars) {
+ half res = 1.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cos_fc047d = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cos_fc047d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %cos_fc047d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_fc047d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %cos_fc047d
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_fc047d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %cos_fc047d
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.ir.msl
index 9e28d57..53da066 100644
--- a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void cosh_2ed778(tint_module_vars_struct tint_module_vars) {
+ half res = 1.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cosh_2ed778 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cosh_2ed778(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %cosh_2ed778
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_2ed778(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %cosh_2ed778
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_2ed778(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %cosh_2ed778
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.ir.msl
index fc9db4e..a2b848e 100644
--- a/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void cosh_377652(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cosh_377652 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cosh_377652(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %cosh_377652
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_377652(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %cosh_377652
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_377652(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %cosh_377652
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.ir.msl
index 228b46f..81c12c1 100644
--- a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void cosh_3b7bbf(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cosh_3b7bbf = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cosh_3b7bbf(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %cosh_3b7bbf
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_3b7bbf(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %cosh_3b7bbf
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_3b7bbf(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %cosh_3b7bbf
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.ir.msl
index b9141f6..c80d82b 100644
--- a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void cosh_43b672(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cosh_43b672 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cosh_43b672(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %cosh_43b672
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_43b672(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %cosh_43b672
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_43b672(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %cosh_43b672
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.ir.msl
index e40d2a4..13f61c6 100644
--- a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void cosh_b1b8a0(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cosh_b1b8a0 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cosh_b1b8a0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %cosh_b1b8a0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_b1b8a0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %cosh_b1b8a0
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_b1b8a0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %cosh_b1b8a0
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.ir.msl
index 0b0a20d..c817215 100644
--- a/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void cosh_c13756(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cosh_c13756 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cosh_c13756(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %cosh_c13756
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_c13756(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %cosh_c13756
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_c13756(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %cosh_c13756
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/cosh/da92dd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/cosh/da92dd.wgsl.expected.ir.msl
index bbc76c4..8e56bed 100644
--- a/test/tint/builtins/gen/literal/cosh/da92dd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/cosh/da92dd.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void cosh_da92dd(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cosh_da92dd = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cosh_da92dd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %cosh_da92dd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_da92dd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %cosh_da92dd
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_da92dd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %cosh_da92dd
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.ir.msl
index 3fa03d0..df10e3e 100644
--- a/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void cosh_e0c1de(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cosh_e0c1de = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cosh_e0c1de(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %cosh_e0c1de
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_e0c1de(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %cosh_e0c1de
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_e0c1de(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %cosh_e0c1de
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/208d46.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countLeadingZeros/208d46.wgsl.expected.ir.msl
index 7b16c66..05f9b02 100644
--- a/test/tint/builtins/gen/literal/countLeadingZeros/208d46.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countLeadingZeros/208d46.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void countLeadingZeros_208d46(tint_module_vars_struct tint_module_vars) {
+ uint res = 31u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countLeadingZeros_208d46 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 31u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countLeadingZeros_208d46(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countLeadingZeros_208d46
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_208d46(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countLeadingZeros_208d46
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_208d46(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countLeadingZeros_208d46
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/6d4656.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countLeadingZeros/6d4656.wgsl.expected.ir.msl
index f00a512..c42ab4a 100644
--- a/test/tint/builtins/gen/literal/countLeadingZeros/6d4656.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countLeadingZeros/6d4656.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void countLeadingZeros_6d4656(tint_module_vars_struct tint_module_vars) {
+ int res = 31;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countLeadingZeros_6d4656 = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 31i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countLeadingZeros_6d4656(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countLeadingZeros_6d4656
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_6d4656(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countLeadingZeros_6d4656
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_6d4656(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countLeadingZeros_6d4656
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.ir.msl
index 877ed3f..922a96a 100644
--- a/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void countLeadingZeros_70783f(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(31u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countLeadingZeros_70783f = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(31u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countLeadingZeros_70783f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countLeadingZeros_70783f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_70783f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countLeadingZeros_70783f
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_70783f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countLeadingZeros_70783f
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.ir.msl
index 014eec5..a958201 100644
--- a/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void countLeadingZeros_7c38a6(tint_module_vars_struct tint_module_vars) {
+ int3 res = int3(31);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countLeadingZeros_7c38a6 = func():void {
- $B2: {
- %res:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(31i)
- %4:vec3<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countLeadingZeros_7c38a6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countLeadingZeros_7c38a6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_7c38a6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countLeadingZeros_7c38a6
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_7c38a6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countLeadingZeros_7c38a6
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.ir.msl
index f4367ad..2814ef4 100644
--- a/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void countLeadingZeros_858d40(tint_module_vars_struct tint_module_vars) {
+ int2 res = int2(31);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countLeadingZeros_858d40 = func():void {
- $B2: {
- %res:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(31i)
- %4:vec2<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countLeadingZeros_858d40(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countLeadingZeros_858d40
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_858d40(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countLeadingZeros_858d40
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_858d40(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countLeadingZeros_858d40
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.ir.msl
index 6b4e08f..282674a 100644
--- a/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void countLeadingZeros_ab6345(tint_module_vars_struct tint_module_vars) {
+ uint3 res = uint3(31u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countLeadingZeros_ab6345 = func():void {
- $B2: {
- %res:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(31u)
- %4:vec3<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countLeadingZeros_ab6345(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countLeadingZeros_ab6345
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_ab6345(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countLeadingZeros_ab6345
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_ab6345(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countLeadingZeros_ab6345
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.ir.msl
index 9ac6475..eaf5ec7 100644
--- a/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void countLeadingZeros_eab32b(tint_module_vars_struct tint_module_vars) {
+ int4 res = int4(31);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countLeadingZeros_eab32b = func():void {
- $B2: {
- %res:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(31i)
- %4:vec4<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countLeadingZeros_eab32b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countLeadingZeros_eab32b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_eab32b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countLeadingZeros_eab32b
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_eab32b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countLeadingZeros_eab32b
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.ir.msl
index 53bf941..b35fea7 100644
--- a/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void countLeadingZeros_f70103(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(31u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countLeadingZeros_f70103 = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(31u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countLeadingZeros_f70103(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countLeadingZeros_f70103
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_f70103(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countLeadingZeros_f70103
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_f70103(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countLeadingZeros_f70103
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.ir.msl
index d960057..4540ccb 100644
--- a/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void countOneBits_0d0e46(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countOneBits_0d0e46 = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countOneBits_0d0e46(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countOneBits_0d0e46
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_0d0e46(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countOneBits_0d0e46
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_0d0e46(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countOneBits_0d0e46
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.ir.msl
index 446cd6a..50d2c0b 100644
--- a/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void countOneBits_0f7980(tint_module_vars_struct tint_module_vars) {
+ int4 res = int4(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countOneBits_0f7980 = func():void {
- $B2: {
- %res:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countOneBits_0f7980(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countOneBits_0f7980
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_0f7980(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countOneBits_0f7980
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_0f7980(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countOneBits_0f7980
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.ir.msl
index db213b7..a1de28f 100644
--- a/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void countOneBits_65d2ae(tint_module_vars_struct tint_module_vars) {
+ int3 res = int3(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countOneBits_65d2ae = func():void {
- $B2: {
- %res:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countOneBits_65d2ae(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countOneBits_65d2ae
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_65d2ae(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countOneBits_65d2ae
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_65d2ae(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countOneBits_65d2ae
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.ir.msl
index 61293cf..8ecd496 100644
--- a/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void countOneBits_690cfc(tint_module_vars_struct tint_module_vars) {
+ uint3 res = uint3(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countOneBits_690cfc = func():void {
- $B2: {
- %res:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countOneBits_690cfc(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countOneBits_690cfc
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_690cfc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countOneBits_690cfc
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_690cfc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countOneBits_690cfc
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.ir.msl
index a79b4dc..28209e0 100644
--- a/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void countOneBits_94fd81(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countOneBits_94fd81 = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countOneBits_94fd81(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countOneBits_94fd81
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_94fd81(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countOneBits_94fd81
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_94fd81(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countOneBits_94fd81
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countOneBits/ae44f9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countOneBits/ae44f9.wgsl.expected.ir.msl
index 4d06d68..0425f73 100644
--- a/test/tint/builtins/gen/literal/countOneBits/ae44f9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countOneBits/ae44f9.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void countOneBits_ae44f9(tint_module_vars_struct tint_module_vars) {
+ uint res = 1u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countOneBits_ae44f9 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countOneBits_ae44f9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countOneBits_ae44f9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_ae44f9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countOneBits_ae44f9
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_ae44f9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countOneBits_ae44f9
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.ir.msl
index 8722955..48dd55b 100644
--- a/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void countOneBits_af90e2(tint_module_vars_struct tint_module_vars) {
+ int2 res = int2(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countOneBits_af90e2 = func():void {
- $B2: {
- %res:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countOneBits_af90e2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countOneBits_af90e2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_af90e2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countOneBits_af90e2
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_af90e2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countOneBits_af90e2
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countOneBits/fd88b2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countOneBits/fd88b2.wgsl.expected.ir.msl
index 31c6f40..4932ebf 100644
--- a/test/tint/builtins/gen/literal/countOneBits/fd88b2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countOneBits/fd88b2.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void countOneBits_fd88b2(tint_module_vars_struct tint_module_vars) {
+ int res = 1;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countOneBits_fd88b2 = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countOneBits_fd88b2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countOneBits_fd88b2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_fd88b2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countOneBits_fd88b2
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_fd88b2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countOneBits_fd88b2
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.ir.msl
index 5aa4bdc..37739c8 100644
--- a/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void countTrailingZeros_1ad138(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(0u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countTrailingZeros_1ad138 = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(0u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countTrailingZeros_1ad138(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countTrailingZeros_1ad138
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_1ad138(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countTrailingZeros_1ad138
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_1ad138(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countTrailingZeros_1ad138
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.ir.msl
index dd5f1af..dd7e884 100644
--- a/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void countTrailingZeros_1dc84a(tint_module_vars_struct tint_module_vars) {
+ int4 res = int4(0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countTrailingZeros_1dc84a = func():void {
- $B2: {
- %res:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(0i)
- %4:vec4<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countTrailingZeros_1dc84a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countTrailingZeros_1dc84a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_1dc84a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countTrailingZeros_1dc84a
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_1dc84a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countTrailingZeros_1dc84a
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/21e394.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countTrailingZeros/21e394.wgsl.expected.ir.msl
index 509e755..a1a0e97 100644
--- a/test/tint/builtins/gen/literal/countTrailingZeros/21e394.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countTrailingZeros/21e394.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void countTrailingZeros_21e394(tint_module_vars_struct tint_module_vars) {
+ uint res = 0u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countTrailingZeros_21e394 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 0u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countTrailingZeros_21e394(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countTrailingZeros_21e394
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_21e394(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countTrailingZeros_21e394
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_21e394(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countTrailingZeros_21e394
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.ir.msl
index 0397cf3..046bcd0 100644
--- a/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void countTrailingZeros_327c37(tint_module_vars_struct tint_module_vars) {
+ int2 res = int2(0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countTrailingZeros_327c37 = func():void {
- $B2: {
- %res:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(0i)
- %4:vec2<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countTrailingZeros_327c37(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countTrailingZeros_327c37
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_327c37(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countTrailingZeros_327c37
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_327c37(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countTrailingZeros_327c37
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/42fed6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countTrailingZeros/42fed6.wgsl.expected.ir.msl
index f18d316..f42bf43 100644
--- a/test/tint/builtins/gen/literal/countTrailingZeros/42fed6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countTrailingZeros/42fed6.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void countTrailingZeros_42fed6(tint_module_vars_struct tint_module_vars) {
+ int res = 0;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countTrailingZeros_42fed6 = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 0i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countTrailingZeros_42fed6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countTrailingZeros_42fed6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_42fed6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countTrailingZeros_42fed6
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_42fed6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countTrailingZeros_42fed6
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.ir.msl
index a2334a5..a6244f4 100644
--- a/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void countTrailingZeros_8ed26f(tint_module_vars_struct tint_module_vars) {
+ uint3 res = uint3(0u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countTrailingZeros_8ed26f = func():void {
- $B2: {
- %res:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(0u)
- %4:vec3<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countTrailingZeros_8ed26f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countTrailingZeros_8ed26f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_8ed26f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countTrailingZeros_8ed26f
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_8ed26f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countTrailingZeros_8ed26f
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.ir.msl
index 6e8d1e2..1e97542 100644
--- a/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void countTrailingZeros_acfacb(tint_module_vars_struct tint_module_vars) {
+ int3 res = int3(0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countTrailingZeros_acfacb = func():void {
- $B2: {
- %res:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(0i)
- %4:vec3<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countTrailingZeros_acfacb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countTrailingZeros_acfacb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_acfacb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countTrailingZeros_acfacb
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_acfacb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countTrailingZeros_acfacb
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.ir.msl
index 11d2846..ed0569b 100644
--- a/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void countTrailingZeros_d2b4a0(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(0u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countTrailingZeros_d2b4a0 = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(0u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countTrailingZeros_d2b4a0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %countTrailingZeros_d2b4a0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_d2b4a0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %countTrailingZeros_d2b4a0
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_d2b4a0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %countTrailingZeros_d2b4a0
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.ir.msl
index 2a70cd0..ad96710 100644
--- a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void cross_041cb0(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(0.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cross_041cb0 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cross_041cb0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %cross_041cb0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cross_041cb0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %cross_041cb0
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cross_041cb0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %cross_041cb0
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.ir.msl
index 5e59e1e..fe3ccd7 100644
--- a/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void cross_9857cb(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(0.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cross_9857cb = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cross_9857cb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %cross_9857cb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cross_9857cb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %cross_9857cb
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cross_9857cb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %cross_9857cb
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.ir.msl
index f0d467e..5e0e469 100644
--- a/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void degrees_0d170c(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(57.2957763671875f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%degrees_0d170c = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(57.2957763671875f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ degrees_0d170c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %degrees_0d170c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ degrees_0d170c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %degrees_0d170c
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ degrees_0d170c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %degrees_0d170c
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.ir.msl
index a2731d6..e13c449 100644
--- a/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void degrees_1ad5df(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(57.2957763671875f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%degrees_1ad5df = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(57.2957763671875f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ degrees_1ad5df(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %degrees_1ad5df
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ degrees_1ad5df(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %degrees_1ad5df
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ degrees_1ad5df(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %degrees_1ad5df
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.ir.msl
index 1780616..69219b5 100644
--- a/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void degrees_2af623(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(57.2957763671875f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%degrees_2af623 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(57.2957763671875f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ degrees_2af623(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %degrees_2af623
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ degrees_2af623(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %degrees_2af623
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ degrees_2af623(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %degrees_2af623
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.ir.msl
index bbc4216..ce9155c 100644
--- a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void degrees_3055d3(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(57.3125h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%degrees_3055d3 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(57.3125h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ degrees_3055d3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %degrees_3055d3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ degrees_3055d3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %degrees_3055d3
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ degrees_3055d3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %degrees_3055d3
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/degrees/51f705.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/degrees/51f705.wgsl.expected.ir.msl
index 7f7c0dd..748cd48 100644
--- a/test/tint/builtins/gen/literal/degrees/51f705.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/degrees/51f705.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void degrees_51f705(tint_module_vars_struct tint_module_vars) {
+ float res = 57.2957763671875f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%degrees_51f705 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 57.2957763671875f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ degrees_51f705(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %degrees_51f705
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ degrees_51f705(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %degrees_51f705
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ degrees_51f705(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %degrees_51f705
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.ir.msl
index 3b25593..193e812 100644
--- a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void degrees_5e9805(tint_module_vars_struct tint_module_vars) {
+ half res = 57.3125h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%degrees_5e9805 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 57.3125h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ degrees_5e9805(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %degrees_5e9805
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ degrees_5e9805(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %degrees_5e9805
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ degrees_5e9805(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %degrees_5e9805
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.ir.msl
index d6eca91..2bcc723 100644
--- a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void degrees_dfe8f4(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(57.3125h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%degrees_dfe8f4 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(57.3125h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ degrees_dfe8f4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %degrees_dfe8f4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ degrees_dfe8f4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %degrees_dfe8f4
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ degrees_dfe8f4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %degrees_dfe8f4
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.ir.msl
index fb976de..5c50bd0 100644
--- a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void degrees_f59715(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(57.3125h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%degrees_f59715 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(57.3125h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ degrees_f59715(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %degrees_f59715
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ degrees_f59715(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %degrees_f59715
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ degrees_f59715(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %degrees_f59715
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.ir.msl
index 9df2f04..fc015f0 100644
--- a/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void determinant_2b62ba(tint_module_vars_struct tint_module_vars) {
+ float res = 0.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%determinant_2b62ba = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ determinant_2b62ba(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %determinant_2b62ba
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_2b62ba(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %determinant_2b62ba
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_2b62ba(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %determinant_2b62ba
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.ir.msl
index e75c120..f0ff4ee 100644
--- a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void determinant_32bfde(tint_module_vars_struct tint_module_vars) {
+ half res = 0.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%determinant_32bfde = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ determinant_32bfde(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %determinant_32bfde
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_32bfde(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %determinant_32bfde
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_32bfde(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %determinant_32bfde
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.ir.msl
index 2e0d308..53aba11 100644
--- a/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void determinant_a0a87c(tint_module_vars_struct tint_module_vars) {
+ float res = 0.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%determinant_a0a87c = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ determinant_a0a87c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %determinant_a0a87c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_a0a87c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %determinant_a0a87c
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_a0a87c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %determinant_a0a87c
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.ir.msl
index 274863b..a6e603d 100644
--- a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void determinant_d7c86f(tint_module_vars_struct tint_module_vars) {
+ half res = 0.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%determinant_d7c86f = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ determinant_d7c86f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %determinant_d7c86f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_d7c86f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %determinant_d7c86f
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_d7c86f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %determinant_d7c86f
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.ir.msl
index 4a41cc3..ea309f49a 100644
--- a/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void determinant_e19305(tint_module_vars_struct tint_module_vars) {
+ float res = 0.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%determinant_e19305 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ determinant_e19305(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %determinant_e19305
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_e19305(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %determinant_e19305
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_e19305(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %determinant_e19305
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.ir.msl
index 6154bba..c45f35b 100644
--- a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void determinant_fc12a5(tint_module_vars_struct tint_module_vars) {
+ half res = 0.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%determinant_fc12a5 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ determinant_fc12a5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %determinant_fc12a5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_fc12a5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %determinant_fc12a5
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_fc12a5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %determinant_fc12a5
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.ir.msl
index 78a2556..ff7b882 100644
--- a/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void distance_0657d4(tint_module_vars_struct tint_module_vars) {
+ float res = 0.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%distance_0657d4 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ distance_0657d4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %distance_0657d4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ distance_0657d4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %distance_0657d4
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ distance_0657d4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %distance_0657d4
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.ir.msl
index 8a0343b..5502d98 100644
--- a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void distance_7272f3(tint_module_vars_struct tint_module_vars) {
+ half res = 0.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%distance_7272f3 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ distance_7272f3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %distance_7272f3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ distance_7272f3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %distance_7272f3
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ distance_7272f3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %distance_7272f3
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.ir.msl
index 85c9d8f..1e8e29d 100644
--- a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void distance_7d201f(tint_module_vars_struct tint_module_vars) {
+ half res = 0.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%distance_7d201f = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ distance_7d201f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %distance_7d201f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ distance_7d201f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %distance_7d201f
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ distance_7d201f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %distance_7d201f
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.ir.msl
index 9ae524c..0747564 100644
--- a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void distance_892a5d(tint_module_vars_struct tint_module_vars) {
+ half res = 0.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%distance_892a5d = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ distance_892a5d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %distance_892a5d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ distance_892a5d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %distance_892a5d
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ distance_892a5d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %distance_892a5d
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.ir.msl
index ca0afc3..2a1a8b8 100644
--- a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void distance_928fa0(tint_module_vars_struct tint_module_vars) {
+ half res = 0.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%distance_928fa0 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ distance_928fa0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %distance_928fa0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ distance_928fa0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %distance_928fa0
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ distance_928fa0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %distance_928fa0
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.ir.msl
index 0570269..a3c0a1c 100644
--- a/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void distance_9646ea(tint_module_vars_struct tint_module_vars) {
+ float res = 0.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%distance_9646ea = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ distance_9646ea(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %distance_9646ea
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ distance_9646ea(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %distance_9646ea
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ distance_9646ea(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %distance_9646ea
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.ir.msl
index fa38915..dd4110f 100644
--- a/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void distance_aa4055(tint_module_vars_struct tint_module_vars) {
+ float res = 0.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%distance_aa4055 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ distance_aa4055(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %distance_aa4055
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ distance_aa4055(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %distance_aa4055
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ distance_aa4055(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %distance_aa4055
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/distance/cfed73.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/distance/cfed73.wgsl.expected.ir.msl
index ff4d191..98a5df1 100644
--- a/test/tint/builtins/gen/literal/distance/cfed73.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/distance/cfed73.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void distance_cfed73(tint_module_vars_struct tint_module_vars) {
+ float res = 0.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%distance_cfed73 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ distance_cfed73(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %distance_cfed73
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ distance_cfed73(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %distance_cfed73
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ distance_cfed73(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %distance_cfed73
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.ir.msl
index 8aa1c92..af9deea 100644
--- a/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void dot_0c577b(tint_module_vars_struct tint_module_vars) {
+ float res = 4.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dot_0c577b = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 4.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ dot_0c577b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %dot_0c577b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_0c577b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %dot_0c577b
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_0c577b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %dot_0c577b
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.ir.msl
index 0834e2a..9cb6733 100644
--- a/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void dot_7548a0(tint_module_vars_struct tint_module_vars) {
+ uint res = 3u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dot_7548a0 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 3u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ dot_7548a0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %dot_7548a0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_7548a0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %dot_7548a0
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_7548a0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %dot_7548a0
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.ir.msl
index 9c80dce..1d1a708 100644
--- a/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void dot_883f0e(tint_module_vars_struct tint_module_vars) {
+ float res = 2.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dot_883f0e = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 2.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ dot_883f0e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %dot_883f0e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_883f0e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %dot_883f0e
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_883f0e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %dot_883f0e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.ir.msl
index f4e1747..dc45f34 100644
--- a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void dot_8e40f1(tint_module_vars_struct tint_module_vars) {
+ half res = 3.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dot_8e40f1 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 3.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ dot_8e40f1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %dot_8e40f1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_8e40f1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %dot_8e40f1
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_8e40f1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %dot_8e40f1
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.ir.msl
index cffc5db..c4401a2 100644
--- a/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void dot_97c7ee(tint_module_vars_struct tint_module_vars) {
+ uint res = 2u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dot_97c7ee = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 2u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ dot_97c7ee(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %dot_97c7ee
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_97c7ee(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %dot_97c7ee
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_97c7ee(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %dot_97c7ee
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.ir.msl
index 612a9ac..ac2da3f 100644
--- a/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void dot_ba4246(tint_module_vars_struct tint_module_vars) {
+ float res = 3.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dot_ba4246 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 3.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ dot_ba4246(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %dot_ba4246
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_ba4246(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %dot_ba4246
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_ba4246(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %dot_ba4246
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.ir.msl
index 335ad7e..11abe66 100644
--- a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void dot_cd5a04(tint_module_vars_struct tint_module_vars) {
+ half res = 2.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dot_cd5a04 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 2.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ dot_cd5a04(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %dot_cd5a04
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_cd5a04(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %dot_cd5a04
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_cd5a04(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %dot_cd5a04
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.ir.msl
index 125642e..6892417 100644
--- a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void dot_d0d179(tint_module_vars_struct tint_module_vars) {
+ half res = 4.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dot_d0d179 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 4.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ dot_d0d179(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %dot_d0d179
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_d0d179(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %dot_d0d179
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_d0d179(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %dot_d0d179
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.ir.msl
index 418954c..95ce9a2 100644
--- a/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void dot_e994c7(tint_module_vars_struct tint_module_vars) {
+ uint res = 4u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dot_e994c7 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 4u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ dot_e994c7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %dot_e994c7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_e994c7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %dot_e994c7
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_e994c7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %dot_e994c7
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.ir.msl
index b6235b4..54bd048 100644
--- a/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void dot_ef6b1d(tint_module_vars_struct tint_module_vars) {
+ int res = 4;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dot_ef6b1d = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 4i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ dot_ef6b1d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %dot_ef6b1d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_ef6b1d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %dot_ef6b1d
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_ef6b1d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %dot_ef6b1d
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.ir.msl
index 7025b74..19b5e18 100644
--- a/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void dot_f1312c(tint_module_vars_struct tint_module_vars) {
+ int res = 3;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dot_f1312c = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 3i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ dot_f1312c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %dot_f1312c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_f1312c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %dot_f1312c
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_f1312c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %dot_f1312c
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.ir.msl
index 01a04f0..919164c 100644
--- a/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void dot_fc5f7c(tint_module_vars_struct tint_module_vars) {
+ int res = 2;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dot_fc5f7c = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 2i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ dot_fc5f7c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %dot_fc5f7c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_fc5f7c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %dot_fc5f7c
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot_fc5f7c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %dot_fc5f7c
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.ir.msl
index 945e756..a391bdc 100644
--- a/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void dot4I8Packed_881e62(tint_module_vars_struct tint_module_vars) {
+ int res = 1;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dot4I8Packed_881e62 = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ dot4I8Packed_881e62(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %dot4I8Packed_881e62
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot4I8Packed_881e62(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %dot4I8Packed_881e62
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot4I8Packed_881e62(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %dot4I8Packed_881e62
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.ir.msl
index 204d5f9..7149244 100644
--- a/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void dot4U8Packed_fbed7b(tint_module_vars_struct tint_module_vars) {
+ uint res = 1u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dot4U8Packed_fbed7b = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ dot4U8Packed_fbed7b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %dot4U8Packed_fbed7b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot4U8Packed_fbed7b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %dot4U8Packed_fbed7b
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dot4U8Packed_fbed7b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %dot4U8Packed_fbed7b
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.ir.msl
index 0ca863b..cbd927c 100644
--- a/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void dpdx_0763f7(tint_module_vars_struct tint_module_vars) {
+ float3 res = dfdx(float3(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdx_0763f7 = func():void {
- $B2: {
- %3:vec3<f32> = dpdx vec3<f32>(1.0f)
- %res:ptr<function, vec3<f32>, read_write> = var, %3
- %5:vec3<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdx_0763f7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdx_0763f7
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.ir.msl
index e0fba5d..462b4a7 100644
--- a/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void dpdx_99edb1(tint_module_vars_struct tint_module_vars) {
+ float2 res = dfdx(float2(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdx_99edb1 = func():void {
- $B2: {
- %3:vec2<f32> = dpdx vec2<f32>(1.0f)
- %res:ptr<function, vec2<f32>, read_write> = var, %3
- %5:vec2<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdx_99edb1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdx_99edb1
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.ir.msl
index 9e269f9..af128dc 100644
--- a/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void dpdx_c487fa(tint_module_vars_struct tint_module_vars) {
+ float4 res = dfdx(float4(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdx_c487fa = func():void {
- $B2: {
- %3:vec4<f32> = dpdx vec4<f32>(1.0f)
- %res:ptr<function, vec4<f32>, read_write> = var, %3
- %5:vec4<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdx_c487fa(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdx_c487fa
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdx/e263de.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdx/e263de.wgsl.expected.ir.msl
index a69f997..c2ff394 100644
--- a/test/tint/builtins/gen/literal/dpdx/e263de.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdx/e263de.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void dpdx_e263de(tint_module_vars_struct tint_module_vars) {
+ float res = dfdx(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdx_e263de = func():void {
- $B2: {
- %3:f32 = dpdx 1.0f
- %res:ptr<function, f32, read_write> = var, %3
- %5:f32 = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdx_e263de(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdx_e263de
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/029152.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdxCoarse/029152.wgsl.expected.ir.msl
index 8ba18ce..161397a 100644
--- a/test/tint/builtins/gen/literal/dpdxCoarse/029152.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdxCoarse/029152.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void dpdxCoarse_029152(tint_module_vars_struct tint_module_vars) {
+ float res = dfdx(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdxCoarse_029152 = func():void {
- $B2: {
- %3:f32 = dpdxCoarse 1.0f
- %res:ptr<function, f32, read_write> = var, %3
- %5:f32 = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdxCoarse_029152(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdxCoarse_029152
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.ir.msl
index 1be7290..a0dcfc5 100644
--- a/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void dpdxCoarse_9581cf(tint_module_vars_struct tint_module_vars) {
+ float2 res = dfdx(float2(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdxCoarse_9581cf = func():void {
- $B2: {
- %3:vec2<f32> = dpdxCoarse vec2<f32>(1.0f)
- %res:ptr<function, vec2<f32>, read_write> = var, %3
- %5:vec2<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdxCoarse_9581cf(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdxCoarse_9581cf
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.ir.msl
index df5d6f1..0a0df60 100644
--- a/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void dpdxCoarse_c28641(tint_module_vars_struct tint_module_vars) {
+ float4 res = dfdx(float4(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdxCoarse_c28641 = func():void {
- $B2: {
- %3:vec4<f32> = dpdxCoarse vec4<f32>(1.0f)
- %res:ptr<function, vec4<f32>, read_write> = var, %3
- %5:vec4<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdxCoarse_c28641(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdxCoarse_c28641
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.ir.msl
index 1a66f58..59434db 100644
--- a/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void dpdxCoarse_f64d7b(tint_module_vars_struct tint_module_vars) {
+ float3 res = dfdx(float3(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdxCoarse_f64d7b = func():void {
- $B2: {
- %3:vec3<f32> = dpdxCoarse vec3<f32>(1.0f)
- %res:ptr<function, vec3<f32>, read_write> = var, %3
- %5:vec3<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdxCoarse_f64d7b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdxCoarse_f64d7b
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.ir.msl
index e8c4db4..f0cd37f 100644
--- a/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void dpdxFine_8c5069(tint_module_vars_struct tint_module_vars) {
+ float4 res = dfdx(float4(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdxFine_8c5069 = func():void {
- $B2: {
- %3:vec4<f32> = dpdxFine vec4<f32>(1.0f)
- %res:ptr<function, vec4<f32>, read_write> = var, %3
- %5:vec4<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdxFine_8c5069(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdxFine_8c5069
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.ir.msl
index 4df38c3..93634f7 100644
--- a/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void dpdxFine_9631de(tint_module_vars_struct tint_module_vars) {
+ float2 res = dfdx(float2(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdxFine_9631de = func():void {
- $B2: {
- %3:vec2<f32> = dpdxFine vec2<f32>(1.0f)
- %res:ptr<function, vec2<f32>, read_write> = var, %3
- %5:vec2<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdxFine_9631de(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdxFine_9631de
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdxFine/f401a2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdxFine/f401a2.wgsl.expected.ir.msl
index 5ba2362..474de4a 100644
--- a/test/tint/builtins/gen/literal/dpdxFine/f401a2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdxFine/f401a2.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void dpdxFine_f401a2(tint_module_vars_struct tint_module_vars) {
+ float res = dfdx(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdxFine_f401a2 = func():void {
- $B2: {
- %3:f32 = dpdxFine 1.0f
- %res:ptr<function, f32, read_write> = var, %3
- %5:f32 = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdxFine_f401a2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdxFine_f401a2
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.ir.msl
index e47e06e..49b3b20 100644
--- a/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void dpdxFine_f92fb6(tint_module_vars_struct tint_module_vars) {
+ float3 res = dfdx(float3(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdxFine_f92fb6 = func():void {
- $B2: {
- %3:vec3<f32> = dpdxFine vec3<f32>(1.0f)
- %res:ptr<function, vec3<f32>, read_write> = var, %3
- %5:vec3<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdxFine_f92fb6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdxFine_f92fb6
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.ir.msl
index 57691c8..641133b 100644
--- a/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void dpdy_699a05(tint_module_vars_struct tint_module_vars) {
+ float4 res = dfdy(float4(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdy_699a05 = func():void {
- $B2: {
- %3:vec4<f32> = dpdy vec4<f32>(1.0f)
- %res:ptr<function, vec4<f32>, read_write> = var, %3
- %5:vec4<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdy_699a05(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdy_699a05
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdy/7f8d84.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdy/7f8d84.wgsl.expected.ir.msl
index da25646..4206c12 100644
--- a/test/tint/builtins/gen/literal/dpdy/7f8d84.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdy/7f8d84.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void dpdy_7f8d84(tint_module_vars_struct tint_module_vars) {
+ float res = dfdy(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdy_7f8d84 = func():void {
- $B2: {
- %3:f32 = dpdy 1.0f
- %res:ptr<function, f32, read_write> = var, %3
- %5:f32 = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdy_7f8d84(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdy_7f8d84
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.ir.msl
index 585d377..dca2d00 100644
--- a/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void dpdy_a8b56e(tint_module_vars_struct tint_module_vars) {
+ float2 res = dfdy(float2(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdy_a8b56e = func():void {
- $B2: {
- %3:vec2<f32> = dpdy vec2<f32>(1.0f)
- %res:ptr<function, vec2<f32>, read_write> = var, %3
- %5:vec2<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdy_a8b56e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdy_a8b56e
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.ir.msl
index d260d93..205884c 100644
--- a/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void dpdy_feb40f(tint_module_vars_struct tint_module_vars) {
+ float3 res = dfdy(float3(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdy_feb40f = func():void {
- $B2: {
- %3:vec3<f32> = dpdy vec3<f32>(1.0f)
- %res:ptr<function, vec3<f32>, read_write> = var, %3
- %5:vec3<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdy_feb40f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdy_feb40f
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.ir.msl
index f9a4259..fda45d0 100644
--- a/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void dpdyCoarse_3e1ab4(tint_module_vars_struct tint_module_vars) {
+ float2 res = dfdy(float2(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdyCoarse_3e1ab4 = func():void {
- $B2: {
- %3:vec2<f32> = dpdyCoarse vec2<f32>(1.0f)
- %res:ptr<function, vec2<f32>, read_write> = var, %3
- %5:vec2<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdyCoarse_3e1ab4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdyCoarse_3e1ab4
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.ir.msl
index 9e6c52e..ba50752 100644
--- a/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void dpdyCoarse_445d24(tint_module_vars_struct tint_module_vars) {
+ float4 res = dfdy(float4(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdyCoarse_445d24 = func():void {
- $B2: {
- %3:vec4<f32> = dpdyCoarse vec4<f32>(1.0f)
- %res:ptr<function, vec4<f32>, read_write> = var, %3
- %5:vec4<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdyCoarse_445d24(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdyCoarse_445d24
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/870a7e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdyCoarse/870a7e.wgsl.expected.ir.msl
index 583e7d8..bc61b27 100644
--- a/test/tint/builtins/gen/literal/dpdyCoarse/870a7e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdyCoarse/870a7e.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void dpdyCoarse_870a7e(tint_module_vars_struct tint_module_vars) {
+ float res = dfdy(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdyCoarse_870a7e = func():void {
- $B2: {
- %3:f32 = dpdyCoarse 1.0f
- %res:ptr<function, f32, read_write> = var, %3
- %5:f32 = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdyCoarse_870a7e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdyCoarse_870a7e
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.ir.msl
index db85027..32e6c71 100644
--- a/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void dpdyCoarse_ae1873(tint_module_vars_struct tint_module_vars) {
+ float3 res = dfdy(float3(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdyCoarse_ae1873 = func():void {
- $B2: {
- %3:vec3<f32> = dpdyCoarse vec3<f32>(1.0f)
- %res:ptr<function, vec3<f32>, read_write> = var, %3
- %5:vec3<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdyCoarse_ae1873(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdyCoarse_ae1873
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.ir.msl
index 9104ee9..e86aae6 100644
--- a/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void dpdyFine_1fb7ab(tint_module_vars_struct tint_module_vars) {
+ float3 res = dfdy(float3(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdyFine_1fb7ab = func():void {
- $B2: {
- %3:vec3<f32> = dpdyFine vec3<f32>(1.0f)
- %res:ptr<function, vec3<f32>, read_write> = var, %3
- %5:vec3<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdyFine_1fb7ab(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdyFine_1fb7ab
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdyFine/6eb673.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdyFine/6eb673.wgsl.expected.ir.msl
index 95f7e27..a2cadb6 100644
--- a/test/tint/builtins/gen/literal/dpdyFine/6eb673.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdyFine/6eb673.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void dpdyFine_6eb673(tint_module_vars_struct tint_module_vars) {
+ float res = dfdy(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdyFine_6eb673 = func():void {
- $B2: {
- %3:f32 = dpdyFine 1.0f
- %res:ptr<function, f32, read_write> = var, %3
- %5:f32 = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdyFine_6eb673(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdyFine_6eb673
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.ir.msl
index 2bdcf10..b2b4047 100644
--- a/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void dpdyFine_d0a648(tint_module_vars_struct tint_module_vars) {
+ float4 res = dfdy(float4(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdyFine_d0a648 = func():void {
- $B2: {
- %3:vec4<f32> = dpdyFine vec4<f32>(1.0f)
- %res:ptr<function, vec4<f32>, read_write> = var, %3
- %5:vec4<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdyFine_d0a648(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdyFine_d0a648
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.ir.msl
index 2168616..4b1b9c9 100644
--- a/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void dpdyFine_df33aa(tint_module_vars_struct tint_module_vars) {
+ float2 res = dfdy(float2(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdyFine_df33aa = func():void {
- $B2: {
- %3:vec2<f32> = dpdyFine vec2<f32>(1.0f)
- %res:ptr<function, vec2<f32>, read_write> = var, %3
- %5:vec2<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdyFine_df33aa(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %dpdyFine_df33aa
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.ir.msl
index c48dffe..6c112fc 100644
--- a/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void exp_0f70eb(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(2.71828174591064453125f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp_0f70eb = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(2.71828174591064453125f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp_0f70eb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %exp_0f70eb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_0f70eb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %exp_0f70eb
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_0f70eb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %exp_0f70eb
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.ir.msl
index 7136422..461f4d5 100644
--- a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void exp_13806d(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(2.716796875h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp_13806d = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(2.716796875h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp_13806d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %exp_13806d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_13806d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %exp_13806d
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_13806d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %exp_13806d
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.ir.msl
index bef8951..ad9de99 100644
--- a/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void exp_1951e7(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(2.71828174591064453125f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp_1951e7 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(2.71828174591064453125f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp_1951e7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %exp_1951e7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_1951e7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %exp_1951e7
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_1951e7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %exp_1951e7
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.ir.msl
index 66b76b1..c41b585 100644
--- a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void exp_2e08e2(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(2.716796875h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp_2e08e2 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(2.716796875h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp_2e08e2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %exp_2e08e2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_2e08e2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %exp_2e08e2
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_2e08e2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %exp_2e08e2
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.ir.msl
index d5f6e29..eaa740a 100644
--- a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void exp_611a87(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(2.716796875h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp_611a87 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(2.716796875h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp_611a87(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %exp_611a87
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_611a87(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %exp_611a87
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_611a87(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %exp_611a87
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/exp/771fd2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/exp/771fd2.wgsl.expected.ir.msl
index 308e004..1723295 100644
--- a/test/tint/builtins/gen/literal/exp/771fd2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/exp/771fd2.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void exp_771fd2(tint_module_vars_struct tint_module_vars) {
+ float res = 2.71828174591064453125f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp_771fd2 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 2.71828174591064453125f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp_771fd2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %exp_771fd2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_771fd2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %exp_771fd2
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_771fd2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %exp_771fd2
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.ir.msl
index f5e4681..2e30001 100644
--- a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void exp_c18fe9(tint_module_vars_struct tint_module_vars) {
+ half res = 2.716796875h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp_c18fe9 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 2.716796875h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp_c18fe9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %exp_c18fe9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_c18fe9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %exp_c18fe9
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_c18fe9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %exp_c18fe9
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.ir.msl
index 850641c..d9040d1 100644
--- a/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void exp_d98450(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(2.71828174591064453125f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp_d98450 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(2.71828174591064453125f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp_d98450(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %exp_d98450
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_d98450(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %exp_d98450
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_d98450(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %exp_d98450
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.ir.msl
index adab754..0db2031 100644
--- a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void exp2_151a4c(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(2.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp2_151a4c = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(2.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp2_151a4c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %exp2_151a4c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_151a4c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %exp2_151a4c
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_151a4c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %exp2_151a4c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.ir.msl
index c3304fb..268a6de 100644
--- a/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void exp2_1f8680(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(2.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp2_1f8680 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(2.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp2_1f8680(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %exp2_1f8680
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_1f8680(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %exp2_1f8680
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_1f8680(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %exp2_1f8680
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.ir.msl
index a5ba82f..0ac3f4f 100644
--- a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void exp2_751377(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(2.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp2_751377 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(2.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp2_751377(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %exp2_751377
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_751377(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %exp2_751377
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_751377(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %exp2_751377
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.ir.msl
index 2545ae5..d37e920 100644
--- a/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void exp2_a9d0a7(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(2.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp2_a9d0a7 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(2.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp2_a9d0a7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %exp2_a9d0a7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_a9d0a7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %exp2_a9d0a7
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_a9d0a7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %exp2_a9d0a7
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.ir.msl
index 7792ed1..bb28ecd 100644
--- a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void exp2_b408e4(tint_module_vars_struct tint_module_vars) {
+ half res = 2.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp2_b408e4 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 2.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp2_b408e4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %exp2_b408e4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_b408e4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %exp2_b408e4
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_b408e4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %exp2_b408e4
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.ir.msl
index 43a70cf..4915739 100644
--- a/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void exp2_d6777c(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(2.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp2_d6777c = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(2.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp2_d6777c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %exp2_d6777c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_d6777c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %exp2_d6777c
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_d6777c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %exp2_d6777c
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/exp2/dea523.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/exp2/dea523.wgsl.expected.ir.msl
index f45114c..68c6d87 100644
--- a/test/tint/builtins/gen/literal/exp2/dea523.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/exp2/dea523.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void exp2_dea523(tint_module_vars_struct tint_module_vars) {
+ float res = 2.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp2_dea523 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 2.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp2_dea523(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %exp2_dea523
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_dea523(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %exp2_dea523
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_dea523(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %exp2_dea523
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.ir.msl
index 3b25fc4..9adae0a 100644
--- a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void exp2_ffa827(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(2.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp2_ffa827 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(2.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp2_ffa827(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %exp2_ffa827
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_ffa827(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %exp2_ffa827
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_ffa827(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %exp2_ffa827
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.ir.msl
index be9003a..66f2575 100644
--- a/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void extractBits_12b197(tint_module_vars_struct tint_module_vars) {
+ uint3 res = uint3(0u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%extractBits_12b197 = func():void {
- $B2: {
- %res:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(0u)
- %4:vec3<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ extractBits_12b197(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %extractBits_12b197
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_12b197(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %extractBits_12b197
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_12b197(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %extractBits_12b197
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/extractBits/249874.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/extractBits/249874.wgsl.expected.ir.msl
index cd8aeff..77a825c 100644
--- a/test/tint/builtins/gen/literal/extractBits/249874.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/extractBits/249874.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void extractBits_249874(tint_module_vars_struct tint_module_vars) {
+ int res = 0;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%extractBits_249874 = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 0i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ extractBits_249874(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %extractBits_249874
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_249874(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %extractBits_249874
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_249874(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %extractBits_249874
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.ir.msl
index 74087c6..64544c8 100644
--- a/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void extractBits_631377(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(0u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%extractBits_631377 = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(0u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ extractBits_631377(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %extractBits_631377
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_631377(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %extractBits_631377
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_631377(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %extractBits_631377
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.ir.msl
index 059bba4..17b6749 100644
--- a/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void extractBits_a99a8d(tint_module_vars_struct tint_module_vars) {
+ int2 res = int2(0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%extractBits_a99a8d = func():void {
- $B2: {
- %res:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(0i)
- %4:vec2<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ extractBits_a99a8d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %extractBits_a99a8d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_a99a8d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %extractBits_a99a8d
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_a99a8d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %extractBits_a99a8d
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/extractBits/ce81f8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/extractBits/ce81f8.wgsl.expected.ir.msl
index 6e7a578..a910804 100644
--- a/test/tint/builtins/gen/literal/extractBits/ce81f8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/extractBits/ce81f8.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void extractBits_ce81f8(tint_module_vars_struct tint_module_vars) {
+ uint res = 0u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%extractBits_ce81f8 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 0u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ extractBits_ce81f8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %extractBits_ce81f8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_ce81f8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %extractBits_ce81f8
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_ce81f8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %extractBits_ce81f8
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.ir.msl
index 7d86250..289584b 100644
--- a/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void extractBits_e04f5d(tint_module_vars_struct tint_module_vars) {
+ int3 res = int3(0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%extractBits_e04f5d = func():void {
- $B2: {
- %res:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(0i)
- %4:vec3<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ extractBits_e04f5d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %extractBits_e04f5d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_e04f5d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %extractBits_e04f5d
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_e04f5d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %extractBits_e04f5d
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.ir.msl
index 9e762ec..895a671 100644
--- a/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void extractBits_f28f69(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(0u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%extractBits_f28f69 = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(0u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ extractBits_f28f69(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %extractBits_f28f69
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_f28f69(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %extractBits_f28f69
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_f28f69(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %extractBits_f28f69
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.ir.msl
index 70c6950..3ad3bb9 100644
--- a/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void extractBits_fb850f(tint_module_vars_struct tint_module_vars) {
+ int4 res = int4(0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%extractBits_fb850f = func():void {
- $B2: {
- %res:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(0i)
- %4:vec4<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ extractBits_fb850f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %extractBits_fb850f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_fb850f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %extractBits_fb850f
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_fb850f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %extractBits_fb850f
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.ir.msl
index b5b3f78..d8d57b3 100644
--- a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void faceForward_524986(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(-1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%faceForward_524986 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(-1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ faceForward_524986(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %faceForward_524986
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_524986(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %faceForward_524986
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_524986(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %faceForward_524986
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.ir.msl
index 7d7d764..de2809c 100644
--- a/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void faceForward_5afbd5(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(-1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%faceForward_5afbd5 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(-1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ faceForward_5afbd5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %faceForward_5afbd5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_5afbd5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %faceForward_5afbd5
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_5afbd5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %faceForward_5afbd5
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.ir.msl
index c1758bd..1ecee8b 100644
--- a/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void faceForward_b316e5(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(-1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%faceForward_b316e5 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(-1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ faceForward_b316e5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %faceForward_b316e5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_b316e5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %faceForward_b316e5
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_b316e5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %faceForward_b316e5
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.ir.msl
index d939e63..11fa53b 100644
--- a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void faceForward_cc63dc(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(-1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%faceForward_cc63dc = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(-1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ faceForward_cc63dc(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %faceForward_cc63dc
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_cc63dc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %faceForward_cc63dc
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_cc63dc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %faceForward_cc63dc
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.ir.msl
index 59437ce..5b4e88a 100644
--- a/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void faceForward_e6908b(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(-1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%faceForward_e6908b = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(-1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ faceForward_e6908b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %faceForward_e6908b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_e6908b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %faceForward_e6908b
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_e6908b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %faceForward_e6908b
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.ir.msl
index 8b1f872..50efa65 100644
--- a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void faceForward_fb0f2e(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(-1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%faceForward_fb0f2e = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(-1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ faceForward_fb0f2e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %faceForward_fb0f2e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_fb0f2e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %faceForward_fb0f2e
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_fb0f2e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %faceForward_fb0f2e
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.ir.msl
index a0d6a48..c0bae19 100644
--- a/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void firstLeadingBit_000ff3(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(0u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstLeadingBit_000ff3 = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(0u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstLeadingBit_000ff3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %firstLeadingBit_000ff3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_000ff3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %firstLeadingBit_000ff3
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_000ff3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %firstLeadingBit_000ff3
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.ir.msl
index ae0b854..814fd82 100644
--- a/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void firstLeadingBit_35053e(tint_module_vars_struct tint_module_vars) {
+ int3 res = int3(0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstLeadingBit_35053e = func():void {
- $B2: {
- %res:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(0i)
- %4:vec3<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstLeadingBit_35053e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %firstLeadingBit_35053e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_35053e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %firstLeadingBit_35053e
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_35053e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %firstLeadingBit_35053e
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.ir.msl
index 9e5c0d4..46d19f7 100644
--- a/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void firstLeadingBit_3fd7d0(tint_module_vars_struct tint_module_vars) {
+ uint3 res = uint3(0u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstLeadingBit_3fd7d0 = func():void {
- $B2: {
- %res:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(0u)
- %4:vec3<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstLeadingBit_3fd7d0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %firstLeadingBit_3fd7d0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_3fd7d0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %firstLeadingBit_3fd7d0
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_3fd7d0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %firstLeadingBit_3fd7d0
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/57a1a3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/firstLeadingBit/57a1a3.wgsl.expected.ir.msl
index 193ac55..7bc33f7 100644
--- a/test/tint/builtins/gen/literal/firstLeadingBit/57a1a3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/firstLeadingBit/57a1a3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void firstLeadingBit_57a1a3(tint_module_vars_struct tint_module_vars) {
+ int res = 0;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstLeadingBit_57a1a3 = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 0i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstLeadingBit_57a1a3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %firstLeadingBit_57a1a3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_57a1a3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %firstLeadingBit_57a1a3
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_57a1a3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %firstLeadingBit_57a1a3
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.ir.msl
index fb4f38a..2501a38 100644
--- a/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void firstLeadingBit_6fe804(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(0u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstLeadingBit_6fe804 = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(0u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstLeadingBit_6fe804(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %firstLeadingBit_6fe804
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_6fe804(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %firstLeadingBit_6fe804
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_6fe804(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %firstLeadingBit_6fe804
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.ir.msl
index c599954..e3bb445 100644
--- a/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void firstLeadingBit_a622c2(tint_module_vars_struct tint_module_vars) {
+ int2 res = int2(0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstLeadingBit_a622c2 = func():void {
- $B2: {
- %res:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(0i)
- %4:vec2<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstLeadingBit_a622c2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %firstLeadingBit_a622c2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_a622c2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %firstLeadingBit_a622c2
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_a622c2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %firstLeadingBit_a622c2
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.ir.msl
index cb0d41f..baa4c04 100644
--- a/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void firstLeadingBit_c1f940(tint_module_vars_struct tint_module_vars) {
+ int4 res = int4(0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstLeadingBit_c1f940 = func():void {
- $B2: {
- %res:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(0i)
- %4:vec4<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstLeadingBit_c1f940(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %firstLeadingBit_c1f940
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_c1f940(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %firstLeadingBit_c1f940
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_c1f940(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %firstLeadingBit_c1f940
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/f0779d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/firstLeadingBit/f0779d.wgsl.expected.ir.msl
index 951f937..6adf18c 100644
--- a/test/tint/builtins/gen/literal/firstLeadingBit/f0779d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/firstLeadingBit/f0779d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void firstLeadingBit_f0779d(tint_module_vars_struct tint_module_vars) {
+ uint res = 0u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstLeadingBit_f0779d = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 0u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstLeadingBit_f0779d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %firstLeadingBit_f0779d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_f0779d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %firstLeadingBit_f0779d
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_f0779d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %firstLeadingBit_f0779d
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.ir.msl
index a496192..c14553e 100644
--- a/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void firstTrailingBit_110f2c(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(0u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstTrailingBit_110f2c = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(0u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstTrailingBit_110f2c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %firstTrailingBit_110f2c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_110f2c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %firstTrailingBit_110f2c
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_110f2c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %firstTrailingBit_110f2c
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/3a2acc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/firstTrailingBit/3a2acc.wgsl.expected.ir.msl
index 9d70845..7ad7344 100644
--- a/test/tint/builtins/gen/literal/firstTrailingBit/3a2acc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/firstTrailingBit/3a2acc.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void firstTrailingBit_3a2acc(tint_module_vars_struct tint_module_vars) {
+ int res = 0;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstTrailingBit_3a2acc = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 0i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstTrailingBit_3a2acc(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %firstTrailingBit_3a2acc
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_3a2acc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %firstTrailingBit_3a2acc
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_3a2acc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %firstTrailingBit_3a2acc
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.ir.msl
index 84eed01..a4022e1 100644
--- a/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void firstTrailingBit_45eb10(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(0u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstTrailingBit_45eb10 = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(0u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstTrailingBit_45eb10(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %firstTrailingBit_45eb10
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_45eb10(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %firstTrailingBit_45eb10
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_45eb10(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %firstTrailingBit_45eb10
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/47d475.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/firstTrailingBit/47d475.wgsl.expected.ir.msl
index 1079c6d..472096d 100644
--- a/test/tint/builtins/gen/literal/firstTrailingBit/47d475.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/firstTrailingBit/47d475.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void firstTrailingBit_47d475(tint_module_vars_struct tint_module_vars) {
+ uint res = 0u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstTrailingBit_47d475 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 0u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstTrailingBit_47d475(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %firstTrailingBit_47d475
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_47d475(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %firstTrailingBit_47d475
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_47d475(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %firstTrailingBit_47d475
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.ir.msl
index 054aa7a..7cc8488 100644
--- a/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void firstTrailingBit_50c072(tint_module_vars_struct tint_module_vars) {
+ int2 res = int2(0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstTrailingBit_50c072 = func():void {
- $B2: {
- %res:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(0i)
- %4:vec2<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstTrailingBit_50c072(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %firstTrailingBit_50c072
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_50c072(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %firstTrailingBit_50c072
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_50c072(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %firstTrailingBit_50c072
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.ir.msl
index c7d6003..e206e90 100644
--- a/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void firstTrailingBit_7496d6(tint_module_vars_struct tint_module_vars) {
+ int3 res = int3(0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstTrailingBit_7496d6 = func():void {
- $B2: {
- %res:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(0i)
- %4:vec3<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstTrailingBit_7496d6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %firstTrailingBit_7496d6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_7496d6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %firstTrailingBit_7496d6
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_7496d6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %firstTrailingBit_7496d6
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.ir.msl
index 2a49bf3..9669528 100644
--- a/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void firstTrailingBit_86551b(tint_module_vars_struct tint_module_vars) {
+ int4 res = int4(0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstTrailingBit_86551b = func():void {
- $B2: {
- %res:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(0i)
- %4:vec4<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstTrailingBit_86551b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %firstTrailingBit_86551b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_86551b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %firstTrailingBit_86551b
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_86551b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %firstTrailingBit_86551b
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.ir.msl
index c1c5b95..9928c33 100644
--- a/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void firstTrailingBit_cb51ce(tint_module_vars_struct tint_module_vars) {
+ uint3 res = uint3(0u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstTrailingBit_cb51ce = func():void {
- $B2: {
- %res:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(0u)
- %4:vec3<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstTrailingBit_cb51ce(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %firstTrailingBit_cb51ce
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_cb51ce(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %firstTrailingBit_cb51ce
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_cb51ce(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %firstTrailingBit_cb51ce
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.ir.msl
index 174b69f..89815eb 100644
--- a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void floor_3802c0(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%floor_3802c0 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ floor_3802c0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %floor_3802c0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_3802c0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %floor_3802c0
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_3802c0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %floor_3802c0
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.ir.msl
index 1d558d0..25d412c 100644
--- a/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void floor_3bccc4(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%floor_3bccc4 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ floor_3bccc4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %floor_3bccc4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_3bccc4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %floor_3bccc4
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_3bccc4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %floor_3bccc4
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.ir.msl
index 6c726ec..2027175 100644
--- a/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void floor_5fc9ac(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%floor_5fc9ac = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ floor_5fc9ac(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %floor_5fc9ac
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_5fc9ac(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %floor_5fc9ac
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_5fc9ac(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %floor_5fc9ac
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.ir.msl
index 9dc18bc..3a68ec6 100644
--- a/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void floor_60d7ea(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%floor_60d7ea = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ floor_60d7ea(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %floor_60d7ea
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_60d7ea(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %floor_60d7ea
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_60d7ea(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %floor_60d7ea
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/floor/66f154.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/floor/66f154.wgsl.expected.ir.msl
index d55980a..e6a54d4 100644
--- a/test/tint/builtins/gen/literal/floor/66f154.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/floor/66f154.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void floor_66f154(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%floor_66f154 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ floor_66f154(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %floor_66f154
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_66f154(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %floor_66f154
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_66f154(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %floor_66f154
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.ir.msl
index abef59d..ba9b63c 100644
--- a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void floor_84658c(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%floor_84658c = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ floor_84658c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %floor_84658c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_84658c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %floor_84658c
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_84658c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %floor_84658c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.ir.msl
index 1c58233..0c09c8c 100644
--- a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void floor_a2d31b(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%floor_a2d31b = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ floor_a2d31b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %floor_a2d31b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_a2d31b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %floor_a2d31b
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_a2d31b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %floor_a2d31b
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.ir.msl
index 0820954..46e5078 100644
--- a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void floor_b6e09c(tint_module_vars_struct tint_module_vars) {
+ half res = 1.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%floor_b6e09c = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ floor_b6e09c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %floor_b6e09c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_b6e09c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %floor_b6e09c
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_b6e09c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %floor_b6e09c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.ir.msl
index 63df411..4f7d407 100644
--- a/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void fma_26a7a9(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(2.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fma_26a7a9 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(2.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fma_26a7a9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %fma_26a7a9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_26a7a9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %fma_26a7a9
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_26a7a9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %fma_26a7a9
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.ir.msl
index 9c9d0ac..efd2017 100644
--- a/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void fma_6a3283(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(2.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fma_6a3283 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(2.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fma_6a3283(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %fma_6a3283
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_6a3283(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %fma_6a3283
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_6a3283(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %fma_6a3283
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.ir.msl
index 330ef62..3ddecdc 100644
--- a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void fma_ab7818(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(2.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fma_ab7818 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(2.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fma_ab7818(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %fma_ab7818
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_ab7818(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %fma_ab7818
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_ab7818(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %fma_ab7818
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.ir.msl
index 3116777..13b40da 100644
--- a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void fma_bf21b6(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(2.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fma_bf21b6 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(2.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fma_bf21b6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %fma_bf21b6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_bf21b6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %fma_bf21b6
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_bf21b6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %fma_bf21b6
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fma/c10ba3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fma/c10ba3.wgsl.expected.ir.msl
index b35d864..ab357a6 100644
--- a/test/tint/builtins/gen/literal/fma/c10ba3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fma/c10ba3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void fma_c10ba3(tint_module_vars_struct tint_module_vars) {
+ float res = 2.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fma_c10ba3 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 2.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fma_c10ba3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %fma_c10ba3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_c10ba3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %fma_c10ba3
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_c10ba3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %fma_c10ba3
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.ir.msl
index bf615e1..933c4f2 100644
--- a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void fma_c8abb3(tint_module_vars_struct tint_module_vars) {
+ half res = 2.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fma_c8abb3 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 2.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fma_c8abb3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %fma_c8abb3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_c8abb3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %fma_c8abb3
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_c8abb3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %fma_c8abb3
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.ir.msl
index 4518ada..8072e08 100644
--- a/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void fma_e17c5c(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(2.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fma_e17c5c = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(2.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fma_e17c5c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %fma_e17c5c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_e17c5c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %fma_e17c5c
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_e17c5c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %fma_e17c5c
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.ir.msl
index df14fac..1d6e98f 100644
--- a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void fma_e7abdc(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(2.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fma_e7abdc = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(2.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fma_e7abdc(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %fma_e7abdc
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_e7abdc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %fma_e7abdc
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_e7abdc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %fma_e7abdc
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.ir.msl
index 5837693..41587be 100644
--- a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void fract_181aa9(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(0.25h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fract_181aa9 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.25h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fract_181aa9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %fract_181aa9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_181aa9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %fract_181aa9
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_181aa9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %fract_181aa9
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.ir.msl
index ad81009..16d2228 100644
--- a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void fract_498c77(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(0.25h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fract_498c77 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.25h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fract_498c77(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %fract_498c77
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_498c77(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %fract_498c77
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_498c77(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %fract_498c77
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.ir.msl
index 441c5cb..6f8fd78 100644
--- a/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void fract_8bc1e9(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(0.25f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fract_8bc1e9 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.25f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fract_8bc1e9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %fract_8bc1e9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_8bc1e9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %fract_8bc1e9
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_8bc1e9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %fract_8bc1e9
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.ir.msl
index 503882d..b562baa 100644
--- a/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void fract_943cb1(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(0.25f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fract_943cb1 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.25f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fract_943cb1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %fract_943cb1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_943cb1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %fract_943cb1
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_943cb1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %fract_943cb1
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.ir.msl
index 312e018..f8a5f65 100644
--- a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void fract_958a1d(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(0.25h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fract_958a1d = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.25h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fract_958a1d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %fract_958a1d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_958a1d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %fract_958a1d
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_958a1d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %fract_958a1d
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.ir.msl
index 8903669..f6fb2f1 100644
--- a/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void fract_a49758(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(0.25f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fract_a49758 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.25f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fract_a49758(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %fract_a49758
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_a49758(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %fract_a49758
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_a49758(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %fract_a49758
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.ir.msl
index 9a5bbd2..aa51cbd 100644
--- a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void fract_eb38ce(tint_module_vars_struct tint_module_vars) {
+ half res = 0.25h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fract_eb38ce = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.25h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fract_eb38ce(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %fract_eb38ce
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_eb38ce(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %fract_eb38ce
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_eb38ce(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %fract_eb38ce
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fract/fa5c71.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fract/fa5c71.wgsl.expected.ir.msl
index 734e936..90334b9 100644
--- a/test/tint/builtins/gen/literal/fract/fa5c71.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fract/fa5c71.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void fract_fa5c71(tint_module_vars_struct tint_module_vars) {
+ float res = 0.25f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fract_fa5c71 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.25f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fract_fa5c71(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %fract_fa5c71
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_fa5c71(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %fract_fa5c71
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_fa5c71(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %fract_fa5c71
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.ir.msl
index bcbd4d4..e1cf7ec 100644
--- a/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void fwidth_5d1b39(tint_module_vars_struct tint_module_vars) {
+ float3 res = fwidth(float3(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidth_5d1b39 = func():void {
- $B2: {
- %3:vec3<f32> = fwidth vec3<f32>(1.0f)
- %res:ptr<function, vec3<f32>, read_write> = var, %3
- %5:vec3<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidth_5d1b39(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %fwidth_5d1b39
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.ir.msl
index 3d835e9..f27b6d6 100644
--- a/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void fwidth_b83ebb(tint_module_vars_struct tint_module_vars) {
+ float2 res = fwidth(float2(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidth_b83ebb = func():void {
- $B2: {
- %3:vec2<f32> = fwidth vec2<f32>(1.0f)
- %res:ptr<function, vec2<f32>, read_write> = var, %3
- %5:vec2<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidth_b83ebb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %fwidth_b83ebb
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.ir.msl
index ca6b902..5fb4ac4 100644
--- a/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void fwidth_d2ab9a(tint_module_vars_struct tint_module_vars) {
+ float4 res = fwidth(float4(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidth_d2ab9a = func():void {
- $B2: {
- %3:vec4<f32> = fwidth vec4<f32>(1.0f)
- %res:ptr<function, vec4<f32>, read_write> = var, %3
- %5:vec4<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidth_d2ab9a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %fwidth_d2ab9a
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fwidth/df38ef.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fwidth/df38ef.wgsl.expected.ir.msl
index 3ac6af6..7d041fa 100644
--- a/test/tint/builtins/gen/literal/fwidth/df38ef.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fwidth/df38ef.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void fwidth_df38ef(tint_module_vars_struct tint_module_vars) {
+ float res = fwidth(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidth_df38ef = func():void {
- $B2: {
- %3:f32 = fwidth 1.0f
- %res:ptr<function, f32, read_write> = var, %3
- %5:f32 = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidth_df38ef(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %fwidth_df38ef
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/159c8a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fwidthCoarse/159c8a.wgsl.expected.ir.msl
index 7f5ff5a..740f73a 100644
--- a/test/tint/builtins/gen/literal/fwidthCoarse/159c8a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fwidthCoarse/159c8a.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void fwidthCoarse_159c8a(tint_module_vars_struct tint_module_vars) {
+ float res = fwidth(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidthCoarse_159c8a = func():void {
- $B2: {
- %3:f32 = fwidthCoarse 1.0f
- %res:ptr<function, f32, read_write> = var, %3
- %5:f32 = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidthCoarse_159c8a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %fwidthCoarse_159c8a
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.ir.msl
index f30d081..eff4a8e 100644
--- a/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void fwidthCoarse_1e59d9(tint_module_vars_struct tint_module_vars) {
+ float3 res = fwidth(float3(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidthCoarse_1e59d9 = func():void {
- $B2: {
- %3:vec3<f32> = fwidthCoarse vec3<f32>(1.0f)
- %res:ptr<function, vec3<f32>, read_write> = var, %3
- %5:vec3<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidthCoarse_1e59d9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %fwidthCoarse_1e59d9
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.ir.msl
index adfb446..8bc1664 100644
--- a/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void fwidthCoarse_4e4fc4(tint_module_vars_struct tint_module_vars) {
+ float4 res = fwidth(float4(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidthCoarse_4e4fc4 = func():void {
- $B2: {
- %3:vec4<f32> = fwidthCoarse vec4<f32>(1.0f)
- %res:ptr<function, vec4<f32>, read_write> = var, %3
- %5:vec4<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidthCoarse_4e4fc4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %fwidthCoarse_4e4fc4
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.ir.msl
index 3a2d028..a872692 100644
--- a/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void fwidthCoarse_e653f7(tint_module_vars_struct tint_module_vars) {
+ float2 res = fwidth(float2(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidthCoarse_e653f7 = func():void {
- $B2: {
- %3:vec2<f32> = fwidthCoarse vec2<f32>(1.0f)
- %res:ptr<function, vec2<f32>, read_write> = var, %3
- %5:vec2<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidthCoarse_e653f7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %fwidthCoarse_e653f7
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.msl
index 7d01936..994d97a 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void fwidthFine_523fdc(tint_module_vars_struct tint_module_vars) {
+ float3 res = fwidth(float3(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidthFine_523fdc = func():void {
- $B2: {
- %3:vec3<f32> = fwidthFine vec3<f32>(1.0f)
- %res:ptr<function, vec3<f32>, read_write> = var, %3
- %5:vec3<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidthFine_523fdc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %fwidthFine_523fdc
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.msl
index fcc356c..3c270a1 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void fwidthFine_68f4ef(tint_module_vars_struct tint_module_vars) {
+ float4 res = fwidth(float4(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidthFine_68f4ef = func():void {
- $B2: {
- %3:vec4<f32> = fwidthFine vec4<f32>(1.0f)
- %res:ptr<function, vec4<f32>, read_write> = var, %3
- %5:vec4<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidthFine_68f4ef(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %fwidthFine_68f4ef
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.msl
index 79017bc..1a13cc6 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void fwidthFine_f1742d(tint_module_vars_struct tint_module_vars) {
+ float res = fwidth(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidthFine_f1742d = func():void {
- $B2: {
- %3:f32 = fwidthFine 1.0f
- %res:ptr<function, f32, read_write> = var, %3
- %5:f32 = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidthFine_f1742d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %fwidthFine_f1742d
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.msl
index d791baf..140b85a 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.msl
@@ -1,29 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void fwidthFine_ff6aa0(tint_module_vars_struct tint_module_vars) {
+ float2 res = fwidth(float2(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidthFine_ff6aa0 = func():void {
- $B2: {
- %3:vec2<f32> = fwidthFine vec2<f32>(1.0f)
- %res:ptr<function, vec2<f32>, read_write> = var, %3
- %5:vec2<f32> = load %res
- store %prevent_dce, %5
- ret
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidthFine_ff6aa0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %7:void = call %fwidthFine_ff6aa0
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.ir.msl
index d721c92..025a64e 100644
--- a/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void insertBits_3c7ba5(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(3u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%insertBits_3c7ba5 = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(3u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ insertBits_3c7ba5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %insertBits_3c7ba5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_3c7ba5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %insertBits_3c7ba5
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_3c7ba5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %insertBits_3c7ba5
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.ir.msl
index 5cd4917..74bc91d 100644
--- a/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void insertBits_428b0b(tint_module_vars_struct tint_module_vars) {
+ int3 res = int3(3);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%insertBits_428b0b = func():void {
- $B2: {
- %res:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(3i)
- %4:vec3<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ insertBits_428b0b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %insertBits_428b0b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_428b0b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %insertBits_428b0b
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_428b0b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %insertBits_428b0b
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.ir.msl
index dfd489d..8da6407 100644
--- a/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void insertBits_51ede1(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(3u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%insertBits_51ede1 = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(3u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ insertBits_51ede1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %insertBits_51ede1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_51ede1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %insertBits_51ede1
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_51ede1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %insertBits_51ede1
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/insertBits/65468b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/insertBits/65468b.wgsl.expected.ir.msl
index 421f660..525295b 100644
--- a/test/tint/builtins/gen/literal/insertBits/65468b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/insertBits/65468b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void insertBits_65468b(tint_module_vars_struct tint_module_vars) {
+ int res = 3;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%insertBits_65468b = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 3i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ insertBits_65468b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %insertBits_65468b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_65468b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %insertBits_65468b
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_65468b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %insertBits_65468b
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.ir.msl
index 2918383..45e9a04 100644
--- a/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void insertBits_87826b(tint_module_vars_struct tint_module_vars) {
+ uint3 res = uint3(3u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%insertBits_87826b = func():void {
- $B2: {
- %res:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(3u)
- %4:vec3<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ insertBits_87826b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %insertBits_87826b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_87826b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %insertBits_87826b
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_87826b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %insertBits_87826b
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.ir.msl
index ed61052..b48dee6 100644
--- a/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void insertBits_d86978(tint_module_vars_struct tint_module_vars) {
+ int4 res = int4(3);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%insertBits_d86978 = func():void {
- $B2: {
- %res:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(3i)
- %4:vec4<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ insertBits_d86978(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %insertBits_d86978
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_d86978(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %insertBits_d86978
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_d86978(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %insertBits_d86978
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/insertBits/e3e3a2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/insertBits/e3e3a2.wgsl.expected.ir.msl
index 7e27124..b3a835a 100644
--- a/test/tint/builtins/gen/literal/insertBits/e3e3a2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/insertBits/e3e3a2.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void insertBits_e3e3a2(tint_module_vars_struct tint_module_vars) {
+ uint res = 3u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%insertBits_e3e3a2 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 3u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ insertBits_e3e3a2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %insertBits_e3e3a2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_e3e3a2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %insertBits_e3e3a2
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_e3e3a2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %insertBits_e3e3a2
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.ir.msl
index 0017091..7ebe0b9 100644
--- a/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void insertBits_fe6ba6(tint_module_vars_struct tint_module_vars) {
+ int2 res = int2(3);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%insertBits_fe6ba6 = func():void {
- $B2: {
- %res:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(3i)
- %4:vec2<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ insertBits_fe6ba6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %insertBits_fe6ba6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_fe6ba6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %insertBits_fe6ba6
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_fe6ba6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %insertBits_fe6ba6
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.ir.msl
index ddcc179..ebfb28d 100644
--- a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void inverseSqrt_440300(tint_module_vars_struct tint_module_vars) {
+ half res = 1.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%inverseSqrt_440300 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ inverseSqrt_440300(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %inverseSqrt_440300
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_440300(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %inverseSqrt_440300
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_440300(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %inverseSqrt_440300
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.ir.msl
index a706a7e..eb4f478 100644
--- a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void inverseSqrt_5f51f8(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%inverseSqrt_5f51f8 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ inverseSqrt_5f51f8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %inverseSqrt_5f51f8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_5f51f8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %inverseSqrt_5f51f8
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_5f51f8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %inverseSqrt_5f51f8
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/84407e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/inverseSqrt/84407e.wgsl.expected.ir.msl
index ab02c0f..c96f17c 100644
--- a/test/tint/builtins/gen/literal/inverseSqrt/84407e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/inverseSqrt/84407e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void inverseSqrt_84407e(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%inverseSqrt_84407e = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ inverseSqrt_84407e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %inverseSqrt_84407e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_84407e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %inverseSqrt_84407e
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_84407e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %inverseSqrt_84407e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.ir.msl
index e4debbe..5d362e8 100644
--- a/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void inverseSqrt_8f2bd2(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%inverseSqrt_8f2bd2 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ inverseSqrt_8f2bd2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %inverseSqrt_8f2bd2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_8f2bd2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %inverseSqrt_8f2bd2
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_8f2bd2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %inverseSqrt_8f2bd2
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.ir.msl
index 8d581d9..ace76dd 100644
--- a/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void inverseSqrt_b197b1(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%inverseSqrt_b197b1 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ inverseSqrt_b197b1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %inverseSqrt_b197b1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_b197b1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %inverseSqrt_b197b1
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_b197b1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %inverseSqrt_b197b1
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.ir.msl
index 0442a06b..a54957f 100644
--- a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void inverseSqrt_b85ebd(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%inverseSqrt_b85ebd = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ inverseSqrt_b85ebd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %inverseSqrt_b85ebd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_b85ebd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %inverseSqrt_b85ebd
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_b85ebd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %inverseSqrt_b85ebd
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.ir.msl
index c0d8171..d43e1a4 100644
--- a/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void inverseSqrt_c22347(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%inverseSqrt_c22347 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ inverseSqrt_c22347(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %inverseSqrt_c22347
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_c22347(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %inverseSqrt_c22347
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_c22347(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %inverseSqrt_c22347
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.ir.msl
index 8db3b8c..3cde832 100644
--- a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void inverseSqrt_cbdc70(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%inverseSqrt_cbdc70 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ inverseSqrt_cbdc70(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %inverseSqrt_cbdc70
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_cbdc70(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %inverseSqrt_cbdc70
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_cbdc70(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %inverseSqrt_cbdc70
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.ir.msl
index 97fb35b..42b52e3 100644
--- a/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ldexp/082c1f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void ldexp_082c1f(tint_module_vars_struct tint_module_vars) {
+ half res = 2.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_082c1f = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 2.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_082c1f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ldexp_082c1f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_082c1f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ldexp_082c1f
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_082c1f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ldexp_082c1f
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.ir.msl
index ec7120a..edf59e4 100644
--- a/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ldexp/217a31.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void ldexp_217a31(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(2.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_217a31 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(2.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_217a31(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ldexp_217a31
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_217a31(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ldexp_217a31
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_217a31(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ldexp_217a31
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.ir.msl
index 8c9d264..022ae53 100644
--- a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void ldexp_3d90b4(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(2.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_3d90b4 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(2.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_3d90b4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ldexp_3d90b4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_3d90b4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ldexp_3d90b4
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_3d90b4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ldexp_3d90b4
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.ir.msl
index c000c5f..99d8408 100644
--- a/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ldexp/593ff3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void ldexp_593ff3(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(2.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_593ff3 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(2.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_593ff3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ldexp_593ff3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_593ff3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ldexp_593ff3
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_593ff3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ldexp_593ff3
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.ir.msl
index 849c493..db988df 100644
--- a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void ldexp_624e0c(tint_module_vars_struct tint_module_vars) {
+ half res = 2.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_624e0c = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 2.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_624e0c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ldexp_624e0c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_624e0c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ldexp_624e0c
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_624e0c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ldexp_624e0c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.ir.msl
index 2d0e3e1..3969743 100644
--- a/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ldexp/65a7bd.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void ldexp_65a7bd(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(2.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_65a7bd = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(2.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_65a7bd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ldexp_65a7bd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_65a7bd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ldexp_65a7bd
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_65a7bd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ldexp_65a7bd
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.ir.msl
index 24eeb3e..3312682 100644
--- a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void ldexp_7485ce(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(2.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_7485ce = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(2.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_7485ce(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ldexp_7485ce
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_7485ce(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ldexp_7485ce
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_7485ce(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ldexp_7485ce
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.ir.msl
index 0374c7a..5a97a43 100644
--- a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void ldexp_7fa13c(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(2.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_7fa13c = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(2.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_7fa13c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ldexp_7fa13c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_7fa13c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ldexp_7fa13c
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_7fa13c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ldexp_7fa13c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.ir.msl
index bc51039..3d18708 100644
--- a/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ldexp/8a0c2f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void ldexp_8a0c2f(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(2.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_8a0c2f = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(2.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_8a0c2f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ldexp_8a0c2f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_8a0c2f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ldexp_8a0c2f
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_8a0c2f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ldexp_8a0c2f
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.ir.msl
index 8f949ca..b2c232d 100644
--- a/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ldexp/8e43e9.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void ldexp_8e43e9(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(2.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_8e43e9 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(2.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_8e43e9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ldexp_8e43e9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_8e43e9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ldexp_8e43e9
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_8e43e9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ldexp_8e43e9
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.ir.msl
index a80f5ba..e183ab8 100644
--- a/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ldexp/a22679.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void ldexp_a22679(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(2.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_a22679 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(2.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_a22679(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ldexp_a22679
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_a22679(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ldexp_a22679
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_a22679(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ldexp_a22679
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.ir.msl
index 9f6b25a..7b4464b 100644
--- a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void ldexp_a31cdc(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(2.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_a31cdc = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(2.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_a31cdc(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ldexp_a31cdc
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_a31cdc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ldexp_a31cdc
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_a31cdc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ldexp_a31cdc
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.ir.msl
index f433aba..19eae46 100644
--- a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void ldexp_abd718(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(2.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_abd718 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(2.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_abd718(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ldexp_abd718
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_abd718(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ldexp_abd718
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_abd718(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ldexp_abd718
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.ir.msl
index 033d067..0f800ee 100644
--- a/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ldexp/c9d0b7.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void ldexp_c9d0b7(tint_module_vars_struct tint_module_vars) {
+ float res = 2.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_c9d0b7 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 2.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_c9d0b7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ldexp_c9d0b7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_c9d0b7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ldexp_c9d0b7
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_c9d0b7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ldexp_c9d0b7
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.ir.msl
index d98ac86..2918126 100644
--- a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void ldexp_cc9cde(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(2.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_cc9cde = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(2.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_cc9cde(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ldexp_cc9cde
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_cc9cde(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ldexp_cc9cde
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_cc9cde(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ldexp_cc9cde
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.ir.msl
index 3fa8503..d97e045 100644
--- a/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void ldexp_db8b49(tint_module_vars_struct tint_module_vars) {
+ float res = 2.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_db8b49 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 2.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_db8b49(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %ldexp_db8b49
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_db8b49(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %ldexp_db8b49
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_db8b49(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %ldexp_db8b49
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/length/056071.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/length/056071.wgsl.expected.ir.msl
index 7b91718..69eb25e 100644
--- a/test/tint/builtins/gen/literal/length/056071.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/length/056071.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void length_056071(tint_module_vars_struct tint_module_vars) {
+ float res = 0.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%length_056071 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ length_056071(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %length_056071
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ length_056071(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %length_056071
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ length_056071(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %length_056071
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.ir.msl
index 35e1a9b..9ef7abd 100644
--- a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void length_3f0e13(tint_module_vars_struct tint_module_vars) {
+ half res = 0.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%length_3f0e13 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ length_3f0e13(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %length_3f0e13
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ length_3f0e13(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %length_3f0e13
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ length_3f0e13(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %length_3f0e13
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.ir.msl
index ae450a1..73b688d 100644
--- a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void length_5b1a9b(tint_module_vars_struct tint_module_vars) {
+ half res = 0.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%length_5b1a9b = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ length_5b1a9b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %length_5b1a9b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ length_5b1a9b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %length_5b1a9b
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ length_5b1a9b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %length_5b1a9b
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/length/602a17.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/length/602a17.wgsl.expected.ir.msl
index 750f1f1..5439001 100644
--- a/test/tint/builtins/gen/literal/length/602a17.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/length/602a17.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void length_602a17(tint_module_vars_struct tint_module_vars) {
+ float res = 0.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%length_602a17 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ length_602a17(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %length_602a17
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ length_602a17(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %length_602a17
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ length_602a17(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %length_602a17
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.ir.msl
index 5547294..22b4966 100644
--- a/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void length_afde8b(tint_module_vars_struct tint_module_vars) {
+ float res = 0.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%length_afde8b = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ length_afde8b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %length_afde8b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ length_afde8b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %length_afde8b
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ length_afde8b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %length_afde8b
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.ir.msl
index 9c93153..f2e88c5 100644
--- a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void length_ba16d6(tint_module_vars_struct tint_module_vars) {
+ half res = 0.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%length_ba16d6 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ length_ba16d6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %length_ba16d6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ length_ba16d6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %length_ba16d6
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ length_ba16d6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %length_ba16d6
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.ir.msl
index 1e7761c..cdbe531 100644
--- a/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void length_becebf(tint_module_vars_struct tint_module_vars) {
+ float res = 0.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%length_becebf = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ length_becebf(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %length_becebf
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ length_becebf(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %length_becebf
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ length_becebf(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %length_becebf
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.ir.msl
index f9b66fc..6b6ed57 100644
--- a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void length_c158da(tint_module_vars_struct tint_module_vars) {
+ half res = 0.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%length_c158da = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ length_c158da(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %length_c158da
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ length_c158da(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %length_c158da
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ length_c158da(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %length_c158da
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.ir.msl
index 6972f91..eff8e3e 100644
--- a/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void log_3da25a(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(0.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log_3da25a = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log_3da25a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %log_3da25a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_3da25a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %log_3da25a
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_3da25a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %log_3da25a
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.ir.msl
index ddb614f..92c83b7 100644
--- a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void log_6ff86f(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(0.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log_6ff86f = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log_6ff86f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %log_6ff86f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_6ff86f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %log_6ff86f
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_6ff86f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %log_6ff86f
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/log/7114a6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/log/7114a6.wgsl.expected.ir.msl
index f84ab50..b6cd665 100644
--- a/test/tint/builtins/gen/literal/log/7114a6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/log/7114a6.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void log_7114a6(tint_module_vars_struct tint_module_vars) {
+ float res = 0.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log_7114a6 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log_7114a6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %log_7114a6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_7114a6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %log_7114a6
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_7114a6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %log_7114a6
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.ir.msl
index e484842..b5113e5 100644
--- a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void log_8f0e32(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(0.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log_8f0e32 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log_8f0e32(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %log_8f0e32
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_8f0e32(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %log_8f0e32
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_8f0e32(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %log_8f0e32
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.ir.msl
index a1bd9ad..df54301 100644
--- a/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void log_b2ce28(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(0.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log_b2ce28 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log_b2ce28(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %log_b2ce28
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_b2ce28(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %log_b2ce28
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_b2ce28(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %log_b2ce28
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.ir.msl
index 5e9a89d..ebb70b6 100644
--- a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void log_c9f489(tint_module_vars_struct tint_module_vars) {
+ half res = 0.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log_c9f489 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log_c9f489(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %log_c9f489
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_c9f489(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %log_c9f489
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_c9f489(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %log_c9f489
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.ir.msl
index 71214e8..3ce56d5 100644
--- a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void log_cdbdc1(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(0.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log_cdbdc1 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log_cdbdc1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %log_cdbdc1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_cdbdc1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %log_cdbdc1
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_cdbdc1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %log_cdbdc1
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.ir.msl
index d5e22ee..7abc01a 100644
--- a/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void log_f4c570(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(0.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log_f4c570 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log_f4c570(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %log_f4c570
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_f4c570(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %log_f4c570
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_f4c570(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %log_f4c570
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.ir.msl
index 0d3fc4c..1c3dc99 100644
--- a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void log2_38b478(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(0.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log2_38b478 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log2_38b478(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %log2_38b478
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_38b478(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %log2_38b478
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_38b478(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %log2_38b478
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/log2/4036ed.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/log2/4036ed.wgsl.expected.ir.msl
index be55ae3..ceab242 100644
--- a/test/tint/builtins/gen/literal/log2/4036ed.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/log2/4036ed.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void log2_4036ed(tint_module_vars_struct tint_module_vars) {
+ float res = 0.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log2_4036ed = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log2_4036ed(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %log2_4036ed
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_4036ed(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %log2_4036ed
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_4036ed(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %log2_4036ed
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.ir.msl
index 89ad282..abdeec9 100644
--- a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void log2_776088(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(0.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log2_776088 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log2_776088(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %log2_776088
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_776088(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %log2_776088
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_776088(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %log2_776088
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.ir.msl
index 42d65bb..86266e1 100644
--- a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void log2_8c10b3(tint_module_vars_struct tint_module_vars) {
+ half res = 0.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log2_8c10b3 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log2_8c10b3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %log2_8c10b3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_8c10b3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %log2_8c10b3
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_8c10b3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %log2_8c10b3
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.ir.msl
index 82282d5..a4202c5 100644
--- a/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void log2_902988(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(0.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log2_902988 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log2_902988(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %log2_902988
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_902988(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %log2_902988
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_902988(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %log2_902988
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.ir.msl
index 27ca570..95ffc14 100644
--- a/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void log2_adb233(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(0.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log2_adb233 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log2_adb233(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %log2_adb233
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_adb233(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %log2_adb233
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_adb233(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %log2_adb233
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.ir.msl
index f7028ec..d3744d9 100644
--- a/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void log2_aea659(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(0.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log2_aea659 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log2_aea659(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %log2_aea659
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_aea659(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %log2_aea659
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_aea659(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %log2_aea659
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.ir.msl
index 11808b9..c5afd86 100644
--- a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void log2_fb9f0b(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(0.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log2_fb9f0b = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log2_fb9f0b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %log2_fb9f0b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_fb9f0b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %log2_fb9f0b
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_fb9f0b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %log2_fb9f0b
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/max/0c0aae.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/max/0c0aae.wgsl.expected.ir.msl
index feaa012..68b9786 100644
--- a/test/tint/builtins/gen/literal/max/0c0aae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/max/0c0aae.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void max_0c0aae(tint_module_vars_struct tint_module_vars) {
+ uint res = 1u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_0c0aae = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_0c0aae(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %max_0c0aae
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_0c0aae(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %max_0c0aae
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_0c0aae(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %max_0c0aae
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.ir.msl
index 8b2ea6b..6a8a63d 100644
--- a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void max_111ac0(tint_module_vars_struct tint_module_vars) {
+ half res = 1.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_111ac0 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_111ac0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %max_111ac0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_111ac0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %max_111ac0
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_111ac0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %max_111ac0
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.ir.msl
index 194ae2d..e69052d 100644
--- a/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void max_25eafe(tint_module_vars_struct tint_module_vars) {
+ int3 res = int3(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_25eafe = func():void {
- $B2: {
- %res:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_25eafe(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %max_25eafe
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_25eafe(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %max_25eafe
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_25eafe(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %max_25eafe
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/max/320815.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/max/320815.wgsl.expected.ir.msl
index 046997e..4c8eb8d 100644
--- a/test/tint/builtins/gen/literal/max/320815.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/max/320815.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void max_320815(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_320815 = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_320815(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %max_320815
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_320815(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %max_320815
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_320815(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %max_320815
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.ir.msl
index 55b0ad5..dd7a51a 100644
--- a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void max_34956e(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_34956e = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_34956e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %max_34956e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_34956e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %max_34956e
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_34956e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %max_34956e
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.ir.msl
index 9db9765..8e803d7 100644
--- a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void max_445169(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_445169 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_445169(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %max_445169
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_445169(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %max_445169
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_445169(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %max_445169
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/max/44a39d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/max/44a39d.wgsl.expected.ir.msl
index 566fade..7a0aadd 100644
--- a/test/tint/builtins/gen/literal/max/44a39d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/max/44a39d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void max_44a39d(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_44a39d = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_44a39d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %max_44a39d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_44a39d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %max_44a39d
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_44a39d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %max_44a39d
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.ir.msl
index e9a308a..2248172 100644
--- a/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void max_453e04(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_453e04 = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_453e04(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %max_453e04
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_453e04(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %max_453e04
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_453e04(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %max_453e04
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/max/462050.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/max/462050.wgsl.expected.ir.msl
index 79913a6..fb05031 100644
--- a/test/tint/builtins/gen/literal/max/462050.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/max/462050.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void max_462050(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_462050 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_462050(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %max_462050
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_462050(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %max_462050
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_462050(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %max_462050
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.ir.msl
index ce337f1..73b062a 100644
--- a/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void max_4883ac(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_4883ac = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_4883ac(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %max_4883ac
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_4883ac(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %max_4883ac
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_4883ac(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %max_4883ac
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.ir.msl
index ba92aca..7458729 100644
--- a/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void max_85e6bc(tint_module_vars_struct tint_module_vars) {
+ int4 res = int4(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_85e6bc = func():void {
- $B2: {
- %res:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_85e6bc(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %max_85e6bc
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_85e6bc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %max_85e6bc
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_85e6bc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %max_85e6bc
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.ir.msl
index 2df3357..f562810 100644
--- a/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void max_a93419(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_a93419 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_a93419(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %max_a93419
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_a93419(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %max_a93419
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_a93419(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %max_a93419
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.ir.msl
index 067837b..db05f2c 100644
--- a/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void max_b1b73a(tint_module_vars_struct tint_module_vars) {
+ uint3 res = uint3(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_b1b73a = func():void {
- $B2: {
- %res:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_b1b73a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %max_b1b73a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_b1b73a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %max_b1b73a
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_b1b73a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %max_b1b73a
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/max/ce7c30.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/max/ce7c30.wgsl.expected.ir.msl
index 5de5295..8f6055d 100644
--- a/test/tint/builtins/gen/literal/max/ce7c30.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/max/ce7c30.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void max_ce7c30(tint_module_vars_struct tint_module_vars) {
+ int res = 1;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_ce7c30 = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_ce7c30(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %max_ce7c30
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_ce7c30(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %max_ce7c30
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_ce7c30(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %max_ce7c30
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.ir.msl
index 2a129ee..46c4b9a 100644
--- a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void max_e14f2b(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_e14f2b = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_e14f2b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %max_e14f2b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_e14f2b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %max_e14f2b
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_e14f2b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %max_e14f2b
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.ir.msl
index 97e011d..2efb033 100644
--- a/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void max_e8192f(tint_module_vars_struct tint_module_vars) {
+ int2 res = int2(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_e8192f = func():void {
- $B2: {
- %res:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_e8192f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %max_e8192f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_e8192f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %max_e8192f
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_e8192f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %max_e8192f
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.ir.msl
index 78e3079..4239b7f 100644
--- a/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void min_03c7e3(tint_module_vars_struct tint_module_vars) {
+ int2 res = int2(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_03c7e3 = func():void {
- $B2: {
- %res:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_03c7e3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %min_03c7e3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_03c7e3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %min_03c7e3
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_03c7e3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %min_03c7e3
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.ir.msl
index ea46645..b96f60b 100644
--- a/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void min_0dc614(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_0dc614 = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_0dc614(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %min_0dc614
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_0dc614(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %min_0dc614
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_0dc614(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %min_0dc614
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.ir.msl
index 0335d07..0f32e79 100644
--- a/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void min_3941e1(tint_module_vars_struct tint_module_vars) {
+ int4 res = int4(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_3941e1 = func():void {
- $B2: {
- %res:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_3941e1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %min_3941e1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_3941e1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %min_3941e1
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_3941e1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %min_3941e1
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/min/46c5d3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/min/46c5d3.wgsl.expected.ir.msl
index 726e91c..3e095c3 100644
--- a/test/tint/builtins/gen/literal/min/46c5d3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/min/46c5d3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void min_46c5d3(tint_module_vars_struct tint_module_vars) {
+ uint res = 1u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_46c5d3 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_46c5d3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %min_46c5d3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_46c5d3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %min_46c5d3
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_46c5d3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %min_46c5d3
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.ir.msl
index 6e01303..5ba69ae 100644
--- a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void min_7c710a(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_7c710a = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_7c710a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %min_7c710a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_7c710a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %min_7c710a
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_7c710a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %min_7c710a
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.ir.msl
index aad1e9a..a050da8 100644
--- a/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void min_82b28f(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_82b28f = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_82b28f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %min_82b28f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_82b28f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %min_82b28f
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_82b28f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %min_82b28f
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.ir.msl
index b19675f..a3f9bff 100644
--- a/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void min_93cfc4(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_93cfc4 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_93cfc4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %min_93cfc4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_93cfc4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %min_93cfc4
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_93cfc4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %min_93cfc4
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.ir.msl
index a83579a..a9377f8 100644
--- a/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void min_a45171(tint_module_vars_struct tint_module_vars) {
+ int3 res = int3(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_a45171 = func():void {
- $B2: {
- %res:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_a45171(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %min_a45171
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_a45171(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %min_a45171
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_a45171(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %min_a45171
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.ir.msl
index c47de82..50bf2ab 100644
--- a/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void min_aa28ad(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_aa28ad = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_aa28ad(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %min_aa28ad
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_aa28ad(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %min_aa28ad
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_aa28ad(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %min_aa28ad
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.ir.msl
index 1c7be54..ccea67d 100644
--- a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void min_ab0acd(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_ab0acd = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_ab0acd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %min_ab0acd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_ab0acd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %min_ab0acd
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_ab0acd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %min_ab0acd
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.ir.msl
index 3ad3ad6..e0cf353 100644
--- a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void min_ac84d6(tint_module_vars_struct tint_module_vars) {
+ half res = 1.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_ac84d6 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_ac84d6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %min_ac84d6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_ac84d6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %min_ac84d6
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_ac84d6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %min_ac84d6
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/min/af326d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/min/af326d.wgsl.expected.ir.msl
index 6724e0a..358637a 100644
--- a/test/tint/builtins/gen/literal/min/af326d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/min/af326d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void min_af326d(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_af326d = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_af326d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %min_af326d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_af326d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %min_af326d
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_af326d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %min_af326d
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.ir.msl
index c587fde..9d45c4d 100644
--- a/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void min_c70bb7(tint_module_vars_struct tint_module_vars) {
+ uint3 res = uint3(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_c70bb7 = func():void {
- $B2: {
- %res:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_c70bb7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %min_c70bb7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_c70bb7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %min_c70bb7
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_c70bb7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %min_c70bb7
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/min/c73147.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/min/c73147.wgsl.expected.ir.msl
index a2645f8..3a5d1ab 100644
--- a/test/tint/builtins/gen/literal/min/c73147.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/min/c73147.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void min_c73147(tint_module_vars_struct tint_module_vars) {
+ int res = 1;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_c73147 = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_c73147(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %min_c73147
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_c73147(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %min_c73147
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_c73147(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %min_c73147
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.ir.msl
index f8cdcb5..aacb8dc 100644
--- a/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void min_c76fa6(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_c76fa6 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_c76fa6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %min_c76fa6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_c76fa6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %min_c76fa6
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_c76fa6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %min_c76fa6
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.ir.msl
index 4ae4813..4316ef6 100644
--- a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void min_e780f9(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_e780f9 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_e780f9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %min_e780f9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_e780f9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %min_e780f9
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_e780f9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %min_e780f9
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.ir.msl
index 5d6c7e9..60c644f 100644
--- a/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void mix_0c8c33(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_0c8c33 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_0c8c33(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %mix_0c8c33
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_0c8c33(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %mix_0c8c33
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_0c8c33(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %mix_0c8c33
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.ir.msl
index 15728d6..184268b 100644
--- a/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void mix_1faeb1(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_1faeb1 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_1faeb1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %mix_1faeb1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_1faeb1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %mix_1faeb1
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_1faeb1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %mix_1faeb1
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.ir.msl
index 266bac2..2e2b8a1 100644
--- a/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void mix_2fadab(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_2fadab = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_2fadab(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %mix_2fadab
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_2fadab(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %mix_2fadab
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_2fadab(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %mix_2fadab
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.ir.msl
index 1179752..869e888 100644
--- a/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void mix_315264(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_315264 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_315264(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %mix_315264
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_315264(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %mix_315264
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_315264(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %mix_315264
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.ir.msl
index 0369647..2c75395 100644
--- a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void mix_38cbbb(tint_module_vars_struct tint_module_vars) {
+ half res = 1.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_38cbbb = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_38cbbb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %mix_38cbbb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_38cbbb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %mix_38cbbb
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_38cbbb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %mix_38cbbb
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/mix/4f0b5e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/mix/4f0b5e.wgsl.expected.ir.msl
index efa8c04..b2eb1ea 100644
--- a/test/tint/builtins/gen/literal/mix/4f0b5e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/mix/4f0b5e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void mix_4f0b5e(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_4f0b5e = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_4f0b5e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %mix_4f0b5e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_4f0b5e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %mix_4f0b5e
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_4f0b5e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %mix_4f0b5e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.ir.msl
index 12c5d1d..76d9704 100644
--- a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void mix_63f2fd(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_63f2fd = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_63f2fd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %mix_63f2fd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_63f2fd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %mix_63f2fd
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_63f2fd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %mix_63f2fd
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.ir.msl
index 6d9aa83..66a3402 100644
--- a/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void mix_6f8adc(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_6f8adc = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_6f8adc(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %mix_6f8adc
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_6f8adc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %mix_6f8adc
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_6f8adc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %mix_6f8adc
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.ir.msl
index 3064ad9..accd28b 100644
--- a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void mix_98ee3e(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_98ee3e = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_98ee3e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %mix_98ee3e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_98ee3e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %mix_98ee3e
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_98ee3e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %mix_98ee3e
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.ir.msl
index a08ac54..ab33b29 100644
--- a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void mix_c1aec6(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_c1aec6 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_c1aec6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %mix_c1aec6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_c1aec6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %mix_c1aec6
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_c1aec6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %mix_c1aec6
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.ir.msl
index a979cb9..3e12393 100644
--- a/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void mix_c37ede(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_c37ede = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_c37ede(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %mix_c37ede
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_c37ede(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %mix_c37ede
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_c37ede(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %mix_c37ede
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.ir.msl
index 77b2515..d8aaf76 100644
--- a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void mix_e46a83(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_e46a83 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_e46a83(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %mix_e46a83
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_e46a83(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %mix_e46a83
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_e46a83(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %mix_e46a83
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.ir.msl
index b3671fe..0504018 100644
--- a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void mix_ee2468(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_ee2468 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_ee2468(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %mix_ee2468
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_ee2468(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %mix_ee2468
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_ee2468(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %mix_ee2468
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.ir.msl
index f9641d8..9fe9569 100644
--- a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void mix_f1a543(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_f1a543 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_f1a543(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %mix_f1a543
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_f1a543(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %mix_f1a543
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_f1a543(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %mix_f1a543
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.ir.msl
index 38fc652..5e35ff7 100644
--- a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void normalize_39d5ec(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(0.5771484375h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%normalize_39d5ec = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.5771484375h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ normalize_39d5ec(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %normalize_39d5ec
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_39d5ec(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %normalize_39d5ec
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_39d5ec(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %normalize_39d5ec
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.ir.msl
index c9a9e41..9b7bddc 100644
--- a/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void normalize_64d8c0(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(0.57735025882720947266f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%normalize_64d8c0 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.57735025882720947266f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ normalize_64d8c0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %normalize_64d8c0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_64d8c0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %normalize_64d8c0
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_64d8c0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %normalize_64d8c0
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.ir.msl
index 9f768ce..941f96d 100644
--- a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void normalize_7990f3(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(0.70703125h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%normalize_7990f3 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.70703125h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ normalize_7990f3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %normalize_7990f3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_7990f3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %normalize_7990f3
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_7990f3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %normalize_7990f3
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.ir.msl
index e3d378d..8d64e64 100644
--- a/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void normalize_9a0aab(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(0.5f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%normalize_9a0aab = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.5f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ normalize_9a0aab(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %normalize_9a0aab
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_9a0aab(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %normalize_9a0aab
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_9a0aab(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %normalize_9a0aab
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.ir.msl
index f1ee83c..8cbc317 100644
--- a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void normalize_b8cb8d(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(0.5h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%normalize_b8cb8d = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.5h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ normalize_b8cb8d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %normalize_b8cb8d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_b8cb8d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %normalize_b8cb8d
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_b8cb8d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %normalize_b8cb8d
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.ir.msl
index 6a04499..fab3e33 100644
--- a/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void normalize_fc2ef1(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(0.70710676908493041992f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%normalize_fc2ef1 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.70710676908493041992f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ normalize_fc2ef1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %normalize_fc2ef1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_fc2ef1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %normalize_fc2ef1
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_fc2ef1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %normalize_fc2ef1
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.ir.msl
index 62b7421..1e56c1e 100644
--- a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void pack2x16float_0e97b3(tint_module_vars_struct tint_module_vars) {
+ uint res = 1006648320u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pack2x16float_0e97b3 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 1006648320u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pack2x16float_0e97b3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %pack2x16float_0e97b3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack2x16float_0e97b3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %pack2x16float_0e97b3
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack2x16float_0e97b3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %pack2x16float_0e97b3
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.ir.msl
index 7986bb2..bfbdaee 100644
--- a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void pack2x16snorm_6c169b(tint_module_vars_struct tint_module_vars) {
+ uint res = 2147450879u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pack2x16snorm_6c169b = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 2147450879u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pack2x16snorm_6c169b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %pack2x16snorm_6c169b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack2x16snorm_6c169b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %pack2x16snorm_6c169b
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack2x16snorm_6c169b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %pack2x16snorm_6c169b
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.ir.msl
index 144a96b..24ffcb6 100644
--- a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void pack2x16unorm_0f08e4(tint_module_vars_struct tint_module_vars) {
+ uint res = 4294967295u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pack2x16unorm_0f08e4 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 4294967295u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pack2x16unorm_0f08e4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %pack2x16unorm_0f08e4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack2x16unorm_0f08e4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %pack2x16unorm_0f08e4
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack2x16unorm_0f08e4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %pack2x16unorm_0f08e4
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.ir.msl
index eccd8f5..05f3129 100644
--- a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void pack4x8snorm_4d22e7(tint_module_vars_struct tint_module_vars) {
+ uint res = 2139062143u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pack4x8snorm_4d22e7 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 2139062143u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pack4x8snorm_4d22e7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %pack4x8snorm_4d22e7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack4x8snorm_4d22e7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %pack4x8snorm_4d22e7
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack4x8snorm_4d22e7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %pack4x8snorm_4d22e7
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.ir.msl
index 013f3c5..3621272 100644
--- a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void pack4x8unorm_95c456(tint_module_vars_struct tint_module_vars) {
+ uint res = 4294967295u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pack4x8unorm_95c456 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 4294967295u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pack4x8unorm_95c456(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %pack4x8unorm_95c456
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack4x8unorm_95c456(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %pack4x8unorm_95c456
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack4x8unorm_95c456(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %pack4x8unorm_95c456
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/pack4xI8/bfce01.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/pack4xI8/bfce01.wgsl.expected.ir.msl
index 16cd350..0ea642f 100644
--- a/test/tint/builtins/gen/literal/pack4xI8/bfce01.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/pack4xI8/bfce01.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void pack4xI8_bfce01(tint_module_vars_struct tint_module_vars) {
+ uint res = 16843009u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pack4xI8_bfce01 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 16843009u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pack4xI8_bfce01(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %pack4xI8_bfce01
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack4xI8_bfce01(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %pack4xI8_bfce01
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack4xI8_bfce01(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %pack4xI8_bfce01
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/pack4xI8Clamp/e42b2a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/pack4xI8Clamp/e42b2a.wgsl.expected.ir.msl
index 315f680..3e7b3b9 100644
--- a/test/tint/builtins/gen/literal/pack4xI8Clamp/e42b2a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/pack4xI8Clamp/e42b2a.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void pack4xI8Clamp_e42b2a(tint_module_vars_struct tint_module_vars) {
+ uint res = 16843009u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pack4xI8Clamp_e42b2a = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 16843009u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pack4xI8Clamp_e42b2a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %pack4xI8Clamp_e42b2a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack4xI8Clamp_e42b2a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %pack4xI8Clamp_e42b2a
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack4xI8Clamp_e42b2a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %pack4xI8Clamp_e42b2a
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/pack4xU8/b70b53.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/pack4xU8/b70b53.wgsl.expected.ir.msl
index b1aaea6..f3da1f4 100644
--- a/test/tint/builtins/gen/literal/pack4xU8/b70b53.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/pack4xU8/b70b53.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void pack4xU8_b70b53(tint_module_vars_struct tint_module_vars) {
+ uint res = 16843009u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pack4xU8_b70b53 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 16843009u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pack4xU8_b70b53(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %pack4xU8_b70b53
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack4xU8_b70b53(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %pack4xU8_b70b53
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack4xU8_b70b53(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %pack4xU8_b70b53
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/pack4xU8Clamp/6b8c1b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/pack4xU8Clamp/6b8c1b.wgsl.expected.ir.msl
index dafd983..fd1e9e1 100644
--- a/test/tint/builtins/gen/literal/pack4xU8Clamp/6b8c1b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/pack4xU8Clamp/6b8c1b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void pack4xU8Clamp_6b8c1b(tint_module_vars_struct tint_module_vars) {
+ uint res = 16843009u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pack4xU8Clamp_6b8c1b = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 16843009u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pack4xU8Clamp_6b8c1b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %pack4xU8Clamp_6b8c1b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack4xU8Clamp_6b8c1b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %pack4xU8Clamp_6b8c1b
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack4xU8Clamp_6b8c1b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %pack4xU8Clamp_6b8c1b
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.ir.msl
index d644677..f3cc5bc 100644
--- a/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void pow_04a908(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pow_04a908 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pow_04a908(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %pow_04a908
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_04a908(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %pow_04a908
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_04a908(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %pow_04a908
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/pow/46e029.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/pow/46e029.wgsl.expected.ir.msl
index 168f07f..eff786b 100644
--- a/test/tint/builtins/gen/literal/pow/46e029.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/pow/46e029.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void pow_46e029(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pow_46e029 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pow_46e029(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %pow_46e029
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_46e029(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %pow_46e029
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_46e029(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %pow_46e029
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.ir.msl
index d9e9415..4883bc9 100644
--- a/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void pow_4a46c9(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pow_4a46c9 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pow_4a46c9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %pow_4a46c9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_4a46c9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %pow_4a46c9
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_4a46c9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %pow_4a46c9
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.ir.msl
index 8523c4f..fca4683 100644
--- a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void pow_4f33b2(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pow_4f33b2 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pow_4f33b2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %pow_4f33b2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_4f33b2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %pow_4f33b2
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_4f33b2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %pow_4f33b2
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.ir.msl
index 6651ead..c4e2d0a 100644
--- a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void pow_ce9ef5(tint_module_vars_struct tint_module_vars) {
+ half res = 1.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pow_ce9ef5 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pow_ce9ef5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %pow_ce9ef5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_ce9ef5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %pow_ce9ef5
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_ce9ef5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %pow_ce9ef5
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.ir.msl
index 3a6fb4f..0237784 100644
--- a/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void pow_e60ea5(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pow_e60ea5 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pow_e60ea5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %pow_e60ea5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_e60ea5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %pow_e60ea5
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_e60ea5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %pow_e60ea5
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.ir.msl
index 06ae3de..5ea4c8c 100644
--- a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void pow_f37b25(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pow_f37b25 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pow_f37b25(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %pow_f37b25
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_f37b25(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %pow_f37b25
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_f37b25(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %pow_f37b25
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.ir.msl
index 8148729..c077b54 100644
--- a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void pow_fa5429(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pow_fa5429 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pow_fa5429(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %pow_fa5429
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_fa5429(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %pow_fa5429
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_fa5429(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %pow_fa5429
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/quantizeToF16/12e50e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quantizeToF16/12e50e.wgsl.expected.ir.msl
index 0e74e8c..65ea753 100644
--- a/test/tint/builtins/gen/literal/quantizeToF16/12e50e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/quantizeToF16/12e50e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void quantizeToF16_12e50e(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%quantizeToF16_12e50e = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ quantizeToF16_12e50e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %quantizeToF16_12e50e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ quantizeToF16_12e50e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %quantizeToF16_12e50e
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ quantizeToF16_12e50e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %quantizeToF16_12e50e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/quantizeToF16/2cddf3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quantizeToF16/2cddf3.wgsl.expected.ir.msl
index 6a2a1c5..a072e25 100644
--- a/test/tint/builtins/gen/literal/quantizeToF16/2cddf3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/quantizeToF16/2cddf3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void quantizeToF16_2cddf3(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%quantizeToF16_2cddf3 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ quantizeToF16_2cddf3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %quantizeToF16_2cddf3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ quantizeToF16_2cddf3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %quantizeToF16_2cddf3
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ quantizeToF16_2cddf3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %quantizeToF16_2cddf3
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/quantizeToF16/cba294.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quantizeToF16/cba294.wgsl.expected.ir.msl
index c7597a6..1ec2a18 100644
--- a/test/tint/builtins/gen/literal/quantizeToF16/cba294.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/quantizeToF16/cba294.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void quantizeToF16_cba294(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%quantizeToF16_cba294 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ quantizeToF16_cba294(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %quantizeToF16_cba294
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ quantizeToF16_cba294(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %quantizeToF16_cba294
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ quantizeToF16_cba294(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %quantizeToF16_cba294
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/quantizeToF16/e8fd14.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quantizeToF16/e8fd14.wgsl.expected.ir.msl
index 2c24604..652e6c6 100644
--- a/test/tint/builtins/gen/literal/quantizeToF16/e8fd14.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/quantizeToF16/e8fd14.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void quantizeToF16_e8fd14(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%quantizeToF16_e8fd14 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ quantizeToF16_e8fd14(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %quantizeToF16_e8fd14
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ quantizeToF16_e8fd14(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %quantizeToF16_e8fd14
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ quantizeToF16_e8fd14(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %quantizeToF16_e8fd14
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.ir.msl
index 848de34..eb7eb65 100644
--- a/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void radians_09b7fc(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(0.01745329238474369049f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%radians_09b7fc = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.01745329238474369049f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ radians_09b7fc(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %radians_09b7fc
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ radians_09b7fc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %radians_09b7fc
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ radians_09b7fc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %radians_09b7fc
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.ir.msl
index 6da0f4e..1a31e2d 100644
--- a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void radians_208fd9(tint_module_vars_struct tint_module_vars) {
+ half res = 0.0174407958984375h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%radians_208fd9 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.0174407958984375h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ radians_208fd9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %radians_208fd9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ radians_208fd9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %radians_208fd9
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ radians_208fd9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %radians_208fd9
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.ir.msl
index 259b772..18fbc8f 100644
--- a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void radians_44f20b(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(0.0174407958984375h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%radians_44f20b = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.0174407958984375h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ radians_44f20b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %radians_44f20b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ radians_44f20b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %radians_44f20b
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ radians_44f20b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %radians_44f20b
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.ir.msl
index ac59e94..dc1ded7 100644
--- a/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void radians_61687a(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(0.01745329238474369049f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%radians_61687a = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.01745329238474369049f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ radians_61687a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %radians_61687a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ radians_61687a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %radians_61687a
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ radians_61687a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %radians_61687a
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/radians/6b0ff2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/radians/6b0ff2.wgsl.expected.ir.msl
index 4c9375d..7f3ed15 100644
--- a/test/tint/builtins/gen/literal/radians/6b0ff2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/radians/6b0ff2.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void radians_6b0ff2(tint_module_vars_struct tint_module_vars) {
+ float res = 0.01745329238474369049f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%radians_6b0ff2 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.01745329238474369049f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ radians_6b0ff2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %radians_6b0ff2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ radians_6b0ff2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %radians_6b0ff2
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ radians_6b0ff2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %radians_6b0ff2
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.ir.msl
index 6b3986d..f350ed0 100644
--- a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void radians_7ea4c7(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(0.0174407958984375h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%radians_7ea4c7 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.0174407958984375h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ radians_7ea4c7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %radians_7ea4c7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ radians_7ea4c7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %radians_7ea4c7
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ radians_7ea4c7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %radians_7ea4c7
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.ir.msl
index f316677..b82301c 100644
--- a/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void radians_f96258(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(0.01745329238474369049f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%radians_f96258 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.01745329238474369049f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ radians_f96258(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %radians_f96258
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ radians_f96258(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %radians_f96258
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ radians_f96258(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %radians_f96258
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.ir.msl
index 57b7c98..82a7c8b 100644
--- a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void radians_fbacf0(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(0.0174407958984375h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%radians_fbacf0 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.0174407958984375h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ radians_fbacf0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %radians_fbacf0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ radians_fbacf0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %radians_fbacf0
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ radians_fbacf0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %radians_fbacf0
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.ir.msl
index 4179b0c..f2a9db9 100644
--- a/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void reflect_05357e(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(-7.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reflect_05357e = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(-7.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reflect_05357e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %reflect_05357e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_05357e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %reflect_05357e
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_05357e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %reflect_05357e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.ir.msl
index 4583243..545f5b6 100644
--- a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void reflect_310de5(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(-7.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reflect_310de5 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(-7.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reflect_310de5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %reflect_310de5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_310de5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %reflect_310de5
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_310de5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %reflect_310de5
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.ir.msl
index e9b088b..2f1812c 100644
--- a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void reflect_61ca21(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(-5.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reflect_61ca21 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(-5.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reflect_61ca21(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %reflect_61ca21
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_61ca21(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %reflect_61ca21
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_61ca21(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %reflect_61ca21
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.ir.msl
index d0ef78f..9dde9da 100644
--- a/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void reflect_b61e10(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(-3.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reflect_b61e10 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(-3.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reflect_b61e10(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %reflect_b61e10
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_b61e10(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %reflect_b61e10
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_b61e10(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %reflect_b61e10
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.ir.msl
index 8b6763e..6fbd30d 100644
--- a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void reflect_bb15ac(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(-3.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reflect_bb15ac = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(-3.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reflect_bb15ac(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %reflect_bb15ac
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_bb15ac(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %reflect_bb15ac
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_bb15ac(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %reflect_bb15ac
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.ir.msl
index 2afe379..47211b0 100644
--- a/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void reflect_f47fdb(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(-5.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reflect_f47fdb = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(-5.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reflect_f47fdb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %reflect_f47fdb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_f47fdb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %reflect_f47fdb
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_f47fdb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %reflect_f47fdb
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.ir.msl
index b4366c8..94dba97 100644
--- a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void refract_0594ba(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(-7.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%refract_0594ba = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(-7.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ refract_0594ba(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %refract_0594ba
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_0594ba(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %refract_0594ba
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_0594ba(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %refract_0594ba
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.ir.msl
index 5780718..98e6d22 100644
--- a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void refract_570cb3(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(-3.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%refract_570cb3 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(-3.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ refract_570cb3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %refract_570cb3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_570cb3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %refract_570cb3
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_570cb3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %refract_570cb3
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.ir.msl
index 64f2529..cb5a663 100644
--- a/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void refract_7e02e6(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(-7.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%refract_7e02e6 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(-7.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ refract_7e02e6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %refract_7e02e6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_7e02e6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %refract_7e02e6
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_7e02e6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %refract_7e02e6
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.ir.msl
index b685da1..0b3e782 100644
--- a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void refract_8984af(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(-5.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%refract_8984af = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(-5.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ refract_8984af(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %refract_8984af
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_8984af(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %refract_8984af
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_8984af(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %refract_8984af
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.ir.msl
index ab6cfdc..04b2150 100644
--- a/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void refract_cbc1d2(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(-5.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%refract_cbc1d2 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(-5.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ refract_cbc1d2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %refract_cbc1d2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_cbc1d2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %refract_cbc1d2
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_cbc1d2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %refract_cbc1d2
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.ir.msl
index 2781980..6cce671 100644
--- a/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void refract_cd905f(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(-3.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%refract_cd905f = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(-3.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ refract_cd905f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %refract_cd905f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_cd905f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %refract_cd905f
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_cd905f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %refract_cd905f
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.ir.msl
index a37f516..48b4c32 100644
--- a/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void reverseBits_222177(tint_module_vars_struct tint_module_vars) {
+ int2 res = int2((-2147483647 - 1));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reverseBits_222177 = func():void {
- $B2: {
- %res:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(-2147483648i)
- %4:vec2<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reverseBits_222177(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %reverseBits_222177
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_222177(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %reverseBits_222177
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_222177(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %reverseBits_222177
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.ir.msl
index ee87551..e493a89 100644
--- a/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void reverseBits_35fea9(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(2147483648u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reverseBits_35fea9 = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(2147483648u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reverseBits_35fea9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %reverseBits_35fea9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_35fea9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %reverseBits_35fea9
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_35fea9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %reverseBits_35fea9
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.ir.msl
index 9c2181c..1ef262a 100644
--- a/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void reverseBits_4dbd6f(tint_module_vars_struct tint_module_vars) {
+ int4 res = int4((-2147483647 - 1));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reverseBits_4dbd6f = func():void {
- $B2: {
- %res:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(-2147483648i)
- %4:vec4<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reverseBits_4dbd6f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %reverseBits_4dbd6f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_4dbd6f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %reverseBits_4dbd6f
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_4dbd6f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %reverseBits_4dbd6f
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/reverseBits/7c4269.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/reverseBits/7c4269.wgsl.expected.ir.msl
index 2b75c35..84e3838 100644
--- a/test/tint/builtins/gen/literal/reverseBits/7c4269.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/reverseBits/7c4269.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void reverseBits_7c4269(tint_module_vars_struct tint_module_vars) {
+ int res = (-2147483647 - 1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reverseBits_7c4269 = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, -2147483648i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reverseBits_7c4269(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %reverseBits_7c4269
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_7c4269(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %reverseBits_7c4269
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_7c4269(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %reverseBits_7c4269
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.ir.msl
index b69da10..e5f4a22 100644
--- a/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void reverseBits_a6ccd4(tint_module_vars_struct tint_module_vars) {
+ uint3 res = uint3(2147483648u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reverseBits_a6ccd4 = func():void {
- $B2: {
- %res:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(2147483648u)
- %4:vec3<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reverseBits_a6ccd4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %reverseBits_a6ccd4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_a6ccd4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %reverseBits_a6ccd4
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_a6ccd4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %reverseBits_a6ccd4
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.ir.msl
index 213fb35..f18b6e1 100644
--- a/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void reverseBits_c21bc1(tint_module_vars_struct tint_module_vars) {
+ int3 res = int3((-2147483647 - 1));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reverseBits_c21bc1 = func():void {
- $B2: {
- %res:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(-2147483648i)
- %4:vec3<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reverseBits_c21bc1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %reverseBits_c21bc1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_c21bc1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %reverseBits_c21bc1
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_c21bc1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %reverseBits_c21bc1
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.ir.msl
index 501332c..e184fa3 100644
--- a/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void reverseBits_e1f4c1(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(2147483648u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reverseBits_e1f4c1 = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(2147483648u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reverseBits_e1f4c1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %reverseBits_e1f4c1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_e1f4c1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %reverseBits_e1f4c1
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_e1f4c1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %reverseBits_e1f4c1
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/reverseBits/e31adf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/reverseBits/e31adf.wgsl.expected.ir.msl
index bc36578..0451f6a 100644
--- a/test/tint/builtins/gen/literal/reverseBits/e31adf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/reverseBits/e31adf.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void reverseBits_e31adf(tint_module_vars_struct tint_module_vars) {
+ uint res = 2147483648u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reverseBits_e31adf = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 2147483648u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reverseBits_e31adf(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %reverseBits_e31adf
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_e31adf(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %reverseBits_e31adf
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_e31adf(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %reverseBits_e31adf
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.ir.msl
index 3938eea..bf58166 100644
--- a/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void round_106c0b(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(4.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%round_106c0b = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(4.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ round_106c0b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %round_106c0b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_106c0b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %round_106c0b
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_106c0b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %round_106c0b
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.ir.msl
index e9795c0..d39f0ef 100644
--- a/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void round_1c7897(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(4.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%round_1c7897 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(4.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ round_1c7897(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %round_1c7897
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_1c7897(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %round_1c7897
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_1c7897(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %round_1c7897
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.ir.msl
index 1b32278..019c481 100644
--- a/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void round_52c84d(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(4.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%round_52c84d = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(4.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ round_52c84d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %round_52c84d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_52c84d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %round_52c84d
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_52c84d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %round_52c84d
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.ir.msl
index 4eaf8e8..f075871 100644
--- a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void round_9078ef(tint_module_vars_struct tint_module_vars) {
+ half res = 4.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%round_9078ef = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 4.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ round_9078ef(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %round_9078ef
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_9078ef(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %round_9078ef
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_9078ef(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %round_9078ef
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/round/9edc38.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/round/9edc38.wgsl.expected.ir.msl
index 6a6c8a4..0c48484 100644
--- a/test/tint/builtins/gen/literal/round/9edc38.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/round/9edc38.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void round_9edc38(tint_module_vars_struct tint_module_vars) {
+ float res = 4.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%round_9edc38 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 4.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ round_9edc38(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %round_9edc38
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_9edc38(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %round_9edc38
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_9edc38(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %round_9edc38
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.ir.msl
index 747acd7..3bb1015 100644
--- a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void round_d87e84(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(4.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%round_d87e84 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(4.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ round_d87e84(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %round_d87e84
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_d87e84(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %round_d87e84
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_d87e84(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %round_d87e84
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.ir.msl
index e250256..065b02f 100644
--- a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void round_e1bba2(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(4.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%round_e1bba2 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(4.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ round_e1bba2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %round_e1bba2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_e1bba2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %round_e1bba2
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_e1bba2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %round_e1bba2
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.ir.msl
index c7933ed..0af70e8 100644
--- a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void round_f665b5(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(4.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%round_f665b5 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(4.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ round_f665b5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %round_f665b5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_f665b5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %round_f665b5
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_f665b5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %round_f665b5
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/saturate/270da5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/saturate/270da5.wgsl.expected.ir.msl
index 58d3885..6e11870 100644
--- a/test/tint/builtins/gen/literal/saturate/270da5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/saturate/270da5.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void saturate_270da5(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%saturate_270da5 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ saturate_270da5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %saturate_270da5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_270da5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %saturate_270da5
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_270da5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %saturate_270da5
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.ir.msl
index b1eceda..d012368 100644
--- a/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void saturate_462535(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%saturate_462535 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ saturate_462535(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %saturate_462535
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_462535(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %saturate_462535
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_462535(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %saturate_462535
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/saturate/51567f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/saturate/51567f.wgsl.expected.ir.msl
index 3ad7145..1f51cef 100644
--- a/test/tint/builtins/gen/literal/saturate/51567f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/saturate/51567f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void saturate_51567f(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%saturate_51567f = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ saturate_51567f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %saturate_51567f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_51567f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %saturate_51567f
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_51567f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %saturate_51567f
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/saturate/6bcddf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/saturate/6bcddf.wgsl.expected.ir.msl
index 0c43f59..4bbbb21 100644
--- a/test/tint/builtins/gen/literal/saturate/6bcddf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/saturate/6bcddf.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void saturate_6bcddf(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%saturate_6bcddf = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ saturate_6bcddf(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %saturate_6bcddf
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_6bcddf(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %saturate_6bcddf
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_6bcddf(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %saturate_6bcddf
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/saturate/a5b571.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/saturate/a5b571.wgsl.expected.ir.msl
index 9215e8e..96a7f14 100644
--- a/test/tint/builtins/gen/literal/saturate/a5b571.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/saturate/a5b571.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void saturate_a5b571(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%saturate_a5b571 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ saturate_a5b571(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %saturate_a5b571
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_a5b571(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %saturate_a5b571
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_a5b571(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %saturate_a5b571
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.ir.msl
index aa621ee..51eb611 100644
--- a/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void saturate_cd2028(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%saturate_cd2028 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ saturate_cd2028(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %saturate_cd2028
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_cd2028(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %saturate_cd2028
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_cd2028(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %saturate_cd2028
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.ir.msl
index 8fb98db..94453b2 100644
--- a/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void saturate_dcde71(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%saturate_dcde71 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ saturate_dcde71(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %saturate_dcde71
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_dcde71(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %saturate_dcde71
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_dcde71(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %saturate_dcde71
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.ir.msl
index adbf785..46967c9 100644
--- a/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void saturate_e8df56(tint_module_vars_struct tint_module_vars) {
+ half res = 1.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%saturate_e8df56 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ saturate_e8df56(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %saturate_e8df56
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_e8df56(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %saturate_e8df56
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_e8df56(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %saturate_e8df56
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.ir.msl
index 6d76d88..c3651a7 100644
--- a/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void select_00b848(tint_module_vars_struct tint_module_vars) {
+ int2 res = int2(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_00b848 = func():void {
- $B2: {
- %res:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_00b848(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_00b848
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_00b848(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_00b848
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_00b848(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_00b848
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.ir.msl
index eda7dd8..e661dd6 100644
--- a/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void select_01e2cd(tint_module_vars_struct tint_module_vars) {
+ int3 res = int3(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_01e2cd = func():void {
- $B2: {
- %res:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_01e2cd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_01e2cd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_01e2cd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_01e2cd
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_01e2cd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_01e2cd
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.ir.msl
index bcf989b..e628beb 100644
--- a/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void select_087ea4(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_087ea4 = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_087ea4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_087ea4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_087ea4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_087ea4
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_087ea4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_087ea4
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.ir.msl
index ae02b21..c879d49 100644
--- a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void select_10e73b(tint_module_vars_struct tint_module_vars) {
+ half res = 1.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_10e73b = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_10e73b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_10e73b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_10e73b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_10e73b
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_10e73b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_10e73b
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.ir.msl
index 1ab7e87..a6e4072 100644
--- a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void select_1ada2a(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_1ada2a = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_1ada2a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_1ada2a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_1ada2a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_1ada2a
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_1ada2a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_1ada2a
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.ir.msl
index f8d02fb..44ae382 100644
--- a/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void select_1e960b(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_1e960b = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_1e960b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_1e960b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_1e960b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_1e960b
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_1e960b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_1e960b
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.ir.msl
index 7898e19..611e683 100644
--- a/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void select_266aff(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_266aff = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_266aff(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_266aff
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_266aff(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_266aff
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_266aff(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_266aff
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.ir.msl
index 4721520..a5e479f 100644
--- a/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void select_28a27e(tint_module_vars_struct tint_module_vars) {
+ uint3 res = uint3(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_28a27e = func():void {
- $B2: {
- %res:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_28a27e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_28a27e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_28a27e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_28a27e
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_28a27e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_28a27e
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.ir.msl
index 1952414..3c60098 100644
--- a/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.ir.msl
@@ -1,43 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void select_3c25ce(tint_module_vars_struct tint_module_vars) {
+ bool3 res = bool3(true);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all((res == bool3(false))));
}
-
-%select_3c25ce = func():void {
- $B2: {
- %res:ptr<function, vec3<bool>, read_write> = var, vec3<bool>(true)
- %4:vec3<bool> = load %res
- %5:vec3<bool> = eq %4, vec3<bool>(false)
- %6:bool = all %5
- %7:i32 = select 0i, 1i, %6
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_3c25ce(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %select_3c25ce
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_3c25ce(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %select_3c25ce
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_3c25ce(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %select_3c25ce
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.ir.msl
index 2169f22..bf71672 100644
--- a/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void select_416e14(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_416e14 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_416e14(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_416e14
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_416e14(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_416e14
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_416e14(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_416e14
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.ir.msl
index 3b3ad84..3e801f2 100644
--- a/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void select_51b047(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_51b047 = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_51b047(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_51b047
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_51b047(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_51b047
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_51b047(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_51b047
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.ir.msl
index 47c62ae..b904db9 100644
--- a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void select_53d518(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_53d518 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_53d518(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_53d518
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_53d518(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_53d518
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_53d518(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_53d518
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/713567.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/713567.wgsl.expected.ir.msl
index 3596694..991736d 100644
--- a/test/tint/builtins/gen/literal/select/713567.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/713567.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void select_713567(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_713567 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_713567(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_713567
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_713567(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_713567
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_713567(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_713567
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.ir.msl
index 7d406fa..b17d81f 100644
--- a/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void select_78be5f(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_78be5f = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_78be5f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_78be5f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_78be5f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_78be5f
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_78be5f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_78be5f
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.ir.msl
index fd12708..9e52b3b 100644
--- a/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.ir.msl
@@ -1,43 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void select_80a9a9(tint_module_vars_struct tint_module_vars) {
+ bool3 res = bool3(true);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all((res == bool3(false))));
}
-
-%select_80a9a9 = func():void {
- $B2: {
- %res:ptr<function, vec3<bool>, read_write> = var, vec3<bool>(true)
- %4:vec3<bool> = load %res
- %5:vec3<bool> = eq %4, vec3<bool>(false)
- %6:bool = all %5
- %7:i32 = select 0i, 1i, %6
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_80a9a9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %select_80a9a9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_80a9a9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %select_80a9a9
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_80a9a9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %select_80a9a9
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.ir.msl
index f799518..92430fd 100644
--- a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void select_830dd9(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_830dd9 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_830dd9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_830dd9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_830dd9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_830dd9
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_830dd9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_830dd9
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.ir.msl
index 1b32ae8..66c303a 100644
--- a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void select_86f9bd(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_86f9bd = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_86f9bd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_86f9bd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_86f9bd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_86f9bd
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_86f9bd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_86f9bd
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.ir.msl
index 682d6b2..4f989a8 100644
--- a/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void select_8fa62c(tint_module_vars_struct tint_module_vars) {
+ int3 res = int3(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_8fa62c = func():void {
- $B2: {
- %res:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_8fa62c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_8fa62c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_8fa62c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_8fa62c
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_8fa62c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_8fa62c
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.ir.msl
index 45d3f8a..fb44a24 100644
--- a/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void select_99f883(tint_module_vars_struct tint_module_vars) {
+ uint res = 1u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_99f883 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_99f883(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_99f883
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_99f883(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_99f883
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_99f883(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_99f883
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.ir.msl
index d9d447f..cce6512 100644
--- a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void select_a081f1(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_a081f1 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_a081f1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_a081f1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_a081f1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_a081f1
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_a081f1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_a081f1
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.ir.msl
index 188330d..d45d8b1 100644
--- a/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void select_a2860e(tint_module_vars_struct tint_module_vars) {
+ int4 res = int4(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_a2860e = func():void {
- $B2: {
- %res:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_a2860e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_a2860e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_a2860e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_a2860e
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_a2860e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_a2860e
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.ir.msl
index bdb67db..3c5fb58 100644
--- a/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void select_ab069f(tint_module_vars_struct tint_module_vars) {
+ int4 res = int4(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_ab069f = func():void {
- $B2: {
- %res:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_ab069f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_ab069f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_ab069f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_ab069f
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_ab069f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_ab069f
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.ir.msl
index e989ed3..e2a8ad3 100644
--- a/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void select_b04721(tint_module_vars_struct tint_module_vars) {
+ uint3 res = uint3(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_b04721 = func():void {
- $B2: {
- %res:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_b04721(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_b04721
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_b04721(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_b04721
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_b04721(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_b04721
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.ir.msl
index d1895c3..a114794 100644
--- a/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void select_bb447f(tint_module_vars_struct tint_module_vars) {
+ int2 res = int2(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_bb447f = func():void {
- $B2: {
- %res:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_bb447f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_bb447f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_bb447f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_bb447f
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_bb447f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_bb447f
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.ir.msl
index 7b14cdb..c39b550 100644
--- a/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void select_bb8aae(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_bb8aae = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_bb8aae(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_bb8aae
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_bb8aae(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_bb8aae
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_bb8aae(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_bb8aae
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.ir.msl
index 7688386..67737e6 100644
--- a/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void select_bf3d29(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_bf3d29 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_bf3d29(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_bf3d29
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_bf3d29(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_bf3d29
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_bf3d29(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_bf3d29
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.ir.msl
index 2f9ddda..b9d3bf3 100644
--- a/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.ir.msl
@@ -1,43 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void select_c31f9e(tint_module_vars_struct tint_module_vars) {
+ bool res = true;
+ (*tint_module_vars.prevent_dce) = select(0, 1, all(!(res)));
}
-
-%select_c31f9e = func():void {
- $B2: {
- %res:ptr<function, bool, read_write> = var, true
- %4:bool = load %res
- %5:bool = eq %4, false
- %6:bool = all %5
- %7:i32 = select 0i, 1i, %6
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_c31f9e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %select_c31f9e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_c31f9e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %select_c31f9e
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_c31f9e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %select_c31f9e
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.ir.msl
index 003b6da..b6c49ea 100644
--- a/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.ir.msl
@@ -1,43 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void select_c41bd1(tint_module_vars_struct tint_module_vars) {
+ bool4 res = bool4(true);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all((res == bool4(false))));
}
-
-%select_c41bd1 = func():void {
- $B2: {
- %res:ptr<function, vec4<bool>, read_write> = var, vec4<bool>(true)
- %4:vec4<bool> = load %res
- %5:vec4<bool> = eq %4, vec4<bool>(false)
- %6:bool = all %5
- %7:i32 = select 0i, 1i, %6
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_c41bd1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %select_c41bd1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_c41bd1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %select_c41bd1
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_c41bd1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %select_c41bd1
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.ir.msl
index bd3f936..a35887b 100644
--- a/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void select_c4a4ef(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_c4a4ef = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_c4a4ef(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_c4a4ef
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_c4a4ef(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_c4a4ef
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_c4a4ef(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_c4a4ef
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.ir.msl
index b0a4fce..b5d4e6b 100644
--- a/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.ir.msl
@@ -1,43 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void select_cb9301(tint_module_vars_struct tint_module_vars) {
+ bool2 res = bool2(true);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all((res == bool2(false))));
}
-
-%select_cb9301 = func():void {
- $B2: {
- %res:ptr<function, vec2<bool>, read_write> = var, vec2<bool>(true)
- %4:vec2<bool> = load %res
- %5:vec2<bool> = eq %4, vec2<bool>(false)
- %6:bool = all %5
- %7:i32 = select 0i, 1i, %6
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_cb9301(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %select_cb9301
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_cb9301(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %select_cb9301
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_cb9301(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %select_cb9301
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.ir.msl
index d5d85a7..4f15263 100644
--- a/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.ir.msl
@@ -1,43 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void select_e3e028(tint_module_vars_struct tint_module_vars) {
+ bool4 res = bool4(true);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all((res == bool4(false))));
}
-
-%select_e3e028 = func():void {
- $B2: {
- %res:ptr<function, vec4<bool>, read_write> = var, vec4<bool>(true)
- %4:vec4<bool> = load %res
- %5:vec4<bool> = eq %4, vec4<bool>(false)
- %6:bool = all %5
- %7:i32 = select 0i, 1i, %6
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_e3e028(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %select_e3e028
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_e3e028(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %select_e3e028
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_e3e028(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %select_e3e028
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.ir.msl
index 8a39293..7846dcd 100644
--- a/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void select_ebfea2(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_ebfea2 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_ebfea2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_ebfea2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_ebfea2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_ebfea2
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_ebfea2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_ebfea2
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.ir.msl
index 8b579a4..2102a0d 100644
--- a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void select_ed7c13(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_ed7c13 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_ed7c13(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_ed7c13
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_ed7c13(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_ed7c13
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_ed7c13(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_ed7c13
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.ir.msl
index 03b9041..253fd0f 100644
--- a/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void select_ed8a15(tint_module_vars_struct tint_module_vars) {
+ int res = 1;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_ed8a15 = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_ed8a15(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %select_ed8a15
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_ed8a15(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %select_ed8a15
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_ed8a15(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %select_ed8a15
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.ir.msl
index 8dda2db..dd628b7 100644
--- a/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.ir.msl
@@ -1,43 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void select_fb7e53(tint_module_vars_struct tint_module_vars) {
+ bool2 res = bool2(true);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all((res == bool2(false))));
}
-
-%select_fb7e53 = func():void {
- $B2: {
- %res:ptr<function, vec2<bool>, read_write> = var, vec2<bool>(true)
- %4:vec2<bool> = load %res
- %5:vec2<bool> = eq %4, vec2<bool>(false)
- %6:bool = all %5
- %7:i32 = select 0i, 1i, %6
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_fb7e53(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %select_fb7e53
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_fb7e53(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %select_fb7e53
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_fb7e53(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %select_fb7e53
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.ir.msl
index 7e58e6e..ac6f910 100644
--- a/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void sign_159665(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_159665 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_159665(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sign_159665
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_159665(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sign_159665
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_159665(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sign_159665
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.ir.msl
index 2efd39a..ca9fcd2 100644
--- a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void sign_160933(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_160933 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_160933(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sign_160933
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_160933(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sign_160933
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_160933(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sign_160933
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sign/3233fa.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sign/3233fa.wgsl.expected.ir.msl
index 208d895..58904e1 100644
--- a/test/tint/builtins/gen/literal/sign/3233fa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sign/3233fa.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void sign_3233fa(tint_module_vars_struct tint_module_vars) {
+ int res = 1;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_3233fa = func():void {
- $B2: {
- %res:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_3233fa(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sign_3233fa
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_3233fa(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sign_3233fa
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_3233fa(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sign_3233fa
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sign/58d779.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sign/58d779.wgsl.expected.ir.msl
index 418b757..bf23ba8 100644
--- a/test/tint/builtins/gen/literal/sign/58d779.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sign/58d779.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void sign_58d779(tint_module_vars_struct tint_module_vars) {
+ int4 res = int4(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_58d779 = func():void {
- $B2: {
- %res:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_58d779(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sign_58d779
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_58d779(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sign_58d779
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_58d779(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sign_58d779
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.ir.msl
index d31a59f..ff16d5e 100644
--- a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void sign_5d283a(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_5d283a = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_5d283a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sign_5d283a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_5d283a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sign_5d283a
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_5d283a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sign_5d283a
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.ir.msl
index ea6fb60..7fc2517 100644
--- a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void sign_7c85ea(tint_module_vars_struct tint_module_vars) {
+ half res = 1.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_7c85ea = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_7c85ea(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sign_7c85ea
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_7c85ea(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sign_7c85ea
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_7c85ea(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sign_7c85ea
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sign/926015.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sign/926015.wgsl.expected.ir.msl
index 9b7633f..b4e0b2d 100644
--- a/test/tint/builtins/gen/literal/sign/926015.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sign/926015.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void sign_926015(tint_module_vars_struct tint_module_vars) {
+ int2 res = int2(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_926015 = func():void {
- $B2: {
- %res:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_926015(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sign_926015
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_926015(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sign_926015
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_926015(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sign_926015
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sign/9603b1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sign/9603b1.wgsl.expected.ir.msl
index 6efd5c3..d8fa327 100644
--- a/test/tint/builtins/gen/literal/sign/9603b1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sign/9603b1.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void sign_9603b1(tint_module_vars_struct tint_module_vars) {
+ int3 res = int3(1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_9603b1 = func():void {
- $B2: {
- %res:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_9603b1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sign_9603b1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_9603b1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sign_9603b1
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_9603b1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sign_9603b1
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.ir.msl
index 5ca0fc8..eb96eb7 100644
--- a/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void sign_b8f634(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_b8f634 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_b8f634(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sign_b8f634
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_b8f634(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sign_b8f634
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_b8f634(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sign_b8f634
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.ir.msl
index 71fd106..43c4ee1 100644
--- a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void sign_ccdb3c(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_ccdb3c = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_ccdb3c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sign_ccdb3c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_ccdb3c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sign_ccdb3c
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_ccdb3c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sign_ccdb3c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.ir.msl
index 758b40d..f5e9020 100644
--- a/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void sign_d065d8(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_d065d8 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_d065d8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sign_d065d8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_d065d8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sign_d065d8
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_d065d8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sign_d065d8
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sign/dd790e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sign/dd790e.wgsl.expected.ir.msl
index fd44221..98159da 100644
--- a/test/tint/builtins/gen/literal/sign/dd790e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sign/dd790e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void sign_dd790e(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_dd790e = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_dd790e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sign_dd790e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_dd790e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sign_dd790e
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_dd790e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sign_dd790e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.ir.msl
index e44c9d8..34e82c6 100644
--- a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void sin_01f241(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sin_01f241 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sin_01f241(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sin_01f241
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_01f241(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sin_01f241
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_01f241(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sin_01f241
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.ir.msl
index 152835c..ab5c493 100644
--- a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void sin_2c903b(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(0.99951171875h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sin_2c903b = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.99951171875h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sin_2c903b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sin_2c903b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_2c903b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sin_2c903b
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_2c903b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sin_2c903b
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.ir.msl
index 8e79366..34d88af 100644
--- a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void sin_3cca11(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(0.99951171875h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sin_3cca11 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.99951171875h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sin_3cca11(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sin_3cca11
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_3cca11(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sin_3cca11
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_3cca11(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sin_3cca11
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.ir.msl
index c9500e0..8034d4c 100644
--- a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void sin_4e3979(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sin_4e3979 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sin_4e3979(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sin_4e3979
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_4e3979(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sin_4e3979
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_4e3979(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sin_4e3979
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.ir.msl
index 165b11c..517a9a1 100644
--- a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void sin_5c0712(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(0.99951171875h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sin_5c0712 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.99951171875h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sin_5c0712(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sin_5c0712
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_5c0712(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sin_5c0712
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_5c0712(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sin_5c0712
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.ir.msl
index 022f530..c3e83b2 100644
--- a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void sin_66a59f(tint_module_vars_struct tint_module_vars) {
+ half res = 0.99951171875h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sin_66a59f = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.99951171875h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sin_66a59f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sin_66a59f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_66a59f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sin_66a59f
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_66a59f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sin_66a59f
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.ir.msl
index 583af3c..53917ea 100644
--- a/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void sin_b78c91(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sin_b78c91 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sin_b78c91(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sin_b78c91
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_b78c91(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sin_b78c91
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_b78c91(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sin_b78c91
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.ir.msl
index f1954d5..7e5a213 100644
--- a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void sin_fc8bc4(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sin_fc8bc4 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sin_fc8bc4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sin_fc8bc4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_fc8bc4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sin_fc8bc4
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_fc8bc4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sin_fc8bc4
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.ir.msl
index f797d71..c48c76c 100644
--- a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void sinh_0908c1(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.1748046875h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sinh_0908c1 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.1748046875h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sinh_0908c1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sinh_0908c1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_0908c1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sinh_0908c1
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_0908c1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sinh_0908c1
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.ir.msl
index 6203fff..fe0d644 100644
--- a/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void sinh_445e33(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.17520117759704589844f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sinh_445e33 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.17520117759704589844f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sinh_445e33(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sinh_445e33
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_445e33(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sinh_445e33
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_445e33(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sinh_445e33
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.ir.msl
index 9ddebef..765ba25 100644
--- a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void sinh_69cce2(tint_module_vars_struct tint_module_vars) {
+ half res = 1.1748046875h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sinh_69cce2 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 1.1748046875h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sinh_69cce2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sinh_69cce2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_69cce2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sinh_69cce2
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_69cce2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sinh_69cce2
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sinh/7bb598.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sinh/7bb598.wgsl.expected.ir.msl
index 378c024..89dda90a 100644
--- a/test/tint/builtins/gen/literal/sinh/7bb598.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sinh/7bb598.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void sinh_7bb598(tint_module_vars_struct tint_module_vars) {
+ float res = 1.17520117759704589844f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sinh_7bb598 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.17520117759704589844f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sinh_7bb598(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sinh_7bb598
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_7bb598(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sinh_7bb598
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_7bb598(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sinh_7bb598
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.ir.msl
index 93d4ab5..a855b93 100644
--- a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void sinh_924f19(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.1748046875h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sinh_924f19 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.1748046875h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sinh_924f19(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sinh_924f19
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_924f19(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sinh_924f19
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_924f19(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sinh_924f19
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.ir.msl
index f8e221d..3c0ef57 100644
--- a/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void sinh_b9860e(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.17520117759704589844f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sinh_b9860e = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.17520117759704589844f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sinh_b9860e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sinh_b9860e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_b9860e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sinh_b9860e
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_b9860e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sinh_b9860e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.ir.msl
index f90ff72..e3184cd 100644
--- a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void sinh_ba7e25(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.1748046875h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sinh_ba7e25 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.1748046875h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sinh_ba7e25(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sinh_ba7e25
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_ba7e25(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sinh_ba7e25
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_ba7e25(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sinh_ba7e25
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.ir.msl
index c8d2e3a..456fcdf 100644
--- a/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void sinh_c9a5eb(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.17520117759704589844f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sinh_c9a5eb = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.17520117759704589844f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sinh_c9a5eb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sinh_c9a5eb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_c9a5eb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sinh_c9a5eb
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_c9a5eb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sinh_c9a5eb
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.ir.msl
index fa3ba83..c2ebfb2 100644
--- a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void smoothstep_12c031(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(0.5h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%smoothstep_12c031 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.5h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ smoothstep_12c031(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %smoothstep_12c031
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_12c031(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %smoothstep_12c031
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_12c031(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %smoothstep_12c031
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.ir.msl
index b5145ef..6a62fa7 100644
--- a/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void smoothstep_392c19(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(0.5f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%smoothstep_392c19 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.5f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ smoothstep_392c19(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %smoothstep_392c19
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_392c19(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %smoothstep_392c19
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_392c19(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %smoothstep_392c19
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.ir.msl
index a851b91..a86e54c 100644
--- a/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void smoothstep_40864c(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(0.5f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%smoothstep_40864c = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.5f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ smoothstep_40864c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %smoothstep_40864c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_40864c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %smoothstep_40864c
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_40864c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %smoothstep_40864c
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.ir.msl
index f3a7a60..f39e1c9 100644
--- a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void smoothstep_586e12(tint_module_vars_struct tint_module_vars) {
+ half res = 0.5h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%smoothstep_586e12 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.5h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ smoothstep_586e12(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %smoothstep_586e12
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_586e12(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %smoothstep_586e12
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_586e12(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %smoothstep_586e12
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/smoothstep/6c4975.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/smoothstep/6c4975.wgsl.expected.ir.msl
index 5d2cd2e..bb29737 100644
--- a/test/tint/builtins/gen/literal/smoothstep/6c4975.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/smoothstep/6c4975.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void smoothstep_6c4975(tint_module_vars_struct tint_module_vars) {
+ float res = 0.5f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%smoothstep_6c4975 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.5f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ smoothstep_6c4975(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %smoothstep_6c4975
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_6c4975(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %smoothstep_6c4975
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_6c4975(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %smoothstep_6c4975
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.ir.msl
index c19a8eb..cf706c0 100644
--- a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void smoothstep_6e7a74(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(0.5h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%smoothstep_6e7a74 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.5h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ smoothstep_6e7a74(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %smoothstep_6e7a74
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_6e7a74(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %smoothstep_6e7a74
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_6e7a74(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %smoothstep_6e7a74
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.ir.msl
index 79b9b3c..3f94b70 100644
--- a/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void smoothstep_aad1db(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(0.5f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%smoothstep_aad1db = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.5f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ smoothstep_aad1db(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %smoothstep_aad1db
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_aad1db(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %smoothstep_aad1db
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_aad1db(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %smoothstep_aad1db
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.ir.msl
index a777dac..0e5dd7a 100644
--- a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void smoothstep_c43ebd(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(0.5h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%smoothstep_c43ebd = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.5h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ smoothstep_c43ebd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %smoothstep_c43ebd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_c43ebd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %smoothstep_c43ebd
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_c43ebd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %smoothstep_c43ebd
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sqrt/20c74e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sqrt/20c74e.wgsl.expected.ir.msl
index f08ab08..c8000ca 100644
--- a/test/tint/builtins/gen/literal/sqrt/20c74e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sqrt/20c74e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void sqrt_20c74e(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sqrt_20c74e = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sqrt_20c74e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sqrt_20c74e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_20c74e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sqrt_20c74e
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_20c74e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sqrt_20c74e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.ir.msl
index a8611b4..336f4c3 100644
--- a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void sqrt_803d1c(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sqrt_803d1c = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sqrt_803d1c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sqrt_803d1c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_803d1c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sqrt_803d1c
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_803d1c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sqrt_803d1c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.ir.msl
index 1aa0330..fae3fa2 100644
--- a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void sqrt_895a0c(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sqrt_895a0c = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sqrt_895a0c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sqrt_895a0c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_895a0c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sqrt_895a0c
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_895a0c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sqrt_895a0c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.ir.msl
index 2b6a953..8863e9c 100644
--- a/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void sqrt_8c7024(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sqrt_8c7024 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sqrt_8c7024(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sqrt_8c7024
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_8c7024(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sqrt_8c7024
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_8c7024(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sqrt_8c7024
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.ir.msl
index fafa6e5..2919663 100644
--- a/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void sqrt_aa0d7a(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sqrt_aa0d7a = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sqrt_aa0d7a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sqrt_aa0d7a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_aa0d7a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sqrt_aa0d7a
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_aa0d7a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sqrt_aa0d7a
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.ir.msl
index 7f8f0fd..db68680 100644
--- a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void sqrt_d9ab4d(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sqrt_d9ab4d = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sqrt_d9ab4d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sqrt_d9ab4d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_d9ab4d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sqrt_d9ab4d
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_d9ab4d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sqrt_d9ab4d
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.ir.msl
index dd03040..245ff5d 100644
--- a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void sqrt_ec33e9(tint_module_vars_struct tint_module_vars) {
+ half res = 1.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sqrt_ec33e9 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sqrt_ec33e9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sqrt_ec33e9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_ec33e9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sqrt_ec33e9
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_ec33e9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sqrt_ec33e9
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.ir.msl
index 25fc369..9899ca7 100644
--- a/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void sqrt_f8c59a(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sqrt_f8c59a = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sqrt_f8c59a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %sqrt_f8c59a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_f8c59a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %sqrt_f8c59a
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_f8c59a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %sqrt_f8c59a
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.ir.msl
index c0e9c09..907644d 100644
--- a/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void step_07cb06(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%step_07cb06 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ step_07cb06(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %step_07cb06
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_07cb06(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %step_07cb06
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_07cb06(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %step_07cb06
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/step/0b073b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/step/0b073b.wgsl.expected.ir.msl
index 8344c29..7c96f4e 100644
--- a/test/tint/builtins/gen/literal/step/0b073b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/step/0b073b.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void step_0b073b(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%step_0b073b = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ step_0b073b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %step_0b073b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_0b073b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %step_0b073b
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_0b073b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %step_0b073b
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.ir.msl
index 07c20bc..7987239 100644
--- a/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void step_19accd(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%step_19accd = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ step_19accd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %step_19accd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_19accd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %step_19accd
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_19accd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %step_19accd
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/step/334303.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/step/334303.wgsl.expected.ir.msl
index c8cdc21..f6fe176 100644
--- a/test/tint/builtins/gen/literal/step/334303.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/step/334303.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void step_334303(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%step_334303 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ step_334303(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %step_334303
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_334303(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %step_334303
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_334303(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %step_334303
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.ir.msl
index cbd9ea0..c21f073 100644
--- a/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void step_630d07(tint_module_vars_struct tint_module_vars) {
+ half res = 1.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%step_630d07 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ step_630d07(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %step_630d07
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_630d07(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %step_630d07
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_630d07(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %step_630d07
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.ir.msl
index 184b4e2..741af07 100644
--- a/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void step_baa320(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%step_baa320 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ step_baa320(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %step_baa320
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_baa320(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %step_baa320
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_baa320(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %step_baa320
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.ir.msl
index 2a0a3d6..ea41cf8 100644
--- a/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void step_cc6b61(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%step_cc6b61 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ step_cc6b61(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %step_cc6b61
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_cc6b61(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %step_cc6b61
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_cc6b61(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %step_cc6b61
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.ir.msl
index 100b9b2..e0eb627 100644
--- a/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void step_e2b337(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%step_e2b337 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ step_e2b337(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %step_e2b337
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_e2b337(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %step_e2b337
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_e2b337(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %step_e2b337
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.ir.msl
index 818ddd4..8d93beb 100644
--- a/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void tan_244e2a(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.55740773677825927734f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tan_244e2a = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.55740773677825927734f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tan_244e2a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %tan_244e2a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_244e2a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %tan_244e2a
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_244e2a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %tan_244e2a
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/tan/2f030e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/tan/2f030e.wgsl.expected.ir.msl
index cc74f56..90fee0d 100644
--- a/test/tint/builtins/gen/literal/tan/2f030e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/tan/2f030e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void tan_2f030e(tint_module_vars_struct tint_module_vars) {
+ float res = 1.55740773677825927734f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tan_2f030e = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.55740773677825927734f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tan_2f030e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %tan_2f030e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_2f030e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %tan_2f030e
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_2f030e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %tan_2f030e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.ir.msl
index 95f54cc..f9758ec 100644
--- a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void tan_539e54(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.556640625h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tan_539e54 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.556640625h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tan_539e54(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %tan_539e54
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_539e54(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %tan_539e54
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_539e54(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %tan_539e54
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.ir.msl
index e35b401..f45fccd 100644
--- a/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void tan_7ea104(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.55740773677825927734f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tan_7ea104 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.55740773677825927734f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tan_7ea104(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %tan_7ea104
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_7ea104(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %tan_7ea104
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_7ea104(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %tan_7ea104
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.ir.msl
index a2d7872..c875bb8 100644
--- a/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void tan_8ce3e9(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.55740773677825927734f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tan_8ce3e9 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.55740773677825927734f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tan_8ce3e9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %tan_8ce3e9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_8ce3e9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %tan_8ce3e9
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_8ce3e9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %tan_8ce3e9
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.ir.msl
index 6572bb2..3cf8ac0 100644
--- a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void tan_9f7c9c(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.556640625h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tan_9f7c9c = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.556640625h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tan_9f7c9c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %tan_9f7c9c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_9f7c9c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %tan_9f7c9c
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_9f7c9c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %tan_9f7c9c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.ir.msl
index c114bdb..d4ce6f3 100644
--- a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void tan_d4d491(tint_module_vars_struct tint_module_vars) {
+ half res = 1.556640625h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tan_d4d491 = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 1.556640625h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tan_d4d491(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %tan_d4d491
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_d4d491(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %tan_d4d491
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_d4d491(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %tan_d4d491
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.ir.msl
index 1228f5f..d545719 100644
--- a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void tan_db0456(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.556640625h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tan_db0456 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.556640625h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tan_db0456(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %tan_db0456
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_db0456(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %tan_db0456
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_db0456(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %tan_db0456
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.ir.msl
index c5ea369..182bc08 100644
--- a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void tanh_06a4fe(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(0.76123046875h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tanh_06a4fe = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.76123046875h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tanh_06a4fe(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %tanh_06a4fe
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_06a4fe(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %tanh_06a4fe
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_06a4fe(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %tanh_06a4fe
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.ir.msl
index 3bc7003..f013a0e 100644
--- a/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void tanh_5663c5(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(0.76159417629241943359f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tanh_5663c5 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.76159417629241943359f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tanh_5663c5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %tanh_5663c5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_5663c5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %tanh_5663c5
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_5663c5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %tanh_5663c5
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.ir.msl
index 2dc6de2..a6c28d4 100644
--- a/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void tanh_5724b3(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(0.76159417629241943359f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tanh_5724b3 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.76159417629241943359f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tanh_5724b3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %tanh_5724b3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_5724b3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %tanh_5724b3
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_5724b3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %tanh_5724b3
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.ir.msl
index f7193b9..710861e 100644
--- a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void tanh_5b19af(tint_module_vars_struct tint_module_vars) {
+ half res = 0.76123046875h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tanh_5b19af = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 0.76123046875h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tanh_5b19af(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %tanh_5b19af
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_5b19af(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %tanh_5b19af
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_5b19af(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %tanh_5b19af
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.ir.msl
index 54dda19..8692e3e9 100644
--- a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void tanh_6d105a(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(0.76123046875h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tanh_6d105a = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.76123046875h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tanh_6d105a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %tanh_6d105a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_6d105a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %tanh_6d105a
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_6d105a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %tanh_6d105a
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.ir.msl
index c4c0aac..53c80e7 100644
--- a/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void tanh_9f9fb9(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(0.76159417629241943359f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tanh_9f9fb9 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.76159417629241943359f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tanh_9f9fb9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %tanh_9f9fb9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_9f9fb9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %tanh_9f9fb9
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_9f9fb9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %tanh_9f9fb9
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/tanh/c15fdb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/tanh/c15fdb.wgsl.expected.ir.msl
index c84f3f5..6c275c3 100644
--- a/test/tint/builtins/gen/literal/tanh/c15fdb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/tanh/c15fdb.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void tanh_c15fdb(tint_module_vars_struct tint_module_vars) {
+ float res = 0.76159417629241943359f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tanh_c15fdb = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.76159417629241943359f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tanh_c15fdb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %tanh_c15fdb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_c15fdb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %tanh_c15fdb
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_c15fdb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %tanh_c15fdb
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.ir.msl
index a8db501..bebd415 100644
--- a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void tanh_e8efb3(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(0.76123046875h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tanh_e8efb3 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.76123046875h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tanh_e8efb3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %tanh_e8efb3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_e8efb3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %tanh_e8efb3
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_e8efb3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %tanh_e8efb3
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.ir.msl
index 897a716..5451a28 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.ir.msl
@@ -1,29 +1,58 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_GammaTransferParams {
+ float G;
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ uint padding;
+};
+struct tint_ExternalTextureParams {
+ uint numPlanes;
+ uint doYuvToRgbConversionOnly;
+ float3x4 yuvToRgbConversionMatrix;
+ tint_GammaTransferParams gammaDecodeParams;
+ tint_GammaTransferParams gammaEncodeParams;
+ float3x3 gamutConversionMatrix;
+ float3x2 sampleTransform;
+ float3x2 loadTransform;
+ float2 samplePlane0RectMin;
+ float2 samplePlane0RectMax;
+ float2 samplePlane1RectMin;
+ float2 samplePlane1RectMax;
+ uint2 visibleSize;
+ float2 plane1CoordFactor;
+};
+struct tint_module_vars_struct {
+ texture2d<float, access::sample> arg_0_plane0;
+ texture2d<float, access::sample> arg_0_plane1;
+ const constant tint_ExternalTextureParams* arg_0_params;
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-
-@group(1) @binding(0) var arg_0 : texture_external;
-
-fn textureDimensions_cdc6c9() {
- var res : vec2<u32> = textureDimensions(arg_0);
- prevent_dce = res;
+void textureDimensions_cdc6c9(tint_module_vars_struct tint_module_vars) {
+ uint2 res = ((*tint_module_vars.arg_0_params).visibleSize + uint2(1u));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
- textureDimensions_cdc6c9();
- return vec4<f32>();
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ textureDimensions_cdc6c9(tint_module_vars);
+ return float4(0.0f);
}
-
-@fragment
-fn fragment_main() {
- textureDimensions_cdc6c9();
+fragment void fragment_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+ textureDimensions_cdc6c9(tint_module_vars);
}
-
-@compute @workgroup_size(1)
-fn compute_main() {
- textureDimensions_cdc6c9();
+kernel void compute_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+ textureDimensions_cdc6c9(tint_module_vars);
}
-
-Failed to generate: error: ExternalTextureOptions missing binding entry for [group: 1, binding: 0]
+vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
+}
diff --git a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.ir.msl
index 2ae2d2a..44fd708 100644
--- a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.ir.msl
@@ -1,54 +1,34 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3x3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat3x3<f16>, read_write> = var @binding_point(2, 0)
+void tint_store_and_preserve_padding(device half3x3* const target, half3x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
+ (*target)[2u] = value_param[2u];
}
-
-%transpose_06794e = func():void {
- $B2: {
- %res:ptr<function, mat3x3<f16>, read_write> = var, mat3x3<f16>(vec3<f16>(1.0h))
- %4:mat3x3<f16> = load %res
- %5:void = call %tint_store_and_preserve_padding, %prevent_dce, %4
- ret
- }
+void transpose_06794e(tint_module_vars_struct tint_module_vars) {
+ half3x3 res = half3x3(half3(1.0h), half3(1.0h), half3(1.0h));
+ tint_store_and_preserve_padding(tint_module_vars.prevent_dce, res);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %8:void = call %transpose_06794e
- ret vec4<f32>(0.0f)
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_06794e(tint_module_vars);
+ return float4(0.0f);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %10:void = call %transpose_06794e
- ret
- }
+fragment void fragment_main(device half3x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_06794e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %12:void = call %transpose_06794e
- ret
- }
+kernel void compute_main(device half3x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_06794e(tint_module_vars);
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f16>, read_write>, %value_param:mat3x3<f16>):void {
- $B6: {
- %15:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %16:vec3<f16> = access %value_param, 0u
- store %15, %16
- %17:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %18:vec3<f16> = access %value_param, 1u
- store %17, %18
- %19:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %20:vec3<f16> = access %value_param, 2u
- store %19, %20
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.ir.msl
index 857b8dd..7f6c6de 100644
--- a/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3x4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat3x4<f32>, read_write> = var @binding_point(2, 0)
+void transpose_2585cd(tint_module_vars_struct tint_module_vars) {
+ float3x4 res = float3x4(float4(1.0f), float4(1.0f), float4(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_2585cd = func():void {
- $B2: {
- %res:ptr<function, mat3x4<f32>, read_write> = var, mat3x4<f32>(vec4<f32>(1.0f))
- %4:mat3x4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_2585cd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %transpose_2585cd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_2585cd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %transpose_2585cd
- ret
- }
+kernel void compute_main(device float3x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_2585cd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %transpose_2585cd
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.ir.msl
index 17a5ecb..d85e1f7 100644
--- a/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2x2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat2x2<f32>, read_write> = var @binding_point(2, 0)
+void transpose_31d679(tint_module_vars_struct tint_module_vars) {
+ float2x2 res = float2x2(float2(1.0f), float2(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_31d679 = func():void {
- $B2: {
- %res:ptr<function, mat2x2<f32>, read_write> = var, mat2x2<f32>(vec2<f32>(1.0f))
- %4:mat2x2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_31d679(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %transpose_31d679
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_31d679(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %transpose_31d679
- ret
- }
+kernel void compute_main(device float2x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_31d679(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %transpose_31d679
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.ir.msl
index 41b0ab2..3fb5261 100644
--- a/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2x4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat2x4<f32>, read_write> = var @binding_point(2, 0)
+void transpose_31e37e(tint_module_vars_struct tint_module_vars) {
+ float2x4 res = float2x4(float4(1.0f), float4(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_31e37e = func():void {
- $B2: {
- %res:ptr<function, mat2x4<f32>, read_write> = var, mat2x4<f32>(vec4<f32>(1.0f))
- %4:mat2x4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_31e37e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %transpose_31e37e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_31e37e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %transpose_31e37e
- ret
- }
+kernel void compute_main(device float2x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_31e37e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %transpose_31e37e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.ir.msl
index 0790be4..65f671a 100644
--- a/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4x2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat4x2<f32>, read_write> = var @binding_point(2, 0)
+void transpose_4ce359(tint_module_vars_struct tint_module_vars) {
+ float4x2 res = float4x2(float2(1.0f), float2(1.0f), float2(1.0f), float2(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_4ce359 = func():void {
- $B2: {
- %res:ptr<function, mat4x2<f32>, read_write> = var, mat4x2<f32>(vec2<f32>(1.0f))
- %4:mat4x2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_4ce359(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %transpose_4ce359
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_4ce359(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %transpose_4ce359
- ret
- }
+kernel void compute_main(device float4x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_4ce359(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %transpose_4ce359
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.ir.msl
index 29e88bf..3306cb2 100644
--- a/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3x2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat3x2<f32>, read_write> = var @binding_point(2, 0)
+void transpose_4dc9a1(tint_module_vars_struct tint_module_vars) {
+ float3x2 res = float3x2(float2(1.0f), float2(1.0f), float2(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_4dc9a1 = func():void {
- $B2: {
- %res:ptr<function, mat3x2<f32>, read_write> = var, mat3x2<f32>(vec2<f32>(1.0f))
- %4:mat3x2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_4dc9a1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %transpose_4dc9a1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_4dc9a1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %transpose_4dc9a1
- ret
- }
+kernel void compute_main(device float3x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_4dc9a1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %transpose_4dc9a1
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.ir.msl
index 54d482b..8f2ea7a 100644
--- a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2x4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat2x4<f16>, read_write> = var @binding_point(2, 0)
+void transpose_5edd96(tint_module_vars_struct tint_module_vars) {
+ half2x4 res = half2x4(half4(1.0h), half4(1.0h));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_5edd96 = func():void {
- $B2: {
- %res:ptr<function, mat2x4<f16>, read_write> = var, mat2x4<f16>(vec4<f16>(1.0h))
- %4:mat2x4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_5edd96(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %transpose_5edd96
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_5edd96(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %transpose_5edd96
- ret
- }
+kernel void compute_main(device half2x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_5edd96(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %transpose_5edd96
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.ir.msl
index 2703a21..f9c9373 100644
--- a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3x4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat3x4<f16>, read_write> = var @binding_point(2, 0)
+void transpose_5f36bf(tint_module_vars_struct tint_module_vars) {
+ half3x4 res = half3x4(half4(1.0h), half4(1.0h), half4(1.0h));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_5f36bf = func():void {
- $B2: {
- %res:ptr<function, mat3x4<f16>, read_write> = var, mat3x4<f16>(vec4<f16>(1.0h))
- %4:mat3x4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_5f36bf(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %transpose_5f36bf
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_5f36bf(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %transpose_5f36bf
- ret
- }
+kernel void compute_main(device half3x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_5f36bf(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %transpose_5f36bf
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.ir.msl
index a9e74ea..2284c17 100644
--- a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2x2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat2x2<f16>, read_write> = var @binding_point(2, 0)
+void transpose_7be8b2(tint_module_vars_struct tint_module_vars) {
+ half2x2 res = half2x2(half2(1.0h), half2(1.0h));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_7be8b2 = func():void {
- $B2: {
- %res:ptr<function, mat2x2<f16>, read_write> = var, mat2x2<f16>(vec2<f16>(1.0h))
- %4:mat2x2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_7be8b2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %transpose_7be8b2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_7be8b2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %transpose_7be8b2
- ret
- }
+kernel void compute_main(device half2x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_7be8b2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %transpose_7be8b2
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.ir.msl
index c49b14f..c93c29f 100644
--- a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4x4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat4x4<f16>, read_write> = var @binding_point(2, 0)
+void transpose_844869(tint_module_vars_struct tint_module_vars) {
+ half4x4 res = half4x4(half4(1.0h), half4(1.0h), half4(1.0h), half4(1.0h));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_844869 = func():void {
- $B2: {
- %res:ptr<function, mat4x4<f16>, read_write> = var, mat4x4<f16>(vec4<f16>(1.0h))
- %4:mat4x4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_844869(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %transpose_844869
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_844869(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %transpose_844869
- ret
- }
+kernel void compute_main(device half4x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_844869(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %transpose_844869
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.ir.msl
index 5374f9f..038f0e9 100644
--- a/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.ir.msl
@@ -1,54 +1,34 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3x3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat3x3<f32>, read_write> = var @binding_point(2, 0)
+void tint_store_and_preserve_padding(device float3x3* const target, float3x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
+ (*target)[2u] = value_param[2u];
}
-
-%transpose_854336 = func():void {
- $B2: {
- %res:ptr<function, mat3x3<f32>, read_write> = var, mat3x3<f32>(vec3<f32>(1.0f))
- %4:mat3x3<f32> = load %res
- %5:void = call %tint_store_and_preserve_padding, %prevent_dce, %4
- ret
- }
+void transpose_854336(tint_module_vars_struct tint_module_vars) {
+ float3x3 res = float3x3(float3(1.0f), float3(1.0f), float3(1.0f));
+ tint_store_and_preserve_padding(tint_module_vars.prevent_dce, res);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %8:void = call %transpose_854336
- ret vec4<f32>(0.0f)
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_854336(tint_module_vars);
+ return float4(0.0f);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %10:void = call %transpose_854336
- ret
- }
+fragment void fragment_main(device float3x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_854336(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %12:void = call %transpose_854336
- ret
- }
+kernel void compute_main(device float3x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_854336(tint_module_vars);
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f32>, read_write>, %value_param:mat3x3<f32>):void {
- $B6: {
- %15:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %16:vec3<f32> = access %value_param, 0u
- store %15, %16
- %17:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %18:vec3<f32> = access %value_param, 1u
- store %17, %18
- %19:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %20:vec3<f32> = access %value_param, 2u
- store %19, %20
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.ir.msl
index ea6b819..23918df 100644
--- a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.ir.msl
@@ -1,57 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4x3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat4x3<f16>, read_write> = var @binding_point(2, 0)
+void tint_store_and_preserve_padding(device half4x3* const target, half4x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
+ (*target)[2u] = value_param[2u];
+ (*target)[3u] = value_param[3u];
}
-
-%transpose_8c06ce = func():void {
- $B2: {
- %res:ptr<function, mat4x3<f16>, read_write> = var, mat4x3<f16>(vec3<f16>(1.0h))
- %4:mat4x3<f16> = load %res
- %5:void = call %tint_store_and_preserve_padding, %prevent_dce, %4
- ret
- }
+void transpose_8c06ce(tint_module_vars_struct tint_module_vars) {
+ half4x3 res = half4x3(half3(1.0h), half3(1.0h), half3(1.0h), half3(1.0h));
+ tint_store_and_preserve_padding(tint_module_vars.prevent_dce, res);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %8:void = call %transpose_8c06ce
- ret vec4<f32>(0.0f)
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_8c06ce(tint_module_vars);
+ return float4(0.0f);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %10:void = call %transpose_8c06ce
- ret
- }
+fragment void fragment_main(device half4x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_8c06ce(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %12:void = call %transpose_8c06ce
- ret
- }
+kernel void compute_main(device half4x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_8c06ce(tint_module_vars);
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f16>, read_write>, %value_param:mat4x3<f16>):void {
- $B6: {
- %15:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %16:vec3<f16> = access %value_param, 0u
- store %15, %16
- %17:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %18:vec3<f16> = access %value_param, 1u
- store %17, %18
- %19:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %20:vec3<f16> = access %value_param, 2u
- store %19, %20
- %21:ptr<storage, vec3<f16>, read_write> = access %target, 3u
- %22:vec3<f16> = access %value_param, 3u
- store %21, %22
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.ir.msl
index 3315a2d..6a2c244 100644
--- a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.ir.msl
@@ -1,51 +1,33 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2x3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat2x3<f16>, read_write> = var @binding_point(2, 0)
+void tint_store_and_preserve_padding(device half2x3* const target, half2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%transpose_b9ad1f = func():void {
- $B2: {
- %res:ptr<function, mat2x3<f16>, read_write> = var, mat2x3<f16>(vec3<f16>(1.0h))
- %4:mat2x3<f16> = load %res
- %5:void = call %tint_store_and_preserve_padding, %prevent_dce, %4
- ret
- }
+void transpose_b9ad1f(tint_module_vars_struct tint_module_vars) {
+ half2x3 res = half2x3(half3(1.0h), half3(1.0h));
+ tint_store_and_preserve_padding(tint_module_vars.prevent_dce, res);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %8:void = call %transpose_b9ad1f
- ret vec4<f32>(0.0f)
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_b9ad1f(tint_module_vars);
+ return float4(0.0f);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %10:void = call %transpose_b9ad1f
- ret
- }
+fragment void fragment_main(device half2x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_b9ad1f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %12:void = call %transpose_b9ad1f
- ret
- }
+kernel void compute_main(device half2x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_b9ad1f(tint_module_vars);
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f16>, read_write>, %value_param:mat2x3<f16>):void {
- $B6: {
- %15:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %16:vec3<f16> = access %value_param, 0u
- store %15, %16
- %17:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %18:vec3<f16> = access %value_param, 1u
- store %17, %18
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.ir.msl
index 292e5b2..d9c75b1 100644
--- a/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4x4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat4x4<f32>, read_write> = var @binding_point(2, 0)
+void transpose_c1b600(tint_module_vars_struct tint_module_vars) {
+ float4x4 res = float4x4(float4(1.0f), float4(1.0f), float4(1.0f), float4(1.0f));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_c1b600 = func():void {
- $B2: {
- %res:ptr<function, mat4x4<f32>, read_write> = var, mat4x4<f32>(vec4<f32>(1.0f))
- %4:mat4x4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_c1b600(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %transpose_c1b600
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_c1b600(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %transpose_c1b600
- ret
- }
+kernel void compute_main(device float4x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_c1b600(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %transpose_c1b600
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.ir.msl
index f18f396..5532056 100644
--- a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3x2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat3x2<f16>, read_write> = var @binding_point(2, 0)
+void transpose_d6faec(tint_module_vars_struct tint_module_vars) {
+ half3x2 res = half3x2(half2(1.0h), half2(1.0h), half2(1.0h));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_d6faec = func():void {
- $B2: {
- %res:ptr<function, mat3x2<f16>, read_write> = var, mat3x2<f16>(vec2<f16>(1.0h))
- %4:mat3x2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_d6faec(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %transpose_d6faec
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_d6faec(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %transpose_d6faec
- ret
- }
+kernel void compute_main(device half3x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_d6faec(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %transpose_d6faec
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.ir.msl
index f4a72c3..1d82e04 100644
--- a/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.ir.msl
@@ -1,57 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4x3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat4x3<f32>, read_write> = var @binding_point(2, 0)
+void tint_store_and_preserve_padding(device float4x3* const target, float4x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
+ (*target)[2u] = value_param[2u];
+ (*target)[3u] = value_param[3u];
}
-
-%transpose_d8f8ba = func():void {
- $B2: {
- %res:ptr<function, mat4x3<f32>, read_write> = var, mat4x3<f32>(vec3<f32>(1.0f))
- %4:mat4x3<f32> = load %res
- %5:void = call %tint_store_and_preserve_padding, %prevent_dce, %4
- ret
- }
+void transpose_d8f8ba(tint_module_vars_struct tint_module_vars) {
+ float4x3 res = float4x3(float3(1.0f), float3(1.0f), float3(1.0f), float3(1.0f));
+ tint_store_and_preserve_padding(tint_module_vars.prevent_dce, res);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %8:void = call %transpose_d8f8ba
- ret vec4<f32>(0.0f)
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_d8f8ba(tint_module_vars);
+ return float4(0.0f);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %10:void = call %transpose_d8f8ba
- ret
- }
+fragment void fragment_main(device float4x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_d8f8ba(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %12:void = call %transpose_d8f8ba
- ret
- }
+kernel void compute_main(device float4x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_d8f8ba(tint_module_vars);
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f32>, read_write>, %value_param:mat4x3<f32>):void {
- $B6: {
- %15:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %16:vec3<f32> = access %value_param, 0u
- store %15, %16
- %17:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %18:vec3<f32> = access %value_param, 1u
- store %17, %18
- %19:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %20:vec3<f32> = access %value_param, 2u
- store %19, %20
- %21:ptr<storage, vec3<f32>, read_write> = access %target, 3u
- %22:vec3<f32> = access %value_param, 3u
- store %21, %22
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.ir.msl
index bbd817b..d1151e4 100644
--- a/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.ir.msl
@@ -1,51 +1,33 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2x3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat2x3<f32>, read_write> = var @binding_point(2, 0)
+void tint_store_and_preserve_padding(device float2x3* const target, float2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%transpose_ed4bdc = func():void {
- $B2: {
- %res:ptr<function, mat2x3<f32>, read_write> = var, mat2x3<f32>(vec3<f32>(1.0f))
- %4:mat2x3<f32> = load %res
- %5:void = call %tint_store_and_preserve_padding, %prevent_dce, %4
- ret
- }
+void transpose_ed4bdc(tint_module_vars_struct tint_module_vars) {
+ float2x3 res = float2x3(float3(1.0f), float3(1.0f));
+ tint_store_and_preserve_padding(tint_module_vars.prevent_dce, res);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %8:void = call %transpose_ed4bdc
- ret vec4<f32>(0.0f)
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_ed4bdc(tint_module_vars);
+ return float4(0.0f);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %10:void = call %transpose_ed4bdc
- ret
- }
+fragment void fragment_main(device float2x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_ed4bdc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %12:void = call %transpose_ed4bdc
- ret
- }
+kernel void compute_main(device float2x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_ed4bdc(tint_module_vars);
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f32>, read_write>, %value_param:mat2x3<f32>):void {
- $B6: {
- %15:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %16:vec3<f32> = access %value_param, 0u
- store %15, %16
- %17:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %18:vec3<f32> = access %value_param, 1u
- store %17, %18
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.ir.msl
index 49f4e35..16d76bc 100644
--- a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4x2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat4x2<f16>, read_write> = var @binding_point(2, 0)
+void transpose_faeb05(tint_module_vars_struct tint_module_vars) {
+ half4x2 res = half4x2(half2(1.0h), half2(1.0h), half2(1.0h), half2(1.0h));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_faeb05 = func():void {
- $B2: {
- %res:ptr<function, mat4x2<f16>, read_write> = var, mat4x2<f16>(vec2<f16>(1.0h))
- %4:mat4x2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_faeb05(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %transpose_faeb05
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_faeb05(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %transpose_faeb05
- ret
- }
+kernel void compute_main(device half4x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_faeb05(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %transpose_faeb05
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.ir.msl
index 1fc3b67..ded1887 100644
--- a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void trunc_103ab8(tint_module_vars_struct tint_module_vars) {
+ half3 res = half3(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%trunc_103ab8 = func():void {
- $B2: {
- %res:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ trunc_103ab8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %trunc_103ab8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_103ab8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %trunc_103ab8
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_103ab8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %trunc_103ab8
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.ir.msl
index 8ec4a9a..da5b788 100644
--- a/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void trunc_562d05(tint_module_vars_struct tint_module_vars) {
+ float3 res = float3(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%trunc_562d05 = func():void {
- $B2: {
- %res:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ trunc_562d05(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %trunc_562d05
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_562d05(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %trunc_562d05
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_562d05(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %trunc_562d05
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.ir.msl
index f80644a..76f4ef2 100644
--- a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void trunc_a56109(tint_module_vars_struct tint_module_vars) {
+ half2 res = half2(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%trunc_a56109 = func():void {
- $B2: {
- %res:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ trunc_a56109(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %trunc_a56109
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_a56109(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %trunc_a56109
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_a56109(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %trunc_a56109
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.ir.msl
index 63d8cac..3f9f10c 100644
--- a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void trunc_cc2b0d(tint_module_vars_struct tint_module_vars) {
+ half res = 1.0h;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%trunc_cc2b0d = func():void {
- $B2: {
- %res:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ trunc_cc2b0d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %trunc_cc2b0d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_cc2b0d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %trunc_cc2b0d
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_cc2b0d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %trunc_cc2b0d
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.ir.msl
index a13987b..3314b5d 100644
--- a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void trunc_ce7c17(tint_module_vars_struct tint_module_vars) {
+ half4 res = half4(1.0h);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%trunc_ce7c17 = func():void {
- $B2: {
- %res:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ trunc_ce7c17(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %trunc_ce7c17
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_ce7c17(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %trunc_ce7c17
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_ce7c17(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %trunc_ce7c17
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.ir.msl
index 50f66f8..b11be4e 100644
--- a/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void trunc_e183aa(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%trunc_e183aa = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ trunc_e183aa(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %trunc_e183aa
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_e183aa(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %trunc_e183aa
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_e183aa(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %trunc_e183aa
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/trunc/eb83df.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/trunc/eb83df.wgsl.expected.ir.msl
index 5f0df2f..8fce7f1 100644
--- a/test/tint/builtins/gen/literal/trunc/eb83df.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/trunc/eb83df.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void trunc_eb83df(tint_module_vars_struct tint_module_vars) {
+ float res = 1.0f;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%trunc_eb83df = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ trunc_eb83df(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %trunc_eb83df
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_eb83df(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %trunc_eb83df
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_eb83df(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %trunc_eb83df
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.ir.msl
index f4dd5a4..3ee7e56 100644
--- a/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void trunc_f370d3(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(1.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%trunc_f370d3 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ trunc_f370d3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %trunc_f370d3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_f370d3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %trunc_f370d3
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_f370d3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %trunc_f370d3
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/unpack2x16float/32a5cf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/unpack2x16float/32a5cf.wgsl.expected.ir.msl
index e8f39d6..f25b3c4 100644
--- a/test/tint/builtins/gen/literal/unpack2x16float/32a5cf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/unpack2x16float/32a5cf.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void unpack2x16float_32a5cf(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(0.00000005960464477539f, 0.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%unpack2x16float_32a5cf = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.00000005960464477539f, 0.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ unpack2x16float_32a5cf(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %unpack2x16float_32a5cf
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack2x16float_32a5cf(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %unpack2x16float_32a5cf
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack2x16float_32a5cf(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %unpack2x16float_32a5cf
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/unpack2x16snorm/b4aea6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/unpack2x16snorm/b4aea6.wgsl.expected.ir.msl
index 82affab..d1bef9d 100644
--- a/test/tint/builtins/gen/literal/unpack2x16snorm/b4aea6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/unpack2x16snorm/b4aea6.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void unpack2x16snorm_b4aea6(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(0.00003051850944757462f, 0.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%unpack2x16snorm_b4aea6 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.00003051850944757462f, 0.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ unpack2x16snorm_b4aea6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %unpack2x16snorm_b4aea6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack2x16snorm_b4aea6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %unpack2x16snorm_b4aea6
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack2x16snorm_b4aea6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %unpack2x16snorm_b4aea6
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/unpack2x16unorm/7699c0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/unpack2x16unorm/7699c0.wgsl.expected.ir.msl
index 4b88d53..a3bdbfb 100644
--- a/test/tint/builtins/gen/literal/unpack2x16unorm/7699c0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/unpack2x16unorm/7699c0.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void unpack2x16unorm_7699c0(tint_module_vars_struct tint_module_vars) {
+ float2 res = float2(0.00001525902189314365f, 0.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%unpack2x16unorm_7699c0 = func():void {
- $B2: {
- %res:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.00001525902189314365f, 0.0f)
- %4:vec2<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ unpack2x16unorm_7699c0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %unpack2x16unorm_7699c0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack2x16unorm_7699c0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %unpack2x16unorm_7699c0
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack2x16unorm_7699c0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %unpack2x16unorm_7699c0
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/unpack4x8snorm/523fb3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/unpack4x8snorm/523fb3.wgsl.expected.ir.msl
index 0da466d..f8889d9 100644
--- a/test/tint/builtins/gen/literal/unpack4x8snorm/523fb3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/unpack4x8snorm/523fb3.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void unpack4x8snorm_523fb3(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(0.00787401571869850159f, 0.0f, 0.0f, 0.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%unpack4x8snorm_523fb3 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.00787401571869850159f, 0.0f, 0.0f, 0.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ unpack4x8snorm_523fb3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %unpack4x8snorm_523fb3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack4x8snorm_523fb3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %unpack4x8snorm_523fb3
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack4x8snorm_523fb3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %unpack4x8snorm_523fb3
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/unpack4x8unorm/750c74.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/unpack4x8unorm/750c74.wgsl.expected.ir.msl
index b9feaba..c1e1f41 100644
--- a/test/tint/builtins/gen/literal/unpack4x8unorm/750c74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/unpack4x8unorm/750c74.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void unpack4x8unorm_750c74(tint_module_vars_struct tint_module_vars) {
+ float4 res = float4(0.0039215688593685627f, 0.0f, 0.0f, 0.0f);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%unpack4x8unorm_750c74 = func():void {
- $B2: {
- %res:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.0039215688593685627f, 0.0f, 0.0f, 0.0f)
- %4:vec4<f32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ unpack4x8unorm_750c74(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %unpack4x8unorm_750c74
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack4x8unorm_750c74(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %unpack4x8unorm_750c74
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack4x8unorm_750c74(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %unpack4x8unorm_750c74
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/unpack4xI8/830900.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/unpack4xI8/830900.wgsl.expected.ir.msl
index 937165e..6663d31 100644
--- a/test/tint/builtins/gen/literal/unpack4xI8/830900.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/unpack4xI8/830900.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void unpack4xI8_830900(tint_module_vars_struct tint_module_vars) {
+ int4 res = int4(1, 0, 0, 0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%unpack4xI8_830900 = func():void {
- $B2: {
- %res:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i, 0i, 0i, 0i)
- %4:vec4<i32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ unpack4xI8_830900(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %unpack4xI8_830900
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack4xI8_830900(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %unpack4xI8_830900
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack4xI8_830900(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %unpack4xI8_830900
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/unpack4xU8/a5ea55.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/unpack4xU8/a5ea55.wgsl.expected.ir.msl
index 7dec3c3..4cf0035 100644
--- a/test/tint/builtins/gen/literal/unpack4xU8/a5ea55.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/unpack4xU8/a5ea55.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void unpack4xU8_a5ea55(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(1u, 0u, 0u, 0u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%unpack4xU8_a5ea55 = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u, 0u, 0u, 0u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ unpack4xU8_a5ea55(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %unpack4xU8_a5ea55
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack4xU8_a5ea55(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %unpack4xU8_a5ea55
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack4xU8_a5ea55(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %unpack4xU8_a5ea55
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/workgroupUniformLoad/37307c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/workgroupUniformLoad/37307c.wgsl.expected.ir.msl
index f8281db..83d8d9b 100644
--- a/test/tint/builtins/gen/literal/workgroupUniformLoad/37307c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/workgroupUniformLoad/37307c.wgsl.expected.ir.msl
@@ -1,41 +1,28 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, u32, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void workgroupUniformLoad_37307c(tint_module_vars_struct tint_module_vars) {
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ uint const v = (*tint_module_vars.arg_0);
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ uint res = v;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%workgroupUniformLoad_37307c = func():void {
- $B2: {
- %4:void = msl.threadgroup_barrier 4u
- %5:u32 = load %arg_0
- %6:u32 = let %5
- %7:void = msl.threadgroup_barrier 4u
- %res:ptr<function, u32, read_write> = var, %6
- %9:u32 = load %res
- store %prevent_dce, %9
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ (*tint_module_vars.arg_0) = 0u;
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ workgroupUniformLoad_37307c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %12:bool = eq %tint_local_index, 0u
- if %12 [t: $B4] { # if_1
- $B4: { # true
- store %arg_0, 0u
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %workgroupUniformLoad_37307c
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v_1).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/workgroupUniformLoad/7a857c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/workgroupUniformLoad/7a857c.wgsl.expected.ir.msl
index e2eb2fb..d8a9f7a 100644
--- a/test/tint/builtins/gen/literal/workgroupUniformLoad/7a857c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/workgroupUniformLoad/7a857c.wgsl.expected.ir.msl
@@ -1,41 +1,28 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup float* arg_0;
+ device float* prevent_dce;
+};
+struct tint_symbol_1 {
+ float tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, f32, read_write> = var
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void workgroupUniformLoad_7a857c(tint_module_vars_struct tint_module_vars) {
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ float const v = (*tint_module_vars.arg_0);
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ float res = v;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%workgroupUniformLoad_7a857c = func():void {
- $B2: {
- %4:void = msl.threadgroup_barrier 4u
- %5:f32 = load %arg_0
- %6:f32 = let %5
- %7:void = msl.threadgroup_barrier 4u
- %res:ptr<function, f32, read_write> = var, %6
- %9:f32 = load %res
- store %prevent_dce, %9
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ (*tint_module_vars.arg_0) = 0.0f;
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ workgroupUniformLoad_7a857c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %12:bool = eq %tint_local_index, 0u
- if %12 [t: $B4] { # if_1
- $B4: { # true
- store %arg_0, 0.0f
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %workgroupUniformLoad_7a857c
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]], device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v_1).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/workgroupUniformLoad/9d33de.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/workgroupUniformLoad/9d33de.wgsl.expected.ir.msl
index 3bb3f44..248acb8 100644
--- a/test/tint/builtins/gen/literal/workgroupUniformLoad/9d33de.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/workgroupUniformLoad/9d33de.wgsl.expected.ir.msl
@@ -1,41 +1,28 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, i32, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void workgroupUniformLoad_9d33de(tint_module_vars_struct tint_module_vars) {
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ int const v = (*tint_module_vars.arg_0);
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ int res = v;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%workgroupUniformLoad_9d33de = func():void {
- $B2: {
- %4:void = msl.threadgroup_barrier 4u
- %5:i32 = load %arg_0
- %6:i32 = let %5
- %7:void = msl.threadgroup_barrier 4u
- %res:ptr<function, i32, read_write> = var, %6
- %9:i32 = load %res
- store %prevent_dce, %9
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ (*tint_module_vars.arg_0) = 0;
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ workgroupUniformLoad_9d33de(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %12:bool = eq %tint_local_index, 0u
- if %12 [t: $B4] { # if_1
- $B4: { # true
- store %arg_0, 0i
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %workgroupUniformLoad_9d33de
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v_1).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/workgroupUniformLoad/e07d08.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/workgroupUniformLoad/e07d08.wgsl.expected.ir.msl
index bd29073..8eabaf9 100644
--- a/test/tint/builtins/gen/literal/workgroupUniformLoad/e07d08.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/workgroupUniformLoad/e07d08.wgsl.expected.ir.msl
@@ -1,41 +1,28 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup half* arg_0;
+ device half* prevent_dce;
+};
+struct tint_symbol_1 {
+ half tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, f16, read_write> = var
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void workgroupUniformLoad_e07d08(tint_module_vars_struct tint_module_vars) {
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ half const v = (*tint_module_vars.arg_0);
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ half res = v;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%workgroupUniformLoad_e07d08 = func():void {
- $B2: {
- %4:void = msl.threadgroup_barrier 4u
- %5:f16 = load %arg_0
- %6:f16 = let %5
- %7:void = msl.threadgroup_barrier 4u
- %res:ptr<function, f16, read_write> = var, %6
- %9:f16 = load %res
- store %prevent_dce, %9
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ (*tint_module_vars.arg_0) = 0.0h;
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ workgroupUniformLoad_e07d08(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %12:bool = eq %tint_local_index, 0u
- if %12 [t: $B4] { # if_1
- $B4: { # true
- store %arg_0, 0.0h
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %workgroupUniformLoad_e07d08
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]], device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v_1).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.ir.msl
index 9290487..ead3750 100644
--- a/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void acos_004aff(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(0.96875h);
+ half2 res = acos(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acos_004aff = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.96875h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = acos %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acos_004aff(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %acos_004aff
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_004aff(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %acos_004aff
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_004aff(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %acos_004aff
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/acos/203628.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.ir.msl
index 033eee4..2bc71ed 100644
--- a/test/tint/builtins/gen/var/acos/203628.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void acos_203628(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(0.96875h);
+ half4 res = acos(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acos_203628 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.96875h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = acos %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acos_203628(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %acos_203628
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_203628(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %acos_203628
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_203628(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %acos_203628
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.ir.msl
index 9921179..3935587 100644
--- a/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void acos_303e3d(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 0.96875h;
+ half res = acos(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acos_303e3d = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 0.96875h
- %4:f16 = load %arg_0
- %5:f16 = acos %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acos_303e3d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %acos_303e3d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_303e3d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %acos_303e3d
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_303e3d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %acos_303e3d
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/acos/489247.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/acos/489247.wgsl.expected.ir.msl
index c141ca9..8d07881 100644
--- a/test/tint/builtins/gen/var/acos/489247.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/acos/489247.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void acos_489247(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 0.96891242265701293945f;
+ float res = acos(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acos_489247 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 0.96891242265701293945f
- %4:f32 = load %arg_0
- %5:f32 = acos %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acos_489247(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %acos_489247
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_489247(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %acos_489247
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_489247(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %acos_489247
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.ir.msl
index 8d7b1cf..71b9585 100644
--- a/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void acos_8e2acf(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(0.96891242265701293945f);
+ float4 res = acos(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acos_8e2acf = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.96891242265701293945f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = acos %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acos_8e2acf(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %acos_8e2acf
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_8e2acf(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %acos_8e2acf
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_8e2acf(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %acos_8e2acf
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.ir.msl
index 9d2a2f4..b6015fc 100644
--- a/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void acos_a610c4(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(0.96891242265701293945f);
+ float3 res = acos(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acos_a610c4 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.96891242265701293945f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = acos %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acos_a610c4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %acos_a610c4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_a610c4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %acos_a610c4
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_a610c4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %acos_a610c4
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.ir.msl
index 1e0875f..31fc949 100644
--- a/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void acos_dfc915(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(0.96891242265701293945f);
+ float2 res = acos(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acos_dfc915 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.96891242265701293945f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = acos %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acos_dfc915(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %acos_dfc915
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_dfc915(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %acos_dfc915
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_dfc915(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %acos_dfc915
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.ir.msl
index d49b44f..c5fb655 100644
--- a/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void acos_f47057(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(0.96875h);
+ half3 res = acos(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acos_f47057 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.96875h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = acos %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acos_f47057(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %acos_f47057
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_f47057(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %acos_f47057
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acos_f47057(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %acos_f47057
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.ir.msl
index 89dd483..1d7a8b6 100644
--- a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void acosh_5f49d8(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.54296875h);
+ half2 res = acosh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acosh_5f49d8 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.54296875h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = acosh %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acosh_5f49d8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %acosh_5f49d8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_5f49d8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %acosh_5f49d8
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_5f49d8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %acosh_5f49d8
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.ir.msl
index 95b285d..4b1968a 100644
--- a/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void acosh_640883(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.54308068752288818359f);
+ float2 res = acosh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acosh_640883 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.54308068752288818359f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = acosh %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acosh_640883(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %acosh_640883
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_640883(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %acosh_640883
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_640883(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %acosh_640883
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.ir.msl
index 8e4ca01..e744a97 100644
--- a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void acosh_a37dfe(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.54296875h;
+ half res = acosh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acosh_a37dfe = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.54296875h
- %4:f16 = load %arg_0
- %5:f16 = acosh %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acosh_a37dfe(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %acosh_a37dfe
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_a37dfe(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %acosh_a37dfe
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_a37dfe(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %acosh_a37dfe
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.ir.msl
index d138155..cb1b851 100644
--- a/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void acosh_d51ccb(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.54308068752288818359f);
+ float4 res = acosh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acosh_d51ccb = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.54308068752288818359f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = acosh %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acosh_d51ccb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %acosh_d51ccb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_d51ccb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %acosh_d51ccb
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_d51ccb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %acosh_d51ccb
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.ir.msl
index b18ea4c..63e3495 100644
--- a/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void acosh_de60d8(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.54296875h);
+ half4 res = acosh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acosh_de60d8 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.54296875h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = acosh %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acosh_de60d8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %acosh_de60d8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_de60d8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %acosh_de60d8
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_de60d8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %acosh_de60d8
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.ir.msl
index 91170a3..b35aa4a 100644
--- a/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void acosh_e38f5c(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.54308068752288818359f);
+ float3 res = acosh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acosh_e38f5c = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.54308068752288818359f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = acosh %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acosh_e38f5c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %acosh_e38f5c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_e38f5c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %acosh_e38f5c
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_e38f5c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %acosh_e38f5c
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/acosh/ecf2d1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/acosh/ecf2d1.wgsl.expected.ir.msl
index bf781bc..f2920c0 100644
--- a/test/tint/builtins/gen/var/acosh/ecf2d1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/acosh/ecf2d1.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void acosh_ecf2d1(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.54308068752288818359f;
+ float res = acosh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acosh_ecf2d1 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.54308068752288818359f
- %4:f32 = load %arg_0
- %5:f32 = acosh %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acosh_ecf2d1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %acosh_ecf2d1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_ecf2d1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %acosh_ecf2d1
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_ecf2d1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %acosh_ecf2d1
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.ir.msl
index 824746f..228f397 100644
--- a/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void acosh_f56574(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.54296875h);
+ half3 res = acosh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%acosh_f56574 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.54296875h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = acosh %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ acosh_f56574(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %acosh_f56574
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_f56574(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %acosh_f56574
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ acosh_f56574(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %acosh_f56574
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.ir.msl
index 3a3730a..0d56884 100644
--- a/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.ir.msl
@@ -1,46 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void all_353d6a(tint_module_vars_struct tint_module_vars) {
+ bool arg_0 = true;
+ bool res = all(arg_0);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all(!(res)));
}
-
-%all_353d6a = func():void {
- $B2: {
- %arg_0:ptr<function, bool, read_write> = var, true
- %4:bool = load %arg_0
- %5:bool = all %4
- %res:ptr<function, bool, read_write> = var, %5
- %7:bool = load %res
- %8:bool = eq %7, false
- %9:bool = all %8
- %10:i32 = select 0i, 1i, %9
- store %prevent_dce, %10
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ all_353d6a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %12:void = call %all_353d6a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ all_353d6a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %14:void = call %all_353d6a
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ all_353d6a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %16:void = call %all_353d6a
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.ir.msl
index 6f18af5..d7af1fe6 100644
--- a/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.ir.msl
@@ -1,46 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void all_986c7b(tint_module_vars_struct tint_module_vars) {
+ bool4 arg_0 = bool4(true);
+ bool res = all(arg_0);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all(!(res)));
}
-
-%all_986c7b = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<bool>, read_write> = var, vec4<bool>(true)
- %4:vec4<bool> = load %arg_0
- %5:bool = all %4
- %res:ptr<function, bool, read_write> = var, %5
- %7:bool = load %res
- %8:bool = eq %7, false
- %9:bool = all %8
- %10:i32 = select 0i, 1i, %9
- store %prevent_dce, %10
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ all_986c7b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %12:void = call %all_986c7b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ all_986c7b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %14:void = call %all_986c7b
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ all_986c7b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %16:void = call %all_986c7b
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.ir.msl
index 44e3c30..024b4e1 100644
--- a/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.ir.msl
@@ -1,46 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void all_bd2dba(tint_module_vars_struct tint_module_vars) {
+ bool3 arg_0 = bool3(true);
+ bool res = all(arg_0);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all(!(res)));
}
-
-%all_bd2dba = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<bool>, read_write> = var, vec3<bool>(true)
- %4:vec3<bool> = load %arg_0
- %5:bool = all %4
- %res:ptr<function, bool, read_write> = var, %5
- %7:bool = load %res
- %8:bool = eq %7, false
- %9:bool = all %8
- %10:i32 = select 0i, 1i, %9
- store %prevent_dce, %10
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ all_bd2dba(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %12:void = call %all_bd2dba
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ all_bd2dba(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %14:void = call %all_bd2dba
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ all_bd2dba(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %16:void = call %all_bd2dba
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/all/f46790.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/all/f46790.wgsl.expected.ir.msl
index e82ee7a..01bc64c 100644
--- a/test/tint/builtins/gen/var/all/f46790.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/all/f46790.wgsl.expected.ir.msl
@@ -1,46 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void all_f46790(tint_module_vars_struct tint_module_vars) {
+ bool2 arg_0 = bool2(true);
+ bool res = all(arg_0);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all(!(res)));
}
-
-%all_f46790 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<bool>, read_write> = var, vec2<bool>(true)
- %4:vec2<bool> = load %arg_0
- %5:bool = all %4
- %res:ptr<function, bool, read_write> = var, %5
- %7:bool = load %res
- %8:bool = eq %7, false
- %9:bool = all %8
- %10:i32 = select 0i, 1i, %9
- store %prevent_dce, %10
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ all_f46790(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %12:void = call %all_f46790
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ all_f46790(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %14:void = call %all_f46790
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ all_f46790(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %16:void = call %all_f46790
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/any/083428.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/any/083428.wgsl.expected.ir.msl
index 022f147..66f6cfe 100644
--- a/test/tint/builtins/gen/var/any/083428.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/any/083428.wgsl.expected.ir.msl
@@ -1,46 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void any_083428(tint_module_vars_struct tint_module_vars) {
+ bool4 arg_0 = bool4(true);
+ bool res = any(arg_0);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all(!(res)));
}
-
-%any_083428 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<bool>, read_write> = var, vec4<bool>(true)
- %4:vec4<bool> = load %arg_0
- %5:bool = any %4
- %res:ptr<function, bool, read_write> = var, %5
- %7:bool = load %res
- %8:bool = eq %7, false
- %9:bool = all %8
- %10:i32 = select 0i, 1i, %9
- store %prevent_dce, %10
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ any_083428(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %12:void = call %any_083428
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ any_083428(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %14:void = call %any_083428
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ any_083428(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %16:void = call %any_083428
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.ir.msl
index 4eb3003..f8b55b9 100644
--- a/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.ir.msl
@@ -1,46 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void any_0e3e58(tint_module_vars_struct tint_module_vars) {
+ bool2 arg_0 = bool2(true);
+ bool res = any(arg_0);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all(!(res)));
}
-
-%any_0e3e58 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<bool>, read_write> = var, vec2<bool>(true)
- %4:vec2<bool> = load %arg_0
- %5:bool = any %4
- %res:ptr<function, bool, read_write> = var, %5
- %7:bool = load %res
- %8:bool = eq %7, false
- %9:bool = all %8
- %10:i32 = select 0i, 1i, %9
- store %prevent_dce, %10
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ any_0e3e58(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %12:void = call %any_0e3e58
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ any_0e3e58(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %14:void = call %any_0e3e58
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ any_0e3e58(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %16:void = call %any_0e3e58
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.ir.msl
index 4d4adfd..1f04f4a 100644
--- a/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.ir.msl
@@ -1,46 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void any_2ab91a(tint_module_vars_struct tint_module_vars) {
+ bool arg_0 = true;
+ bool res = any(arg_0);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all(!(res)));
}
-
-%any_2ab91a = func():void {
- $B2: {
- %arg_0:ptr<function, bool, read_write> = var, true
- %4:bool = load %arg_0
- %5:bool = any %4
- %res:ptr<function, bool, read_write> = var, %5
- %7:bool = load %res
- %8:bool = eq %7, false
- %9:bool = all %8
- %10:i32 = select 0i, 1i, %9
- store %prevent_dce, %10
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ any_2ab91a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %12:void = call %any_2ab91a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ any_2ab91a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %14:void = call %any_2ab91a
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ any_2ab91a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %16:void = call %any_2ab91a
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.ir.msl
index 529c520..4ee17b9 100644
--- a/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.ir.msl
@@ -1,46 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void any_e755c1(tint_module_vars_struct tint_module_vars) {
+ bool3 arg_0 = bool3(true);
+ bool res = any(arg_0);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all(!(res)));
}
-
-%any_e755c1 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<bool>, read_write> = var, vec3<bool>(true)
- %4:vec3<bool> = load %arg_0
- %5:bool = any %4
- %res:ptr<function, bool, read_write> = var, %5
- %7:bool = load %res
- %8:bool = eq %7, false
- %9:bool = all %8
- %10:i32 = select 0i, 1i, %9
- store %prevent_dce, %10
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ any_e755c1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %12:void = call %any_e755c1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ any_e755c1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %14:void = call %any_e755c1
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ any_e755c1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %16:void = call %any_e755c1
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/arrayLength/1588cd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/arrayLength/1588cd.wgsl.expected.ir.msl
index 6a20a8a..7d67192 100644
--- a/test/tint/builtins/gen/var/arrayLength/1588cd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/arrayLength/1588cd.wgsl.expected.ir.msl
@@ -1,47 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RO = struct @align(4) {
- arg_0:array<i32> @offset(0)
-}
+struct SB_RO {
+ tint_array<int, 1> arg_0;
+};
+struct tint_module_vars_struct {
+ const device SB_RO* sb_ro;
+ device uint* prevent_dce;
+ const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-$B1: { # root
- %sb_ro:ptr<storage, SB_RO, read> = var @binding_point(0, 1)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void arrayLength_1588cd(tint_module_vars_struct tint_module_vars) {
+ uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 4u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%arrayLength_1588cd = func():void {
- $B2: {
- %4:ptr<storage, array<i32>, read> = access %sb_ro, 0u
- %5:u32 = arrayLength %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ arrayLength_1588cd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %arrayLength_1588cd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_1588cd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %arrayLength_1588cd
- ret
- }
+kernel void compute_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_1588cd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %arrayLength_1588cd
- ret
- }
+vertex vertex_main_outputs vertex_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/arrayLength/61b1c7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/arrayLength/61b1c7.wgsl.expected.ir.msl
index 7f449f6..d569950 100644
--- a/test/tint/builtins/gen/var/arrayLength/61b1c7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/arrayLength/61b1c7.wgsl.expected.ir.msl
@@ -1,47 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:array<i32> @offset(0)
-}
+struct SB_RW {
+ tint_array<int, 1> arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+ const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void arrayLength_61b1c7(tint_module_vars_struct tint_module_vars) {
+ uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 4u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%arrayLength_61b1c7 = func():void {
- $B2: {
- %4:ptr<storage, array<i32>, read_write> = access %sb_rw, 0u
- %5:u32 = arrayLength %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ arrayLength_61b1c7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %arrayLength_61b1c7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_61b1c7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %arrayLength_61b1c7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_61b1c7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %arrayLength_61b1c7
- ret
- }
+vertex vertex_main_outputs vertex_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.ir.msl
index f062c57..e6afb58 100644
--- a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.ir.msl
@@ -1,47 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RO = struct @align(2) {
- arg_0:array<f16> @offset(0)
-}
+struct SB_RO {
+ tint_array<half, 1> arg_0;
+};
+struct tint_module_vars_struct {
+ const device SB_RO* sb_ro;
+ device uint* prevent_dce;
+ const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-$B1: { # root
- %sb_ro:ptr<storage, SB_RO, read> = var @binding_point(0, 1)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void arrayLength_8421b9(tint_module_vars_struct tint_module_vars) {
+ uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 2u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%arrayLength_8421b9 = func():void {
- $B2: {
- %4:ptr<storage, array<f16>, read> = access %sb_ro, 0u
- %5:u32 = arrayLength %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ arrayLength_8421b9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %arrayLength_8421b9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_8421b9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %arrayLength_8421b9
- ret
- }
+kernel void compute_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_8421b9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %arrayLength_8421b9
- ret
- }
+vertex vertex_main_outputs vertex_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/arrayLength/a0f5ca.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/arrayLength/a0f5ca.wgsl.expected.ir.msl
index a48951d..204ba53 100644
--- a/test/tint/builtins/gen/var/arrayLength/a0f5ca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/arrayLength/a0f5ca.wgsl.expected.ir.msl
@@ -1,47 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RO = struct @align(4) {
- arg_0:array<f32> @offset(0)
-}
+struct SB_RO {
+ tint_array<float, 1> arg_0;
+};
+struct tint_module_vars_struct {
+ const device SB_RO* sb_ro;
+ device uint* prevent_dce;
+ const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-$B1: { # root
- %sb_ro:ptr<storage, SB_RO, read> = var @binding_point(0, 1)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void arrayLength_a0f5ca(tint_module_vars_struct tint_module_vars) {
+ uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 4u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%arrayLength_a0f5ca = func():void {
- $B2: {
- %4:ptr<storage, array<f32>, read> = access %sb_ro, 0u
- %5:u32 = arrayLength %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ arrayLength_a0f5ca(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %arrayLength_a0f5ca
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_a0f5ca(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %arrayLength_a0f5ca
- ret
- }
+kernel void compute_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_a0f5ca(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %arrayLength_a0f5ca
- ret
- }
+vertex vertex_main_outputs vertex_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.ir.msl
index 818bebf..b610bef 100644
--- a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.ir.msl
@@ -1,47 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(2) {
- arg_0:array<f16> @offset(0)
-}
+struct SB_RW {
+ tint_array<half, 1> arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+ const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void arrayLength_cbd6b5(tint_module_vars_struct tint_module_vars) {
+ uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 2u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%arrayLength_cbd6b5 = func():void {
- $B2: {
- %4:ptr<storage, array<f16>, read_write> = access %sb_rw, 0u
- %5:u32 = arrayLength %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ arrayLength_cbd6b5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %arrayLength_cbd6b5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_cbd6b5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %arrayLength_cbd6b5
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_cbd6b5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %arrayLength_cbd6b5
- ret
- }
+vertex vertex_main_outputs vertex_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/arrayLength/cdd123.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/arrayLength/cdd123.wgsl.expected.ir.msl
index bbdda44..2fa85f7 100644
--- a/test/tint/builtins/gen/var/arrayLength/cdd123.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/arrayLength/cdd123.wgsl.expected.ir.msl
@@ -1,47 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:array<f32> @offset(0)
-}
+struct SB_RW {
+ tint_array<float, 1> arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+ const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void arrayLength_cdd123(tint_module_vars_struct tint_module_vars) {
+ uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 4u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%arrayLength_cdd123 = func():void {
- $B2: {
- %4:ptr<storage, array<f32>, read_write> = access %sb_rw, 0u
- %5:u32 = arrayLength %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ arrayLength_cdd123(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %arrayLength_cdd123
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_cdd123(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %arrayLength_cdd123
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_cdd123(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %arrayLength_cdd123
- ret
- }
+vertex vertex_main_outputs vertex_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/arrayLength/cfca0a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/arrayLength/cfca0a.wgsl.expected.ir.msl
index f320d12..351baa5 100644
--- a/test/tint/builtins/gen/var/arrayLength/cfca0a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/arrayLength/cfca0a.wgsl.expected.ir.msl
@@ -1,47 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RO = struct @align(4) {
- arg_0:array<u32> @offset(0)
-}
+struct SB_RO {
+ tint_array<uint, 1> arg_0;
+};
+struct tint_module_vars_struct {
+ const device SB_RO* sb_ro;
+ device uint* prevent_dce;
+ const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-$B1: { # root
- %sb_ro:ptr<storage, SB_RO, read> = var @binding_point(0, 1)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void arrayLength_cfca0a(tint_module_vars_struct tint_module_vars) {
+ uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 4u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%arrayLength_cfca0a = func():void {
- $B2: {
- %4:ptr<storage, array<u32>, read> = access %sb_ro, 0u
- %5:u32 = arrayLength %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ arrayLength_cfca0a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %arrayLength_cfca0a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_cfca0a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %arrayLength_cfca0a
- ret
- }
+kernel void compute_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_cfca0a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %arrayLength_cfca0a
- ret
- }
+vertex vertex_main_outputs vertex_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/arrayLength/eb510f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/arrayLength/eb510f.wgsl.expected.ir.msl
index b07c58a..96cda01 100644
--- a/test/tint/builtins/gen/var/arrayLength/eb510f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/arrayLength/eb510f.wgsl.expected.ir.msl
@@ -1,47 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:array<u32> @offset(0)
-}
+struct SB_RW {
+ tint_array<uint, 1> arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+ const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void arrayLength_eb510f(tint_module_vars_struct tint_module_vars) {
+ uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 4u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%arrayLength_eb510f = func():void {
- $B2: {
- %4:ptr<storage, array<u32>, read_write> = access %sb_rw, 0u
- %5:u32 = arrayLength %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ arrayLength_eb510f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %arrayLength_eb510f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_eb510f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %arrayLength_eb510f
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ arrayLength_eb510f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %arrayLength_eb510f
- ret
- }
+vertex vertex_main_outputs vertex_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.ir.msl
index a41816a..bcaee5f 100644
--- a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void asin_064953(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(0.47942554950714111328f);
+ float4 res = asin(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asin_064953 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.47942554950714111328f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = asin %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asin_064953(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %asin_064953
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_064953(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %asin_064953
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_064953(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %asin_064953
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.ir.msl
index 26cd65b..676fb9d 100644
--- a/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void asin_11dfda(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 0.479248046875h;
+ half res = asin(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asin_11dfda = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 0.479248046875h
- %4:f16 = load %arg_0
- %5:f16 = asin %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asin_11dfda(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %asin_11dfda
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_11dfda(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %asin_11dfda
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_11dfda(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %asin_11dfda
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.ir.msl
index 0ead735..704a0c3 100644
--- a/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void asin_2d8e29(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(0.479248046875h);
+ half3 res = asin(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asin_2d8e29 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.479248046875h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = asin %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asin_2d8e29(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %asin_2d8e29
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_2d8e29(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %asin_2d8e29
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_2d8e29(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %asin_2d8e29
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.ir.msl
index be8699f..99dd261 100644
--- a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void asin_3cfbd4(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(0.479248046875h);
+ half4 res = asin(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asin_3cfbd4 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.479248046875h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = asin %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asin_3cfbd4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %asin_3cfbd4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_3cfbd4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %asin_3cfbd4
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_3cfbd4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %asin_3cfbd4
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.ir.msl
index f30db80..4be68fa 100644
--- a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void asin_7b6a44(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(0.47942554950714111328f);
+ float2 res = asin(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asin_7b6a44 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.47942554950714111328f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = asin %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asin_7b6a44(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %asin_7b6a44
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_7b6a44(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %asin_7b6a44
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_7b6a44(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %asin_7b6a44
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.ir.msl
index 92b6188..85f3303 100644
--- a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void asin_8cd9c9(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(0.47942554950714111328f);
+ float3 res = asin(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asin_8cd9c9 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.47942554950714111328f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = asin %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asin_8cd9c9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %asin_8cd9c9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_8cd9c9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %asin_8cd9c9
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_8cd9c9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %asin_8cd9c9
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.ir.msl
index 4ec4659..cae6fcd 100644
--- a/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void asin_b4aced(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(0.479248046875h);
+ half2 res = asin(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asin_b4aced = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.479248046875h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = asin %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asin_b4aced(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %asin_b4aced
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_b4aced(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %asin_b4aced
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_b4aced(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %asin_b4aced
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.ir.msl
index 5de31fb..589777b 100644
--- a/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void asin_c0c272(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 0.47942554950714111328f;
+ float res = asin(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asin_c0c272 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 0.47942554950714111328f
- %4:f32 = load %arg_0
- %5:f32 = asin %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asin_c0c272(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %asin_c0c272
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_c0c272(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %asin_c0c272
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asin_c0c272(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %asin_c0c272
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/asinh/157447.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/asinh/157447.wgsl.expected.ir.msl
index 9170e51..1f3b5af 100644
--- a/test/tint/builtins/gen/var/asinh/157447.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/asinh/157447.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void asinh_157447(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = asinh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asinh_157447 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = asinh %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asinh_157447(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %asinh_157447
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_157447(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %asinh_157447
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_157447(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %asinh_157447
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.ir.msl
index 8da41f2..ceef9d4 100644
--- a/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void asinh_2265ee(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = asinh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asinh_2265ee = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = asinh %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asinh_2265ee(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %asinh_2265ee
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_2265ee(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %asinh_2265ee
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_2265ee(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %asinh_2265ee
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.ir.msl
index cdd2f8f..887db13 100644
--- a/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void asinh_468a48(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half res = asinh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asinh_468a48 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %arg_0
- %5:f16 = asinh %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asinh_468a48(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %asinh_468a48
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_468a48(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %asinh_468a48
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_468a48(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %asinh_468a48
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.ir.msl
index bb6c0cf..1af0607 100644
--- a/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void asinh_4a2226(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = asinh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asinh_4a2226 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = asinh %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asinh_4a2226(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %asinh_4a2226
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_4a2226(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %asinh_4a2226
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_4a2226(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %asinh_4a2226
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.ir.msl
index 0c55edb..fe32514 100644
--- a/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void asinh_8d2e51(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = asinh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asinh_8d2e51 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = asinh %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asinh_8d2e51(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %asinh_8d2e51
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_8d2e51(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %asinh_8d2e51
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_8d2e51(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %asinh_8d2e51
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.ir.msl
index b758841..beec9c8 100644
--- a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void asinh_95ab2b(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 res = asinh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asinh_95ab2b = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = asinh %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asinh_95ab2b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %asinh_95ab2b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_95ab2b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %asinh_95ab2b
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_95ab2b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %asinh_95ab2b
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.ir.msl
index 0723f1b..07b656d 100644
--- a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void asinh_ad8f8b(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 res = asinh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asinh_ad8f8b = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = asinh %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asinh_ad8f8b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %asinh_ad8f8b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_ad8f8b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %asinh_ad8f8b
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_ad8f8b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %asinh_ad8f8b
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.ir.msl
index 605b105..4a7b326 100644
--- a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void asinh_fb5e8c(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 res = asinh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%asinh_fb5e8c = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = asinh %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ asinh_fb5e8c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %asinh_fb5e8c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_fb5e8c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %asinh_fb5e8c
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ asinh_fb5e8c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %asinh_fb5e8c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atan/02979a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atan/02979a.wgsl.expected.ir.msl
index 29ffb53..04f4ddc 100644
--- a/test/tint/builtins/gen/var/atan/02979a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atan/02979a.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void atan_02979a(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = atan(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan_02979a = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = atan %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan_02979a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %atan_02979a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_02979a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %atan_02979a
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_02979a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %atan_02979a
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.ir.msl
index c0c624d..627ac6b 100644
--- a/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void atan_19faea(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 res = atan(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan_19faea = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = atan %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan_19faea(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %atan_19faea
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_19faea(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %atan_19faea
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_19faea(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %atan_19faea
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.ir.msl
index 2df5a3e..c2a8116 100644
--- a/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void atan_1e1764(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 res = atan(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan_1e1764 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = atan %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan_1e1764(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %atan_1e1764
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_1e1764(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %atan_1e1764
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_1e1764(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %atan_1e1764
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.ir.msl
index 02c54c4..58b7d3a 100644
--- a/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void atan_331e6d(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = atan(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan_331e6d = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = atan %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan_331e6d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %atan_331e6d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_331e6d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %atan_331e6d
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_331e6d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %atan_331e6d
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.ir.msl
index d5ab0e8..658424d 100644
--- a/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void atan_a5f421(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 res = atan(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan_a5f421 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = atan %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan_a5f421(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %atan_a5f421
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_a5f421(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %atan_a5f421
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_a5f421(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %atan_a5f421
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.ir.msl
index 30940d5..b437c28 100644
--- a/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void atan_a7ba61(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half res = atan(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan_a7ba61 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %arg_0
- %5:f16 = atan %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan_a7ba61(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %atan_a7ba61
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_a7ba61(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %atan_a7ba61
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_a7ba61(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %atan_a7ba61
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.ir.msl
index 6cbb3b7..3908e64 100644
--- a/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void atan_a8b696(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = atan(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan_a8b696 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = atan %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan_a8b696(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %atan_a8b696
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_a8b696(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %atan_a8b696
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_a8b696(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %atan_a8b696
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.ir.msl
index 5c79624..25933f0 100644
--- a/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void atan_ad96e4(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = atan(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan_ad96e4 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = atan %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan_ad96e4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %atan_ad96e4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_ad96e4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %atan_ad96e4
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan_ad96e4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %atan_ad96e4
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.ir.msl
index 5eb4fe0..3a39d0e 100644
--- a/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void atan2_21dfea(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 arg_1 = half3(1.0h);
+ half3 res = atan2(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan2_21dfea = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_1:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %5:vec3<f16> = load %arg_0
- %6:vec3<f16> = load %arg_1
- %7:vec3<f16> = atan2 %5, %6
- %res:ptr<function, vec3<f16>, read_write> = var, %7
- %9:vec3<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan2_21dfea(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %atan2_21dfea
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_21dfea(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %atan2_21dfea
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_21dfea(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %atan2_21dfea
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.ir.msl
index 914fb95..7495a2a 100644
--- a/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void atan2_57fb13(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 arg_1 = float2(1.0f);
+ float2 res = atan2(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan2_57fb13 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_1:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %5:vec2<f32> = load %arg_0
- %6:vec2<f32> = load %arg_1
- %7:vec2<f32> = atan2 %5, %6
- %res:ptr<function, vec2<f32>, read_write> = var, %7
- %9:vec2<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan2_57fb13(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %atan2_57fb13
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_57fb13(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %atan2_57fb13
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_57fb13(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %atan2_57fb13
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.ir.msl
index 28e491b..1dcdd63 100644
--- a/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void atan2_93febc(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 arg_1 = half2(1.0h);
+ half2 res = atan2(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan2_93febc = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_1:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %5:vec2<f16> = load %arg_0
- %6:vec2<f16> = load %arg_1
- %7:vec2<f16> = atan2 %5, %6
- %res:ptr<function, vec2<f16>, read_write> = var, %7
- %9:vec2<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan2_93febc(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %atan2_93febc
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_93febc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %atan2_93febc
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_93febc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %atan2_93febc
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atan2/96057c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atan2/96057c.wgsl.expected.ir.msl
index 5d5b6e9..fd73bdd 100644
--- a/test/tint/builtins/gen/var/atan2/96057c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atan2/96057c.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void atan2_96057c(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float arg_1 = 1.0f;
+ float res = atan2(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan2_96057c = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %arg_1:ptr<function, f32, read_write> = var, 1.0f
- %5:f32 = load %arg_0
- %6:f32 = load %arg_1
- %7:f32 = atan2 %5, %6
- %res:ptr<function, f32, read_write> = var, %7
- %9:f32 = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan2_96057c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %atan2_96057c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_96057c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %atan2_96057c
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_96057c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %atan2_96057c
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.ir.msl
index fdb0d0f..8650242 100644
--- a/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void atan2_a70d0d(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 arg_1 = float3(1.0f);
+ float3 res = atan2(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan2_a70d0d = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_1:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %5:vec3<f32> = load %arg_0
- %6:vec3<f32> = load %arg_1
- %7:vec3<f32> = atan2 %5, %6
- %res:ptr<function, vec3<f32>, read_write> = var, %7
- %9:vec3<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan2_a70d0d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %atan2_a70d0d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_a70d0d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %atan2_a70d0d
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_a70d0d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %atan2_a70d0d
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.ir.msl
index b69ca4b..e48043c 100644
--- a/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void atan2_ae713e(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 arg_1 = float4(1.0f);
+ float4 res = atan2(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan2_ae713e = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_1:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %5:vec4<f32> = load %arg_0
- %6:vec4<f32> = load %arg_1
- %7:vec4<f32> = atan2 %5, %6
- %res:ptr<function, vec4<f32>, read_write> = var, %7
- %9:vec4<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan2_ae713e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %atan2_ae713e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_ae713e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %atan2_ae713e
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_ae713e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %atan2_ae713e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.ir.msl
index 8e9ab53..13ab811 100644
--- a/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void atan2_ca698e(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half arg_1 = 1.0h;
+ half res = atan2(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan2_ca698e = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %arg_1:ptr<function, f16, read_write> = var, 1.0h
- %5:f16 = load %arg_0
- %6:f16 = load %arg_1
- %7:f16 = atan2 %5, %6
- %res:ptr<function, f16, read_write> = var, %7
- %9:f16 = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan2_ca698e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %atan2_ca698e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_ca698e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %atan2_ca698e
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_ca698e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %atan2_ca698e
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.ir.msl
index 7d3dde6..da6d786 100644
--- a/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void atan2_d983ab(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 arg_1 = half4(1.0h);
+ half4 res = atan2(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atan2_d983ab = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_1:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %5:vec4<f16> = load %arg_0
- %6:vec4<f16> = load %arg_1
- %7:vec4<f16> = atan2 %5, %6
- %res:ptr<function, vec4<f16>, read_write> = var, %7
- %9:vec4<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atan2_d983ab(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %atan2_d983ab
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_d983ab(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %atan2_d983ab
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atan2_d983ab(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %atan2_d983ab
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.ir.msl
index 30c0afa..4999d2b 100644
--- a/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void atanh_440cca(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(0.5f);
+ float3 res = atanh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atanh_440cca = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.5f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = atanh %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atanh_440cca(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %atanh_440cca
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_440cca(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %atanh_440cca
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_440cca(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %atanh_440cca
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.ir.msl
index f9cedd7..fd05d5b 100644
--- a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void atanh_5bf88d(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(0.5h);
+ half2 res = atanh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atanh_5bf88d = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.5h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = atanh %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atanh_5bf88d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %atanh_5bf88d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_5bf88d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %atanh_5bf88d
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_5bf88d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %atanh_5bf88d
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atanh/7997d8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atanh/7997d8.wgsl.expected.ir.msl
index 937886f..b472b79 100644
--- a/test/tint/builtins/gen/var/atanh/7997d8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atanh/7997d8.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void atanh_7997d8(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 0.5f;
+ float res = atanh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atanh_7997d8 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 0.5f
- %4:f32 = load %arg_0
- %5:f32 = atanh %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atanh_7997d8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %atanh_7997d8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_7997d8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %atanh_7997d8
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_7997d8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %atanh_7997d8
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.ir.msl
index 36e7fee..db844bc 100644
--- a/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void atanh_c0e634(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(0.5f);
+ float2 res = atanh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atanh_c0e634 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.5f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = atanh %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atanh_c0e634(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %atanh_c0e634
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_c0e634(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %atanh_c0e634
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_c0e634(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %atanh_c0e634
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.ir.msl
index 801ce66..c98bfd6 100644
--- a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void atanh_d2d8cd(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 0.5h;
+ half res = atanh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atanh_d2d8cd = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 0.5h
- %4:f16 = load %arg_0
- %5:f16 = atanh %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atanh_d2d8cd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %atanh_d2d8cd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_d2d8cd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %atanh_d2d8cd
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_d2d8cd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %atanh_d2d8cd
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.ir.msl
index 2a736aa..07c04ac 100644
--- a/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void atanh_e3b450(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(0.5h);
+ half4 res = atanh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atanh_e3b450 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.5h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = atanh %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atanh_e3b450(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %atanh_e3b450
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_e3b450(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %atanh_e3b450
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_e3b450(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %atanh_e3b450
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.ir.msl
index 73e8145..e9a1f0f 100644
--- a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void atanh_ec4b06(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(0.5h);
+ half3 res = atanh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atanh_ec4b06 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.5h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = atanh %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atanh_ec4b06(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %atanh_ec4b06
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_ec4b06(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %atanh_ec4b06
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_ec4b06(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %atanh_ec4b06
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.ir.msl
index 7d4ae12..01dd096 100644
--- a/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void atanh_f3e01b(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(0.5f);
+ float4 res = atanh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atanh_f3e01b = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.5f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = atanh %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ atanh_f3e01b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %atanh_f3e01b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_f3e01b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %atanh_f3e01b
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ atanh_f3e01b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %atanh_f3e01b
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicAdd/794055.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicAdd/794055.wgsl.expected.ir.msl
index b0e458b..3d7c0eb 100644
--- a/test/tint/builtins/gen/var/atomicAdd/794055.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicAdd/794055.wgsl.expected.ir.msl
@@ -1,40 +1,26 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<i32>, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void atomicAdd_794055(tint_module_vars_struct tint_module_vars) {
+ int arg_1 = 1;
+ int res = atomic_fetch_add_explicit(tint_module_vars.arg_0, arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicAdd_794055 = func():void {
- $B2: {
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:i32 = load %arg_1
- %6:i32 = atomicAdd %arg_0, %5
- %res:ptr<function, i32, read_write> = var, %6
- %8:i32 = load %res
- store %prevent_dce, %8
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicAdd_794055(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %11:bool = eq %tint_local_index, 0u
- if %11 [t: $B4] { # if_1
- $B4: { # true
- %12:void = atomicStore %arg_0, 0i
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %atomicAdd_794055
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicAdd/8a199a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicAdd/8a199a.wgsl.expected.ir.msl
index e02fd62..9e30fe7 100644
--- a/test/tint/builtins/gen/var/atomicAdd/8a199a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicAdd/8a199a.wgsl.expected.ir.msl
@@ -1,43 +1,23 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_uint arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<u32> @offset(0)
+void atomicAdd_8a199a(tint_module_vars_struct tint_module_vars) {
+ uint arg_1 = 1u;
+ uint res = atomic_fetch_add_explicit((&(*tint_module_vars.sb_rw).arg_0), arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicAdd_8a199a(tint_module_vars);
}
-
-%atomicAdd_8a199a = func():void {
- $B2: {
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %5:ptr<storage, atomic<u32>, read_write> = access %sb_rw, 0u
- %6:u32 = load %arg_1
- %7:u32 = atomicAdd %5, %6
- %res:ptr<function, u32, read_write> = var, %7
- %9:u32 = load %res
- store %prevent_dce, %9
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicAdd_8a199a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:void = call %atomicAdd_8a199a
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %13:void = call %atomicAdd_8a199a
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicAdd/d32fe4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicAdd/d32fe4.wgsl.expected.ir.msl
index a986677..6d40ca6 100644
--- a/test/tint/builtins/gen/var/atomicAdd/d32fe4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicAdd/d32fe4.wgsl.expected.ir.msl
@@ -1,43 +1,23 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_int arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device int* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<i32> @offset(0)
+void atomicAdd_d32fe4(tint_module_vars_struct tint_module_vars) {
+ int arg_1 = 1;
+ int res = atomic_fetch_add_explicit((&(*tint_module_vars.sb_rw).arg_0), arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicAdd_d32fe4(tint_module_vars);
}
-
-%atomicAdd_d32fe4 = func():void {
- $B2: {
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:ptr<storage, atomic<i32>, read_write> = access %sb_rw, 0u
- %6:i32 = load %arg_1
- %7:i32 = atomicAdd %5, %6
- %res:ptr<function, i32, read_write> = var, %7
- %9:i32 = load %res
- store %prevent_dce, %9
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicAdd_d32fe4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:void = call %atomicAdd_d32fe4
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %13:void = call %atomicAdd_d32fe4
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicAdd/d5db1d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicAdd/d5db1d.wgsl.expected.ir.msl
index 1eaa8da..5b1bae0 100644
--- a/test/tint/builtins/gen/var/atomicAdd/d5db1d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicAdd/d5db1d.wgsl.expected.ir.msl
@@ -1,40 +1,26 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<u32>, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void atomicAdd_d5db1d(tint_module_vars_struct tint_module_vars) {
+ uint arg_1 = 1u;
+ uint res = atomic_fetch_add_explicit(tint_module_vars.arg_0, arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicAdd_d5db1d = func():void {
- $B2: {
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %5:u32 = load %arg_1
- %6:u32 = atomicAdd %arg_0, %5
- %res:ptr<function, u32, read_write> = var, %6
- %8:u32 = load %res
- store %prevent_dce, %8
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0u, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicAdd_d5db1d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %11:bool = eq %tint_local_index, 0u
- if %11 [t: $B4] { # if_1
- $B4: { # true
- %12:void = atomicStore %arg_0, 0u
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %atomicAdd_d5db1d
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicAnd/152966.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicAnd/152966.wgsl.expected.ir.msl
index a1ba11d..b6d7ffe 100644
--- a/test/tint/builtins/gen/var/atomicAnd/152966.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicAnd/152966.wgsl.expected.ir.msl
@@ -1,43 +1,23 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_int arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device int* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<i32> @offset(0)
+void atomicAnd_152966(tint_module_vars_struct tint_module_vars) {
+ int arg_1 = 1;
+ int res = atomic_fetch_and_explicit((&(*tint_module_vars.sb_rw).arg_0), arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicAnd_152966(tint_module_vars);
}
-
-%atomicAnd_152966 = func():void {
- $B2: {
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:ptr<storage, atomic<i32>, read_write> = access %sb_rw, 0u
- %6:i32 = load %arg_1
- %7:i32 = atomicAnd %5, %6
- %res:ptr<function, i32, read_write> = var, %7
- %9:i32 = load %res
- store %prevent_dce, %9
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicAnd_152966(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:void = call %atomicAnd_152966
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %13:void = call %atomicAnd_152966
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicAnd/34edd3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicAnd/34edd3.wgsl.expected.ir.msl
index 1f18321..6fd6457 100644
--- a/test/tint/builtins/gen/var/atomicAnd/34edd3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicAnd/34edd3.wgsl.expected.ir.msl
@@ -1,40 +1,26 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<u32>, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void atomicAnd_34edd3(tint_module_vars_struct tint_module_vars) {
+ uint arg_1 = 1u;
+ uint res = atomic_fetch_and_explicit(tint_module_vars.arg_0, arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicAnd_34edd3 = func():void {
- $B2: {
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %5:u32 = load %arg_1
- %6:u32 = atomicAnd %arg_0, %5
- %res:ptr<function, u32, read_write> = var, %6
- %8:u32 = load %res
- store %prevent_dce, %8
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0u, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicAnd_34edd3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %11:bool = eq %tint_local_index, 0u
- if %11 [t: $B4] { # if_1
- $B4: { # true
- %12:void = atomicStore %arg_0, 0u
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %atomicAnd_34edd3
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicAnd/45a819.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicAnd/45a819.wgsl.expected.ir.msl
index fb95c90..0a24d4a 100644
--- a/test/tint/builtins/gen/var/atomicAnd/45a819.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicAnd/45a819.wgsl.expected.ir.msl
@@ -1,40 +1,26 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<i32>, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void atomicAnd_45a819(tint_module_vars_struct tint_module_vars) {
+ int arg_1 = 1;
+ int res = atomic_fetch_and_explicit(tint_module_vars.arg_0, arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicAnd_45a819 = func():void {
- $B2: {
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:i32 = load %arg_1
- %6:i32 = atomicAnd %arg_0, %5
- %res:ptr<function, i32, read_write> = var, %6
- %8:i32 = load %res
- store %prevent_dce, %8
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicAnd_45a819(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %11:bool = eq %tint_local_index, 0u
- if %11 [t: $B4] { # if_1
- $B4: { # true
- %12:void = atomicStore %arg_0, 0i
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %atomicAnd_45a819
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicAnd/85a8d9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicAnd/85a8d9.wgsl.expected.ir.msl
index b7fc583..6540c27 100644
--- a/test/tint/builtins/gen/var/atomicAnd/85a8d9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicAnd/85a8d9.wgsl.expected.ir.msl
@@ -1,43 +1,23 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_uint arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<u32> @offset(0)
+void atomicAnd_85a8d9(tint_module_vars_struct tint_module_vars) {
+ uint arg_1 = 1u;
+ uint res = atomic_fetch_and_explicit((&(*tint_module_vars.sb_rw).arg_0), arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicAnd_85a8d9(tint_module_vars);
}
-
-%atomicAnd_85a8d9 = func():void {
- $B2: {
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %5:ptr<storage, atomic<u32>, read_write> = access %sb_rw, 0u
- %6:u32 = load %arg_1
- %7:u32 = atomicAnd %5, %6
- %res:ptr<function, u32, read_write> = var, %7
- %9:u32 = load %res
- store %prevent_dce, %9
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicAnd_85a8d9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:void = call %atomicAnd_85a8d9
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %13:void = call %atomicAnd_85a8d9
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicExchange/0a5dca.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicExchange/0a5dca.wgsl.expected.ir.msl
index 01fb28e..ddf2515 100644
--- a/test/tint/builtins/gen/var/atomicExchange/0a5dca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicExchange/0a5dca.wgsl.expected.ir.msl
@@ -1,40 +1,26 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<u32>, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void atomicExchange_0a5dca(tint_module_vars_struct tint_module_vars) {
+ uint arg_1 = 1u;
+ uint res = atomic_exchange_explicit(tint_module_vars.arg_0, arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicExchange_0a5dca = func():void {
- $B2: {
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %5:u32 = load %arg_1
- %6:u32 = atomicExchange %arg_0, %5
- %res:ptr<function, u32, read_write> = var, %6
- %8:u32 = load %res
- store %prevent_dce, %8
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0u, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicExchange_0a5dca(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %11:bool = eq %tint_local_index, 0u
- if %11 [t: $B4] { # if_1
- $B4: { # true
- %12:void = atomicStore %arg_0, 0u
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %atomicExchange_0a5dca
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicExchange/d59712.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicExchange/d59712.wgsl.expected.ir.msl
index 6cce0f2..106922c 100644
--- a/test/tint/builtins/gen/var/atomicExchange/d59712.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicExchange/d59712.wgsl.expected.ir.msl
@@ -1,43 +1,23 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_uint arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<u32> @offset(0)
+void atomicExchange_d59712(tint_module_vars_struct tint_module_vars) {
+ uint arg_1 = 1u;
+ uint res = atomic_exchange_explicit((&(*tint_module_vars.sb_rw).arg_0), arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicExchange_d59712(tint_module_vars);
}
-
-%atomicExchange_d59712 = func():void {
- $B2: {
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %5:ptr<storage, atomic<u32>, read_write> = access %sb_rw, 0u
- %6:u32 = load %arg_1
- %7:u32 = atomicExchange %5, %6
- %res:ptr<function, u32, read_write> = var, %7
- %9:u32 = load %res
- store %prevent_dce, %9
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicExchange_d59712(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:void = call %atomicExchange_d59712
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %13:void = call %atomicExchange_d59712
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicExchange/e114ba.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicExchange/e114ba.wgsl.expected.ir.msl
index 6834d7d..a70e2ae 100644
--- a/test/tint/builtins/gen/var/atomicExchange/e114ba.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicExchange/e114ba.wgsl.expected.ir.msl
@@ -1,40 +1,26 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<i32>, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void atomicExchange_e114ba(tint_module_vars_struct tint_module_vars) {
+ int arg_1 = 1;
+ int res = atomic_exchange_explicit(tint_module_vars.arg_0, arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicExchange_e114ba = func():void {
- $B2: {
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:i32 = load %arg_1
- %6:i32 = atomicExchange %arg_0, %5
- %res:ptr<function, i32, read_write> = var, %6
- %8:i32 = load %res
- store %prevent_dce, %8
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicExchange_e114ba(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %11:bool = eq %tint_local_index, 0u
- if %11 [t: $B4] { # if_1
- $B4: { # true
- %12:void = atomicStore %arg_0, 0i
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %atomicExchange_e114ba
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicExchange/f2e22f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicExchange/f2e22f.wgsl.expected.ir.msl
index 4150b9e..50f696e 100644
--- a/test/tint/builtins/gen/var/atomicExchange/f2e22f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicExchange/f2e22f.wgsl.expected.ir.msl
@@ -1,43 +1,23 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_int arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device int* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<i32> @offset(0)
+void atomicExchange_f2e22f(tint_module_vars_struct tint_module_vars) {
+ int arg_1 = 1;
+ int res = atomic_exchange_explicit((&(*tint_module_vars.sb_rw).arg_0), arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicExchange_f2e22f(tint_module_vars);
}
-
-%atomicExchange_f2e22f = func():void {
- $B2: {
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:ptr<storage, atomic<i32>, read_write> = access %sb_rw, 0u
- %6:i32 = load %arg_1
- %7:i32 = atomicExchange %5, %6
- %res:ptr<function, i32, read_write> = var, %7
- %9:i32 = load %res
- store %prevent_dce, %9
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicExchange_f2e22f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:void = call %atomicExchange_f2e22f
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %13:void = call %atomicExchange_f2e22f
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicLoad/0806ad.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicLoad/0806ad.wgsl.expected.ir.msl
index b990acb..baed38d 100644
--- a/test/tint/builtins/gen/var/atomicLoad/0806ad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicLoad/0806ad.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_int arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device int* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<i32> @offset(0)
+void atomicLoad_0806ad(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_load_explicit((&(*tint_module_vars.sb_rw).arg_0), memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicLoad_0806ad(tint_module_vars);
}
-
-%atomicLoad_0806ad = func():void {
- $B2: {
- %4:ptr<storage, atomic<i32>, read_write> = access %sb_rw, 0u
- %5:i32 = atomicLoad %4
- %res:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicLoad_0806ad(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicLoad_0806ad
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicLoad_0806ad
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicLoad/361bf1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicLoad/361bf1.wgsl.expected.ir.msl
index 7ae76ad..f4620b3 100644
--- a/test/tint/builtins/gen/var/atomicLoad/361bf1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicLoad/361bf1.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<u32>, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void atomicLoad_361bf1(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_load_explicit(tint_module_vars.arg_0, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicLoad_361bf1 = func():void {
- $B2: {
- %4:u32 = atomicLoad %arg_0
- %res:ptr<function, u32, read_write> = var, %4
- %6:u32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0u, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicLoad_361bf1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0u
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicLoad_361bf1
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicLoad/afcc03.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicLoad/afcc03.wgsl.expected.ir.msl
index ee77bef..a06cda4 100644
--- a/test/tint/builtins/gen/var/atomicLoad/afcc03.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicLoad/afcc03.wgsl.expected.ir.msl
@@ -1,38 +1,25 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<i32>, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void atomicLoad_afcc03(tint_module_vars_struct tint_module_vars) {
+ int res = atomic_load_explicit(tint_module_vars.arg_0, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicLoad_afcc03 = func():void {
- $B2: {
- %4:i32 = atomicLoad %arg_0
- %res:ptr<function, i32, read_write> = var, %4
- %6:i32 = load %res
- store %prevent_dce, %6
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicLoad_afcc03(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %9:bool = eq %tint_local_index, 0u
- if %9 [t: $B4] { # if_1
- $B4: { # true
- %10:void = atomicStore %arg_0, 0i
- exit_if # if_1
- }
- }
- %11:void = msl.threadgroup_barrier 4u
- %12:void = call %atomicLoad_afcc03
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicLoad/fe6cc3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicLoad/fe6cc3.wgsl.expected.ir.msl
index 0637775..2e72caf 100644
--- a/test/tint/builtins/gen/var/atomicLoad/fe6cc3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicLoad/fe6cc3.wgsl.expected.ir.msl
@@ -1,41 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_uint arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<u32> @offset(0)
+void atomicLoad_fe6cc3(tint_module_vars_struct tint_module_vars) {
+ uint res = atomic_load_explicit((&(*tint_module_vars.sb_rw).arg_0), memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicLoad_fe6cc3(tint_module_vars);
}
-
-%atomicLoad_fe6cc3 = func():void {
- $B2: {
- %4:ptr<storage, atomic<u32>, read_write> = access %sb_rw, 0u
- %5:u32 = atomicLoad %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicLoad_fe6cc3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %atomicLoad_fe6cc3
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %11:void = call %atomicLoad_fe6cc3
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicMax/51b9be.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicMax/51b9be.wgsl.expected.ir.msl
index 1f0f423..29d3daf 100644
--- a/test/tint/builtins/gen/var/atomicMax/51b9be.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicMax/51b9be.wgsl.expected.ir.msl
@@ -1,43 +1,23 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_uint arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<u32> @offset(0)
+void atomicMax_51b9be(tint_module_vars_struct tint_module_vars) {
+ uint arg_1 = 1u;
+ uint res = atomic_fetch_max_explicit((&(*tint_module_vars.sb_rw).arg_0), arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicMax_51b9be(tint_module_vars);
}
-
-%atomicMax_51b9be = func():void {
- $B2: {
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %5:ptr<storage, atomic<u32>, read_write> = access %sb_rw, 0u
- %6:u32 = load %arg_1
- %7:u32 = atomicMax %5, %6
- %res:ptr<function, u32, read_write> = var, %7
- %9:u32 = load %res
- store %prevent_dce, %9
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicMax_51b9be(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:void = call %atomicMax_51b9be
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %13:void = call %atomicMax_51b9be
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicMax/92aa72.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicMax/92aa72.wgsl.expected.ir.msl
index 94e0ee9..9e6903f 100644
--- a/test/tint/builtins/gen/var/atomicMax/92aa72.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicMax/92aa72.wgsl.expected.ir.msl
@@ -1,43 +1,23 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_int arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device int* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<i32> @offset(0)
+void atomicMax_92aa72(tint_module_vars_struct tint_module_vars) {
+ int arg_1 = 1;
+ int res = atomic_fetch_max_explicit((&(*tint_module_vars.sb_rw).arg_0), arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicMax_92aa72(tint_module_vars);
}
-
-%atomicMax_92aa72 = func():void {
- $B2: {
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:ptr<storage, atomic<i32>, read_write> = access %sb_rw, 0u
- %6:i32 = load %arg_1
- %7:i32 = atomicMax %5, %6
- %res:ptr<function, i32, read_write> = var, %7
- %9:i32 = load %res
- store %prevent_dce, %9
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicMax_92aa72(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:void = call %atomicMax_92aa72
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %13:void = call %atomicMax_92aa72
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicMax/a89cc3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicMax/a89cc3.wgsl.expected.ir.msl
index 562e7ee..b6f3269 100644
--- a/test/tint/builtins/gen/var/atomicMax/a89cc3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicMax/a89cc3.wgsl.expected.ir.msl
@@ -1,40 +1,26 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<i32>, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void atomicMax_a89cc3(tint_module_vars_struct tint_module_vars) {
+ int arg_1 = 1;
+ int res = atomic_fetch_max_explicit(tint_module_vars.arg_0, arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicMax_a89cc3 = func():void {
- $B2: {
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:i32 = load %arg_1
- %6:i32 = atomicMax %arg_0, %5
- %res:ptr<function, i32, read_write> = var, %6
- %8:i32 = load %res
- store %prevent_dce, %8
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicMax_a89cc3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %11:bool = eq %tint_local_index, 0u
- if %11 [t: $B4] { # if_1
- $B4: { # true
- %12:void = atomicStore %arg_0, 0i
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %atomicMax_a89cc3
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicMax/beccfc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicMax/beccfc.wgsl.expected.ir.msl
index d1b0c9d..96d6ead 100644
--- a/test/tint/builtins/gen/var/atomicMax/beccfc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicMax/beccfc.wgsl.expected.ir.msl
@@ -1,40 +1,26 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<u32>, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void atomicMax_beccfc(tint_module_vars_struct tint_module_vars) {
+ uint arg_1 = 1u;
+ uint res = atomic_fetch_max_explicit(tint_module_vars.arg_0, arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicMax_beccfc = func():void {
- $B2: {
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %5:u32 = load %arg_1
- %6:u32 = atomicMax %arg_0, %5
- %res:ptr<function, u32, read_write> = var, %6
- %8:u32 = load %res
- store %prevent_dce, %8
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0u, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicMax_beccfc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %11:bool = eq %tint_local_index, 0u
- if %11 [t: $B4] { # if_1
- $B4: { # true
- %12:void = atomicStore %arg_0, 0u
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %atomicMax_beccfc
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicMin/278235.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicMin/278235.wgsl.expected.ir.msl
index 0f2fbc8..2982337 100644
--- a/test/tint/builtins/gen/var/atomicMin/278235.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicMin/278235.wgsl.expected.ir.msl
@@ -1,40 +1,26 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<i32>, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void atomicMin_278235(tint_module_vars_struct tint_module_vars) {
+ int arg_1 = 1;
+ int res = atomic_fetch_min_explicit(tint_module_vars.arg_0, arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicMin_278235 = func():void {
- $B2: {
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:i32 = load %arg_1
- %6:i32 = atomicMin %arg_0, %5
- %res:ptr<function, i32, read_write> = var, %6
- %8:i32 = load %res
- store %prevent_dce, %8
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicMin_278235(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %11:bool = eq %tint_local_index, 0u
- if %11 [t: $B4] { # if_1
- $B4: { # true
- %12:void = atomicStore %arg_0, 0i
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %atomicMin_278235
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicMin/69d383.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicMin/69d383.wgsl.expected.ir.msl
index bcceaf4..af08199 100644
--- a/test/tint/builtins/gen/var/atomicMin/69d383.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicMin/69d383.wgsl.expected.ir.msl
@@ -1,40 +1,26 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<u32>, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void atomicMin_69d383(tint_module_vars_struct tint_module_vars) {
+ uint arg_1 = 1u;
+ uint res = atomic_fetch_min_explicit(tint_module_vars.arg_0, arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicMin_69d383 = func():void {
- $B2: {
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %5:u32 = load %arg_1
- %6:u32 = atomicMin %arg_0, %5
- %res:ptr<function, u32, read_write> = var, %6
- %8:u32 = load %res
- store %prevent_dce, %8
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0u, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicMin_69d383(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %11:bool = eq %tint_local_index, 0u
- if %11 [t: $B4] { # if_1
- $B4: { # true
- %12:void = atomicStore %arg_0, 0u
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %atomicMin_69d383
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicMin/8e38dc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicMin/8e38dc.wgsl.expected.ir.msl
index 2ba247f..a102727 100644
--- a/test/tint/builtins/gen/var/atomicMin/8e38dc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicMin/8e38dc.wgsl.expected.ir.msl
@@ -1,43 +1,23 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_int arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device int* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<i32> @offset(0)
+void atomicMin_8e38dc(tint_module_vars_struct tint_module_vars) {
+ int arg_1 = 1;
+ int res = atomic_fetch_min_explicit((&(*tint_module_vars.sb_rw).arg_0), arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicMin_8e38dc(tint_module_vars);
}
-
-%atomicMin_8e38dc = func():void {
- $B2: {
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:ptr<storage, atomic<i32>, read_write> = access %sb_rw, 0u
- %6:i32 = load %arg_1
- %7:i32 = atomicMin %5, %6
- %res:ptr<function, i32, read_write> = var, %7
- %9:i32 = load %res
- store %prevent_dce, %9
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicMin_8e38dc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:void = call %atomicMin_8e38dc
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %13:void = call %atomicMin_8e38dc
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicMin/c67a74.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicMin/c67a74.wgsl.expected.ir.msl
index b73dd5e..f31a735 100644
--- a/test/tint/builtins/gen/var/atomicMin/c67a74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicMin/c67a74.wgsl.expected.ir.msl
@@ -1,43 +1,23 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_uint arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<u32> @offset(0)
+void atomicMin_c67a74(tint_module_vars_struct tint_module_vars) {
+ uint arg_1 = 1u;
+ uint res = atomic_fetch_min_explicit((&(*tint_module_vars.sb_rw).arg_0), arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicMin_c67a74(tint_module_vars);
}
-
-%atomicMin_c67a74 = func():void {
- $B2: {
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %5:ptr<storage, atomic<u32>, read_write> = access %sb_rw, 0u
- %6:u32 = load %arg_1
- %7:u32 = atomicMin %5, %6
- %res:ptr<function, u32, read_write> = var, %7
- %9:u32 = load %res
- store %prevent_dce, %9
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicMin_c67a74(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:void = call %atomicMin_c67a74
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %13:void = call %atomicMin_c67a74
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicOr/5e3d61.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicOr/5e3d61.wgsl.expected.ir.msl
index 674263e..5ef63fe 100644
--- a/test/tint/builtins/gen/var/atomicOr/5e3d61.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicOr/5e3d61.wgsl.expected.ir.msl
@@ -1,40 +1,26 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<u32>, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void atomicOr_5e3d61(tint_module_vars_struct tint_module_vars) {
+ uint arg_1 = 1u;
+ uint res = atomic_fetch_or_explicit(tint_module_vars.arg_0, arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicOr_5e3d61 = func():void {
- $B2: {
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %5:u32 = load %arg_1
- %6:u32 = atomicOr %arg_0, %5
- %res:ptr<function, u32, read_write> = var, %6
- %8:u32 = load %res
- store %prevent_dce, %8
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0u, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicOr_5e3d61(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %11:bool = eq %tint_local_index, 0u
- if %11 [t: $B4] { # if_1
- $B4: { # true
- %12:void = atomicStore %arg_0, 0u
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %atomicOr_5e3d61
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicOr/5e95d4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicOr/5e95d4.wgsl.expected.ir.msl
index 55439a1..fb4d308 100644
--- a/test/tint/builtins/gen/var/atomicOr/5e95d4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicOr/5e95d4.wgsl.expected.ir.msl
@@ -1,43 +1,23 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_uint arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<u32> @offset(0)
+void atomicOr_5e95d4(tint_module_vars_struct tint_module_vars) {
+ uint arg_1 = 1u;
+ uint res = atomic_fetch_or_explicit((&(*tint_module_vars.sb_rw).arg_0), arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicOr_5e95d4(tint_module_vars);
}
-
-%atomicOr_5e95d4 = func():void {
- $B2: {
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %5:ptr<storage, atomic<u32>, read_write> = access %sb_rw, 0u
- %6:u32 = load %arg_1
- %7:u32 = atomicOr %5, %6
- %res:ptr<function, u32, read_write> = var, %7
- %9:u32 = load %res
- store %prevent_dce, %9
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicOr_5e95d4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:void = call %atomicOr_5e95d4
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %13:void = call %atomicOr_5e95d4
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicOr/8d96a0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicOr/8d96a0.wgsl.expected.ir.msl
index 676e025..d306b96 100644
--- a/test/tint/builtins/gen/var/atomicOr/8d96a0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicOr/8d96a0.wgsl.expected.ir.msl
@@ -1,43 +1,23 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_int arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device int* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<i32> @offset(0)
+void atomicOr_8d96a0(tint_module_vars_struct tint_module_vars) {
+ int arg_1 = 1;
+ int res = atomic_fetch_or_explicit((&(*tint_module_vars.sb_rw).arg_0), arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicOr_8d96a0(tint_module_vars);
}
-
-%atomicOr_8d96a0 = func():void {
- $B2: {
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:ptr<storage, atomic<i32>, read_write> = access %sb_rw, 0u
- %6:i32 = load %arg_1
- %7:i32 = atomicOr %5, %6
- %res:ptr<function, i32, read_write> = var, %7
- %9:i32 = load %res
- store %prevent_dce, %9
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicOr_8d96a0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:void = call %atomicOr_8d96a0
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %13:void = call %atomicOr_8d96a0
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicOr/d09248.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicOr/d09248.wgsl.expected.ir.msl
index 9411bde..372b876 100644
--- a/test/tint/builtins/gen/var/atomicOr/d09248.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicOr/d09248.wgsl.expected.ir.msl
@@ -1,40 +1,26 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<i32>, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void atomicOr_d09248(tint_module_vars_struct tint_module_vars) {
+ int arg_1 = 1;
+ int res = atomic_fetch_or_explicit(tint_module_vars.arg_0, arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicOr_d09248 = func():void {
- $B2: {
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:i32 = load %arg_1
- %6:i32 = atomicOr %arg_0, %5
- %res:ptr<function, i32, read_write> = var, %6
- %8:i32 = load %res
- store %prevent_dce, %8
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicOr_d09248(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %11:bool = eq %tint_local_index, 0u
- if %11 [t: $B4] { # if_1
- $B4: { # true
- %12:void = atomicStore %arg_0, 0i
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %atomicOr_d09248
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicSub/051100.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicSub/051100.wgsl.expected.ir.msl
index 4c11fa3..619e6d6 100644
--- a/test/tint/builtins/gen/var/atomicSub/051100.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicSub/051100.wgsl.expected.ir.msl
@@ -1,43 +1,23 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_int arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device int* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<i32> @offset(0)
+void atomicSub_051100(tint_module_vars_struct tint_module_vars) {
+ int arg_1 = 1;
+ int res = atomic_fetch_sub_explicit((&(*tint_module_vars.sb_rw).arg_0), arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicSub_051100(tint_module_vars);
}
-
-%atomicSub_051100 = func():void {
- $B2: {
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:ptr<storage, atomic<i32>, read_write> = access %sb_rw, 0u
- %6:i32 = load %arg_1
- %7:i32 = atomicSub %5, %6
- %res:ptr<function, i32, read_write> = var, %7
- %9:i32 = load %res
- store %prevent_dce, %9
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicSub_051100(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:void = call %atomicSub_051100
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %13:void = call %atomicSub_051100
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicSub/0d26c2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicSub/0d26c2.wgsl.expected.ir.msl
index d2ef285..d705a86 100644
--- a/test/tint/builtins/gen/var/atomicSub/0d26c2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicSub/0d26c2.wgsl.expected.ir.msl
@@ -1,40 +1,26 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<u32>, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void atomicSub_0d26c2(tint_module_vars_struct tint_module_vars) {
+ uint arg_1 = 1u;
+ uint res = atomic_fetch_sub_explicit(tint_module_vars.arg_0, arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicSub_0d26c2 = func():void {
- $B2: {
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %5:u32 = load %arg_1
- %6:u32 = atomicSub %arg_0, %5
- %res:ptr<function, u32, read_write> = var, %6
- %8:u32 = load %res
- store %prevent_dce, %8
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0u, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicSub_0d26c2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %11:bool = eq %tint_local_index, 0u
- if %11 [t: $B4] { # if_1
- $B4: { # true
- %12:void = atomicStore %arg_0, 0u
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %atomicSub_0d26c2
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicSub/15bfc9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicSub/15bfc9.wgsl.expected.ir.msl
index f2b9e5d..6f3406e 100644
--- a/test/tint/builtins/gen/var/atomicSub/15bfc9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicSub/15bfc9.wgsl.expected.ir.msl
@@ -1,43 +1,23 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_uint arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<u32> @offset(0)
+void atomicSub_15bfc9(tint_module_vars_struct tint_module_vars) {
+ uint arg_1 = 1u;
+ uint res = atomic_fetch_sub_explicit((&(*tint_module_vars.sb_rw).arg_0), arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicSub_15bfc9(tint_module_vars);
}
-
-%atomicSub_15bfc9 = func():void {
- $B2: {
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %5:ptr<storage, atomic<u32>, read_write> = access %sb_rw, 0u
- %6:u32 = load %arg_1
- %7:u32 = atomicSub %5, %6
- %res:ptr<function, u32, read_write> = var, %7
- %9:u32 = load %res
- store %prevent_dce, %9
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicSub_15bfc9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:void = call %atomicSub_15bfc9
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %13:void = call %atomicSub_15bfc9
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicSub/77883a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicSub/77883a.wgsl.expected.ir.msl
index 08c3396..663eced 100644
--- a/test/tint/builtins/gen/var/atomicSub/77883a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicSub/77883a.wgsl.expected.ir.msl
@@ -1,40 +1,26 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<i32>, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void atomicSub_77883a(tint_module_vars_struct tint_module_vars) {
+ int arg_1 = 1;
+ int res = atomic_fetch_sub_explicit(tint_module_vars.arg_0, arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicSub_77883a = func():void {
- $B2: {
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:i32 = load %arg_1
- %6:i32 = atomicSub %arg_0, %5
- %res:ptr<function, i32, read_write> = var, %6
- %8:i32 = load %res
- store %prevent_dce, %8
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicSub_77883a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %11:bool = eq %tint_local_index, 0u
- if %11 [t: $B4] { # if_1
- $B4: { # true
- %12:void = atomicStore %arg_0, 0i
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %atomicSub_77883a
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicXor/54510e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicXor/54510e.wgsl.expected.ir.msl
index 098fa82..82a3524 100644
--- a/test/tint/builtins/gen/var/atomicXor/54510e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicXor/54510e.wgsl.expected.ir.msl
@@ -1,43 +1,23 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_uint arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device uint* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<u32> @offset(0)
+void atomicXor_54510e(tint_module_vars_struct tint_module_vars) {
+ uint arg_1 = 1u;
+ uint res = atomic_fetch_xor_explicit((&(*tint_module_vars.sb_rw).arg_0), arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicXor_54510e(tint_module_vars);
}
-
-%atomicXor_54510e = func():void {
- $B2: {
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %5:ptr<storage, atomic<u32>, read_write> = access %sb_rw, 0u
- %6:u32 = load %arg_1
- %7:u32 = atomicXor %5, %6
- %res:ptr<function, u32, read_write> = var, %7
- %9:u32 = load %res
- store %prevent_dce, %9
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicXor_54510e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:void = call %atomicXor_54510e
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %13:void = call %atomicXor_54510e
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicXor/75dc95.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicXor/75dc95.wgsl.expected.ir.msl
index 7006b95..3551472 100644
--- a/test/tint/builtins/gen/var/atomicXor/75dc95.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicXor/75dc95.wgsl.expected.ir.msl
@@ -1,40 +1,26 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<i32>, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void atomicXor_75dc95(tint_module_vars_struct tint_module_vars) {
+ int arg_1 = 1;
+ int res = atomic_fetch_xor_explicit(tint_module_vars.arg_0, arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicXor_75dc95 = func():void {
- $B2: {
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:i32 = load %arg_1
- %6:i32 = atomicXor %arg_0, %5
- %res:ptr<function, i32, read_write> = var, %6
- %8:i32 = load %res
- store %prevent_dce, %8
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicXor_75dc95(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %11:bool = eq %tint_local_index, 0u
- if %11 [t: $B4] { # if_1
- $B4: { # true
- %12:void = atomicStore %arg_0, 0i
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %atomicXor_75dc95
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicXor/c1b78c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicXor/c1b78c.wgsl.expected.ir.msl
index 8f0769e..8f1aaa0 100644
--- a/test/tint/builtins/gen/var/atomicXor/c1b78c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicXor/c1b78c.wgsl.expected.ir.msl
@@ -1,43 +1,23 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SB_RW {
+ atomic_int arg_0;
+};
+struct tint_module_vars_struct {
+ device SB_RW* sb_rw;
+ device int* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SB_RW = struct @align(4) {
- arg_0:atomic<i32> @offset(0)
+void atomicXor_c1b78c(tint_module_vars_struct tint_module_vars) {
+ int arg_1 = 1;
+ int res = atomic_fetch_xor_explicit((&(*tint_module_vars.sb_rw).arg_0), arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-$B1: { # root
- %sb_rw:ptr<storage, SB_RW, read_write> = var @binding_point(0, 0)
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicXor_c1b78c(tint_module_vars);
}
-
-%atomicXor_c1b78c = func():void {
- $B2: {
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:ptr<storage, atomic<i32>, read_write> = access %sb_rw, 0u
- %6:i32 = load %arg_1
- %7:i32 = atomicXor %5, %6
- %res:ptr<function, i32, read_write> = var, %7
- %9:i32 = load %res
- store %prevent_dce, %9
- ret
- }
+kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+ atomicXor_c1b78c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:void = call %atomicXor_c1b78c
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %13:void = call %atomicXor_c1b78c
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/atomicXor/c8e6be.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicXor/c8e6be.wgsl.expected.ir.msl
index add516e..52520e2 100644
--- a/test/tint/builtins/gen/var/atomicXor/c8e6be.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicXor/c8e6be.wgsl.expected.ir.msl
@@ -1,40 +1,26 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup atomic_uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ atomic_uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, atomic<u32>, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void atomicXor_c8e6be(tint_module_vars_struct tint_module_vars) {
+ uint arg_1 = 1u;
+ uint res = atomic_fetch_xor_explicit(tint_module_vars.arg_0, arg_1, memory_order_relaxed);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%atomicXor_c8e6be = func():void {
- $B2: {
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %5:u32 = load %arg_1
- %6:u32 = atomicXor %arg_0, %5
- %res:ptr<function, u32, read_write> = var, %6
- %8:u32 = load %res
- store %prevent_dce, %8
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ atomic_store_explicit(tint_module_vars.arg_0, 0u, memory_order_relaxed);
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ atomicXor_c8e6be(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %11:bool = eq %tint_local_index, 0u
- if %11 [t: $B4] { # if_1
- $B4: { # true
- %12:void = atomicStore %arg_0, 0u
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %atomicXor_c8e6be
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/0fe0c9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/0fe0c9.wgsl.expected.ir.msl
index 8f69339..cf38bd5 100644
--- a/test/tint/builtins/gen/var/bitcast/0fe0c9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/0fe0c9.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_0fe0c9(tint_module_vars_struct tint_module_vars) {
+ uint3 arg_0 = uint3(1u);
+ float3 res = as_type<float3>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_0fe0c9 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %arg_0
- %5:vec3<f32> = bitcast %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_0fe0c9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_0fe0c9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_0fe0c9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_0fe0c9
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_0fe0c9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_0fe0c9
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/160c09.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/160c09.wgsl.expected.ir.msl
index 3bc3ef4..510cc67 100644
--- a/test/tint/builtins/gen/var/bitcast/160c09.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/160c09.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_160c09(tint_module_vars_struct tint_module_vars) {
+ uint4 res = uint4(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_160c09 = func():void {
- $B2: {
- %res:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_160c09(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_160c09
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_160c09(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_160c09
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_160c09(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_160c09
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/16cba4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/16cba4.wgsl.expected.ir.msl
index 73abc25..c9703c7 100644
--- a/test/tint/builtins/gen/var/bitcast/16cba4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/16cba4.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void bitcast_16cba4(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ int res = as_type<int>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_16cba4 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:i32 = bitcast %4
- %res:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_16cba4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_16cba4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_16cba4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_16cba4
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_16cba4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_16cba4
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/1c3b31.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/1c3b31.wgsl.expected.ir.msl
index 4e4b6f4..7808a2f 100644
--- a/test/tint/builtins/gen/var/bitcast/1c3b31.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/1c3b31.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_1c3b31(tint_module_vars_struct tint_module_vars) {
+ int2 arg_0 = int2(1);
+ uint2 res = as_type<uint2>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_1c3b31 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %arg_0
- %5:vec2<u32> = bitcast %4
- %res:ptr<function, vec2<u32>, read_write> = var, %5
- %7:vec2<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_1c3b31(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_1c3b31
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_1c3b31(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_1c3b31
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_1c3b31(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_1c3b31
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/1df11f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/1df11f.wgsl.expected.ir.msl
index a6ff8e1..765f193 100644
--- a/test/tint/builtins/gen/var/bitcast/1df11f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/1df11f.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void bitcast_1df11f(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 res = as_type<half2>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_1df11f = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = bitcast %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_1df11f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_1df11f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_1df11f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_1df11f
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_1df11f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_1df11f
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/214f23.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/214f23.wgsl.expected.ir.msl
index 3224687..3a824ae 100644
--- a/test/tint/builtins/gen/var/bitcast/214f23.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/214f23.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_214f23(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ int2 res = as_type<int2>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_214f23 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec2<i32> = bitcast %4
- %res:ptr<function, vec2<i32>, read_write> = var, %5
- %7:vec2<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_214f23(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_214f23
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_214f23(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_214f23
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_214f23(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_214f23
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/23c8bd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/23c8bd.wgsl.expected.ir.msl
index c224a52..d2e0d7c 100644
--- a/test/tint/builtins/gen/var/bitcast/23c8bd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/23c8bd.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void bitcast_23c8bd(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ float res = as_type<float>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_23c8bd = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %arg_0
- %5:f32 = bitcast %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_23c8bd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_23c8bd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_23c8bd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_23c8bd
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_23c8bd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_23c8bd
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/2421c8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/2421c8.wgsl.expected.ir.msl
index 0d5fc30..5f06eb7 100644
--- a/test/tint/builtins/gen/var/bitcast/2421c8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/2421c8.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_2421c8(tint_module_vars_struct tint_module_vars) {
+ uint2 arg_0 = uint2(1u);
+ float2 res = as_type<float2>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_2421c8 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %arg_0
- %5:vec2<f32> = bitcast %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_2421c8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_2421c8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_2421c8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_2421c8
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_2421c8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_2421c8
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/287bdf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/287bdf.wgsl.expected.ir.msl
index a0dd331..4299666 100644
--- a/test/tint/builtins/gen/var/bitcast/287bdf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/287bdf.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_287bdf(tint_module_vars_struct tint_module_vars) {
+ int3 arg_0 = int3(1);
+ uint3 res = as_type<uint3>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_287bdf = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %arg_0
- %5:vec3<u32> = bitcast %4
- %res:ptr<function, vec3<u32>, read_write> = var, %5
- %7:vec3<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_287bdf(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_287bdf
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_287bdf(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_287bdf
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_287bdf(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_287bdf
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/2a6e58.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/2a6e58.wgsl.expected.ir.msl
index e8b86d1..895de4e 100644
--- a/test/tint/builtins/gen/var/bitcast/2a6e58.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/2a6e58.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_2a6e58(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ float2 res = as_type<float2>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_2a6e58 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec2<f32> = bitcast %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_2a6e58(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_2a6e58
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_2a6e58(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_2a6e58
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_2a6e58(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_2a6e58
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/2b05b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/2b05b3.wgsl.expected.ir.msl
index f24eef3..6a12177 100644
--- a/test/tint/builtins/gen/var/bitcast/2b05b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/2b05b3.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_2b05b3(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = as_type<float3>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_2b05b3 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = bitcast %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_2b05b3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_2b05b3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_2b05b3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_2b05b3
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_2b05b3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_2b05b3
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/2b2738.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/2b2738.wgsl.expected.ir.msl
index 0355a57..fce582f 100644
--- a/test/tint/builtins/gen/var/bitcast/2b2738.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/2b2738.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_2b2738(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ uint2 res = as_type<uint2>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_2b2738 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<u32> = bitcast %4
- %res:ptr<function, vec2<u32>, read_write> = var, %5
- %7:vec2<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_2b2738(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_2b2738
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_2b2738(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_2b2738
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_2b2738(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_2b2738
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/31c080.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/31c080.wgsl.expected.ir.msl
index 36d608f..00730dc 100644
--- a/test/tint/builtins/gen/var/bitcast/31c080.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/31c080.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void bitcast_31c080(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ uint res = as_type<uint>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_31c080 = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %arg_0
- %5:u32 = bitcast %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_31c080(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_31c080
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_31c080(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_31c080
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_31c080(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_31c080
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/332f78.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/332f78.wgsl.expected.ir.msl
index 8deaf83..a7ef825 100644
--- a/test/tint/builtins/gen/var/bitcast/332f78.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/332f78.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_332f78(tint_module_vars_struct tint_module_vars) {
+ int3 arg_0 = int3(1);
+ float3 res = as_type<float3>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_332f78 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %arg_0
- %5:vec3<f32> = bitcast %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_332f78(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_332f78
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_332f78(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_332f78
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_332f78(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_332f78
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/3e7b47.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/3e7b47.wgsl.expected.ir.msl
index b7b950e..668b4c3 100644
--- a/test/tint/builtins/gen/var/bitcast/3e7b47.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/3e7b47.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void bitcast_3e7b47(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 res = as_type<half4>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_3e7b47 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = bitcast %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_3e7b47(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_3e7b47
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_3e7b47(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_3e7b47
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_3e7b47(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_3e7b47
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/3f7437.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/3f7437.wgsl.expected.ir.msl
index e0ae4c0..86c2adc 100644
--- a/test/tint/builtins/gen/var/bitcast/3f7437.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/3f7437.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_3f7437(tint_module_vars_struct tint_module_vars) {
+ int4 arg_0 = int4(1);
+ int4 res = as_type<int4>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_3f7437 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %arg_0
- %5:vec4<i32> = bitcast %4
- %res:ptr<function, vec4<i32>, read_write> = var, %5
- %7:vec4<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_3f7437(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_3f7437
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_3f7437(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_3f7437
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_3f7437(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_3f7437
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/3fdacd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/3fdacd.wgsl.expected.ir.msl
index 1bab90a..2bd0353 100644
--- a/test/tint/builtins/gen/var/bitcast/3fdacd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/3fdacd.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_3fdacd(tint_module_vars_struct tint_module_vars) {
+ int4 arg_0 = int4(1);
+ float4 res = as_type<float4>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_3fdacd = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %arg_0
- %5:vec4<f32> = bitcast %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_3fdacd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_3fdacd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_3fdacd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_3fdacd
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_3fdacd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_3fdacd
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/429d64.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/429d64.wgsl.expected.ir.msl
index 302376f..fd8ef1f 100644
--- a/test/tint/builtins/gen/var/bitcast/429d64.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/429d64.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void bitcast_429d64(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ half4 res = as_type<half4>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_429d64 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec4<f16> = bitcast %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_429d64(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_429d64
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_429d64(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_429d64
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_429d64(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_429d64
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/436211.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/436211.wgsl.expected.ir.msl
index 0b77eed..c76ecfb 100644
--- a/test/tint/builtins/gen/var/bitcast/436211.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/436211.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void bitcast_436211(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half res = as_type<half>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_436211 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %arg_0
- %5:f16 = bitcast %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_436211(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_436211
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_436211(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_436211
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_436211(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_436211
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/5081ed.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/5081ed.wgsl.expected.ir.msl
index 6fbca43..1257d4e 100644
--- a/test/tint/builtins/gen/var/bitcast/5081ed.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/5081ed.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void bitcast_5081ed(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 res = as_type<half3>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_5081ed = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = bitcast %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_5081ed(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_5081ed
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_5081ed(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_5081ed
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_5081ed(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_5081ed
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/56266e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/56266e.wgsl.expected.ir.msl
index 37d76ca..d98a430 100644
--- a/test/tint/builtins/gen/var/bitcast/56266e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/56266e.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_56266e(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ uint3 res = as_type<uint3>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_56266e = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<u32> = bitcast %4
- %res:ptr<function, vec3<u32>, read_write> = var, %5
- %7:vec3<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_56266e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_56266e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_56266e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_56266e
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_56266e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_56266e
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/66e93d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/66e93d.wgsl.expected.ir.msl
index b980939..c4d8c40 100644
--- a/test/tint/builtins/gen/var/bitcast/66e93d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/66e93d.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void bitcast_66e93d(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ half2 res = as_type<half2>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_66e93d = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %arg_0
- %5:vec2<f16> = bitcast %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_66e93d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_66e93d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_66e93d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_66e93d
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_66e93d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_66e93d
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/674557.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/674557.wgsl.expected.ir.msl
index 10c8c1c..4b5fd8f 100644
--- a/test/tint/builtins/gen/var/bitcast/674557.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/674557.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void bitcast_674557(tint_module_vars_struct tint_module_vars) {
+ int arg_0 = 1;
+ half2 res = as_type<half2>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_674557 = func():void {
- $B2: {
- %arg_0:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %arg_0
- %5:vec2<f16> = bitcast %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_674557(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_674557
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_674557(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_674557
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_674557(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_674557
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/6ac6f9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/6ac6f9.wgsl.expected.ir.msl
index 3903be1..010ef4d 100644
--- a/test/tint/builtins/gen/var/bitcast/6ac6f9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/6ac6f9.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void bitcast_6ac6f9(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ int res = as_type<int>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_6ac6f9 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %arg_0
- %5:i32 = bitcast %4
- %res:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_6ac6f9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_6ac6f9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_6ac6f9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_6ac6f9
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_6ac6f9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_6ac6f9
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/6de2bd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/6de2bd.wgsl.expected.ir.msl
index 75088ccd..e4f6a67 100644
--- a/test/tint/builtins/gen/var/bitcast/6de2bd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/6de2bd.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_6de2bd(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ int4 res = as_type<int4>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_6de2bd = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<i32> = bitcast %4
- %res:ptr<function, vec4<i32>, read_write> = var, %5
- %7:vec4<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_6de2bd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_6de2bd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_6de2bd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_6de2bd
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_6de2bd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_6de2bd
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/70b121.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/70b121.wgsl.expected.ir.msl
index 5a11cf6..2238a27 100644
--- a/test/tint/builtins/gen/var/bitcast/70b121.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/70b121.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_70b121(tint_module_vars_struct tint_module_vars) {
+ uint2 res = uint2(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_70b121 = func():void {
- $B2: {
- %res:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_70b121(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_70b121
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_70b121(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_70b121
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_70b121(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_70b121
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/71c92a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/71c92a.wgsl.expected.ir.msl
index 2f33f9d..f1099fa 100644
--- a/test/tint/builtins/gen/var/bitcast/71c92a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/71c92a.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void bitcast_71c92a(tint_module_vars_struct tint_module_vars) {
+ int2 arg_0 = int2(1);
+ half4 res = as_type<half4>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_71c92a = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %arg_0
- %5:vec4<f16> = bitcast %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_71c92a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_71c92a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_71c92a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_71c92a
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_71c92a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_71c92a
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/745b27.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/745b27.wgsl.expected.ir.msl
index 5de8567..bb56cbf 100644
--- a/test/tint/builtins/gen/var/bitcast/745b27.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/745b27.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_745b27(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = as_type<float4>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_745b27 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = bitcast %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_745b27(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_745b27
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_745b27(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_745b27
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_745b27(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_745b27
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/7e67cc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/7e67cc.wgsl.expected.ir.msl
index 7b41ec2..a61dc28 100644
--- a/test/tint/builtins/gen/var/bitcast/7e67cc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/7e67cc.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void bitcast_7e67cc(tint_module_vars_struct tint_module_vars) {
+ int arg_0 = 1;
+ int res = as_type<int>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_7e67cc = func():void {
- $B2: {
- %arg_0:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %arg_0
- %5:i32 = bitcast %4
- %res:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_7e67cc(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_7e67cc
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_7e67cc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_7e67cc
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_7e67cc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_7e67cc
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/7ffa9c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/7ffa9c.wgsl.expected.ir.msl
index 33d25ac..4d698c2 100644
--- a/test/tint/builtins/gen/var/bitcast/7ffa9c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/7ffa9c.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_7ffa9c(tint_module_vars_struct tint_module_vars) {
+ uint4 arg_0 = uint4(1u);
+ uint4 res = as_type<uint4>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_7ffa9c = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %arg_0
- %5:vec4<u32> = bitcast %4
- %res:ptr<function, vec4<u32>, read_write> = var, %5
- %7:vec4<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_7ffa9c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_7ffa9c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_7ffa9c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_7ffa9c
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_7ffa9c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_7ffa9c
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/81c5f5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/81c5f5.wgsl.expected.ir.msl
index beeb8f4..f5c5a82 100644
--- a/test/tint/builtins/gen/var/bitcast/81c5f5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/81c5f5.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_81c5f5(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ uint2 res = as_type<uint2>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_81c5f5 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec2<u32> = bitcast %4
- %res:ptr<function, vec2<u32>, read_write> = var, %5
- %7:vec2<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_81c5f5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_81c5f5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_81c5f5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_81c5f5
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_81c5f5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_81c5f5
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/8318a8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/8318a8.wgsl.expected.ir.msl
index 9481752..9be0e96 100644
--- a/test/tint/builtins/gen/var/bitcast/8318a8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/8318a8.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_8318a8(tint_module_vars_struct tint_module_vars) {
+ uint3 arg_0 = uint3(1u);
+ uint3 res = as_type<uint3>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_8318a8 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %arg_0
- %5:vec3<u32> = bitcast %4
- %res:ptr<function, vec3<u32>, read_write> = var, %5
- %7:vec3<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_8318a8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_8318a8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_8318a8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_8318a8
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_8318a8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_8318a8
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/879dc9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/879dc9.wgsl.expected.ir.msl
index 21f6360..4e4c885 100644
--- a/test/tint/builtins/gen/var/bitcast/879dc9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/879dc9.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void bitcast_879dc9(tint_module_vars_struct tint_module_vars) {
+ uint res = 1u;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_879dc9 = func():void {
- $B2: {
- %res:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_879dc9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_879dc9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_879dc9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_879dc9
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_879dc9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_879dc9
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/899e50.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/899e50.wgsl.expected.ir.msl
index 3d5901a..84c2063 100644
--- a/test/tint/builtins/gen/var/bitcast/899e50.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/899e50.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_899e50(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ int2 res = as_type<int2>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_899e50 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<i32> = bitcast %4
- %res:ptr<function, vec2<i32>, read_write> = var, %5
- %7:vec2<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_899e50(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_899e50
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_899e50(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_899e50
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_899e50(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_899e50
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/8d184c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/8d184c.wgsl.expected.ir.msl
index 0b8b043..bef0b27 100644
--- a/test/tint/builtins/gen/var/bitcast/8d184c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/8d184c.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_8d184c(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ uint4 res = as_type<uint4>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_8d184c = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<u32> = bitcast %4
- %res:ptr<function, vec4<u32>, read_write> = var, %5
- %7:vec4<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_8d184c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_8d184c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_8d184c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_8d184c
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_8d184c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_8d184c
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/9bcf71.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/9bcf71.wgsl.expected.ir.msl
index 9ddc8fe..9e51eee 100644
--- a/test/tint/builtins/gen/var/bitcast/9bcf71.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/9bcf71.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_9bcf71(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = as_type<float2>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_9bcf71 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = bitcast %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_9bcf71(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_9bcf71
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_9bcf71(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_9bcf71
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_9bcf71(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_9bcf71
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/9ca42c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/9ca42c.wgsl.expected.ir.msl
index 9f12f8d..075949c 100644
--- a/test/tint/builtins/gen/var/bitcast/9ca42c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/9ca42c.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void bitcast_9ca42c(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ half2 res = as_type<half2>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_9ca42c = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:vec2<f16> = bitcast %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_9ca42c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_9ca42c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_9ca42c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_9ca42c
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_9ca42c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_9ca42c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/9eee21.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/9eee21.wgsl.expected.ir.msl
index 0aed783..0a851df 100644
--- a/test/tint/builtins/gen/var/bitcast/9eee21.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/9eee21.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_9eee21(tint_module_vars_struct tint_module_vars) {
+ int3 arg_0 = int3(1);
+ int3 res = as_type<int3>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_9eee21 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %arg_0
- %5:vec3<i32> = bitcast %4
- %res:ptr<function, vec3<i32>, read_write> = var, %5
- %7:vec3<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_9eee21(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_9eee21
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_9eee21(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_9eee21
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_9eee21(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_9eee21
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/a4b290.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/a4b290.wgsl.expected.ir.msl
index de13cfd..c72fb10 100644
--- a/test/tint/builtins/gen/var/bitcast/a4b290.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/a4b290.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_a4b290(tint_module_vars_struct tint_module_vars) {
+ uint4 arg_0 = uint4(1u);
+ float4 res = as_type<float4>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_a4b290 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %arg_0
- %5:vec4<f32> = bitcast %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_a4b290(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_a4b290
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a4b290(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_a4b290
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a4b290(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_a4b290
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/a58b50.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/a58b50.wgsl.expected.ir.msl
index ba225e9..4474cbb 100644
--- a/test/tint/builtins/gen/var/bitcast/a58b50.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/a58b50.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void bitcast_a58b50(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ uint res = as_type<uint>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_a58b50 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %arg_0
- %5:u32 = bitcast %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_a58b50(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_a58b50
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a58b50(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_a58b50
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a58b50(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_a58b50
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/a5c539.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/a5c539.wgsl.expected.ir.msl
index 5132cd1..cb2084e 100644
--- a/test/tint/builtins/gen/var/bitcast/a5c539.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/a5c539.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_a5c539(tint_module_vars_struct tint_module_vars) {
+ uint4 arg_0 = uint4(1u);
+ int4 res = as_type<int4>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_a5c539 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %arg_0
- %5:vec4<i32> = bitcast %4
- %res:ptr<function, vec4<i32>, read_write> = var, %5
- %7:vec4<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_a5c539(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_a5c539
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a5c539(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_a5c539
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a5c539(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_a5c539
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/a8c93f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/a8c93f.wgsl.expected.ir.msl
index 147242f..5b8c010 100644
--- a/test/tint/builtins/gen/var/bitcast/a8c93f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/a8c93f.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_a8c93f(tint_module_vars_struct tint_module_vars) {
+ int4 arg_0 = int4(1);
+ uint4 res = as_type<uint4>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_a8c93f = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %arg_0
- %5:vec4<u32> = bitcast %4
- %res:ptr<function, vec4<u32>, read_write> = var, %5
- %7:vec4<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_a8c93f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_a8c93f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a8c93f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_a8c93f
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a8c93f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_a8c93f
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/a8ea1b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/a8ea1b.wgsl.expected.ir.msl
index e30d2fa..25aaa96 100644
--- a/test/tint/builtins/gen/var/bitcast/a8ea1b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/a8ea1b.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_a8ea1b(tint_module_vars_struct tint_module_vars) {
+ uint3 arg_0 = uint3(1u);
+ int3 res = as_type<int3>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_a8ea1b = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %arg_0
- %5:vec3<i32> = bitcast %4
- %res:ptr<function, vec3<i32>, read_write> = var, %5
- %7:vec3<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_a8ea1b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_a8ea1b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a8ea1b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_a8ea1b
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_a8ea1b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_a8ea1b
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/ac09d0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/ac09d0.wgsl.expected.ir.msl
index fd5bbda..6079aee 100644
--- a/test/tint/builtins/gen/var/bitcast/ac09d0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/ac09d0.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void bitcast_ac09d0(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = as_type<float>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_ac09d0 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = bitcast %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_ac09d0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_ac09d0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_ac09d0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_ac09d0
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_ac09d0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_ac09d0
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/ad4b05.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/ad4b05.wgsl.expected.ir.msl
index d5df97e..e833d4a 100644
--- a/test/tint/builtins/gen/var/bitcast/ad4b05.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/ad4b05.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void bitcast_ad4b05(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ float res = as_type<float>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_ad4b05 = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %arg_0
- %5:f32 = bitcast %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_ad4b05(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_ad4b05
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_ad4b05(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_ad4b05
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_ad4b05(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_ad4b05
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/b28cbd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/b28cbd.wgsl.expected.ir.msl
index 535ebc1..4d5eb40 100644
--- a/test/tint/builtins/gen/var/bitcast/b28cbd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/b28cbd.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_b28cbd(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ int3 res = as_type<int3>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_b28cbd = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<i32> = bitcast %4
- %res:ptr<function, vec3<i32>, read_write> = var, %5
- %7:vec3<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_b28cbd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_b28cbd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_b28cbd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_b28cbd
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_b28cbd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_b28cbd
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/b77573.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/b77573.wgsl.expected.ir.msl
index 59c56c4..a11349a 100644
--- a/test/tint/builtins/gen/var/bitcast/b77573.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/b77573.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void bitcast_b77573(tint_module_vars_struct tint_module_vars) {
+ int2 arg_0 = int2(1);
+ float2 res = as_type<float2>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_b77573 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %arg_0
- %5:vec2<f32> = bitcast %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_b77573(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_b77573
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_b77573(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_b77573
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_b77573(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_b77573
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/bc3994.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/bc3994.wgsl.expected.ir.msl
index ddaaea8..3269c59 100644
--- a/test/tint/builtins/gen/var/bitcast/bc3994.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/bc3994.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void bitcast_bc3994(tint_module_vars_struct tint_module_vars) {
+ uint2 arg_0 = uint2(1u);
+ half4 res = as_type<half4>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_bc3994 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %arg_0
- %5:vec4<f16> = bitcast %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_bc3994(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_bc3994
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_bc3994(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_bc3994
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_bc3994(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_bc3994
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/c69aaf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/c69aaf.wgsl.expected.ir.msl
index 4c420af..15fb146 100644
--- a/test/tint/builtins/gen/var/bitcast/c69aaf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/c69aaf.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_c69aaf(tint_module_vars_struct tint_module_vars) {
+ uint2 arg_0 = uint2(1u);
+ int2 res = as_type<int2>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_c69aaf = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %arg_0
- %5:vec2<i32> = bitcast %4
- %res:ptr<function, vec2<i32>, read_write> = var, %5
- %7:vec2<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_c69aaf(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_c69aaf
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_c69aaf(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_c69aaf
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_c69aaf(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_c69aaf
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/ca5c3f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/ca5c3f.wgsl.expected.ir.msl
index fcff441..9ed9709 100644
--- a/test/tint/builtins/gen/var/bitcast/ca5c3f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/ca5c3f.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void bitcast_ca5c3f(tint_module_vars_struct tint_module_vars) {
+ int arg_0 = 1;
+ float res = as_type<float>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_ca5c3f = func():void {
- $B2: {
- %arg_0:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %arg_0
- %5:f32 = bitcast %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_ca5c3f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_ca5c3f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_ca5c3f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_ca5c3f
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_ca5c3f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_ca5c3f
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/cc7aa7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/cc7aa7.wgsl.expected.ir.msl
index befcd85..30602b5 100644
--- a/test/tint/builtins/gen/var/bitcast/cc7aa7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/cc7aa7.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void bitcast_cc7aa7(tint_module_vars_struct tint_module_vars) {
+ int2 arg_0 = int2(1);
+ int2 res = as_type<int2>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_cc7aa7 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %arg_0
- %5:vec2<i32> = bitcast %4
- %res:ptr<function, vec2<i32>, read_write> = var, %5
- %7:vec2<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_cc7aa7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_cc7aa7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_cc7aa7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_cc7aa7
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_cc7aa7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_cc7aa7
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/d29765.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/d29765.wgsl.expected.ir.msl
index 9130589..f55f430 100644
--- a/test/tint/builtins/gen/var/bitcast/d29765.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/d29765.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_d29765(tint_module_vars_struct tint_module_vars) {
+ uint2 arg_0 = uint2(1u);
+ uint2 res = as_type<uint2>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_d29765 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %arg_0
- %5:vec2<u32> = bitcast %4
- %res:ptr<function, vec2<u32>, read_write> = var, %5
- %7:vec2<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_d29765(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_d29765
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_d29765(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_d29765
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_d29765(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_d29765
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/dce842.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/dce842.wgsl.expected.ir.msl
index df8dd02..95d5472 100644
--- a/test/tint/builtins/gen/var/bitcast/dce842.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/dce842.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void bitcast_dce842(tint_module_vars_struct tint_module_vars) {
+ int arg_0 = 1;
+ uint res = as_type<uint>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_dce842 = func():void {
- $B2: {
- %arg_0:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %arg_0
- %5:u32 = bitcast %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_dce842(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_dce842
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_dce842(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_dce842
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_dce842(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_dce842
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/e61c57.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/e61c57.wgsl.expected.ir.msl
index 0aef928..a2543f2 100644
--- a/test/tint/builtins/gen/var/bitcast/e61c57.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/e61c57.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void bitcast_e61c57(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ int res = as_type<int>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_e61c57 = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %arg_0
- %5:i32 = bitcast %4
- %res:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_e61c57(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_e61c57
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_e61c57(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_e61c57
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_e61c57(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_e61c57
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/e6c18f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/e6c18f.wgsl.expected.ir.msl
index 26286a0..4ac975d 100644
--- a/test/tint/builtins/gen/var/bitcast/e6c18f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/e6c18f.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void bitcast_e6c18f(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ uint res = as_type<uint>(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_e6c18f = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:u32 = bitcast %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_e6c18f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %bitcast_e6c18f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_e6c18f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %bitcast_e6c18f
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_e6c18f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %bitcast_e6c18f
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/bitcast/f756cd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/bitcast/f756cd.wgsl.expected.ir.msl
index be39e07..5960258 100644
--- a/test/tint/builtins/gen/var/bitcast/f756cd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/bitcast/f756cd.wgsl.expected.ir.msl
@@ -1,40 +1,29 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void bitcast_f756cd(tint_module_vars_struct tint_module_vars) {
+ uint3 res = uint3(1u);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%bitcast_f756cd = func():void {
- $B2: {
- %res:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %res
- store %prevent_dce, %4
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ bitcast_f756cd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %6:void = call %bitcast_f756cd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_f756cd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %8:void = call %bitcast_f756cd
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ bitcast_f756cd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %10:void = call %bitcast_f756cd
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.ir.msl
index cbaf635..168836f 100644
--- a/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void ceil_09bf52(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.5h);
+ half3 res = ceil(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ceil_09bf52 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.5h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = ceil %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ceil_09bf52(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %ceil_09bf52
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_09bf52(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %ceil_09bf52
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_09bf52(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %ceil_09bf52
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.ir.msl
index 31069bf..adffb65 100644
--- a/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void ceil_18c240(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.5h);
+ half2 res = ceil(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ceil_18c240 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.5h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = ceil %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ceil_18c240(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %ceil_18c240
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_18c240(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %ceil_18c240
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_18c240(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %ceil_18c240
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.ir.msl
index 2752308..0c645dd 100644
--- a/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void ceil_34064b(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.5f);
+ float3 res = ceil(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ceil_34064b = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.5f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = ceil %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ceil_34064b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %ceil_34064b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_34064b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %ceil_34064b
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_34064b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %ceil_34064b
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.ir.msl
index 76b4825..b5d3a63 100644
--- a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void ceil_4bca2a(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.5h);
+ half4 res = ceil(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ceil_4bca2a = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.5h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = ceil %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ceil_4bca2a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %ceil_4bca2a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_4bca2a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %ceil_4bca2a
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_4bca2a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %ceil_4bca2a
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ceil/678655.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ceil/678655.wgsl.expected.ir.msl
index 7f3c625..cfee9f1 100644
--- a/test/tint/builtins/gen/var/ceil/678655.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ceil/678655.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void ceil_678655(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.5f;
+ float res = ceil(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ceil_678655 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.5f
- %4:f32 = load %arg_0
- %5:f32 = ceil %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ceil_678655(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %ceil_678655
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_678655(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %ceil_678655
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_678655(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %ceil_678655
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.ir.msl
index de82b9f..161a499 100644
--- a/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void ceil_96f597(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.5f);
+ float2 res = ceil(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ceil_96f597 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.5f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = ceil %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ceil_96f597(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %ceil_96f597
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_96f597(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %ceil_96f597
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_96f597(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %ceil_96f597
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.ir.msl
index b0ca642..0bfe173 100644
--- a/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void ceil_b74c16(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.5f);
+ float4 res = ceil(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ceil_b74c16 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.5f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = ceil %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ceil_b74c16(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %ceil_b74c16
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_b74c16(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %ceil_b74c16
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_b74c16(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %ceil_b74c16
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.ir.msl
index c4060ff..76d1eaf 100644
--- a/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void ceil_f3f889(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.5h;
+ half res = ceil(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ceil_f3f889 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.5h
- %4:f16 = load %arg_0
- %5:f16 = ceil %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ceil_f3f889(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %ceil_f3f889
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_f3f889(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %ceil_f3f889
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ceil_f3f889(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %ceil_f3f889
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.ir.msl
index 4b952a9..2008a6b 100644
--- a/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void clamp_0acf8f(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 arg_1 = float2(1.0f);
+ float2 arg_2 = float2(1.0f);
+ float2 res = clamp(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_0acf8f = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_1:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_2:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %6:vec2<f32> = load %arg_0
- %7:vec2<f32> = load %arg_1
- %8:vec2<f32> = load %arg_2
- %9:vec2<f32> = clamp %6, %7, %8
- %res:ptr<function, vec2<f32>, read_write> = var, %9
- %11:vec2<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_0acf8f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %clamp_0acf8f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_0acf8f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %clamp_0acf8f
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_0acf8f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %clamp_0acf8f
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.ir.msl
index c0557d7..fb799f3 100644
--- a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.ir.msl
@@ -1,49 +1,33 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void clamp_1a32e3(tint_module_vars_struct tint_module_vars) {
+ int4 arg_0 = int4(1);
+ int4 arg_1 = int4(1);
+ int4 arg_2 = int4(1);
+ int4 const v = arg_2;
+ int4 res = min(max(arg_0, arg_1), v);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_1a32e3 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %arg_1:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %arg_2:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %6:vec4<i32> = load %arg_0
- %7:vec4<i32> = load %arg_1
- %8:vec4<i32> = load %arg_2
- %9:vec4<i32> = let %8
- %10:vec4<i32> = max %6, %7
- %11:vec4<i32> = min %10, %9
- %res:ptr<function, vec4<i32>, read_write> = var, %11
- %13:vec4<i32> = load %res
- store %prevent_dce, %13
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_1a32e3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %15:void = call %clamp_1a32e3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_1a32e3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %17:void = call %clamp_1a32e3
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_1a32e3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %19:void = call %clamp_1a32e3
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.ir.msl
index 8379ec8..8d9ca46 100644
--- a/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void clamp_235b29(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 arg_1 = half2(1.0h);
+ half2 arg_2 = half2(1.0h);
+ half2 res = clamp(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_235b29 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_1:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_2:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %6:vec2<f16> = load %arg_0
- %7:vec2<f16> = load %arg_1
- %8:vec2<f16> = load %arg_2
- %9:vec2<f16> = clamp %6, %7, %8
- %res:ptr<function, vec2<f16>, read_write> = var, %9
- %11:vec2<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_235b29(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %clamp_235b29
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_235b29(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %clamp_235b29
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_235b29(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %clamp_235b29
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/clamp/2bd567.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/2bd567.wgsl.expected.ir.msl
index a567d0d..856c38a 100644
--- a/test/tint/builtins/gen/var/clamp/2bd567.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/2bd567.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void clamp_2bd567(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float arg_1 = 1.0f;
+ float arg_2 = 1.0f;
+ float res = clamp(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_2bd567 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %arg_1:ptr<function, f32, read_write> = var, 1.0f
- %arg_2:ptr<function, f32, read_write> = var, 1.0f
- %6:f32 = load %arg_0
- %7:f32 = load %arg_1
- %8:f32 = load %arg_2
- %9:f32 = clamp %6, %7, %8
- %res:ptr<function, f32, read_write> = var, %9
- %11:f32 = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_2bd567(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %clamp_2bd567
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_2bd567(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %clamp_2bd567
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_2bd567(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %clamp_2bd567
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.ir.msl
index bbb1e4a..4dca351 100644
--- a/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void clamp_2bde41(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 arg_1 = float4(1.0f);
+ float4 arg_2 = float4(1.0f);
+ float4 res = clamp(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_2bde41 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_1:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_2:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %6:vec4<f32> = load %arg_0
- %7:vec4<f32> = load %arg_1
- %8:vec4<f32> = load %arg_2
- %9:vec4<f32> = clamp %6, %7, %8
- %res:ptr<function, vec4<f32>, read_write> = var, %9
- %11:vec4<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_2bde41(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %clamp_2bde41
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_2bde41(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %clamp_2bde41
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_2bde41(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %clamp_2bde41
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.ir.msl
index 3da7fdf..bd4619e 100644
--- a/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void clamp_2c251b(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 arg_1 = half4(1.0h);
+ half4 arg_2 = half4(1.0h);
+ half4 res = clamp(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_2c251b = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_1:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_2:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %6:vec4<f16> = load %arg_0
- %7:vec4<f16> = load %arg_1
- %8:vec4<f16> = load %arg_2
- %9:vec4<f16> = clamp %6, %7, %8
- %res:ptr<function, vec4<f16>, read_write> = var, %9
- %11:vec4<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_2c251b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %clamp_2c251b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_2c251b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %clamp_2c251b
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_2c251b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %clamp_2c251b
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.ir.msl
index 787fa10..90db0ff 100644
--- a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.ir.msl
@@ -1,49 +1,33 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void clamp_548fc7(tint_module_vars_struct tint_module_vars) {
+ uint3 arg_0 = uint3(1u);
+ uint3 arg_1 = uint3(1u);
+ uint3 arg_2 = uint3(1u);
+ uint3 const v = arg_2;
+ uint3 res = min(max(arg_0, arg_1), v);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_548fc7 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %arg_1:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %arg_2:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %6:vec3<u32> = load %arg_0
- %7:vec3<u32> = load %arg_1
- %8:vec3<u32> = load %arg_2
- %9:vec3<u32> = let %8
- %10:vec3<u32> = max %6, %7
- %11:vec3<u32> = min %10, %9
- %res:ptr<function, vec3<u32>, read_write> = var, %11
- %13:vec3<u32> = load %res
- store %prevent_dce, %13
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_548fc7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %15:void = call %clamp_548fc7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_548fc7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %17:void = call %clamp_548fc7
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_548fc7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %19:void = call %clamp_548fc7
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.ir.msl
index 8ef14fd..3aaa0e7 100644
--- a/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void clamp_553ffb(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half arg_1 = 1.0h;
+ half arg_2 = 1.0h;
+ half res = clamp(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_553ffb = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %arg_1:ptr<function, f16, read_write> = var, 1.0h
- %arg_2:ptr<function, f16, read_write> = var, 1.0h
- %6:f16 = load %arg_0
- %7:f16 = load %arg_1
- %8:f16 = load %arg_2
- %9:f16 = clamp %6, %7, %8
- %res:ptr<function, f16, read_write> = var, %9
- %11:f16 = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_553ffb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %clamp_553ffb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_553ffb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %clamp_553ffb
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_553ffb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %clamp_553ffb
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.ir.msl
index 1f183f9..dc62ecb 100644
--- a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.ir.msl
@@ -1,49 +1,33 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void clamp_5f0819(tint_module_vars_struct tint_module_vars) {
+ int3 arg_0 = int3(1);
+ int3 arg_1 = int3(1);
+ int3 arg_2 = int3(1);
+ int3 const v = arg_2;
+ int3 res = min(max(arg_0, arg_1), v);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_5f0819 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %arg_1:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %arg_2:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %6:vec3<i32> = load %arg_0
- %7:vec3<i32> = load %arg_1
- %8:vec3<i32> = load %arg_2
- %9:vec3<i32> = let %8
- %10:vec3<i32> = max %6, %7
- %11:vec3<i32> = min %10, %9
- %res:ptr<function, vec3<i32>, read_write> = var, %11
- %13:vec3<i32> = load %res
- store %prevent_dce, %13
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_5f0819(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %15:void = call %clamp_5f0819
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_5f0819(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %17:void = call %clamp_5f0819
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_5f0819(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %19:void = call %clamp_5f0819
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.ir.msl
index d599483..8ac34d7 100644
--- a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.ir.msl
@@ -1,49 +1,33 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void clamp_6c1749(tint_module_vars_struct tint_module_vars) {
+ int2 arg_0 = int2(1);
+ int2 arg_1 = int2(1);
+ int2 arg_2 = int2(1);
+ int2 const v = arg_2;
+ int2 res = min(max(arg_0, arg_1), v);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_6c1749 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %arg_1:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %arg_2:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %6:vec2<i32> = load %arg_0
- %7:vec2<i32> = load %arg_1
- %8:vec2<i32> = load %arg_2
- %9:vec2<i32> = let %8
- %10:vec2<i32> = max %6, %7
- %11:vec2<i32> = min %10, %9
- %res:ptr<function, vec2<i32>, read_write> = var, %11
- %13:vec2<i32> = load %res
- store %prevent_dce, %13
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_6c1749(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %15:void = call %clamp_6c1749
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_6c1749(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %17:void = call %clamp_6c1749
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_6c1749(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %19:void = call %clamp_6c1749
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.ir.msl
index e126b0a..71c9c7b 100644
--- a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.ir.msl
@@ -1,49 +1,33 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void clamp_7706d7(tint_module_vars_struct tint_module_vars) {
+ uint2 arg_0 = uint2(1u);
+ uint2 arg_1 = uint2(1u);
+ uint2 arg_2 = uint2(1u);
+ uint2 const v = arg_2;
+ uint2 res = min(max(arg_0, arg_1), v);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_7706d7 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %arg_1:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %arg_2:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %6:vec2<u32> = load %arg_0
- %7:vec2<u32> = load %arg_1
- %8:vec2<u32> = load %arg_2
- %9:vec2<u32> = let %8
- %10:vec2<u32> = max %6, %7
- %11:vec2<u32> = min %10, %9
- %res:ptr<function, vec2<u32>, read_write> = var, %11
- %13:vec2<u32> = load %res
- store %prevent_dce, %13
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_7706d7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %15:void = call %clamp_7706d7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_7706d7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %17:void = call %clamp_7706d7
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_7706d7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %19:void = call %clamp_7706d7
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.ir.msl
index 68a7d40..dbc85e5 100644
--- a/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void clamp_867397(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 arg_1 = float3(1.0f);
+ float3 arg_2 = float3(1.0f);
+ float3 res = clamp(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_867397 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_1:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_2:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %6:vec3<f32> = load %arg_0
- %7:vec3<f32> = load %arg_1
- %8:vec3<f32> = load %arg_2
- %9:vec3<f32> = clamp %6, %7, %8
- %res:ptr<function, vec3<f32>, read_write> = var, %9
- %11:vec3<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_867397(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %clamp_867397
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_867397(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %clamp_867397
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_867397(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %clamp_867397
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.ir.msl
index cc2bedb..eea915b 100644
--- a/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.ir.msl
@@ -1,49 +1,33 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void clamp_a2de25(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ uint const v = arg_2;
+ uint res = min(max(arg_0, arg_1), v);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_a2de25 = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %6:u32 = load %arg_0
- %7:u32 = load %arg_1
- %8:u32 = load %arg_2
- %9:u32 = let %8
- %10:u32 = max %6, %7
- %11:u32 = min %10, %9
- %res:ptr<function, u32, read_write> = var, %11
- %13:u32 = load %res
- store %prevent_dce, %13
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_a2de25(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %15:void = call %clamp_a2de25
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_a2de25(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %17:void = call %clamp_a2de25
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_a2de25(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %19:void = call %clamp_a2de25
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.ir.msl
index b2d9963..4142d54 100644
--- a/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.ir.msl
@@ -1,49 +1,33 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void clamp_b07c65(tint_module_vars_struct tint_module_vars) {
+ int arg_0 = 1;
+ int arg_1 = 1;
+ int arg_2 = 1;
+ int const v = arg_2;
+ int res = min(max(arg_0, arg_1), v);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_b07c65 = func():void {
- $B2: {
- %arg_0:ptr<function, i32, read_write> = var, 1i
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %arg_2:ptr<function, i32, read_write> = var, 1i
- %6:i32 = load %arg_0
- %7:i32 = load %arg_1
- %8:i32 = load %arg_2
- %9:i32 = let %8
- %10:i32 = max %6, %7
- %11:i32 = min %10, %9
- %res:ptr<function, i32, read_write> = var, %11
- %13:i32 = load %res
- store %prevent_dce, %13
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_b07c65(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %15:void = call %clamp_b07c65
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_b07c65(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %17:void = call %clamp_b07c65
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_b07c65(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %19:void = call %clamp_b07c65
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.ir.msl
index 2a2c14b..8319bc8 100644
--- a/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void clamp_b195eb(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 arg_1 = half3(1.0h);
+ half3 arg_2 = half3(1.0h);
+ half3 res = clamp(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_b195eb = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_1:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_2:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %6:vec3<f16> = load %arg_0
- %7:vec3<f16> = load %arg_1
- %8:vec3<f16> = load %arg_2
- %9:vec3<f16> = clamp %6, %7, %8
- %res:ptr<function, vec3<f16>, read_write> = var, %9
- %11:vec3<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_b195eb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %clamp_b195eb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_b195eb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %clamp_b195eb
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_b195eb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %clamp_b195eb
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.ir.msl
index 2036f4e..cd6795b 100644
--- a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.ir.msl
@@ -1,49 +1,33 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void clamp_bd43ce(tint_module_vars_struct tint_module_vars) {
+ uint4 arg_0 = uint4(1u);
+ uint4 arg_1 = uint4(1u);
+ uint4 arg_2 = uint4(1u);
+ uint4 const v = arg_2;
+ uint4 res = min(max(arg_0, arg_1), v);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%clamp_bd43ce = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %arg_1:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %arg_2:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %6:vec4<u32> = load %arg_0
- %7:vec4<u32> = load %arg_1
- %8:vec4<u32> = load %arg_2
- %9:vec4<u32> = let %8
- %10:vec4<u32> = max %6, %7
- %11:vec4<u32> = min %10, %9
- %res:ptr<function, vec4<u32>, read_write> = var, %11
- %13:vec4<u32> = load %res
- store %prevent_dce, %13
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ clamp_bd43ce(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %15:void = call %clamp_bd43ce
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_bd43ce(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %17:void = call %clamp_bd43ce
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ clamp_bd43ce(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %19:void = call %clamp_bd43ce
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.ir.msl
index 8b8ef827..f09f8c3 100644
--- a/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void cos_0835a8(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(0.0h);
+ half3 res = cos(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cos_0835a8 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.0h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = cos %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cos_0835a8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %cos_0835a8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_0835a8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %cos_0835a8
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_0835a8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %cos_0835a8
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.ir.msl
index f1a498a..b60d3a9 100644
--- a/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void cos_0a89f7(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(0.0h);
+ half4 res = cos(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cos_0a89f7 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = cos %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cos_0a89f7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %cos_0a89f7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_0a89f7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %cos_0a89f7
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_0a89f7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %cos_0a89f7
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.ir.msl
index c989ffb..a966d2b 100644
--- a/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void cos_16dc15(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(0.0f);
+ float3 res = cos(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cos_16dc15 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = cos %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cos_16dc15(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %cos_16dc15
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_16dc15(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %cos_16dc15
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_16dc15(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %cos_16dc15
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.ir.msl
index 1f90d5b..5354747 100644
--- a/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void cos_29d66d(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(0.0f);
+ float4 res = cos(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cos_29d66d = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = cos %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cos_29d66d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %cos_29d66d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_29d66d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %cos_29d66d
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_29d66d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %cos_29d66d
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.ir.msl
index ebc0227..01bbf56 100644
--- a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void cos_5bc2c6(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(0.0h);
+ half2 res = cos(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cos_5bc2c6 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.0h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = cos %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cos_5bc2c6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %cos_5bc2c6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_5bc2c6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %cos_5bc2c6
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_5bc2c6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %cos_5bc2c6
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.ir.msl
index f111de7..e729f91 100644
--- a/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void cos_c3b486(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(0.0f);
+ float2 res = cos(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cos_c3b486 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = cos %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cos_c3b486(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %cos_c3b486
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_c3b486(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %cos_c3b486
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_c3b486(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %cos_c3b486
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/cos/c5c28e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/cos/c5c28e.wgsl.expected.ir.msl
index 3e56c13..8e63392 100644
--- a/test/tint/builtins/gen/var/cos/c5c28e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/cos/c5c28e.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void cos_c5c28e(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 0.0f;
+ float res = cos(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cos_c5c28e = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 0.0f
- %4:f32 = load %arg_0
- %5:f32 = cos %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cos_c5c28e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %cos_c5c28e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_c5c28e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %cos_c5c28e
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_c5c28e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %cos_c5c28e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.ir.msl
index 3820c7f..00c1d97 100644
--- a/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void cos_fc047d(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 0.0h;
+ half res = cos(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cos_fc047d = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 0.0h
- %4:f16 = load %arg_0
- %5:f16 = cos %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cos_fc047d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %cos_fc047d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_fc047d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %cos_fc047d
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cos_fc047d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %cos_fc047d
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.ir.msl
index 462884c..691e579 100644
--- a/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void cosh_2ed778(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 0.0h;
+ half res = cosh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cosh_2ed778 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 0.0h
- %4:f16 = load %arg_0
- %5:f16 = cosh %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cosh_2ed778(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %cosh_2ed778
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_2ed778(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %cosh_2ed778
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_2ed778(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %cosh_2ed778
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.ir.msl
index 5db6769..47f4d73e 100644
--- a/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void cosh_377652(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(0.0f);
+ float3 res = cosh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cosh_377652 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = cosh %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cosh_377652(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %cosh_377652
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_377652(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %cosh_377652
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_377652(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %cosh_377652
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.ir.msl
index 256b96a..12cead3 100644
--- a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void cosh_3b7bbf(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(0.0h);
+ half4 res = cosh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cosh_3b7bbf = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(0.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = cosh %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cosh_3b7bbf(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %cosh_3b7bbf
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_3b7bbf(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %cosh_3b7bbf
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_3b7bbf(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %cosh_3b7bbf
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.ir.msl
index 2919630..46497a4 100644
--- a/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void cosh_43b672(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(0.0h);
+ half2 res = cosh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cosh_43b672 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(0.0h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = cosh %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cosh_43b672(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %cosh_43b672
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_43b672(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %cosh_43b672
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_43b672(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %cosh_43b672
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.ir.msl
index aaedb1e..a216d45 100644
--- a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void cosh_b1b8a0(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(0.0h);
+ half3 res = cosh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cosh_b1b8a0 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(0.0h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = cosh %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cosh_b1b8a0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %cosh_b1b8a0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_b1b8a0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %cosh_b1b8a0
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_b1b8a0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %cosh_b1b8a0
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.ir.msl
index 08f15c7..ae934ed 100644
--- a/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void cosh_c13756(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(0.0f);
+ float2 res = cosh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cosh_c13756 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(0.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = cosh %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cosh_c13756(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %cosh_c13756
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_c13756(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %cosh_c13756
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_c13756(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %cosh_c13756
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/cosh/da92dd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/cosh/da92dd.wgsl.expected.ir.msl
index fbc323c..55dd3c0 100644
--- a/test/tint/builtins/gen/var/cosh/da92dd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/cosh/da92dd.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void cosh_da92dd(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 0.0f;
+ float res = cosh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cosh_da92dd = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 0.0f
- %4:f32 = load %arg_0
- %5:f32 = cosh %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cosh_da92dd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %cosh_da92dd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_da92dd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %cosh_da92dd
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_da92dd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %cosh_da92dd
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.ir.msl
index 8fe2e12..36e218b 100644
--- a/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void cosh_e0c1de(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(0.0f);
+ float4 res = cosh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cosh_e0c1de = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(0.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = cosh %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cosh_e0c1de(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %cosh_e0c1de
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_e0c1de(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %cosh_e0c1de
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cosh_e0c1de(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %cosh_e0c1de
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countLeadingZeros/208d46.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countLeadingZeros/208d46.wgsl.expected.ir.msl
index f78c43d..0979df0 100644
--- a/test/tint/builtins/gen/var/countLeadingZeros/208d46.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countLeadingZeros/208d46.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void countLeadingZeros_208d46(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ uint res = clz(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countLeadingZeros_208d46 = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %arg_0
- %5:u32 = countLeadingZeros %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countLeadingZeros_208d46(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countLeadingZeros_208d46
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_208d46(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countLeadingZeros_208d46
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_208d46(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countLeadingZeros_208d46
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countLeadingZeros/6d4656.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countLeadingZeros/6d4656.wgsl.expected.ir.msl
index 20e2bb9..a25453c 100644
--- a/test/tint/builtins/gen/var/countLeadingZeros/6d4656.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countLeadingZeros/6d4656.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void countLeadingZeros_6d4656(tint_module_vars_struct tint_module_vars) {
+ int arg_0 = 1;
+ int res = clz(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countLeadingZeros_6d4656 = func():void {
- $B2: {
- %arg_0:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %arg_0
- %5:i32 = countLeadingZeros %4
- %res:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countLeadingZeros_6d4656(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countLeadingZeros_6d4656
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_6d4656(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countLeadingZeros_6d4656
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_6d4656(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countLeadingZeros_6d4656
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.ir.msl
index 6779730..f86ae0f 100644
--- a/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void countLeadingZeros_70783f(tint_module_vars_struct tint_module_vars) {
+ uint2 arg_0 = uint2(1u);
+ uint2 res = clz(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countLeadingZeros_70783f = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %arg_0
- %5:vec2<u32> = countLeadingZeros %4
- %res:ptr<function, vec2<u32>, read_write> = var, %5
- %7:vec2<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countLeadingZeros_70783f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countLeadingZeros_70783f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_70783f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countLeadingZeros_70783f
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_70783f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countLeadingZeros_70783f
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.ir.msl
index d553603..686e6e4 100644
--- a/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void countLeadingZeros_7c38a6(tint_module_vars_struct tint_module_vars) {
+ int3 arg_0 = int3(1);
+ int3 res = clz(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countLeadingZeros_7c38a6 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %arg_0
- %5:vec3<i32> = countLeadingZeros %4
- %res:ptr<function, vec3<i32>, read_write> = var, %5
- %7:vec3<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countLeadingZeros_7c38a6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countLeadingZeros_7c38a6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_7c38a6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countLeadingZeros_7c38a6
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_7c38a6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countLeadingZeros_7c38a6
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.ir.msl
index 7a43878..05fd489 100644
--- a/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void countLeadingZeros_858d40(tint_module_vars_struct tint_module_vars) {
+ int2 arg_0 = int2(1);
+ int2 res = clz(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countLeadingZeros_858d40 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %arg_0
- %5:vec2<i32> = countLeadingZeros %4
- %res:ptr<function, vec2<i32>, read_write> = var, %5
- %7:vec2<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countLeadingZeros_858d40(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countLeadingZeros_858d40
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_858d40(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countLeadingZeros_858d40
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_858d40(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countLeadingZeros_858d40
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.ir.msl
index f05b12a..cd6d5a3 100644
--- a/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void countLeadingZeros_ab6345(tint_module_vars_struct tint_module_vars) {
+ uint3 arg_0 = uint3(1u);
+ uint3 res = clz(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countLeadingZeros_ab6345 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %arg_0
- %5:vec3<u32> = countLeadingZeros %4
- %res:ptr<function, vec3<u32>, read_write> = var, %5
- %7:vec3<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countLeadingZeros_ab6345(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countLeadingZeros_ab6345
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_ab6345(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countLeadingZeros_ab6345
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_ab6345(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countLeadingZeros_ab6345
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.ir.msl
index 34db708..7ed091b 100644
--- a/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void countLeadingZeros_eab32b(tint_module_vars_struct tint_module_vars) {
+ int4 arg_0 = int4(1);
+ int4 res = clz(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countLeadingZeros_eab32b = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %arg_0
- %5:vec4<i32> = countLeadingZeros %4
- %res:ptr<function, vec4<i32>, read_write> = var, %5
- %7:vec4<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countLeadingZeros_eab32b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countLeadingZeros_eab32b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_eab32b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countLeadingZeros_eab32b
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_eab32b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countLeadingZeros_eab32b
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.ir.msl
index b048ae0..8205fe3 100644
--- a/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void countLeadingZeros_f70103(tint_module_vars_struct tint_module_vars) {
+ uint4 arg_0 = uint4(1u);
+ uint4 res = clz(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countLeadingZeros_f70103 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %arg_0
- %5:vec4<u32> = countLeadingZeros %4
- %res:ptr<function, vec4<u32>, read_write> = var, %5
- %7:vec4<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countLeadingZeros_f70103(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countLeadingZeros_f70103
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_f70103(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countLeadingZeros_f70103
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countLeadingZeros_f70103(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countLeadingZeros_f70103
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.ir.msl
index c2dcf06..8ebfc45 100644
--- a/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void countOneBits_0d0e46(tint_module_vars_struct tint_module_vars) {
+ uint4 arg_0 = uint4(1u);
+ uint4 res = popcount(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countOneBits_0d0e46 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %arg_0
- %5:vec4<u32> = countOneBits %4
- %res:ptr<function, vec4<u32>, read_write> = var, %5
- %7:vec4<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countOneBits_0d0e46(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countOneBits_0d0e46
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_0d0e46(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countOneBits_0d0e46
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_0d0e46(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countOneBits_0d0e46
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.ir.msl
index 6c50856..cba9f51 100644
--- a/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void countOneBits_0f7980(tint_module_vars_struct tint_module_vars) {
+ int4 arg_0 = int4(1);
+ int4 res = popcount(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countOneBits_0f7980 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %arg_0
- %5:vec4<i32> = countOneBits %4
- %res:ptr<function, vec4<i32>, read_write> = var, %5
- %7:vec4<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countOneBits_0f7980(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countOneBits_0f7980
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_0f7980(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countOneBits_0f7980
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_0f7980(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countOneBits_0f7980
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.ir.msl
index 767b61e..fda618d 100644
--- a/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void countOneBits_65d2ae(tint_module_vars_struct tint_module_vars) {
+ int3 arg_0 = int3(1);
+ int3 res = popcount(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countOneBits_65d2ae = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %arg_0
- %5:vec3<i32> = countOneBits %4
- %res:ptr<function, vec3<i32>, read_write> = var, %5
- %7:vec3<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countOneBits_65d2ae(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countOneBits_65d2ae
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_65d2ae(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countOneBits_65d2ae
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_65d2ae(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countOneBits_65d2ae
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.ir.msl
index 9ffbb82..7b8fb02 100644
--- a/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void countOneBits_690cfc(tint_module_vars_struct tint_module_vars) {
+ uint3 arg_0 = uint3(1u);
+ uint3 res = popcount(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countOneBits_690cfc = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %arg_0
- %5:vec3<u32> = countOneBits %4
- %res:ptr<function, vec3<u32>, read_write> = var, %5
- %7:vec3<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countOneBits_690cfc(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countOneBits_690cfc
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_690cfc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countOneBits_690cfc
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_690cfc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countOneBits_690cfc
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.ir.msl
index 202a66a..46280fa 100644
--- a/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void countOneBits_94fd81(tint_module_vars_struct tint_module_vars) {
+ uint2 arg_0 = uint2(1u);
+ uint2 res = popcount(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countOneBits_94fd81 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %arg_0
- %5:vec2<u32> = countOneBits %4
- %res:ptr<function, vec2<u32>, read_write> = var, %5
- %7:vec2<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countOneBits_94fd81(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countOneBits_94fd81
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_94fd81(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countOneBits_94fd81
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_94fd81(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countOneBits_94fd81
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countOneBits/ae44f9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countOneBits/ae44f9.wgsl.expected.ir.msl
index caa73ce..dc1670d 100644
--- a/test/tint/builtins/gen/var/countOneBits/ae44f9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countOneBits/ae44f9.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void countOneBits_ae44f9(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ uint res = popcount(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countOneBits_ae44f9 = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %arg_0
- %5:u32 = countOneBits %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countOneBits_ae44f9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countOneBits_ae44f9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_ae44f9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countOneBits_ae44f9
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_ae44f9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countOneBits_ae44f9
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.ir.msl
index 97655bb..9ed7813 100644
--- a/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void countOneBits_af90e2(tint_module_vars_struct tint_module_vars) {
+ int2 arg_0 = int2(1);
+ int2 res = popcount(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countOneBits_af90e2 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %arg_0
- %5:vec2<i32> = countOneBits %4
- %res:ptr<function, vec2<i32>, read_write> = var, %5
- %7:vec2<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countOneBits_af90e2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countOneBits_af90e2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_af90e2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countOneBits_af90e2
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_af90e2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countOneBits_af90e2
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countOneBits/fd88b2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countOneBits/fd88b2.wgsl.expected.ir.msl
index 68e35d3..2ecd97b 100644
--- a/test/tint/builtins/gen/var/countOneBits/fd88b2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countOneBits/fd88b2.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void countOneBits_fd88b2(tint_module_vars_struct tint_module_vars) {
+ int arg_0 = 1;
+ int res = popcount(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countOneBits_fd88b2 = func():void {
- $B2: {
- %arg_0:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %arg_0
- %5:i32 = countOneBits %4
- %res:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countOneBits_fd88b2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countOneBits_fd88b2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_fd88b2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countOneBits_fd88b2
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countOneBits_fd88b2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countOneBits_fd88b2
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.ir.msl
index c0b588c..a239df8 100644
--- a/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void countTrailingZeros_1ad138(tint_module_vars_struct tint_module_vars) {
+ uint2 arg_0 = uint2(1u);
+ uint2 res = ctz(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countTrailingZeros_1ad138 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %arg_0
- %5:vec2<u32> = countTrailingZeros %4
- %res:ptr<function, vec2<u32>, read_write> = var, %5
- %7:vec2<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countTrailingZeros_1ad138(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countTrailingZeros_1ad138
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_1ad138(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countTrailingZeros_1ad138
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_1ad138(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countTrailingZeros_1ad138
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.ir.msl
index 0c43f1f..da4097d 100644
--- a/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void countTrailingZeros_1dc84a(tint_module_vars_struct tint_module_vars) {
+ int4 arg_0 = int4(1);
+ int4 res = ctz(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countTrailingZeros_1dc84a = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %arg_0
- %5:vec4<i32> = countTrailingZeros %4
- %res:ptr<function, vec4<i32>, read_write> = var, %5
- %7:vec4<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countTrailingZeros_1dc84a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countTrailingZeros_1dc84a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_1dc84a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countTrailingZeros_1dc84a
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_1dc84a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countTrailingZeros_1dc84a
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countTrailingZeros/21e394.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countTrailingZeros/21e394.wgsl.expected.ir.msl
index 9e37cdc..dfa6aac 100644
--- a/test/tint/builtins/gen/var/countTrailingZeros/21e394.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countTrailingZeros/21e394.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void countTrailingZeros_21e394(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ uint res = ctz(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countTrailingZeros_21e394 = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %arg_0
- %5:u32 = countTrailingZeros %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countTrailingZeros_21e394(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countTrailingZeros_21e394
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_21e394(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countTrailingZeros_21e394
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_21e394(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countTrailingZeros_21e394
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.ir.msl
index 7170c77..1684b24 100644
--- a/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void countTrailingZeros_327c37(tint_module_vars_struct tint_module_vars) {
+ int2 arg_0 = int2(1);
+ int2 res = ctz(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countTrailingZeros_327c37 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %arg_0
- %5:vec2<i32> = countTrailingZeros %4
- %res:ptr<function, vec2<i32>, read_write> = var, %5
- %7:vec2<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countTrailingZeros_327c37(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countTrailingZeros_327c37
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_327c37(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countTrailingZeros_327c37
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_327c37(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countTrailingZeros_327c37
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countTrailingZeros/42fed6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countTrailingZeros/42fed6.wgsl.expected.ir.msl
index 22109af..a326cf9 100644
--- a/test/tint/builtins/gen/var/countTrailingZeros/42fed6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countTrailingZeros/42fed6.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void countTrailingZeros_42fed6(tint_module_vars_struct tint_module_vars) {
+ int arg_0 = 1;
+ int res = ctz(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countTrailingZeros_42fed6 = func():void {
- $B2: {
- %arg_0:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %arg_0
- %5:i32 = countTrailingZeros %4
- %res:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countTrailingZeros_42fed6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countTrailingZeros_42fed6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_42fed6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countTrailingZeros_42fed6
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_42fed6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countTrailingZeros_42fed6
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.ir.msl
index ef0218c..d8da7fb 100644
--- a/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void countTrailingZeros_8ed26f(tint_module_vars_struct tint_module_vars) {
+ uint3 arg_0 = uint3(1u);
+ uint3 res = ctz(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countTrailingZeros_8ed26f = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %arg_0
- %5:vec3<u32> = countTrailingZeros %4
- %res:ptr<function, vec3<u32>, read_write> = var, %5
- %7:vec3<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countTrailingZeros_8ed26f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countTrailingZeros_8ed26f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_8ed26f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countTrailingZeros_8ed26f
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_8ed26f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countTrailingZeros_8ed26f
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.ir.msl
index 0bb4f4e..035426c 100644
--- a/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void countTrailingZeros_acfacb(tint_module_vars_struct tint_module_vars) {
+ int3 arg_0 = int3(1);
+ int3 res = ctz(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countTrailingZeros_acfacb = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %arg_0
- %5:vec3<i32> = countTrailingZeros %4
- %res:ptr<function, vec3<i32>, read_write> = var, %5
- %7:vec3<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countTrailingZeros_acfacb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countTrailingZeros_acfacb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_acfacb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countTrailingZeros_acfacb
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_acfacb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countTrailingZeros_acfacb
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.ir.msl
index 373c504..0f1b6b4 100644
--- a/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void countTrailingZeros_d2b4a0(tint_module_vars_struct tint_module_vars) {
+ uint4 arg_0 = uint4(1u);
+ uint4 res = ctz(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%countTrailingZeros_d2b4a0 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %arg_0
- %5:vec4<u32> = countTrailingZeros %4
- %res:ptr<function, vec4<u32>, read_write> = var, %5
- %7:vec4<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ countTrailingZeros_d2b4a0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %countTrailingZeros_d2b4a0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_d2b4a0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %countTrailingZeros_d2b4a0
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ countTrailingZeros_d2b4a0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %countTrailingZeros_d2b4a0
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.ir.msl
index 1aaf80d..f6b72f3 100644
--- a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void cross_041cb0(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 arg_1 = float3(1.0f);
+ float3 res = cross(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cross_041cb0 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_1:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %5:vec3<f32> = load %arg_0
- %6:vec3<f32> = load %arg_1
- %7:vec3<f32> = cross %5, %6
- %res:ptr<function, vec3<f32>, read_write> = var, %7
- %9:vec3<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cross_041cb0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %cross_041cb0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cross_041cb0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %cross_041cb0
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cross_041cb0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %cross_041cb0
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.ir.msl
index 7efca35..847b411 100644
--- a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void cross_9857cb(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 arg_1 = half3(1.0h);
+ half3 res = cross(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%cross_9857cb = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_1:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %5:vec3<f16> = load %arg_0
- %6:vec3<f16> = load %arg_1
- %7:vec3<f16> = cross %5, %6
- %res:ptr<function, vec3<f16>, read_write> = var, %7
- %9:vec3<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ cross_9857cb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %cross_9857cb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cross_9857cb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %cross_9857cb
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ cross_9857cb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %cross_9857cb
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.ir.msl
index abf9485..2d5ebd2 100644
--- a/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void determinant_2b62ba(tint_module_vars_struct tint_module_vars) {
+ float3x3 arg_0 = float3x3(float3(1.0f), float3(1.0f), float3(1.0f));
+ float res = determinant(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%determinant_2b62ba = func():void {
- $B2: {
- %arg_0:ptr<function, mat3x3<f32>, read_write> = var, mat3x3<f32>(vec3<f32>(1.0f))
- %4:mat3x3<f32> = load %arg_0
- %5:f32 = determinant %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ determinant_2b62ba(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %determinant_2b62ba
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_2b62ba(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %determinant_2b62ba
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_2b62ba(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %determinant_2b62ba
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.ir.msl
index 0d95a2d..979b0ab 100644
--- a/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void determinant_32bfde(tint_module_vars_struct tint_module_vars) {
+ half4x4 arg_0 = half4x4(half4(1.0h), half4(1.0h), half4(1.0h), half4(1.0h));
+ half res = determinant(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%determinant_32bfde = func():void {
- $B2: {
- %arg_0:ptr<function, mat4x4<f16>, read_write> = var, mat4x4<f16>(vec4<f16>(1.0h))
- %4:mat4x4<f16> = load %arg_0
- %5:f16 = determinant %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ determinant_32bfde(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %determinant_32bfde
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_32bfde(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %determinant_32bfde
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_32bfde(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %determinant_32bfde
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.ir.msl
index e1ef5da..c35be68 100644
--- a/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void determinant_a0a87c(tint_module_vars_struct tint_module_vars) {
+ float4x4 arg_0 = float4x4(float4(1.0f), float4(1.0f), float4(1.0f), float4(1.0f));
+ float res = determinant(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%determinant_a0a87c = func():void {
- $B2: {
- %arg_0:ptr<function, mat4x4<f32>, read_write> = var, mat4x4<f32>(vec4<f32>(1.0f))
- %4:mat4x4<f32> = load %arg_0
- %5:f32 = determinant %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ determinant_a0a87c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %determinant_a0a87c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_a0a87c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %determinant_a0a87c
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_a0a87c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %determinant_a0a87c
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.ir.msl
index f9af38a..32680b0 100644
--- a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void determinant_d7c86f(tint_module_vars_struct tint_module_vars) {
+ half3x3 arg_0 = half3x3(half3(1.0h), half3(1.0h), half3(1.0h));
+ half res = determinant(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%determinant_d7c86f = func():void {
- $B2: {
- %arg_0:ptr<function, mat3x3<f16>, read_write> = var, mat3x3<f16>(vec3<f16>(1.0h))
- %4:mat3x3<f16> = load %arg_0
- %5:f16 = determinant %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ determinant_d7c86f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %determinant_d7c86f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_d7c86f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %determinant_d7c86f
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_d7c86f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %determinant_d7c86f
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.ir.msl
index ea38e69..8c92e94 100644
--- a/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void determinant_e19305(tint_module_vars_struct tint_module_vars) {
+ float2x2 arg_0 = float2x2(float2(1.0f), float2(1.0f));
+ float res = determinant(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%determinant_e19305 = func():void {
- $B2: {
- %arg_0:ptr<function, mat2x2<f32>, read_write> = var, mat2x2<f32>(vec2<f32>(1.0f))
- %4:mat2x2<f32> = load %arg_0
- %5:f32 = determinant %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ determinant_e19305(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %determinant_e19305
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_e19305(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %determinant_e19305
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_e19305(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %determinant_e19305
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.ir.msl
index 8e16d1f..7c47946 100644
--- a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void determinant_fc12a5(tint_module_vars_struct tint_module_vars) {
+ half2x2 arg_0 = half2x2(half2(1.0h), half2(1.0h));
+ half res = determinant(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%determinant_fc12a5 = func():void {
- $B2: {
- %arg_0:ptr<function, mat2x2<f16>, read_write> = var, mat2x2<f16>(vec2<f16>(1.0h))
- %4:mat2x2<f16> = load %arg_0
- %5:f16 = determinant %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ determinant_fc12a5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %determinant_fc12a5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_fc12a5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %determinant_fc12a5
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ determinant_fc12a5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %determinant_fc12a5
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.ir.msl
index 77e74a7..7f79f24 100644
--- a/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void dpdx_0763f7(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = dfdx(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdx_0763f7 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = dpdx %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdx_0763f7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdx_0763f7
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.ir.msl
index 3b24933..ce58a4b 100644
--- a/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void dpdx_99edb1(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = dfdx(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdx_99edb1 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = dpdx %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdx_99edb1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdx_99edb1
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.ir.msl
index 10c1dd2..cf9cf77 100644
--- a/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void dpdx_c487fa(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = dfdx(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdx_c487fa = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = dpdx %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdx_c487fa(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdx_c487fa
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdx/e263de.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdx/e263de.wgsl.expected.ir.msl
index 9b5fa43..c9cd24f 100644
--- a/test/tint/builtins/gen/var/dpdx/e263de.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdx/e263de.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void dpdx_e263de(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = dfdx(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdx_e263de = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = dpdx %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdx_e263de(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdx_e263de
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdxCoarse/029152.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdxCoarse/029152.wgsl.expected.ir.msl
index 46b92b4..f7d0c76 100644
--- a/test/tint/builtins/gen/var/dpdxCoarse/029152.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdxCoarse/029152.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void dpdxCoarse_029152(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = dfdx(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdxCoarse_029152 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = dpdxCoarse %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdxCoarse_029152(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdxCoarse_029152
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.ir.msl
index 6901848..8e20d44 100644
--- a/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void dpdxCoarse_9581cf(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = dfdx(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdxCoarse_9581cf = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = dpdxCoarse %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdxCoarse_9581cf(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdxCoarse_9581cf
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.ir.msl
index 56f17df..d29bfab 100644
--- a/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void dpdxCoarse_c28641(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = dfdx(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdxCoarse_c28641 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = dpdxCoarse %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdxCoarse_c28641(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdxCoarse_c28641
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.ir.msl
index 32c632f..766d5e4 100644
--- a/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void dpdxCoarse_f64d7b(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = dfdx(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdxCoarse_f64d7b = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = dpdxCoarse %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdxCoarse_f64d7b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdxCoarse_f64d7b
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.ir.msl
index 58c89f9..a966458 100644
--- a/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void dpdxFine_8c5069(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = dfdx(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdxFine_8c5069 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = dpdxFine %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdxFine_8c5069(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdxFine_8c5069
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.ir.msl
index 0f66004..61122b4 100644
--- a/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void dpdxFine_9631de(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = dfdx(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdxFine_9631de = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = dpdxFine %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdxFine_9631de(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdxFine_9631de
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdxFine/f401a2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdxFine/f401a2.wgsl.expected.ir.msl
index ed80b3f..05159bd 100644
--- a/test/tint/builtins/gen/var/dpdxFine/f401a2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdxFine/f401a2.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void dpdxFine_f401a2(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = dfdx(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdxFine_f401a2 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = dpdxFine %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdxFine_f401a2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdxFine_f401a2
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.ir.msl
index 1f85d0a..b5f633d 100644
--- a/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void dpdxFine_f92fb6(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = dfdx(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdxFine_f92fb6 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = dpdxFine %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdxFine_f92fb6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdxFine_f92fb6
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.ir.msl
index 8772d24..e1631f5 100644
--- a/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void dpdy_699a05(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = dfdy(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdy_699a05 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = dpdy %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdy_699a05(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdy_699a05
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdy/7f8d84.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdy/7f8d84.wgsl.expected.ir.msl
index eeacda5..1278270 100644
--- a/test/tint/builtins/gen/var/dpdy/7f8d84.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdy/7f8d84.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void dpdy_7f8d84(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = dfdy(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdy_7f8d84 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = dpdy %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdy_7f8d84(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdy_7f8d84
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.ir.msl
index ddcf808..826288f 100644
--- a/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void dpdy_a8b56e(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = dfdy(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdy_a8b56e = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = dpdy %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdy_a8b56e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdy_a8b56e
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.ir.msl
index aafd81a..166841c 100644
--- a/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void dpdy_feb40f(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = dfdy(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdy_feb40f = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = dpdy %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdy_feb40f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdy_feb40f
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.ir.msl
index bbbd56b..2b2d46b 100644
--- a/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void dpdyCoarse_3e1ab4(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = dfdy(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdyCoarse_3e1ab4 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = dpdyCoarse %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdyCoarse_3e1ab4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdyCoarse_3e1ab4
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.ir.msl
index 3e14a29..292ebb0 100644
--- a/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void dpdyCoarse_445d24(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = dfdy(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdyCoarse_445d24 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = dpdyCoarse %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdyCoarse_445d24(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdyCoarse_445d24
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdyCoarse/870a7e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdyCoarse/870a7e.wgsl.expected.ir.msl
index c85e414..cee2638 100644
--- a/test/tint/builtins/gen/var/dpdyCoarse/870a7e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdyCoarse/870a7e.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void dpdyCoarse_870a7e(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = dfdy(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdyCoarse_870a7e = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = dpdyCoarse %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdyCoarse_870a7e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdyCoarse_870a7e
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.ir.msl
index 9ed9024..d20a333 100644
--- a/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void dpdyCoarse_ae1873(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = dfdy(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdyCoarse_ae1873 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = dpdyCoarse %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdyCoarse_ae1873(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdyCoarse_ae1873
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.ir.msl
index 106c2a6..862ad17 100644
--- a/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void dpdyFine_1fb7ab(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = dfdy(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdyFine_1fb7ab = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = dpdyFine %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdyFine_1fb7ab(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdyFine_1fb7ab
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdyFine/6eb673.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdyFine/6eb673.wgsl.expected.ir.msl
index bf02b2e..b101c71 100644
--- a/test/tint/builtins/gen/var/dpdyFine/6eb673.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdyFine/6eb673.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void dpdyFine_6eb673(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = dfdy(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdyFine_6eb673 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = dpdyFine %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdyFine_6eb673(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdyFine_6eb673
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.ir.msl
index 68fca90..f398119 100644
--- a/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void dpdyFine_d0a648(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = dfdy(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdyFine_d0a648 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = dpdyFine %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdyFine_d0a648(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdyFine_d0a648
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.ir.msl
index 74579f7..3e5f457 100644
--- a/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void dpdyFine_df33aa(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = dfdy(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%dpdyFine_df33aa = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = dpdyFine %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ dpdyFine_df33aa(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %dpdyFine_df33aa
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.ir.msl
index ac71538..ece120a 100644
--- a/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void exp_0f70eb(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = exp(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp_0f70eb = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = exp %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp_0f70eb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %exp_0f70eb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_0f70eb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %exp_0f70eb
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_0f70eb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %exp_0f70eb
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.ir.msl
index ba27483..4643734 100644
--- a/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void exp_13806d(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 res = exp(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp_13806d = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = exp %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp_13806d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %exp_13806d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_13806d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %exp_13806d
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_13806d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %exp_13806d
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.ir.msl
index ba90a5b..46ce952 100644
--- a/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void exp_1951e7(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = exp(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp_1951e7 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = exp %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp_1951e7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %exp_1951e7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_1951e7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %exp_1951e7
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_1951e7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %exp_1951e7
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.ir.msl
index c72ccea..37d0404 100644
--- a/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void exp_2e08e2(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 res = exp(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp_2e08e2 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = exp %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp_2e08e2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %exp_2e08e2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_2e08e2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %exp_2e08e2
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_2e08e2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %exp_2e08e2
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.ir.msl
index fd33b71..6beb39f 100644
--- a/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void exp_611a87(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 res = exp(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp_611a87 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = exp %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp_611a87(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %exp_611a87
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_611a87(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %exp_611a87
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_611a87(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %exp_611a87
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/exp/771fd2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/exp/771fd2.wgsl.expected.ir.msl
index cdb7c97..3e35dbb 100644
--- a/test/tint/builtins/gen/var/exp/771fd2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/exp/771fd2.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void exp_771fd2(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = exp(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp_771fd2 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = exp %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp_771fd2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %exp_771fd2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_771fd2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %exp_771fd2
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_771fd2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %exp_771fd2
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.ir.msl
index 68d4e53..11addb7 100644
--- a/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void exp_c18fe9(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half res = exp(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp_c18fe9 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %arg_0
- %5:f16 = exp %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp_c18fe9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %exp_c18fe9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_c18fe9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %exp_c18fe9
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_c18fe9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %exp_c18fe9
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.ir.msl
index ba8a527..c5d38e5 100644
--- a/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void exp_d98450(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = exp(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp_d98450 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = exp %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp_d98450(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %exp_d98450
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_d98450(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %exp_d98450
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp_d98450(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %exp_d98450
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.ir.msl
index 172fb64..3762bdb 100644
--- a/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void exp2_151a4c(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 res = exp2(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp2_151a4c = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = exp2 %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp2_151a4c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %exp2_151a4c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_151a4c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %exp2_151a4c
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_151a4c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %exp2_151a4c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.ir.msl
index 63cf705..52c2b10 100644
--- a/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void exp2_1f8680(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = exp2(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp2_1f8680 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = exp2 %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp2_1f8680(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %exp2_1f8680
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_1f8680(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %exp2_1f8680
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_1f8680(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %exp2_1f8680
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.ir.msl
index c62d385..d114dc4 100644
--- a/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void exp2_751377(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 res = exp2(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp2_751377 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = exp2 %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp2_751377(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %exp2_751377
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_751377(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %exp2_751377
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_751377(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %exp2_751377
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.ir.msl
index 3869a1e..31d611a 100644
--- a/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void exp2_a9d0a7(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = exp2(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp2_a9d0a7 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = exp2 %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp2_a9d0a7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %exp2_a9d0a7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_a9d0a7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %exp2_a9d0a7
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_a9d0a7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %exp2_a9d0a7
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.ir.msl
index 8d66ab8..e6f750f 100644
--- a/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void exp2_b408e4(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half res = exp2(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp2_b408e4 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %arg_0
- %5:f16 = exp2 %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp2_b408e4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %exp2_b408e4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_b408e4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %exp2_b408e4
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_b408e4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %exp2_b408e4
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.ir.msl
index d47f914..cfb733e 100644
--- a/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void exp2_d6777c(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = exp2(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp2_d6777c = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = exp2 %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp2_d6777c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %exp2_d6777c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_d6777c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %exp2_d6777c
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_d6777c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %exp2_d6777c
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/exp2/dea523.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/exp2/dea523.wgsl.expected.ir.msl
index 9da7c77..f144dd5 100644
--- a/test/tint/builtins/gen/var/exp2/dea523.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/exp2/dea523.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void exp2_dea523(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = exp2(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp2_dea523 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = exp2 %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp2_dea523(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %exp2_dea523
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_dea523(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %exp2_dea523
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_dea523(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %exp2_dea523
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.ir.msl
index ef5868a..156167a 100644
--- a/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void exp2_ffa827(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 res = exp2(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%exp2_ffa827 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = exp2 %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ exp2_ffa827(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %exp2_ffa827
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_ffa827(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %exp2_ffa827
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ exp2_ffa827(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %exp2_ffa827
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.ir.msl
index fa79d1a..4165525 100644
--- a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.ir.msl
@@ -1,53 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void extractBits_12b197(tint_module_vars_struct tint_module_vars) {
+ uint3 arg_0 = uint3(1u);
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ uint3 const v = arg_0;
+ uint const v_1 = arg_2;
+ uint const v_2 = min(arg_1, 32u);
+ uint3 res = extract_bits(v, v_2, min(v_1, (32u - v_2)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%extractBits_12b197 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %6:vec3<u32> = load %arg_0
- %7:vec3<u32> = let %6
- %8:u32 = load %arg_1
- %9:u32 = load %arg_2
- %10:u32 = let %9
- %11:u32 = min %8, 32u
- %12:u32 = let %11
- %13:u32 = sub 32u, %12
- %14:u32 = min %10, %13
- %15:vec3<u32> = extractBits %7, %12, %14
- %res:ptr<function, vec3<u32>, read_write> = var, %15
- %17:vec3<u32> = load %res
- store %prevent_dce, %17
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ extractBits_12b197(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %19:void = call %extractBits_12b197
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_12b197(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %21:void = call %extractBits_12b197
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_12b197(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %23:void = call %extractBits_12b197
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.ir.msl
index eb66449..8a1fd2a 100644
--- a/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.ir.msl
@@ -1,53 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void extractBits_249874(tint_module_vars_struct tint_module_vars) {
+ int arg_0 = 1;
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ int const v = arg_0;
+ uint const v_1 = arg_2;
+ uint const v_2 = min(arg_1, 32u);
+ int res = extract_bits(v, v_2, min(v_1, (32u - v_2)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%extractBits_249874 = func():void {
- $B2: {
- %arg_0:ptr<function, i32, read_write> = var, 1i
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %6:i32 = load %arg_0
- %7:i32 = let %6
- %8:u32 = load %arg_1
- %9:u32 = load %arg_2
- %10:u32 = let %9
- %11:u32 = min %8, 32u
- %12:u32 = let %11
- %13:u32 = sub 32u, %12
- %14:u32 = min %10, %13
- %15:i32 = extractBits %7, %12, %14
- %res:ptr<function, i32, read_write> = var, %15
- %17:i32 = load %res
- store %prevent_dce, %17
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ extractBits_249874(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %19:void = call %extractBits_249874
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_249874(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %21:void = call %extractBits_249874
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_249874(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %23:void = call %extractBits_249874
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.ir.msl
index e0e22af..ea010ae 100644
--- a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.ir.msl
@@ -1,53 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void extractBits_631377(tint_module_vars_struct tint_module_vars) {
+ uint4 arg_0 = uint4(1u);
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ uint4 const v = arg_0;
+ uint const v_1 = arg_2;
+ uint const v_2 = min(arg_1, 32u);
+ uint4 res = extract_bits(v, v_2, min(v_1, (32u - v_2)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%extractBits_631377 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %6:vec4<u32> = load %arg_0
- %7:vec4<u32> = let %6
- %8:u32 = load %arg_1
- %9:u32 = load %arg_2
- %10:u32 = let %9
- %11:u32 = min %8, 32u
- %12:u32 = let %11
- %13:u32 = sub 32u, %12
- %14:u32 = min %10, %13
- %15:vec4<u32> = extractBits %7, %12, %14
- %res:ptr<function, vec4<u32>, read_write> = var, %15
- %17:vec4<u32> = load %res
- store %prevent_dce, %17
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ extractBits_631377(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %19:void = call %extractBits_631377
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_631377(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %21:void = call %extractBits_631377
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_631377(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %23:void = call %extractBits_631377
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.ir.msl
index 9767fd2..c7fe9d1 100644
--- a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.ir.msl
@@ -1,53 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void extractBits_a99a8d(tint_module_vars_struct tint_module_vars) {
+ int2 arg_0 = int2(1);
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ int2 const v = arg_0;
+ uint const v_1 = arg_2;
+ uint const v_2 = min(arg_1, 32u);
+ int2 res = extract_bits(v, v_2, min(v_1, (32u - v_2)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%extractBits_a99a8d = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %6:vec2<i32> = load %arg_0
- %7:vec2<i32> = let %6
- %8:u32 = load %arg_1
- %9:u32 = load %arg_2
- %10:u32 = let %9
- %11:u32 = min %8, 32u
- %12:u32 = let %11
- %13:u32 = sub 32u, %12
- %14:u32 = min %10, %13
- %15:vec2<i32> = extractBits %7, %12, %14
- %res:ptr<function, vec2<i32>, read_write> = var, %15
- %17:vec2<i32> = load %res
- store %prevent_dce, %17
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ extractBits_a99a8d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %19:void = call %extractBits_a99a8d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_a99a8d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %21:void = call %extractBits_a99a8d
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_a99a8d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %23:void = call %extractBits_a99a8d
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.ir.msl
index 3dc80c7..5e58ab9 100644
--- a/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.ir.msl
@@ -1,53 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void extractBits_ce81f8(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ uint const v = arg_0;
+ uint const v_1 = arg_2;
+ uint const v_2 = min(arg_1, 32u);
+ uint res = extract_bits(v, v_2, min(v_1, (32u - v_2)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%extractBits_ce81f8 = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %6:u32 = load %arg_0
- %7:u32 = let %6
- %8:u32 = load %arg_1
- %9:u32 = load %arg_2
- %10:u32 = let %9
- %11:u32 = min %8, 32u
- %12:u32 = let %11
- %13:u32 = sub 32u, %12
- %14:u32 = min %10, %13
- %15:u32 = extractBits %7, %12, %14
- %res:ptr<function, u32, read_write> = var, %15
- %17:u32 = load %res
- store %prevent_dce, %17
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ extractBits_ce81f8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %19:void = call %extractBits_ce81f8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_ce81f8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %21:void = call %extractBits_ce81f8
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_ce81f8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %23:void = call %extractBits_ce81f8
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.ir.msl
index 3138dd4..a0cfeb8 100644
--- a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.ir.msl
@@ -1,53 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void extractBits_e04f5d(tint_module_vars_struct tint_module_vars) {
+ int3 arg_0 = int3(1);
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ int3 const v = arg_0;
+ uint const v_1 = arg_2;
+ uint const v_2 = min(arg_1, 32u);
+ int3 res = extract_bits(v, v_2, min(v_1, (32u - v_2)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%extractBits_e04f5d = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %6:vec3<i32> = load %arg_0
- %7:vec3<i32> = let %6
- %8:u32 = load %arg_1
- %9:u32 = load %arg_2
- %10:u32 = let %9
- %11:u32 = min %8, 32u
- %12:u32 = let %11
- %13:u32 = sub 32u, %12
- %14:u32 = min %10, %13
- %15:vec3<i32> = extractBits %7, %12, %14
- %res:ptr<function, vec3<i32>, read_write> = var, %15
- %17:vec3<i32> = load %res
- store %prevent_dce, %17
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ extractBits_e04f5d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %19:void = call %extractBits_e04f5d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_e04f5d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %21:void = call %extractBits_e04f5d
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_e04f5d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %23:void = call %extractBits_e04f5d
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.ir.msl
index d605beb..c912c30 100644
--- a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.ir.msl
@@ -1,53 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void extractBits_f28f69(tint_module_vars_struct tint_module_vars) {
+ uint2 arg_0 = uint2(1u);
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ uint2 const v = arg_0;
+ uint const v_1 = arg_2;
+ uint const v_2 = min(arg_1, 32u);
+ uint2 res = extract_bits(v, v_2, min(v_1, (32u - v_2)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%extractBits_f28f69 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %6:vec2<u32> = load %arg_0
- %7:vec2<u32> = let %6
- %8:u32 = load %arg_1
- %9:u32 = load %arg_2
- %10:u32 = let %9
- %11:u32 = min %8, 32u
- %12:u32 = let %11
- %13:u32 = sub 32u, %12
- %14:u32 = min %10, %13
- %15:vec2<u32> = extractBits %7, %12, %14
- %res:ptr<function, vec2<u32>, read_write> = var, %15
- %17:vec2<u32> = load %res
- store %prevent_dce, %17
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ extractBits_f28f69(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %19:void = call %extractBits_f28f69
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_f28f69(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %21:void = call %extractBits_f28f69
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_f28f69(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %23:void = call %extractBits_f28f69
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.ir.msl
index 292ff46..e5bf6f3 100644
--- a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.ir.msl
@@ -1,53 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void extractBits_fb850f(tint_module_vars_struct tint_module_vars) {
+ int4 arg_0 = int4(1);
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ int4 const v = arg_0;
+ uint const v_1 = arg_2;
+ uint const v_2 = min(arg_1, 32u);
+ int4 res = extract_bits(v, v_2, min(v_1, (32u - v_2)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%extractBits_fb850f = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %6:vec4<i32> = load %arg_0
- %7:vec4<i32> = let %6
- %8:u32 = load %arg_1
- %9:u32 = load %arg_2
- %10:u32 = let %9
- %11:u32 = min %8, 32u
- %12:u32 = let %11
- %13:u32 = sub 32u, %12
- %14:u32 = min %10, %13
- %15:vec4<i32> = extractBits %7, %12, %14
- %res:ptr<function, vec4<i32>, read_write> = var, %15
- %17:vec4<i32> = load %res
- store %prevent_dce, %17
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ extractBits_fb850f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %19:void = call %extractBits_fb850f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_fb850f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %21:void = call %extractBits_fb850f
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ extractBits_fb850f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %23:void = call %extractBits_fb850f
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.ir.msl
index d69df78..c079fc3 100644
--- a/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void faceForward_524986(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 arg_1 = half3(1.0h);
+ half3 arg_2 = half3(1.0h);
+ half3 res = faceforward(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%faceForward_524986 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_1:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_2:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %6:vec3<f16> = load %arg_0
- %7:vec3<f16> = load %arg_1
- %8:vec3<f16> = load %arg_2
- %9:vec3<f16> = faceForward %6, %7, %8
- %res:ptr<function, vec3<f16>, read_write> = var, %9
- %11:vec3<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ faceForward_524986(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %faceForward_524986
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_524986(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %faceForward_524986
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_524986(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %faceForward_524986
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.ir.msl
index 22b13e6..0176c26 100644
--- a/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void faceForward_5afbd5(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 arg_1 = float3(1.0f);
+ float3 arg_2 = float3(1.0f);
+ float3 res = faceforward(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%faceForward_5afbd5 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_1:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_2:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %6:vec3<f32> = load %arg_0
- %7:vec3<f32> = load %arg_1
- %8:vec3<f32> = load %arg_2
- %9:vec3<f32> = faceForward %6, %7, %8
- %res:ptr<function, vec3<f32>, read_write> = var, %9
- %11:vec3<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ faceForward_5afbd5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %faceForward_5afbd5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_5afbd5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %faceForward_5afbd5
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_5afbd5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %faceForward_5afbd5
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.ir.msl
index 1ae842e..a948585 100644
--- a/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void faceForward_b316e5(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 arg_1 = float4(1.0f);
+ float4 arg_2 = float4(1.0f);
+ float4 res = faceforward(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%faceForward_b316e5 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_1:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_2:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %6:vec4<f32> = load %arg_0
- %7:vec4<f32> = load %arg_1
- %8:vec4<f32> = load %arg_2
- %9:vec4<f32> = faceForward %6, %7, %8
- %res:ptr<function, vec4<f32>, read_write> = var, %9
- %11:vec4<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ faceForward_b316e5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %faceForward_b316e5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_b316e5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %faceForward_b316e5
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_b316e5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %faceForward_b316e5
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.ir.msl
index 4d95c4c..2e5ee9c 100644
--- a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void faceForward_cc63dc(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 arg_1 = half4(1.0h);
+ half4 arg_2 = half4(1.0h);
+ half4 res = faceforward(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%faceForward_cc63dc = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_1:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_2:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %6:vec4<f16> = load %arg_0
- %7:vec4<f16> = load %arg_1
- %8:vec4<f16> = load %arg_2
- %9:vec4<f16> = faceForward %6, %7, %8
- %res:ptr<function, vec4<f16>, read_write> = var, %9
- %11:vec4<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ faceForward_cc63dc(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %faceForward_cc63dc
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_cc63dc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %faceForward_cc63dc
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_cc63dc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %faceForward_cc63dc
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.ir.msl
index 7a14c48..7f19329 100644
--- a/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void faceForward_e6908b(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 arg_1 = float2(1.0f);
+ float2 arg_2 = float2(1.0f);
+ float2 res = faceforward(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%faceForward_e6908b = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_1:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_2:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %6:vec2<f32> = load %arg_0
- %7:vec2<f32> = load %arg_1
- %8:vec2<f32> = load %arg_2
- %9:vec2<f32> = faceForward %6, %7, %8
- %res:ptr<function, vec2<f32>, read_write> = var, %9
- %11:vec2<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ faceForward_e6908b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %faceForward_e6908b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_e6908b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %faceForward_e6908b
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_e6908b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %faceForward_e6908b
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.ir.msl
index a0babaa..023d899 100644
--- a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void faceForward_fb0f2e(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 arg_1 = half2(1.0h);
+ half2 arg_2 = half2(1.0h);
+ half2 res = faceforward(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%faceForward_fb0f2e = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_1:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_2:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %6:vec2<f16> = load %arg_0
- %7:vec2<f16> = load %arg_1
- %8:vec2<f16> = load %arg_2
- %9:vec2<f16> = faceForward %6, %7, %8
- %res:ptr<function, vec2<f16>, read_write> = var, %9
- %11:vec2<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ faceForward_fb0f2e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %faceForward_fb0f2e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_fb0f2e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %faceForward_fb0f2e
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ faceForward_fb0f2e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %faceForward_fb0f2e
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.ir.msl
index b9251a0..85970fd 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.ir.msl
@@ -1,72 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void firstLeadingBit_000ff3(tint_module_vars_struct tint_module_vars) {
+ uint4 arg_0 = uint4(1u);
+ uint4 const v = arg_0;
+ uint4 const v_1 = select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)));
+ uint4 const v_2 = select(uint4(8u), uint4(0u), (((v >> v_1) & uint4(65280u)) == uint4(0u)));
+ uint4 const v_3 = select(uint4(4u), uint4(0u), ((((v >> v_1) >> v_2) & uint4(240u)) == uint4(0u)));
+ uint4 const v_4 = select(uint4(2u), uint4(0u), (((((v >> v_1) >> v_2) >> v_3) & uint4(12u)) == uint4(0u)));
+ uint4 res = select((v_1 | (v_2 | (v_3 | (v_4 | select(uint4(1u), uint4(0u), ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uint4(2u)) == uint4(0u))))))), uint4(4294967295u), (((((v >> v_1) >> v_2) >> v_3) >> v_4) == uint4(0u)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstLeadingBit_000ff3 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %arg_0
- %5:vec4<u32> = let %4
- %6:vec4<u32> = and %5, vec4<u32>(4294901760u)
- %7:vec4<bool> = eq %6, vec4<u32>(0u)
- %8:vec4<u32> = select vec4<u32>(16u), vec4<u32>(0u), %7
- %9:vec4<u32> = let %8
- %10:vec4<u32> = shr %5, %9
- %11:vec4<u32> = and %10, vec4<u32>(65280u)
- %12:vec4<bool> = eq %11, vec4<u32>(0u)
- %13:vec4<u32> = select vec4<u32>(8u), vec4<u32>(0u), %12
- %14:vec4<u32> = let %13
- %15:vec4<u32> = shr %10, %14
- %16:vec4<u32> = and %15, vec4<u32>(240u)
- %17:vec4<bool> = eq %16, vec4<u32>(0u)
- %18:vec4<u32> = select vec4<u32>(4u), vec4<u32>(0u), %17
- %19:vec4<u32> = let %18
- %20:vec4<u32> = shr %15, %19
- %21:vec4<u32> = and %20, vec4<u32>(12u)
- %22:vec4<bool> = eq %21, vec4<u32>(0u)
- %23:vec4<u32> = select vec4<u32>(2u), vec4<u32>(0u), %22
- %24:vec4<u32> = let %23
- %25:vec4<u32> = shr %20, %24
- %26:vec4<u32> = and %25, vec4<u32>(2u)
- %27:vec4<bool> = eq %26, vec4<u32>(0u)
- %28:vec4<u32> = select vec4<u32>(1u), vec4<u32>(0u), %27
- %29:vec4<u32> = or %24, %28
- %30:vec4<u32> = or %19, %29
- %31:vec4<u32> = or %14, %30
- %32:vec4<u32> = or %9, %31
- %33:vec4<bool> = eq %25, vec4<u32>(0u)
- %34:vec4<u32> = select %32, vec4<u32>(4294967295u), %33
- %res:ptr<function, vec4<u32>, read_write> = var, %34
- %36:vec4<u32> = load %res
- store %prevent_dce, %36
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstLeadingBit_000ff3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %38:void = call %firstLeadingBit_000ff3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_000ff3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %40:void = call %firstLeadingBit_000ff3
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_000ff3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %42:void = call %firstLeadingBit_000ff3
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.ir.msl
index 225bd64..052c564 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.ir.msl
@@ -1,78 +1,36 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void firstLeadingBit_35053e(tint_module_vars_struct tint_module_vars) {
+ int3 arg_0 = int3(1);
+ uint3 const v = as_type<uint3>(arg_0);
+ uint3 const v_1 = select(~(v), v, (v < uint3(2147483648u)));
+ uint3 const v_2 = select(uint3(16u), uint3(0u), ((v_1 & uint3(4294901760u)) == uint3(0u)));
+ uint3 const v_3 = select(uint3(8u), uint3(0u), (((v_1 >> v_2) & uint3(65280u)) == uint3(0u)));
+ uint3 const v_4 = select(uint3(4u), uint3(0u), ((((v_1 >> v_2) >> v_3) & uint3(240u)) == uint3(0u)));
+ uint3 const v_5 = select(uint3(2u), uint3(0u), (((((v_1 >> v_2) >> v_3) >> v_4) & uint3(12u)) == uint3(0u)));
+ int3 res = as_type<int3>(select((v_2 | (v_3 | (v_4 | (v_5 | select(uint3(1u), uint3(0u), ((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uint3(2u)) == uint3(0u))))))), uint3(4294967295u), (((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) == uint3(0u))));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstLeadingBit_35053e = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %arg_0
- %5:vec3<u32> = bitcast %4
- %6:vec3<u32> = let %5
- %7:vec3<u32> = complement %6
- %8:vec3<bool> = lt %6, vec3<u32>(2147483648u)
- %9:vec3<u32> = select %7, %6, %8
- %10:vec3<u32> = let %9
- %11:vec3<u32> = and %10, vec3<u32>(4294901760u)
- %12:vec3<bool> = eq %11, vec3<u32>(0u)
- %13:vec3<u32> = select vec3<u32>(16u), vec3<u32>(0u), %12
- %14:vec3<u32> = let %13
- %15:vec3<u32> = shr %10, %14
- %16:vec3<u32> = and %15, vec3<u32>(65280u)
- %17:vec3<bool> = eq %16, vec3<u32>(0u)
- %18:vec3<u32> = select vec3<u32>(8u), vec3<u32>(0u), %17
- %19:vec3<u32> = let %18
- %20:vec3<u32> = shr %15, %19
- %21:vec3<u32> = and %20, vec3<u32>(240u)
- %22:vec3<bool> = eq %21, vec3<u32>(0u)
- %23:vec3<u32> = select vec3<u32>(4u), vec3<u32>(0u), %22
- %24:vec3<u32> = let %23
- %25:vec3<u32> = shr %20, %24
- %26:vec3<u32> = and %25, vec3<u32>(12u)
- %27:vec3<bool> = eq %26, vec3<u32>(0u)
- %28:vec3<u32> = select vec3<u32>(2u), vec3<u32>(0u), %27
- %29:vec3<u32> = let %28
- %30:vec3<u32> = shr %25, %29
- %31:vec3<u32> = and %30, vec3<u32>(2u)
- %32:vec3<bool> = eq %31, vec3<u32>(0u)
- %33:vec3<u32> = select vec3<u32>(1u), vec3<u32>(0u), %32
- %34:vec3<u32> = or %29, %33
- %35:vec3<u32> = or %24, %34
- %36:vec3<u32> = or %19, %35
- %37:vec3<u32> = or %14, %36
- %38:vec3<bool> = eq %30, vec3<u32>(0u)
- %39:vec3<u32> = select %37, vec3<u32>(4294967295u), %38
- %40:vec3<i32> = bitcast %39
- %res:ptr<function, vec3<i32>, read_write> = var, %40
- %42:vec3<i32> = load %res
- store %prevent_dce, %42
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstLeadingBit_35053e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %44:void = call %firstLeadingBit_35053e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_35053e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %46:void = call %firstLeadingBit_35053e
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_35053e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %48:void = call %firstLeadingBit_35053e
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.ir.msl
index 1282e64..39cd1f9 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.ir.msl
@@ -1,72 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void firstLeadingBit_3fd7d0(tint_module_vars_struct tint_module_vars) {
+ uint3 arg_0 = uint3(1u);
+ uint3 const v = arg_0;
+ uint3 const v_1 = select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)));
+ uint3 const v_2 = select(uint3(8u), uint3(0u), (((v >> v_1) & uint3(65280u)) == uint3(0u)));
+ uint3 const v_3 = select(uint3(4u), uint3(0u), ((((v >> v_1) >> v_2) & uint3(240u)) == uint3(0u)));
+ uint3 const v_4 = select(uint3(2u), uint3(0u), (((((v >> v_1) >> v_2) >> v_3) & uint3(12u)) == uint3(0u)));
+ uint3 res = select((v_1 | (v_2 | (v_3 | (v_4 | select(uint3(1u), uint3(0u), ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uint3(2u)) == uint3(0u))))))), uint3(4294967295u), (((((v >> v_1) >> v_2) >> v_3) >> v_4) == uint3(0u)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstLeadingBit_3fd7d0 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %arg_0
- %5:vec3<u32> = let %4
- %6:vec3<u32> = and %5, vec3<u32>(4294901760u)
- %7:vec3<bool> = eq %6, vec3<u32>(0u)
- %8:vec3<u32> = select vec3<u32>(16u), vec3<u32>(0u), %7
- %9:vec3<u32> = let %8
- %10:vec3<u32> = shr %5, %9
- %11:vec3<u32> = and %10, vec3<u32>(65280u)
- %12:vec3<bool> = eq %11, vec3<u32>(0u)
- %13:vec3<u32> = select vec3<u32>(8u), vec3<u32>(0u), %12
- %14:vec3<u32> = let %13
- %15:vec3<u32> = shr %10, %14
- %16:vec3<u32> = and %15, vec3<u32>(240u)
- %17:vec3<bool> = eq %16, vec3<u32>(0u)
- %18:vec3<u32> = select vec3<u32>(4u), vec3<u32>(0u), %17
- %19:vec3<u32> = let %18
- %20:vec3<u32> = shr %15, %19
- %21:vec3<u32> = and %20, vec3<u32>(12u)
- %22:vec3<bool> = eq %21, vec3<u32>(0u)
- %23:vec3<u32> = select vec3<u32>(2u), vec3<u32>(0u), %22
- %24:vec3<u32> = let %23
- %25:vec3<u32> = shr %20, %24
- %26:vec3<u32> = and %25, vec3<u32>(2u)
- %27:vec3<bool> = eq %26, vec3<u32>(0u)
- %28:vec3<u32> = select vec3<u32>(1u), vec3<u32>(0u), %27
- %29:vec3<u32> = or %24, %28
- %30:vec3<u32> = or %19, %29
- %31:vec3<u32> = or %14, %30
- %32:vec3<u32> = or %9, %31
- %33:vec3<bool> = eq %25, vec3<u32>(0u)
- %34:vec3<u32> = select %32, vec3<u32>(4294967295u), %33
- %res:ptr<function, vec3<u32>, read_write> = var, %34
- %36:vec3<u32> = load %res
- store %prevent_dce, %36
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstLeadingBit_3fd7d0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %38:void = call %firstLeadingBit_3fd7d0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_3fd7d0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %40:void = call %firstLeadingBit_3fd7d0
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_3fd7d0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %42:void = call %firstLeadingBit_3fd7d0
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/57a1a3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstLeadingBit/57a1a3.wgsl.expected.ir.msl
index 58eb576..f87e153 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/57a1a3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/57a1a3.wgsl.expected.ir.msl
@@ -1,78 +1,36 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void firstLeadingBit_57a1a3(tint_module_vars_struct tint_module_vars) {
+ int arg_0 = 1;
+ uint const v = as_type<uint>(arg_0);
+ uint const v_1 = select(~(v), v, (v < 2147483648u));
+ uint const v_2 = select(16u, 0u, ((v_1 & 4294901760u) == 0u));
+ uint const v_3 = select(8u, 0u, (((v_1 >> v_2) & 65280u) == 0u));
+ uint const v_4 = select(4u, 0u, ((((v_1 >> v_2) >> v_3) & 240u) == 0u));
+ uint const v_5 = select(2u, 0u, (((((v_1 >> v_2) >> v_3) >> v_4) & 12u) == 0u));
+ int res = as_type<int>(select((v_2 | (v_3 | (v_4 | (v_5 | select(1u, 0u, ((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & 2u) == 0u)))))), 4294967295u, (((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) == 0u)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstLeadingBit_57a1a3 = func():void {
- $B2: {
- %arg_0:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %arg_0
- %5:u32 = bitcast %4
- %6:u32 = let %5
- %7:u32 = complement %6
- %8:bool = lt %6, 2147483648u
- %9:u32 = select %7, %6, %8
- %10:u32 = let %9
- %11:u32 = and %10, 4294901760u
- %12:bool = eq %11, 0u
- %13:u32 = select 16u, 0u, %12
- %14:u32 = let %13
- %15:u32 = shr %10, %14
- %16:u32 = and %15, 65280u
- %17:bool = eq %16, 0u
- %18:u32 = select 8u, 0u, %17
- %19:u32 = let %18
- %20:u32 = shr %15, %19
- %21:u32 = and %20, 240u
- %22:bool = eq %21, 0u
- %23:u32 = select 4u, 0u, %22
- %24:u32 = let %23
- %25:u32 = shr %20, %24
- %26:u32 = and %25, 12u
- %27:bool = eq %26, 0u
- %28:u32 = select 2u, 0u, %27
- %29:u32 = let %28
- %30:u32 = shr %25, %29
- %31:u32 = and %30, 2u
- %32:bool = eq %31, 0u
- %33:u32 = select 1u, 0u, %32
- %34:u32 = or %29, %33
- %35:u32 = or %24, %34
- %36:u32 = or %19, %35
- %37:u32 = or %14, %36
- %38:bool = eq %30, 0u
- %39:u32 = select %37, 4294967295u, %38
- %40:i32 = bitcast %39
- %res:ptr<function, i32, read_write> = var, %40
- %42:i32 = load %res
- store %prevent_dce, %42
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstLeadingBit_57a1a3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %44:void = call %firstLeadingBit_57a1a3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_57a1a3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %46:void = call %firstLeadingBit_57a1a3
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_57a1a3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %48:void = call %firstLeadingBit_57a1a3
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.ir.msl
index 3c7e062..8a5b26c 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.ir.msl
@@ -1,72 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void firstLeadingBit_6fe804(tint_module_vars_struct tint_module_vars) {
+ uint2 arg_0 = uint2(1u);
+ uint2 const v = arg_0;
+ uint2 const v_1 = select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)));
+ uint2 const v_2 = select(uint2(8u), uint2(0u), (((v >> v_1) & uint2(65280u)) == uint2(0u)));
+ uint2 const v_3 = select(uint2(4u), uint2(0u), ((((v >> v_1) >> v_2) & uint2(240u)) == uint2(0u)));
+ uint2 const v_4 = select(uint2(2u), uint2(0u), (((((v >> v_1) >> v_2) >> v_3) & uint2(12u)) == uint2(0u)));
+ uint2 res = select((v_1 | (v_2 | (v_3 | (v_4 | select(uint2(1u), uint2(0u), ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uint2(2u)) == uint2(0u))))))), uint2(4294967295u), (((((v >> v_1) >> v_2) >> v_3) >> v_4) == uint2(0u)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstLeadingBit_6fe804 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %arg_0
- %5:vec2<u32> = let %4
- %6:vec2<u32> = and %5, vec2<u32>(4294901760u)
- %7:vec2<bool> = eq %6, vec2<u32>(0u)
- %8:vec2<u32> = select vec2<u32>(16u), vec2<u32>(0u), %7
- %9:vec2<u32> = let %8
- %10:vec2<u32> = shr %5, %9
- %11:vec2<u32> = and %10, vec2<u32>(65280u)
- %12:vec2<bool> = eq %11, vec2<u32>(0u)
- %13:vec2<u32> = select vec2<u32>(8u), vec2<u32>(0u), %12
- %14:vec2<u32> = let %13
- %15:vec2<u32> = shr %10, %14
- %16:vec2<u32> = and %15, vec2<u32>(240u)
- %17:vec2<bool> = eq %16, vec2<u32>(0u)
- %18:vec2<u32> = select vec2<u32>(4u), vec2<u32>(0u), %17
- %19:vec2<u32> = let %18
- %20:vec2<u32> = shr %15, %19
- %21:vec2<u32> = and %20, vec2<u32>(12u)
- %22:vec2<bool> = eq %21, vec2<u32>(0u)
- %23:vec2<u32> = select vec2<u32>(2u), vec2<u32>(0u), %22
- %24:vec2<u32> = let %23
- %25:vec2<u32> = shr %20, %24
- %26:vec2<u32> = and %25, vec2<u32>(2u)
- %27:vec2<bool> = eq %26, vec2<u32>(0u)
- %28:vec2<u32> = select vec2<u32>(1u), vec2<u32>(0u), %27
- %29:vec2<u32> = or %24, %28
- %30:vec2<u32> = or %19, %29
- %31:vec2<u32> = or %14, %30
- %32:vec2<u32> = or %9, %31
- %33:vec2<bool> = eq %25, vec2<u32>(0u)
- %34:vec2<u32> = select %32, vec2<u32>(4294967295u), %33
- %res:ptr<function, vec2<u32>, read_write> = var, %34
- %36:vec2<u32> = load %res
- store %prevent_dce, %36
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstLeadingBit_6fe804(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %38:void = call %firstLeadingBit_6fe804
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_6fe804(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %40:void = call %firstLeadingBit_6fe804
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_6fe804(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %42:void = call %firstLeadingBit_6fe804
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.ir.msl
index 2232065..add7c34 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.ir.msl
@@ -1,78 +1,36 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void firstLeadingBit_a622c2(tint_module_vars_struct tint_module_vars) {
+ int2 arg_0 = int2(1);
+ uint2 const v = as_type<uint2>(arg_0);
+ uint2 const v_1 = select(~(v), v, (v < uint2(2147483648u)));
+ uint2 const v_2 = select(uint2(16u), uint2(0u), ((v_1 & uint2(4294901760u)) == uint2(0u)));
+ uint2 const v_3 = select(uint2(8u), uint2(0u), (((v_1 >> v_2) & uint2(65280u)) == uint2(0u)));
+ uint2 const v_4 = select(uint2(4u), uint2(0u), ((((v_1 >> v_2) >> v_3) & uint2(240u)) == uint2(0u)));
+ uint2 const v_5 = select(uint2(2u), uint2(0u), (((((v_1 >> v_2) >> v_3) >> v_4) & uint2(12u)) == uint2(0u)));
+ int2 res = as_type<int2>(select((v_2 | (v_3 | (v_4 | (v_5 | select(uint2(1u), uint2(0u), ((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uint2(2u)) == uint2(0u))))))), uint2(4294967295u), (((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) == uint2(0u))));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstLeadingBit_a622c2 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %arg_0
- %5:vec2<u32> = bitcast %4
- %6:vec2<u32> = let %5
- %7:vec2<u32> = complement %6
- %8:vec2<bool> = lt %6, vec2<u32>(2147483648u)
- %9:vec2<u32> = select %7, %6, %8
- %10:vec2<u32> = let %9
- %11:vec2<u32> = and %10, vec2<u32>(4294901760u)
- %12:vec2<bool> = eq %11, vec2<u32>(0u)
- %13:vec2<u32> = select vec2<u32>(16u), vec2<u32>(0u), %12
- %14:vec2<u32> = let %13
- %15:vec2<u32> = shr %10, %14
- %16:vec2<u32> = and %15, vec2<u32>(65280u)
- %17:vec2<bool> = eq %16, vec2<u32>(0u)
- %18:vec2<u32> = select vec2<u32>(8u), vec2<u32>(0u), %17
- %19:vec2<u32> = let %18
- %20:vec2<u32> = shr %15, %19
- %21:vec2<u32> = and %20, vec2<u32>(240u)
- %22:vec2<bool> = eq %21, vec2<u32>(0u)
- %23:vec2<u32> = select vec2<u32>(4u), vec2<u32>(0u), %22
- %24:vec2<u32> = let %23
- %25:vec2<u32> = shr %20, %24
- %26:vec2<u32> = and %25, vec2<u32>(12u)
- %27:vec2<bool> = eq %26, vec2<u32>(0u)
- %28:vec2<u32> = select vec2<u32>(2u), vec2<u32>(0u), %27
- %29:vec2<u32> = let %28
- %30:vec2<u32> = shr %25, %29
- %31:vec2<u32> = and %30, vec2<u32>(2u)
- %32:vec2<bool> = eq %31, vec2<u32>(0u)
- %33:vec2<u32> = select vec2<u32>(1u), vec2<u32>(0u), %32
- %34:vec2<u32> = or %29, %33
- %35:vec2<u32> = or %24, %34
- %36:vec2<u32> = or %19, %35
- %37:vec2<u32> = or %14, %36
- %38:vec2<bool> = eq %30, vec2<u32>(0u)
- %39:vec2<u32> = select %37, vec2<u32>(4294967295u), %38
- %40:vec2<i32> = bitcast %39
- %res:ptr<function, vec2<i32>, read_write> = var, %40
- %42:vec2<i32> = load %res
- store %prevent_dce, %42
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstLeadingBit_a622c2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %44:void = call %firstLeadingBit_a622c2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_a622c2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %46:void = call %firstLeadingBit_a622c2
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_a622c2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %48:void = call %firstLeadingBit_a622c2
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.ir.msl
index 45f4401..a5db8d3 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.ir.msl
@@ -1,78 +1,36 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void firstLeadingBit_c1f940(tint_module_vars_struct tint_module_vars) {
+ int4 arg_0 = int4(1);
+ uint4 const v = as_type<uint4>(arg_0);
+ uint4 const v_1 = select(~(v), v, (v < uint4(2147483648u)));
+ uint4 const v_2 = select(uint4(16u), uint4(0u), ((v_1 & uint4(4294901760u)) == uint4(0u)));
+ uint4 const v_3 = select(uint4(8u), uint4(0u), (((v_1 >> v_2) & uint4(65280u)) == uint4(0u)));
+ uint4 const v_4 = select(uint4(4u), uint4(0u), ((((v_1 >> v_2) >> v_3) & uint4(240u)) == uint4(0u)));
+ uint4 const v_5 = select(uint4(2u), uint4(0u), (((((v_1 >> v_2) >> v_3) >> v_4) & uint4(12u)) == uint4(0u)));
+ int4 res = as_type<int4>(select((v_2 | (v_3 | (v_4 | (v_5 | select(uint4(1u), uint4(0u), ((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uint4(2u)) == uint4(0u))))))), uint4(4294967295u), (((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) == uint4(0u))));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstLeadingBit_c1f940 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %arg_0
- %5:vec4<u32> = bitcast %4
- %6:vec4<u32> = let %5
- %7:vec4<u32> = complement %6
- %8:vec4<bool> = lt %6, vec4<u32>(2147483648u)
- %9:vec4<u32> = select %7, %6, %8
- %10:vec4<u32> = let %9
- %11:vec4<u32> = and %10, vec4<u32>(4294901760u)
- %12:vec4<bool> = eq %11, vec4<u32>(0u)
- %13:vec4<u32> = select vec4<u32>(16u), vec4<u32>(0u), %12
- %14:vec4<u32> = let %13
- %15:vec4<u32> = shr %10, %14
- %16:vec4<u32> = and %15, vec4<u32>(65280u)
- %17:vec4<bool> = eq %16, vec4<u32>(0u)
- %18:vec4<u32> = select vec4<u32>(8u), vec4<u32>(0u), %17
- %19:vec4<u32> = let %18
- %20:vec4<u32> = shr %15, %19
- %21:vec4<u32> = and %20, vec4<u32>(240u)
- %22:vec4<bool> = eq %21, vec4<u32>(0u)
- %23:vec4<u32> = select vec4<u32>(4u), vec4<u32>(0u), %22
- %24:vec4<u32> = let %23
- %25:vec4<u32> = shr %20, %24
- %26:vec4<u32> = and %25, vec4<u32>(12u)
- %27:vec4<bool> = eq %26, vec4<u32>(0u)
- %28:vec4<u32> = select vec4<u32>(2u), vec4<u32>(0u), %27
- %29:vec4<u32> = let %28
- %30:vec4<u32> = shr %25, %29
- %31:vec4<u32> = and %30, vec4<u32>(2u)
- %32:vec4<bool> = eq %31, vec4<u32>(0u)
- %33:vec4<u32> = select vec4<u32>(1u), vec4<u32>(0u), %32
- %34:vec4<u32> = or %29, %33
- %35:vec4<u32> = or %24, %34
- %36:vec4<u32> = or %19, %35
- %37:vec4<u32> = or %14, %36
- %38:vec4<bool> = eq %30, vec4<u32>(0u)
- %39:vec4<u32> = select %37, vec4<u32>(4294967295u), %38
- %40:vec4<i32> = bitcast %39
- %res:ptr<function, vec4<i32>, read_write> = var, %40
- %42:vec4<i32> = load %res
- store %prevent_dce, %42
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstLeadingBit_c1f940(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %44:void = call %firstLeadingBit_c1f940
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_c1f940(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %46:void = call %firstLeadingBit_c1f940
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_c1f940(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %48:void = call %firstLeadingBit_c1f940
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/f0779d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstLeadingBit/f0779d.wgsl.expected.ir.msl
index 5392912..16187d5 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/f0779d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/f0779d.wgsl.expected.ir.msl
@@ -1,72 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void firstLeadingBit_f0779d(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ uint const v = arg_0;
+ uint const v_1 = select(16u, 0u, ((v & 4294901760u) == 0u));
+ uint const v_2 = select(8u, 0u, (((v >> v_1) & 65280u) == 0u));
+ uint const v_3 = select(4u, 0u, ((((v >> v_1) >> v_2) & 240u) == 0u));
+ uint const v_4 = select(2u, 0u, (((((v >> v_1) >> v_2) >> v_3) & 12u) == 0u));
+ uint res = select((v_1 | (v_2 | (v_3 | (v_4 | select(1u, 0u, ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & 2u) == 0u)))))), 4294967295u, (((((v >> v_1) >> v_2) >> v_3) >> v_4) == 0u));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstLeadingBit_f0779d = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %arg_0
- %5:u32 = let %4
- %6:u32 = and %5, 4294901760u
- %7:bool = eq %6, 0u
- %8:u32 = select 16u, 0u, %7
- %9:u32 = let %8
- %10:u32 = shr %5, %9
- %11:u32 = and %10, 65280u
- %12:bool = eq %11, 0u
- %13:u32 = select 8u, 0u, %12
- %14:u32 = let %13
- %15:u32 = shr %10, %14
- %16:u32 = and %15, 240u
- %17:bool = eq %16, 0u
- %18:u32 = select 4u, 0u, %17
- %19:u32 = let %18
- %20:u32 = shr %15, %19
- %21:u32 = and %20, 12u
- %22:bool = eq %21, 0u
- %23:u32 = select 2u, 0u, %22
- %24:u32 = let %23
- %25:u32 = shr %20, %24
- %26:u32 = and %25, 2u
- %27:bool = eq %26, 0u
- %28:u32 = select 1u, 0u, %27
- %29:u32 = or %24, %28
- %30:u32 = or %19, %29
- %31:u32 = or %14, %30
- %32:u32 = or %9, %31
- %33:bool = eq %25, 0u
- %34:u32 = select %32, 4294967295u, %33
- %res:ptr<function, u32, read_write> = var, %34
- %36:u32 = load %res
- store %prevent_dce, %36
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstLeadingBit_f0779d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %38:void = call %firstLeadingBit_f0779d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_f0779d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %40:void = call %firstLeadingBit_f0779d
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstLeadingBit_f0779d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %42:void = call %firstLeadingBit_f0779d
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.ir.msl
index 7bb011e..2f0af56 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.ir.msl
@@ -1,72 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void firstTrailingBit_110f2c(tint_module_vars_struct tint_module_vars) {
+ uint4 arg_0 = uint4(1u);
+ uint4 const v = arg_0;
+ uint4 const v_1 = select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)));
+ uint4 const v_2 = select(uint4(0u), uint4(8u), (((v >> v_1) & uint4(255u)) == uint4(0u)));
+ uint4 const v_3 = select(uint4(0u), uint4(4u), ((((v >> v_1) >> v_2) & uint4(15u)) == uint4(0u)));
+ uint4 const v_4 = select(uint4(0u), uint4(2u), (((((v >> v_1) >> v_2) >> v_3) & uint4(3u)) == uint4(0u)));
+ uint4 res = select((v_1 | (v_2 | (v_3 | (v_4 | select(uint4(0u), uint4(1u), ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uint4(1u)) == uint4(0u))))))), uint4(4294967295u), (((((v >> v_1) >> v_2) >> v_3) >> v_4) == uint4(0u)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstTrailingBit_110f2c = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %arg_0
- %5:vec4<u32> = let %4
- %6:vec4<u32> = and %5, vec4<u32>(65535u)
- %7:vec4<bool> = eq %6, vec4<u32>(0u)
- %8:vec4<u32> = select vec4<u32>(0u), vec4<u32>(16u), %7
- %9:vec4<u32> = let %8
- %10:vec4<u32> = shr %5, %9
- %11:vec4<u32> = and %10, vec4<u32>(255u)
- %12:vec4<bool> = eq %11, vec4<u32>(0u)
- %13:vec4<u32> = select vec4<u32>(0u), vec4<u32>(8u), %12
- %14:vec4<u32> = let %13
- %15:vec4<u32> = shr %10, %14
- %16:vec4<u32> = and %15, vec4<u32>(15u)
- %17:vec4<bool> = eq %16, vec4<u32>(0u)
- %18:vec4<u32> = select vec4<u32>(0u), vec4<u32>(4u), %17
- %19:vec4<u32> = let %18
- %20:vec4<u32> = shr %15, %19
- %21:vec4<u32> = and %20, vec4<u32>(3u)
- %22:vec4<bool> = eq %21, vec4<u32>(0u)
- %23:vec4<u32> = select vec4<u32>(0u), vec4<u32>(2u), %22
- %24:vec4<u32> = let %23
- %25:vec4<u32> = shr %20, %24
- %26:vec4<u32> = and %25, vec4<u32>(1u)
- %27:vec4<bool> = eq %26, vec4<u32>(0u)
- %28:vec4<u32> = select vec4<u32>(0u), vec4<u32>(1u), %27
- %29:vec4<u32> = or %24, %28
- %30:vec4<u32> = or %19, %29
- %31:vec4<u32> = or %14, %30
- %32:vec4<u32> = or %9, %31
- %33:vec4<bool> = eq %25, vec4<u32>(0u)
- %34:vec4<u32> = select %32, vec4<u32>(4294967295u), %33
- %res:ptr<function, vec4<u32>, read_write> = var, %34
- %36:vec4<u32> = load %res
- store %prevent_dce, %36
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstTrailingBit_110f2c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %38:void = call %firstTrailingBit_110f2c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_110f2c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %40:void = call %firstTrailingBit_110f2c
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_110f2c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %42:void = call %firstTrailingBit_110f2c
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/3a2acc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstTrailingBit/3a2acc.wgsl.expected.ir.msl
index 3b34436..b816c4d 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/3a2acc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/3a2acc.wgsl.expected.ir.msl
@@ -1,74 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void firstTrailingBit_3a2acc(tint_module_vars_struct tint_module_vars) {
+ int arg_0 = 1;
+ uint const v = as_type<uint>(arg_0);
+ uint const v_1 = select(0u, 16u, ((v & 65535u) == 0u));
+ uint const v_2 = select(0u, 8u, (((v >> v_1) & 255u) == 0u));
+ uint const v_3 = select(0u, 4u, ((((v >> v_1) >> v_2) & 15u) == 0u));
+ uint const v_4 = select(0u, 2u, (((((v >> v_1) >> v_2) >> v_3) & 3u) == 0u));
+ int res = as_type<int>(select((v_1 | (v_2 | (v_3 | (v_4 | select(0u, 1u, ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & 1u) == 0u)))))), 4294967295u, (((((v >> v_1) >> v_2) >> v_3) >> v_4) == 0u)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstTrailingBit_3a2acc = func():void {
- $B2: {
- %arg_0:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %arg_0
- %5:u32 = bitcast %4
- %6:u32 = let %5
- %7:u32 = and %6, 65535u
- %8:bool = eq %7, 0u
- %9:u32 = select 0u, 16u, %8
- %10:u32 = let %9
- %11:u32 = shr %6, %10
- %12:u32 = and %11, 255u
- %13:bool = eq %12, 0u
- %14:u32 = select 0u, 8u, %13
- %15:u32 = let %14
- %16:u32 = shr %11, %15
- %17:u32 = and %16, 15u
- %18:bool = eq %17, 0u
- %19:u32 = select 0u, 4u, %18
- %20:u32 = let %19
- %21:u32 = shr %16, %20
- %22:u32 = and %21, 3u
- %23:bool = eq %22, 0u
- %24:u32 = select 0u, 2u, %23
- %25:u32 = let %24
- %26:u32 = shr %21, %25
- %27:u32 = and %26, 1u
- %28:bool = eq %27, 0u
- %29:u32 = select 0u, 1u, %28
- %30:u32 = or %25, %29
- %31:u32 = or %20, %30
- %32:u32 = or %15, %31
- %33:u32 = or %10, %32
- %34:bool = eq %26, 0u
- %35:u32 = select %33, 4294967295u, %34
- %36:i32 = bitcast %35
- %res:ptr<function, i32, read_write> = var, %36
- %38:i32 = load %res
- store %prevent_dce, %38
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstTrailingBit_3a2acc(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %40:void = call %firstTrailingBit_3a2acc
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_3a2acc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %42:void = call %firstTrailingBit_3a2acc
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_3a2acc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %44:void = call %firstTrailingBit_3a2acc
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.ir.msl
index 5c2abb7..13368bc 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.ir.msl
@@ -1,72 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void firstTrailingBit_45eb10(tint_module_vars_struct tint_module_vars) {
+ uint2 arg_0 = uint2(1u);
+ uint2 const v = arg_0;
+ uint2 const v_1 = select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)));
+ uint2 const v_2 = select(uint2(0u), uint2(8u), (((v >> v_1) & uint2(255u)) == uint2(0u)));
+ uint2 const v_3 = select(uint2(0u), uint2(4u), ((((v >> v_1) >> v_2) & uint2(15u)) == uint2(0u)));
+ uint2 const v_4 = select(uint2(0u), uint2(2u), (((((v >> v_1) >> v_2) >> v_3) & uint2(3u)) == uint2(0u)));
+ uint2 res = select((v_1 | (v_2 | (v_3 | (v_4 | select(uint2(0u), uint2(1u), ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uint2(1u)) == uint2(0u))))))), uint2(4294967295u), (((((v >> v_1) >> v_2) >> v_3) >> v_4) == uint2(0u)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstTrailingBit_45eb10 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %arg_0
- %5:vec2<u32> = let %4
- %6:vec2<u32> = and %5, vec2<u32>(65535u)
- %7:vec2<bool> = eq %6, vec2<u32>(0u)
- %8:vec2<u32> = select vec2<u32>(0u), vec2<u32>(16u), %7
- %9:vec2<u32> = let %8
- %10:vec2<u32> = shr %5, %9
- %11:vec2<u32> = and %10, vec2<u32>(255u)
- %12:vec2<bool> = eq %11, vec2<u32>(0u)
- %13:vec2<u32> = select vec2<u32>(0u), vec2<u32>(8u), %12
- %14:vec2<u32> = let %13
- %15:vec2<u32> = shr %10, %14
- %16:vec2<u32> = and %15, vec2<u32>(15u)
- %17:vec2<bool> = eq %16, vec2<u32>(0u)
- %18:vec2<u32> = select vec2<u32>(0u), vec2<u32>(4u), %17
- %19:vec2<u32> = let %18
- %20:vec2<u32> = shr %15, %19
- %21:vec2<u32> = and %20, vec2<u32>(3u)
- %22:vec2<bool> = eq %21, vec2<u32>(0u)
- %23:vec2<u32> = select vec2<u32>(0u), vec2<u32>(2u), %22
- %24:vec2<u32> = let %23
- %25:vec2<u32> = shr %20, %24
- %26:vec2<u32> = and %25, vec2<u32>(1u)
- %27:vec2<bool> = eq %26, vec2<u32>(0u)
- %28:vec2<u32> = select vec2<u32>(0u), vec2<u32>(1u), %27
- %29:vec2<u32> = or %24, %28
- %30:vec2<u32> = or %19, %29
- %31:vec2<u32> = or %14, %30
- %32:vec2<u32> = or %9, %31
- %33:vec2<bool> = eq %25, vec2<u32>(0u)
- %34:vec2<u32> = select %32, vec2<u32>(4294967295u), %33
- %res:ptr<function, vec2<u32>, read_write> = var, %34
- %36:vec2<u32> = load %res
- store %prevent_dce, %36
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstTrailingBit_45eb10(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %38:void = call %firstTrailingBit_45eb10
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_45eb10(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %40:void = call %firstTrailingBit_45eb10
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_45eb10(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %42:void = call %firstTrailingBit_45eb10
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/47d475.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstTrailingBit/47d475.wgsl.expected.ir.msl
index cdaebf9..4053667 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/47d475.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/47d475.wgsl.expected.ir.msl
@@ -1,72 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void firstTrailingBit_47d475(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ uint const v = arg_0;
+ uint const v_1 = select(0u, 16u, ((v & 65535u) == 0u));
+ uint const v_2 = select(0u, 8u, (((v >> v_1) & 255u) == 0u));
+ uint const v_3 = select(0u, 4u, ((((v >> v_1) >> v_2) & 15u) == 0u));
+ uint const v_4 = select(0u, 2u, (((((v >> v_1) >> v_2) >> v_3) & 3u) == 0u));
+ uint res = select((v_1 | (v_2 | (v_3 | (v_4 | select(0u, 1u, ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & 1u) == 0u)))))), 4294967295u, (((((v >> v_1) >> v_2) >> v_3) >> v_4) == 0u));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstTrailingBit_47d475 = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %arg_0
- %5:u32 = let %4
- %6:u32 = and %5, 65535u
- %7:bool = eq %6, 0u
- %8:u32 = select 0u, 16u, %7
- %9:u32 = let %8
- %10:u32 = shr %5, %9
- %11:u32 = and %10, 255u
- %12:bool = eq %11, 0u
- %13:u32 = select 0u, 8u, %12
- %14:u32 = let %13
- %15:u32 = shr %10, %14
- %16:u32 = and %15, 15u
- %17:bool = eq %16, 0u
- %18:u32 = select 0u, 4u, %17
- %19:u32 = let %18
- %20:u32 = shr %15, %19
- %21:u32 = and %20, 3u
- %22:bool = eq %21, 0u
- %23:u32 = select 0u, 2u, %22
- %24:u32 = let %23
- %25:u32 = shr %20, %24
- %26:u32 = and %25, 1u
- %27:bool = eq %26, 0u
- %28:u32 = select 0u, 1u, %27
- %29:u32 = or %24, %28
- %30:u32 = or %19, %29
- %31:u32 = or %14, %30
- %32:u32 = or %9, %31
- %33:bool = eq %25, 0u
- %34:u32 = select %32, 4294967295u, %33
- %res:ptr<function, u32, read_write> = var, %34
- %36:u32 = load %res
- store %prevent_dce, %36
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstTrailingBit_47d475(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %38:void = call %firstTrailingBit_47d475
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_47d475(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %40:void = call %firstTrailingBit_47d475
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_47d475(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %42:void = call %firstTrailingBit_47d475
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.ir.msl
index 087ea96..f335055 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.ir.msl
@@ -1,74 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void firstTrailingBit_50c072(tint_module_vars_struct tint_module_vars) {
+ int2 arg_0 = int2(1);
+ uint2 const v = as_type<uint2>(arg_0);
+ uint2 const v_1 = select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)));
+ uint2 const v_2 = select(uint2(0u), uint2(8u), (((v >> v_1) & uint2(255u)) == uint2(0u)));
+ uint2 const v_3 = select(uint2(0u), uint2(4u), ((((v >> v_1) >> v_2) & uint2(15u)) == uint2(0u)));
+ uint2 const v_4 = select(uint2(0u), uint2(2u), (((((v >> v_1) >> v_2) >> v_3) & uint2(3u)) == uint2(0u)));
+ int2 res = as_type<int2>(select((v_1 | (v_2 | (v_3 | (v_4 | select(uint2(0u), uint2(1u), ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uint2(1u)) == uint2(0u))))))), uint2(4294967295u), (((((v >> v_1) >> v_2) >> v_3) >> v_4) == uint2(0u))));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstTrailingBit_50c072 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %arg_0
- %5:vec2<u32> = bitcast %4
- %6:vec2<u32> = let %5
- %7:vec2<u32> = and %6, vec2<u32>(65535u)
- %8:vec2<bool> = eq %7, vec2<u32>(0u)
- %9:vec2<u32> = select vec2<u32>(0u), vec2<u32>(16u), %8
- %10:vec2<u32> = let %9
- %11:vec2<u32> = shr %6, %10
- %12:vec2<u32> = and %11, vec2<u32>(255u)
- %13:vec2<bool> = eq %12, vec2<u32>(0u)
- %14:vec2<u32> = select vec2<u32>(0u), vec2<u32>(8u), %13
- %15:vec2<u32> = let %14
- %16:vec2<u32> = shr %11, %15
- %17:vec2<u32> = and %16, vec2<u32>(15u)
- %18:vec2<bool> = eq %17, vec2<u32>(0u)
- %19:vec2<u32> = select vec2<u32>(0u), vec2<u32>(4u), %18
- %20:vec2<u32> = let %19
- %21:vec2<u32> = shr %16, %20
- %22:vec2<u32> = and %21, vec2<u32>(3u)
- %23:vec2<bool> = eq %22, vec2<u32>(0u)
- %24:vec2<u32> = select vec2<u32>(0u), vec2<u32>(2u), %23
- %25:vec2<u32> = let %24
- %26:vec2<u32> = shr %21, %25
- %27:vec2<u32> = and %26, vec2<u32>(1u)
- %28:vec2<bool> = eq %27, vec2<u32>(0u)
- %29:vec2<u32> = select vec2<u32>(0u), vec2<u32>(1u), %28
- %30:vec2<u32> = or %25, %29
- %31:vec2<u32> = or %20, %30
- %32:vec2<u32> = or %15, %31
- %33:vec2<u32> = or %10, %32
- %34:vec2<bool> = eq %26, vec2<u32>(0u)
- %35:vec2<u32> = select %33, vec2<u32>(4294967295u), %34
- %36:vec2<i32> = bitcast %35
- %res:ptr<function, vec2<i32>, read_write> = var, %36
- %38:vec2<i32> = load %res
- store %prevent_dce, %38
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstTrailingBit_50c072(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %40:void = call %firstTrailingBit_50c072
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_50c072(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %42:void = call %firstTrailingBit_50c072
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_50c072(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %44:void = call %firstTrailingBit_50c072
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.ir.msl
index 7f110cc..1285957 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.ir.msl
@@ -1,74 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void firstTrailingBit_7496d6(tint_module_vars_struct tint_module_vars) {
+ int3 arg_0 = int3(1);
+ uint3 const v = as_type<uint3>(arg_0);
+ uint3 const v_1 = select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)));
+ uint3 const v_2 = select(uint3(0u), uint3(8u), (((v >> v_1) & uint3(255u)) == uint3(0u)));
+ uint3 const v_3 = select(uint3(0u), uint3(4u), ((((v >> v_1) >> v_2) & uint3(15u)) == uint3(0u)));
+ uint3 const v_4 = select(uint3(0u), uint3(2u), (((((v >> v_1) >> v_2) >> v_3) & uint3(3u)) == uint3(0u)));
+ int3 res = as_type<int3>(select((v_1 | (v_2 | (v_3 | (v_4 | select(uint3(0u), uint3(1u), ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uint3(1u)) == uint3(0u))))))), uint3(4294967295u), (((((v >> v_1) >> v_2) >> v_3) >> v_4) == uint3(0u))));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstTrailingBit_7496d6 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %arg_0
- %5:vec3<u32> = bitcast %4
- %6:vec3<u32> = let %5
- %7:vec3<u32> = and %6, vec3<u32>(65535u)
- %8:vec3<bool> = eq %7, vec3<u32>(0u)
- %9:vec3<u32> = select vec3<u32>(0u), vec3<u32>(16u), %8
- %10:vec3<u32> = let %9
- %11:vec3<u32> = shr %6, %10
- %12:vec3<u32> = and %11, vec3<u32>(255u)
- %13:vec3<bool> = eq %12, vec3<u32>(0u)
- %14:vec3<u32> = select vec3<u32>(0u), vec3<u32>(8u), %13
- %15:vec3<u32> = let %14
- %16:vec3<u32> = shr %11, %15
- %17:vec3<u32> = and %16, vec3<u32>(15u)
- %18:vec3<bool> = eq %17, vec3<u32>(0u)
- %19:vec3<u32> = select vec3<u32>(0u), vec3<u32>(4u), %18
- %20:vec3<u32> = let %19
- %21:vec3<u32> = shr %16, %20
- %22:vec3<u32> = and %21, vec3<u32>(3u)
- %23:vec3<bool> = eq %22, vec3<u32>(0u)
- %24:vec3<u32> = select vec3<u32>(0u), vec3<u32>(2u), %23
- %25:vec3<u32> = let %24
- %26:vec3<u32> = shr %21, %25
- %27:vec3<u32> = and %26, vec3<u32>(1u)
- %28:vec3<bool> = eq %27, vec3<u32>(0u)
- %29:vec3<u32> = select vec3<u32>(0u), vec3<u32>(1u), %28
- %30:vec3<u32> = or %25, %29
- %31:vec3<u32> = or %20, %30
- %32:vec3<u32> = or %15, %31
- %33:vec3<u32> = or %10, %32
- %34:vec3<bool> = eq %26, vec3<u32>(0u)
- %35:vec3<u32> = select %33, vec3<u32>(4294967295u), %34
- %36:vec3<i32> = bitcast %35
- %res:ptr<function, vec3<i32>, read_write> = var, %36
- %38:vec3<i32> = load %res
- store %prevent_dce, %38
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstTrailingBit_7496d6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %40:void = call %firstTrailingBit_7496d6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_7496d6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %42:void = call %firstTrailingBit_7496d6
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_7496d6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %44:void = call %firstTrailingBit_7496d6
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.ir.msl
index be6f04a..00a02fd 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.ir.msl
@@ -1,74 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void firstTrailingBit_86551b(tint_module_vars_struct tint_module_vars) {
+ int4 arg_0 = int4(1);
+ uint4 const v = as_type<uint4>(arg_0);
+ uint4 const v_1 = select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)));
+ uint4 const v_2 = select(uint4(0u), uint4(8u), (((v >> v_1) & uint4(255u)) == uint4(0u)));
+ uint4 const v_3 = select(uint4(0u), uint4(4u), ((((v >> v_1) >> v_2) & uint4(15u)) == uint4(0u)));
+ uint4 const v_4 = select(uint4(0u), uint4(2u), (((((v >> v_1) >> v_2) >> v_3) & uint4(3u)) == uint4(0u)));
+ int4 res = as_type<int4>(select((v_1 | (v_2 | (v_3 | (v_4 | select(uint4(0u), uint4(1u), ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uint4(1u)) == uint4(0u))))))), uint4(4294967295u), (((((v >> v_1) >> v_2) >> v_3) >> v_4) == uint4(0u))));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstTrailingBit_86551b = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %arg_0
- %5:vec4<u32> = bitcast %4
- %6:vec4<u32> = let %5
- %7:vec4<u32> = and %6, vec4<u32>(65535u)
- %8:vec4<bool> = eq %7, vec4<u32>(0u)
- %9:vec4<u32> = select vec4<u32>(0u), vec4<u32>(16u), %8
- %10:vec4<u32> = let %9
- %11:vec4<u32> = shr %6, %10
- %12:vec4<u32> = and %11, vec4<u32>(255u)
- %13:vec4<bool> = eq %12, vec4<u32>(0u)
- %14:vec4<u32> = select vec4<u32>(0u), vec4<u32>(8u), %13
- %15:vec4<u32> = let %14
- %16:vec4<u32> = shr %11, %15
- %17:vec4<u32> = and %16, vec4<u32>(15u)
- %18:vec4<bool> = eq %17, vec4<u32>(0u)
- %19:vec4<u32> = select vec4<u32>(0u), vec4<u32>(4u), %18
- %20:vec4<u32> = let %19
- %21:vec4<u32> = shr %16, %20
- %22:vec4<u32> = and %21, vec4<u32>(3u)
- %23:vec4<bool> = eq %22, vec4<u32>(0u)
- %24:vec4<u32> = select vec4<u32>(0u), vec4<u32>(2u), %23
- %25:vec4<u32> = let %24
- %26:vec4<u32> = shr %21, %25
- %27:vec4<u32> = and %26, vec4<u32>(1u)
- %28:vec4<bool> = eq %27, vec4<u32>(0u)
- %29:vec4<u32> = select vec4<u32>(0u), vec4<u32>(1u), %28
- %30:vec4<u32> = or %25, %29
- %31:vec4<u32> = or %20, %30
- %32:vec4<u32> = or %15, %31
- %33:vec4<u32> = or %10, %32
- %34:vec4<bool> = eq %26, vec4<u32>(0u)
- %35:vec4<u32> = select %33, vec4<u32>(4294967295u), %34
- %36:vec4<i32> = bitcast %35
- %res:ptr<function, vec4<i32>, read_write> = var, %36
- %38:vec4<i32> = load %res
- store %prevent_dce, %38
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstTrailingBit_86551b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %40:void = call %firstTrailingBit_86551b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_86551b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %42:void = call %firstTrailingBit_86551b
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_86551b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %44:void = call %firstTrailingBit_86551b
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.ir.msl
index 40e8482..a611e4f 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.ir.msl
@@ -1,72 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void firstTrailingBit_cb51ce(tint_module_vars_struct tint_module_vars) {
+ uint3 arg_0 = uint3(1u);
+ uint3 const v = arg_0;
+ uint3 const v_1 = select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)));
+ uint3 const v_2 = select(uint3(0u), uint3(8u), (((v >> v_1) & uint3(255u)) == uint3(0u)));
+ uint3 const v_3 = select(uint3(0u), uint3(4u), ((((v >> v_1) >> v_2) & uint3(15u)) == uint3(0u)));
+ uint3 const v_4 = select(uint3(0u), uint3(2u), (((((v >> v_1) >> v_2) >> v_3) & uint3(3u)) == uint3(0u)));
+ uint3 res = select((v_1 | (v_2 | (v_3 | (v_4 | select(uint3(0u), uint3(1u), ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uint3(1u)) == uint3(0u))))))), uint3(4294967295u), (((((v >> v_1) >> v_2) >> v_3) >> v_4) == uint3(0u)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%firstTrailingBit_cb51ce = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %arg_0
- %5:vec3<u32> = let %4
- %6:vec3<u32> = and %5, vec3<u32>(65535u)
- %7:vec3<bool> = eq %6, vec3<u32>(0u)
- %8:vec3<u32> = select vec3<u32>(0u), vec3<u32>(16u), %7
- %9:vec3<u32> = let %8
- %10:vec3<u32> = shr %5, %9
- %11:vec3<u32> = and %10, vec3<u32>(255u)
- %12:vec3<bool> = eq %11, vec3<u32>(0u)
- %13:vec3<u32> = select vec3<u32>(0u), vec3<u32>(8u), %12
- %14:vec3<u32> = let %13
- %15:vec3<u32> = shr %10, %14
- %16:vec3<u32> = and %15, vec3<u32>(15u)
- %17:vec3<bool> = eq %16, vec3<u32>(0u)
- %18:vec3<u32> = select vec3<u32>(0u), vec3<u32>(4u), %17
- %19:vec3<u32> = let %18
- %20:vec3<u32> = shr %15, %19
- %21:vec3<u32> = and %20, vec3<u32>(3u)
- %22:vec3<bool> = eq %21, vec3<u32>(0u)
- %23:vec3<u32> = select vec3<u32>(0u), vec3<u32>(2u), %22
- %24:vec3<u32> = let %23
- %25:vec3<u32> = shr %20, %24
- %26:vec3<u32> = and %25, vec3<u32>(1u)
- %27:vec3<bool> = eq %26, vec3<u32>(0u)
- %28:vec3<u32> = select vec3<u32>(0u), vec3<u32>(1u), %27
- %29:vec3<u32> = or %24, %28
- %30:vec3<u32> = or %19, %29
- %31:vec3<u32> = or %14, %30
- %32:vec3<u32> = or %9, %31
- %33:vec3<bool> = eq %25, vec3<u32>(0u)
- %34:vec3<u32> = select %32, vec3<u32>(4294967295u), %33
- %res:ptr<function, vec3<u32>, read_write> = var, %34
- %36:vec3<u32> = load %res
- store %prevent_dce, %36
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ firstTrailingBit_cb51ce(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %38:void = call %firstTrailingBit_cb51ce
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_cb51ce(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %40:void = call %firstTrailingBit_cb51ce
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ firstTrailingBit_cb51ce(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %42:void = call %firstTrailingBit_cb51ce
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.ir.msl
index 12f230d..fdf7095 100644
--- a/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void floor_3802c0(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.5h);
+ half3 res = floor(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%floor_3802c0 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.5h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = floor %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ floor_3802c0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %floor_3802c0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_3802c0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %floor_3802c0
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_3802c0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %floor_3802c0
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.ir.msl
index b6b85f8..df25cff 100644
--- a/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void floor_3bccc4(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.5f);
+ float4 res = floor(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%floor_3bccc4 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.5f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = floor %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ floor_3bccc4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %floor_3bccc4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_3bccc4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %floor_3bccc4
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_3bccc4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %floor_3bccc4
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.ir.msl
index 01eda4e..5fde3f7 100644
--- a/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void floor_5fc9ac(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.5f);
+ float2 res = floor(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%floor_5fc9ac = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.5f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = floor %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ floor_5fc9ac(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %floor_5fc9ac
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_5fc9ac(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %floor_5fc9ac
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_5fc9ac(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %floor_5fc9ac
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.ir.msl
index 3366cdc..b9da562 100644
--- a/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void floor_60d7ea(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.5f);
+ float3 res = floor(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%floor_60d7ea = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.5f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = floor %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ floor_60d7ea(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %floor_60d7ea
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_60d7ea(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %floor_60d7ea
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_60d7ea(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %floor_60d7ea
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/floor/66f154.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/floor/66f154.wgsl.expected.ir.msl
index a033a2f5..132143a 100644
--- a/test/tint/builtins/gen/var/floor/66f154.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/floor/66f154.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void floor_66f154(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.5f;
+ float res = floor(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%floor_66f154 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.5f
- %4:f32 = load %arg_0
- %5:f32 = floor %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ floor_66f154(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %floor_66f154
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_66f154(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %floor_66f154
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_66f154(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %floor_66f154
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.ir.msl
index 2420c6e..8a9100c 100644
--- a/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void floor_84658c(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.5h);
+ half2 res = floor(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%floor_84658c = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.5h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = floor %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ floor_84658c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %floor_84658c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_84658c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %floor_84658c
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_84658c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %floor_84658c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.ir.msl
index c4c5252..f071c9b 100644
--- a/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void floor_a2d31b(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.5h);
+ half4 res = floor(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%floor_a2d31b = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.5h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = floor %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ floor_a2d31b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %floor_a2d31b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_a2d31b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %floor_a2d31b
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_a2d31b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %floor_a2d31b
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.ir.msl
index f5f3ac4..2557170 100644
--- a/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void floor_b6e09c(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.5h;
+ half res = floor(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%floor_b6e09c = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.5h
- %4:f16 = load %arg_0
- %5:f16 = floor %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ floor_b6e09c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %floor_b6e09c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_b6e09c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %floor_b6e09c
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ floor_b6e09c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %floor_b6e09c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.ir.msl
index 936329a..5fc5658 100644
--- a/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void fma_26a7a9(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 arg_1 = float2(1.0f);
+ float2 arg_2 = float2(1.0f);
+ float2 res = fma(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fma_26a7a9 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_1:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_2:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %6:vec2<f32> = load %arg_0
- %7:vec2<f32> = load %arg_1
- %8:vec2<f32> = load %arg_2
- %9:vec2<f32> = fma %6, %7, %8
- %res:ptr<function, vec2<f32>, read_write> = var, %9
- %11:vec2<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fma_26a7a9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %fma_26a7a9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_26a7a9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %fma_26a7a9
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_26a7a9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %fma_26a7a9
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.ir.msl
index a7a2534..6974aaf 100644
--- a/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void fma_6a3283(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 arg_1 = float4(1.0f);
+ float4 arg_2 = float4(1.0f);
+ float4 res = fma(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fma_6a3283 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_1:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_2:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %6:vec4<f32> = load %arg_0
- %7:vec4<f32> = load %arg_1
- %8:vec4<f32> = load %arg_2
- %9:vec4<f32> = fma %6, %7, %8
- %res:ptr<function, vec4<f32>, read_write> = var, %9
- %11:vec4<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fma_6a3283(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %fma_6a3283
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_6a3283(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %fma_6a3283
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_6a3283(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %fma_6a3283
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.ir.msl
index 99c3c5d..9bf044d 100644
--- a/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void fma_ab7818(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 arg_1 = half4(1.0h);
+ half4 arg_2 = half4(1.0h);
+ half4 res = fma(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fma_ab7818 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_1:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_2:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %6:vec4<f16> = load %arg_0
- %7:vec4<f16> = load %arg_1
- %8:vec4<f16> = load %arg_2
- %9:vec4<f16> = fma %6, %7, %8
- %res:ptr<function, vec4<f16>, read_write> = var, %9
- %11:vec4<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fma_ab7818(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %fma_ab7818
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_ab7818(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %fma_ab7818
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_ab7818(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %fma_ab7818
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.ir.msl
index 9f83d66..8506b5f 100644
--- a/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void fma_bf21b6(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 arg_1 = half2(1.0h);
+ half2 arg_2 = half2(1.0h);
+ half2 res = fma(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fma_bf21b6 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_1:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_2:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %6:vec2<f16> = load %arg_0
- %7:vec2<f16> = load %arg_1
- %8:vec2<f16> = load %arg_2
- %9:vec2<f16> = fma %6, %7, %8
- %res:ptr<function, vec2<f16>, read_write> = var, %9
- %11:vec2<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fma_bf21b6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %fma_bf21b6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_bf21b6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %fma_bf21b6
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_bf21b6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %fma_bf21b6
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fma/c10ba3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fma/c10ba3.wgsl.expected.ir.msl
index 5859743..c9d328a 100644
--- a/test/tint/builtins/gen/var/fma/c10ba3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fma/c10ba3.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void fma_c10ba3(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float arg_1 = 1.0f;
+ float arg_2 = 1.0f;
+ float res = fma(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fma_c10ba3 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %arg_1:ptr<function, f32, read_write> = var, 1.0f
- %arg_2:ptr<function, f32, read_write> = var, 1.0f
- %6:f32 = load %arg_0
- %7:f32 = load %arg_1
- %8:f32 = load %arg_2
- %9:f32 = fma %6, %7, %8
- %res:ptr<function, f32, read_write> = var, %9
- %11:f32 = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fma_c10ba3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %fma_c10ba3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_c10ba3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %fma_c10ba3
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_c10ba3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %fma_c10ba3
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.ir.msl
index 7a91b27..70492f6 100644
--- a/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void fma_c8abb3(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half arg_1 = 1.0h;
+ half arg_2 = 1.0h;
+ half res = fma(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fma_c8abb3 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %arg_1:ptr<function, f16, read_write> = var, 1.0h
- %arg_2:ptr<function, f16, read_write> = var, 1.0h
- %6:f16 = load %arg_0
- %7:f16 = load %arg_1
- %8:f16 = load %arg_2
- %9:f16 = fma %6, %7, %8
- %res:ptr<function, f16, read_write> = var, %9
- %11:f16 = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fma_c8abb3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %fma_c8abb3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_c8abb3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %fma_c8abb3
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_c8abb3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %fma_c8abb3
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.ir.msl
index b64eea0..f680d68 100644
--- a/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void fma_e17c5c(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 arg_1 = float3(1.0f);
+ float3 arg_2 = float3(1.0f);
+ float3 res = fma(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fma_e17c5c = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_1:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_2:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %6:vec3<f32> = load %arg_0
- %7:vec3<f32> = load %arg_1
- %8:vec3<f32> = load %arg_2
- %9:vec3<f32> = fma %6, %7, %8
- %res:ptr<function, vec3<f32>, read_write> = var, %9
- %11:vec3<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fma_e17c5c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %fma_e17c5c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_e17c5c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %fma_e17c5c
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_e17c5c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %fma_e17c5c
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.ir.msl
index 6970e0c..eee61bb 100644
--- a/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void fma_e7abdc(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 arg_1 = half3(1.0h);
+ half3 arg_2 = half3(1.0h);
+ half3 res = fma(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fma_e7abdc = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_1:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_2:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %6:vec3<f16> = load %arg_0
- %7:vec3<f16> = load %arg_1
- %8:vec3<f16> = load %arg_2
- %9:vec3<f16> = fma %6, %7, %8
- %res:ptr<function, vec3<f16>, read_write> = var, %9
- %11:vec3<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fma_e7abdc(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %fma_e7abdc
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_e7abdc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %fma_e7abdc
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fma_e7abdc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %fma_e7abdc
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.ir.msl
index a5f0b4e..0297383 100644
--- a/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void fract_181aa9(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.25h);
+ half2 res = fract(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fract_181aa9 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.25h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = fract %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fract_181aa9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %fract_181aa9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_181aa9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %fract_181aa9
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_181aa9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %fract_181aa9
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.ir.msl
index 7548531..0b518de 100644
--- a/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void fract_498c77(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.25h);
+ half4 res = fract(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fract_498c77 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.25h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = fract %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fract_498c77(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %fract_498c77
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_498c77(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %fract_498c77
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_498c77(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %fract_498c77
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.ir.msl
index 2aebd35..430ee2f 100644
--- a/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void fract_8bc1e9(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.25f);
+ float4 res = fract(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fract_8bc1e9 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.25f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = fract %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fract_8bc1e9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %fract_8bc1e9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_8bc1e9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %fract_8bc1e9
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_8bc1e9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %fract_8bc1e9
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.ir.msl
index 27f3625..e5ac27b 100644
--- a/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void fract_943cb1(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.25f);
+ float2 res = fract(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fract_943cb1 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.25f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = fract %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fract_943cb1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %fract_943cb1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_943cb1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %fract_943cb1
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_943cb1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %fract_943cb1
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.ir.msl
index 055722d..6f0f5de 100644
--- a/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void fract_958a1d(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.25h);
+ half3 res = fract(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fract_958a1d = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.25h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = fract %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fract_958a1d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %fract_958a1d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_958a1d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %fract_958a1d
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_958a1d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %fract_958a1d
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.ir.msl
index 59fc0ce..035dccc 100644
--- a/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void fract_a49758(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.25f);
+ float3 res = fract(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fract_a49758 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.25f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = fract %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fract_a49758(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %fract_a49758
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_a49758(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %fract_a49758
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_a49758(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %fract_a49758
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.ir.msl
index 29710e2..37c5d39 100644
--- a/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void fract_eb38ce(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.25h;
+ half res = fract(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fract_eb38ce = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.25h
- %4:f16 = load %arg_0
- %5:f16 = fract %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fract_eb38ce(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %fract_eb38ce
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_eb38ce(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %fract_eb38ce
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_eb38ce(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %fract_eb38ce
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fract/fa5c71.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fract/fa5c71.wgsl.expected.ir.msl
index 4a90150..5b6caba 100644
--- a/test/tint/builtins/gen/var/fract/fa5c71.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fract/fa5c71.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void fract_fa5c71(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.25f;
+ float res = fract(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fract_fa5c71 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.25f
- %4:f32 = load %arg_0
- %5:f32 = fract %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ fract_fa5c71(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %fract_fa5c71
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_fa5c71(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %fract_fa5c71
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fract_fa5c71(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %fract_fa5c71
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.ir.msl
index bfa53f8..180709c 100644
--- a/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void fwidth_5d1b39(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = fwidth(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidth_5d1b39 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = fwidth %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidth_5d1b39(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %fwidth_5d1b39
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.ir.msl
index 6a2f226..95b0374 100644
--- a/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void fwidth_b83ebb(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = fwidth(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidth_b83ebb = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = fwidth %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidth_b83ebb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %fwidth_b83ebb
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.ir.msl
index ee4019b..0818a8d 100644
--- a/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void fwidth_d2ab9a(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = fwidth(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidth_d2ab9a = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = fwidth %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidth_d2ab9a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %fwidth_d2ab9a
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fwidth/df38ef.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fwidth/df38ef.wgsl.expected.ir.msl
index 6f11de3..e1a1baf 100644
--- a/test/tint/builtins/gen/var/fwidth/df38ef.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fwidth/df38ef.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void fwidth_df38ef(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = fwidth(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidth_df38ef = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = fwidth %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidth_df38ef(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %fwidth_df38ef
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fwidthCoarse/159c8a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fwidthCoarse/159c8a.wgsl.expected.ir.msl
index 271aa4a..b0bcfe6 100644
--- a/test/tint/builtins/gen/var/fwidthCoarse/159c8a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fwidthCoarse/159c8a.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void fwidthCoarse_159c8a(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = fwidth(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidthCoarse_159c8a = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = fwidthCoarse %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidthCoarse_159c8a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %fwidthCoarse_159c8a
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.ir.msl
index fa7b458..ebdfdea 100644
--- a/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void fwidthCoarse_1e59d9(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = fwidth(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidthCoarse_1e59d9 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = fwidthCoarse %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidthCoarse_1e59d9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %fwidthCoarse_1e59d9
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.ir.msl
index 6abf6c0..89b8f87 100644
--- a/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void fwidthCoarse_4e4fc4(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = fwidth(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidthCoarse_4e4fc4 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = fwidthCoarse %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidthCoarse_4e4fc4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %fwidthCoarse_4e4fc4
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.ir.msl
index 9d8ea01..1d86424 100644
--- a/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void fwidthCoarse_e653f7(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = fwidth(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidthCoarse_e653f7 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = fwidthCoarse %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidthCoarse_e653f7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %fwidthCoarse_e653f7
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.msl
index 7cea757..56d584b 100644
--- a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void fwidthFine_523fdc(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = fwidth(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidthFine_523fdc = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = fwidthFine %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidthFine_523fdc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %fwidthFine_523fdc
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.msl
index 6c05b53..8063a31 100644
--- a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void fwidthFine_68f4ef(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = fwidth(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidthFine_68f4ef = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = fwidthFine %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidthFine_68f4ef(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %fwidthFine_68f4ef
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.msl
index fc30376..42c2159 100644
--- a/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void fwidthFine_f1742d(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = fwidth(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidthFine_f1742d = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = fwidthFine %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidthFine_f1742d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %fwidthFine_f1742d
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.msl
index e6ec81c..beaae55 100644
--- a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void fwidthFine_ff6aa0(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = fwidth(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%fwidthFine_ff6aa0 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = fwidthFine %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ fwidthFine_ff6aa0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B3: {
- %9:void = call %fwidthFine_ff6aa0
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.ir.msl
index 9f7a806..a659256 100644
--- a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.ir.msl
@@ -1,56 +1,37 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void insertBits_3c7ba5(tint_module_vars_struct tint_module_vars) {
+ uint2 arg_0 = uint2(1u);
+ uint2 arg_1 = uint2(1u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ uint2 const v = arg_0;
+ uint2 const v_1 = arg_1;
+ uint const v_2 = arg_3;
+ uint const v_3 = min(arg_2, 32u);
+ uint2 res = insert_bits(v, v_1, v_3, min(v_2, (32u - v_3)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%insertBits_3c7ba5 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %arg_1:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %arg_3:ptr<function, u32, read_write> = var, 1u
- %7:vec2<u32> = load %arg_0
- %8:vec2<u32> = let %7
- %9:vec2<u32> = load %arg_1
- %10:vec2<u32> = let %9
- %11:u32 = load %arg_2
- %12:u32 = load %arg_3
- %13:u32 = let %12
- %14:u32 = min %11, 32u
- %15:u32 = let %14
- %16:u32 = sub 32u, %15
- %17:u32 = min %13, %16
- %18:vec2<u32> = insertBits %8, %10, %15, %17
- %res:ptr<function, vec2<u32>, read_write> = var, %18
- %20:vec2<u32> = load %res
- store %prevent_dce, %20
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ insertBits_3c7ba5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %22:void = call %insertBits_3c7ba5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_3c7ba5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %24:void = call %insertBits_3c7ba5
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_3c7ba5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %26:void = call %insertBits_3c7ba5
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.ir.msl
index 2870ac6..472f1e7 100644
--- a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.ir.msl
@@ -1,56 +1,37 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void insertBits_428b0b(tint_module_vars_struct tint_module_vars) {
+ int3 arg_0 = int3(1);
+ int3 arg_1 = int3(1);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ int3 const v = arg_0;
+ int3 const v_1 = arg_1;
+ uint const v_2 = arg_3;
+ uint const v_3 = min(arg_2, 32u);
+ int3 res = insert_bits(v, v_1, v_3, min(v_2, (32u - v_3)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%insertBits_428b0b = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %arg_1:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %arg_3:ptr<function, u32, read_write> = var, 1u
- %7:vec3<i32> = load %arg_0
- %8:vec3<i32> = let %7
- %9:vec3<i32> = load %arg_1
- %10:vec3<i32> = let %9
- %11:u32 = load %arg_2
- %12:u32 = load %arg_3
- %13:u32 = let %12
- %14:u32 = min %11, 32u
- %15:u32 = let %14
- %16:u32 = sub 32u, %15
- %17:u32 = min %13, %16
- %18:vec3<i32> = insertBits %8, %10, %15, %17
- %res:ptr<function, vec3<i32>, read_write> = var, %18
- %20:vec3<i32> = load %res
- store %prevent_dce, %20
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ insertBits_428b0b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %22:void = call %insertBits_428b0b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_428b0b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %24:void = call %insertBits_428b0b
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_428b0b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %26:void = call %insertBits_428b0b
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.ir.msl
index ffe2673..8a79f7b 100644
--- a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.ir.msl
@@ -1,56 +1,37 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void insertBits_51ede1(tint_module_vars_struct tint_module_vars) {
+ uint4 arg_0 = uint4(1u);
+ uint4 arg_1 = uint4(1u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ uint4 const v = arg_0;
+ uint4 const v_1 = arg_1;
+ uint const v_2 = arg_3;
+ uint const v_3 = min(arg_2, 32u);
+ uint4 res = insert_bits(v, v_1, v_3, min(v_2, (32u - v_3)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%insertBits_51ede1 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %arg_1:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %arg_3:ptr<function, u32, read_write> = var, 1u
- %7:vec4<u32> = load %arg_0
- %8:vec4<u32> = let %7
- %9:vec4<u32> = load %arg_1
- %10:vec4<u32> = let %9
- %11:u32 = load %arg_2
- %12:u32 = load %arg_3
- %13:u32 = let %12
- %14:u32 = min %11, 32u
- %15:u32 = let %14
- %16:u32 = sub 32u, %15
- %17:u32 = min %13, %16
- %18:vec4<u32> = insertBits %8, %10, %15, %17
- %res:ptr<function, vec4<u32>, read_write> = var, %18
- %20:vec4<u32> = load %res
- store %prevent_dce, %20
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ insertBits_51ede1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %22:void = call %insertBits_51ede1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_51ede1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %24:void = call %insertBits_51ede1
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_51ede1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %26:void = call %insertBits_51ede1
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/insertBits/65468b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/insertBits/65468b.wgsl.expected.ir.msl
index 383f3b3..5d8de10 100644
--- a/test/tint/builtins/gen/var/insertBits/65468b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/insertBits/65468b.wgsl.expected.ir.msl
@@ -1,56 +1,37 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void insertBits_65468b(tint_module_vars_struct tint_module_vars) {
+ int arg_0 = 1;
+ int arg_1 = 1;
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ int const v = arg_0;
+ int const v_1 = arg_1;
+ uint const v_2 = arg_3;
+ uint const v_3 = min(arg_2, 32u);
+ int res = insert_bits(v, v_1, v_3, min(v_2, (32u - v_3)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%insertBits_65468b = func():void {
- $B2: {
- %arg_0:ptr<function, i32, read_write> = var, 1i
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %arg_3:ptr<function, u32, read_write> = var, 1u
- %7:i32 = load %arg_0
- %8:i32 = let %7
- %9:i32 = load %arg_1
- %10:i32 = let %9
- %11:u32 = load %arg_2
- %12:u32 = load %arg_3
- %13:u32 = let %12
- %14:u32 = min %11, 32u
- %15:u32 = let %14
- %16:u32 = sub 32u, %15
- %17:u32 = min %13, %16
- %18:i32 = insertBits %8, %10, %15, %17
- %res:ptr<function, i32, read_write> = var, %18
- %20:i32 = load %res
- store %prevent_dce, %20
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ insertBits_65468b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %22:void = call %insertBits_65468b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_65468b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %24:void = call %insertBits_65468b
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_65468b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %26:void = call %insertBits_65468b
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.ir.msl
index b3de742..83fecf0 100644
--- a/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.ir.msl
@@ -1,56 +1,37 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void insertBits_87826b(tint_module_vars_struct tint_module_vars) {
+ uint3 arg_0 = uint3(1u);
+ uint3 arg_1 = uint3(1u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ uint3 const v = arg_0;
+ uint3 const v_1 = arg_1;
+ uint const v_2 = arg_3;
+ uint const v_3 = min(arg_2, 32u);
+ uint3 res = insert_bits(v, v_1, v_3, min(v_2, (32u - v_3)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%insertBits_87826b = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %arg_1:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %arg_3:ptr<function, u32, read_write> = var, 1u
- %7:vec3<u32> = load %arg_0
- %8:vec3<u32> = let %7
- %9:vec3<u32> = load %arg_1
- %10:vec3<u32> = let %9
- %11:u32 = load %arg_2
- %12:u32 = load %arg_3
- %13:u32 = let %12
- %14:u32 = min %11, 32u
- %15:u32 = let %14
- %16:u32 = sub 32u, %15
- %17:u32 = min %13, %16
- %18:vec3<u32> = insertBits %8, %10, %15, %17
- %res:ptr<function, vec3<u32>, read_write> = var, %18
- %20:vec3<u32> = load %res
- store %prevent_dce, %20
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ insertBits_87826b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %22:void = call %insertBits_87826b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_87826b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %24:void = call %insertBits_87826b
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_87826b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %26:void = call %insertBits_87826b
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.ir.msl
index e02fd5b..6879270 100644
--- a/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.ir.msl
@@ -1,56 +1,37 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void insertBits_d86978(tint_module_vars_struct tint_module_vars) {
+ int4 arg_0 = int4(1);
+ int4 arg_1 = int4(1);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ int4 const v = arg_0;
+ int4 const v_1 = arg_1;
+ uint const v_2 = arg_3;
+ uint const v_3 = min(arg_2, 32u);
+ int4 res = insert_bits(v, v_1, v_3, min(v_2, (32u - v_3)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%insertBits_d86978 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %arg_1:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %arg_3:ptr<function, u32, read_write> = var, 1u
- %7:vec4<i32> = load %arg_0
- %8:vec4<i32> = let %7
- %9:vec4<i32> = load %arg_1
- %10:vec4<i32> = let %9
- %11:u32 = load %arg_2
- %12:u32 = load %arg_3
- %13:u32 = let %12
- %14:u32 = min %11, 32u
- %15:u32 = let %14
- %16:u32 = sub 32u, %15
- %17:u32 = min %13, %16
- %18:vec4<i32> = insertBits %8, %10, %15, %17
- %res:ptr<function, vec4<i32>, read_write> = var, %18
- %20:vec4<i32> = load %res
- store %prevent_dce, %20
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ insertBits_d86978(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %22:void = call %insertBits_d86978
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_d86978(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %24:void = call %insertBits_d86978
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_d86978(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %26:void = call %insertBits_d86978
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/insertBits/e3e3a2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/insertBits/e3e3a2.wgsl.expected.ir.msl
index afb16eb..0fd9f2f 100644
--- a/test/tint/builtins/gen/var/insertBits/e3e3a2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/insertBits/e3e3a2.wgsl.expected.ir.msl
@@ -1,56 +1,37 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void insertBits_e3e3a2(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ uint const v = arg_0;
+ uint const v_1 = arg_1;
+ uint const v_2 = arg_3;
+ uint const v_3 = min(arg_2, 32u);
+ uint res = insert_bits(v, v_1, v_3, min(v_2, (32u - v_3)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%insertBits_e3e3a2 = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %arg_3:ptr<function, u32, read_write> = var, 1u
- %7:u32 = load %arg_0
- %8:u32 = let %7
- %9:u32 = load %arg_1
- %10:u32 = let %9
- %11:u32 = load %arg_2
- %12:u32 = load %arg_3
- %13:u32 = let %12
- %14:u32 = min %11, 32u
- %15:u32 = let %14
- %16:u32 = sub 32u, %15
- %17:u32 = min %13, %16
- %18:u32 = insertBits %8, %10, %15, %17
- %res:ptr<function, u32, read_write> = var, %18
- %20:u32 = load %res
- store %prevent_dce, %20
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ insertBits_e3e3a2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %22:void = call %insertBits_e3e3a2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_e3e3a2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %24:void = call %insertBits_e3e3a2
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_e3e3a2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %26:void = call %insertBits_e3e3a2
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.ir.msl
index 284d7e3..4d151a5 100644
--- a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.ir.msl
@@ -1,56 +1,37 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void insertBits_fe6ba6(tint_module_vars_struct tint_module_vars) {
+ int2 arg_0 = int2(1);
+ int2 arg_1 = int2(1);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ int2 const v = arg_0;
+ int2 const v_1 = arg_1;
+ uint const v_2 = arg_3;
+ uint const v_3 = min(arg_2, 32u);
+ int2 res = insert_bits(v, v_1, v_3, min(v_2, (32u - v_3)));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%insertBits_fe6ba6 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %arg_1:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %arg_3:ptr<function, u32, read_write> = var, 1u
- %7:vec2<i32> = load %arg_0
- %8:vec2<i32> = let %7
- %9:vec2<i32> = load %arg_1
- %10:vec2<i32> = let %9
- %11:u32 = load %arg_2
- %12:u32 = load %arg_3
- %13:u32 = let %12
- %14:u32 = min %11, 32u
- %15:u32 = let %14
- %16:u32 = sub 32u, %15
- %17:u32 = min %13, %16
- %18:vec2<i32> = insertBits %8, %10, %15, %17
- %res:ptr<function, vec2<i32>, read_write> = var, %18
- %20:vec2<i32> = load %res
- store %prevent_dce, %20
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ insertBits_fe6ba6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %22:void = call %insertBits_fe6ba6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_fe6ba6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %24:void = call %insertBits_fe6ba6
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ insertBits_fe6ba6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %26:void = call %insertBits_fe6ba6
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.ir.msl
index f25d3ee..a6e2b5b 100644
--- a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void inverseSqrt_440300(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half res = rsqrt(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%inverseSqrt_440300 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %arg_0
- %5:f16 = inverseSqrt %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ inverseSqrt_440300(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %inverseSqrt_440300
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_440300(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %inverseSqrt_440300
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_440300(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %inverseSqrt_440300
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.ir.msl
index f8fbfaf..8cc552b 100644
--- a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void inverseSqrt_5f51f8(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 res = rsqrt(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%inverseSqrt_5f51f8 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = inverseSqrt %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ inverseSqrt_5f51f8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %inverseSqrt_5f51f8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_5f51f8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %inverseSqrt_5f51f8
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_5f51f8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %inverseSqrt_5f51f8
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/inverseSqrt/84407e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/inverseSqrt/84407e.wgsl.expected.ir.msl
index d4afaa8..b4f9831 100644
--- a/test/tint/builtins/gen/var/inverseSqrt/84407e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/inverseSqrt/84407e.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void inverseSqrt_84407e(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = rsqrt(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%inverseSqrt_84407e = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = inverseSqrt %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ inverseSqrt_84407e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %inverseSqrt_84407e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_84407e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %inverseSqrt_84407e
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_84407e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %inverseSqrt_84407e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.ir.msl
index 6a4c8e2..da21190 100644
--- a/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void inverseSqrt_8f2bd2(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = rsqrt(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%inverseSqrt_8f2bd2 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = inverseSqrt %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ inverseSqrt_8f2bd2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %inverseSqrt_8f2bd2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_8f2bd2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %inverseSqrt_8f2bd2
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_8f2bd2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %inverseSqrt_8f2bd2
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.ir.msl
index 859d28f..139d67a 100644
--- a/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void inverseSqrt_b197b1(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = rsqrt(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%inverseSqrt_b197b1 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = inverseSqrt %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ inverseSqrt_b197b1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %inverseSqrt_b197b1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_b197b1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %inverseSqrt_b197b1
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_b197b1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %inverseSqrt_b197b1
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.ir.msl
index 1155726..88725e1 100644
--- a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void inverseSqrt_b85ebd(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 res = rsqrt(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%inverseSqrt_b85ebd = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = inverseSqrt %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ inverseSqrt_b85ebd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %inverseSqrt_b85ebd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_b85ebd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %inverseSqrt_b85ebd
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_b85ebd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %inverseSqrt_b85ebd
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.ir.msl
index 2eac11b..5d29b1f 100644
--- a/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void inverseSqrt_c22347(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = rsqrt(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%inverseSqrt_c22347 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = inverseSqrt %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ inverseSqrt_c22347(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %inverseSqrt_c22347
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_c22347(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %inverseSqrt_c22347
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_c22347(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %inverseSqrt_c22347
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.ir.msl
index ab8e2e3..be1e29c 100644
--- a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void inverseSqrt_cbdc70(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 res = rsqrt(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%inverseSqrt_cbdc70 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = inverseSqrt %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ inverseSqrt_cbdc70(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %inverseSqrt_cbdc70
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_cbdc70(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %inverseSqrt_cbdc70
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ inverseSqrt_cbdc70(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %inverseSqrt_cbdc70
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.ir.msl
index 1b4f5f2..e9d30d2 100644
--- a/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ldexp/082c1f.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void ldexp_082c1f(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half res = ldexp(arg_0, 1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_082c1f = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %arg_0
- %5:f16 = ldexp %4, 1i
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_082c1f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %ldexp_082c1f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_082c1f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %ldexp_082c1f
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_082c1f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %ldexp_082c1f
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.ir.msl
index 6abced5..532bc00 100644
--- a/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ldexp/217a31.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void ldexp_217a31(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 res = ldexp(arg_0, int2(1));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_217a31 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = ldexp %4, vec2<i32>(1i)
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_217a31(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %ldexp_217a31
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_217a31(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %ldexp_217a31
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_217a31(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %ldexp_217a31
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.ir.msl
index 0606c84..82bb915 100644
--- a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void ldexp_3d90b4(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ int2 arg_1 = int2(1);
+ half2 res = ldexp(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_3d90b4 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_1:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %5:vec2<f16> = load %arg_0
- %6:vec2<i32> = load %arg_1
- %7:vec2<f16> = ldexp %5, %6
- %res:ptr<function, vec2<f16>, read_write> = var, %7
- %9:vec2<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_3d90b4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %ldexp_3d90b4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_3d90b4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %ldexp_3d90b4
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_3d90b4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %ldexp_3d90b4
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.ir.msl
index 2aed51e..9739a70 100644
--- a/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ldexp/593ff3.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void ldexp_593ff3(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = ldexp(arg_0, int3(1));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_593ff3 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = ldexp %4, vec3<i32>(1i)
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_593ff3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %ldexp_593ff3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_593ff3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %ldexp_593ff3
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_593ff3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %ldexp_593ff3
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.ir.msl
index 5ab7660..0fefb4e 100644
--- a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void ldexp_624e0c(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ int arg_1 = 1;
+ half res = ldexp(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_624e0c = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:f16 = load %arg_0
- %6:i32 = load %arg_1
- %7:f16 = ldexp %5, %6
- %res:ptr<function, f16, read_write> = var, %7
- %9:f16 = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_624e0c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %ldexp_624e0c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_624e0c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %ldexp_624e0c
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_624e0c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %ldexp_624e0c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.ir.msl
index 568b34a..c7fadb7 100644
--- a/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ldexp/65a7bd.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void ldexp_65a7bd(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = ldexp(arg_0, int4(1));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_65a7bd = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = ldexp %4, vec4<i32>(1i)
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_65a7bd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %ldexp_65a7bd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_65a7bd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %ldexp_65a7bd
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_65a7bd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %ldexp_65a7bd
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.ir.msl
index 6462700..1506f19 100644
--- a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void ldexp_7485ce(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ int3 arg_1 = int3(1);
+ half3 res = ldexp(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_7485ce = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_1:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %5:vec3<f16> = load %arg_0
- %6:vec3<i32> = load %arg_1
- %7:vec3<f16> = ldexp %5, %6
- %res:ptr<function, vec3<f16>, read_write> = var, %7
- %9:vec3<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_7485ce(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %ldexp_7485ce
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_7485ce(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %ldexp_7485ce
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_7485ce(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %ldexp_7485ce
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.ir.msl
index 40c82ad..6e29996 100644
--- a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void ldexp_7fa13c(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ int4 arg_1 = int4(1);
+ half4 res = ldexp(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_7fa13c = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_1:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %5:vec4<f16> = load %arg_0
- %6:vec4<i32> = load %arg_1
- %7:vec4<f16> = ldexp %5, %6
- %res:ptr<function, vec4<f16>, read_write> = var, %7
- %9:vec4<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_7fa13c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %ldexp_7fa13c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_7fa13c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %ldexp_7fa13c
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_7fa13c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %ldexp_7fa13c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.ir.msl
index b880f13..a627cf2 100644
--- a/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ldexp/8a0c2f.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void ldexp_8a0c2f(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 res = ldexp(arg_0, int4(1));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_8a0c2f = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = ldexp %4, vec4<i32>(1i)
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_8a0c2f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %ldexp_8a0c2f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_8a0c2f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %ldexp_8a0c2f
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_8a0c2f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %ldexp_8a0c2f
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.ir.msl
index a0bbce0..29afd6d 100644
--- a/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ldexp/8e43e9.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void ldexp_8e43e9(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 res = ldexp(arg_0, int3(1));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_8e43e9 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = ldexp %4, vec3<i32>(1i)
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_8e43e9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %ldexp_8e43e9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_8e43e9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %ldexp_8e43e9
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_8e43e9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %ldexp_8e43e9
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.ir.msl
index d9062dd..0ec8e29 100644
--- a/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ldexp/a22679.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void ldexp_a22679(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = ldexp(arg_0, int2(1));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_a22679 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = ldexp %4, vec2<i32>(1i)
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_a22679(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %ldexp_a22679
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_a22679(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %ldexp_a22679
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_a22679(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %ldexp_a22679
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.ir.msl
index 5e0688e..f44ebb6 100644
--- a/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void ldexp_a31cdc(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ int3 arg_1 = int3(1);
+ float3 res = ldexp(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_a31cdc = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_1:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %5:vec3<f32> = load %arg_0
- %6:vec3<i32> = load %arg_1
- %7:vec3<f32> = ldexp %5, %6
- %res:ptr<function, vec3<f32>, read_write> = var, %7
- %9:vec3<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_a31cdc(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %ldexp_a31cdc
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_a31cdc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %ldexp_a31cdc
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_a31cdc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %ldexp_a31cdc
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.ir.msl
index f3e515a..dc96112 100644
--- a/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void ldexp_abd718(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ int2 arg_1 = int2(1);
+ float2 res = ldexp(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_abd718 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_1:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %5:vec2<f32> = load %arg_0
- %6:vec2<i32> = load %arg_1
- %7:vec2<f32> = ldexp %5, %6
- %res:ptr<function, vec2<f32>, read_write> = var, %7
- %9:vec2<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_abd718(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %ldexp_abd718
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_abd718(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %ldexp_abd718
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_abd718(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %ldexp_abd718
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.ir.msl
index d8ede5c..9092a85 100644
--- a/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ldexp/c9d0b7.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void ldexp_c9d0b7(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = ldexp(arg_0, 1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_c9d0b7 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = ldexp %4, 1i
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_c9d0b7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %ldexp_c9d0b7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_c9d0b7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %ldexp_c9d0b7
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_c9d0b7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %ldexp_c9d0b7
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.ir.msl
index 8563df5..617a559 100644
--- a/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void ldexp_cc9cde(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ int4 arg_1 = int4(1);
+ float4 res = ldexp(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_cc9cde = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_1:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %5:vec4<f32> = load %arg_0
- %6:vec4<i32> = load %arg_1
- %7:vec4<f32> = ldexp %5, %6
- %res:ptr<function, vec4<f32>, read_write> = var, %7
- %9:vec4<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_cc9cde(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %ldexp_cc9cde
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_cc9cde(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %ldexp_cc9cde
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_cc9cde(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %ldexp_cc9cde
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/ldexp/db8b49.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/ldexp/db8b49.wgsl.expected.ir.msl
index 612fd50..7361f93 100644
--- a/test/tint/builtins/gen/var/ldexp/db8b49.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/ldexp/db8b49.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void ldexp_db8b49(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ int arg_1 = 1;
+ float res = ldexp(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%ldexp_db8b49 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:f32 = load %arg_0
- %6:i32 = load %arg_1
- %7:f32 = ldexp %5, %6
- %res:ptr<function, f32, read_write> = var, %7
- %9:f32 = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ ldexp_db8b49(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %ldexp_db8b49
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_db8b49(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %ldexp_db8b49
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ ldexp_db8b49(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %ldexp_db8b49
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.ir.msl
index 5eef4a2..b33ca5d 100644
--- a/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void log_3da25a(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = log(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log_3da25a = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = log %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log_3da25a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %log_3da25a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_3da25a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %log_3da25a
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_3da25a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %log_3da25a
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.ir.msl
index fae22b8..5f3ad83 100644
--- a/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void log_6ff86f(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 res = log(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log_6ff86f = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = log %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log_6ff86f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %log_6ff86f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_6ff86f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %log_6ff86f
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_6ff86f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %log_6ff86f
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/log/7114a6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/log/7114a6.wgsl.expected.ir.msl
index e946e94..34d9881 100644
--- a/test/tint/builtins/gen/var/log/7114a6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/log/7114a6.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void log_7114a6(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = log(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log_7114a6 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = log %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log_7114a6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %log_7114a6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_7114a6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %log_7114a6
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_7114a6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %log_7114a6
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.ir.msl
index cb15115..c875e28 100644
--- a/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void log_8f0e32(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 res = log(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log_8f0e32 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = log %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log_8f0e32(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %log_8f0e32
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_8f0e32(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %log_8f0e32
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_8f0e32(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %log_8f0e32
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.ir.msl
index 643e4b0..74cec33 100644
--- a/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void log_b2ce28(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = log(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log_b2ce28 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = log %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log_b2ce28(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %log_b2ce28
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_b2ce28(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %log_b2ce28
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_b2ce28(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %log_b2ce28
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.ir.msl
index ab9f9f0..13b9691 100644
--- a/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void log_c9f489(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half res = log(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log_c9f489 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %arg_0
- %5:f16 = log %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log_c9f489(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %log_c9f489
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_c9f489(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %log_c9f489
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_c9f489(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %log_c9f489
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.ir.msl
index 0cc9552..9d23ffc 100644
--- a/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void log_cdbdc1(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 res = log(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log_cdbdc1 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = log %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log_cdbdc1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %log_cdbdc1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_cdbdc1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %log_cdbdc1
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_cdbdc1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %log_cdbdc1
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.ir.msl
index 5a04e6e..d65c404 100644
--- a/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void log_f4c570(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = log(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log_f4c570 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = log %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log_f4c570(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %log_f4c570
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_f4c570(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %log_f4c570
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log_f4c570(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %log_f4c570
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.ir.msl
index 5926a34..5e71295 100644
--- a/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void log2_38b478(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 res = log2(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log2_38b478 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = log2 %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log2_38b478(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %log2_38b478
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_38b478(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %log2_38b478
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_38b478(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %log2_38b478
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/log2/4036ed.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/log2/4036ed.wgsl.expected.ir.msl
index 4d1be75..7b8d383 100644
--- a/test/tint/builtins/gen/var/log2/4036ed.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/log2/4036ed.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void log2_4036ed(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = log2(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log2_4036ed = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = log2 %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log2_4036ed(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %log2_4036ed
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_4036ed(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %log2_4036ed
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_4036ed(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %log2_4036ed
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/log2/776088.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.ir.msl
index 4127f4e..0c653c3 100644
--- a/test/tint/builtins/gen/var/log2/776088.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void log2_776088(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 res = log2(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log2_776088 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = log2 %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log2_776088(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %log2_776088
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_776088(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %log2_776088
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_776088(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %log2_776088
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.ir.msl
index 81a2294..15b925f 100644
--- a/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void log2_8c10b3(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half res = log2(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log2_8c10b3 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %arg_0
- %5:f16 = log2 %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log2_8c10b3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %log2_8c10b3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_8c10b3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %log2_8c10b3
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_8c10b3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %log2_8c10b3
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/log2/902988.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/log2/902988.wgsl.expected.ir.msl
index 6f6f237..427ab01 100644
--- a/test/tint/builtins/gen/var/log2/902988.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/log2/902988.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void log2_902988(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = log2(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log2_902988 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = log2 %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log2_902988(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %log2_902988
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_902988(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %log2_902988
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_902988(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %log2_902988
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.ir.msl
index d8d20ec..fa80033 100644
--- a/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void log2_adb233(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = log2(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log2_adb233 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = log2 %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log2_adb233(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %log2_adb233
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_adb233(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %log2_adb233
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_adb233(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %log2_adb233
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.ir.msl
index d22e0f4..d5330ec 100644
--- a/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void log2_aea659(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = log2(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log2_aea659 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = log2 %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log2_aea659(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %log2_aea659
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_aea659(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %log2_aea659
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_aea659(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %log2_aea659
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.ir.msl
index 8e44561..5e4a288 100644
--- a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void log2_fb9f0b(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 res = log2(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%log2_fb9f0b = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = log2 %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ log2_fb9f0b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %log2_fb9f0b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_fb9f0b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %log2_fb9f0b
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ log2_fb9f0b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %log2_fb9f0b
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/max/0c0aae.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/max/0c0aae.wgsl.expected.ir.msl
index 42205d5..f1ac3af 100644
--- a/test/tint/builtins/gen/var/max/0c0aae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/max/0c0aae.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void max_0c0aae(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ uint arg_1 = 1u;
+ uint res = max(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_0c0aae = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %5:u32 = load %arg_0
- %6:u32 = load %arg_1
- %7:u32 = max %5, %6
- %res:ptr<function, u32, read_write> = var, %7
- %9:u32 = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_0c0aae(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %max_0c0aae
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_0c0aae(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %max_0c0aae
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_0c0aae(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %max_0c0aae
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.ir.msl
index 6a34953..1ea9d8d 100644
--- a/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void max_111ac0(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half arg_1 = 1.0h;
+ half res = max(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_111ac0 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %arg_1:ptr<function, f16, read_write> = var, 1.0h
- %5:f16 = load %arg_0
- %6:f16 = load %arg_1
- %7:f16 = max %5, %6
- %res:ptr<function, f16, read_write> = var, %7
- %9:f16 = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_111ac0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %max_111ac0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_111ac0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %max_111ac0
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_111ac0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %max_111ac0
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.ir.msl
index 284b967..1c5ad2b 100644
--- a/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void max_25eafe(tint_module_vars_struct tint_module_vars) {
+ int3 arg_0 = int3(1);
+ int3 arg_1 = int3(1);
+ int3 res = max(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_25eafe = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %arg_1:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %5:vec3<i32> = load %arg_0
- %6:vec3<i32> = load %arg_1
- %7:vec3<i32> = max %5, %6
- %res:ptr<function, vec3<i32>, read_write> = var, %7
- %9:vec3<i32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_25eafe(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %max_25eafe
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_25eafe(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %max_25eafe
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_25eafe(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %max_25eafe
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/max/320815.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/max/320815.wgsl.expected.ir.msl
index f37df09..97af1b0 100644
--- a/test/tint/builtins/gen/var/max/320815.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/max/320815.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void max_320815(tint_module_vars_struct tint_module_vars) {
+ uint2 arg_0 = uint2(1u);
+ uint2 arg_1 = uint2(1u);
+ uint2 res = max(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_320815 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %arg_1:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %5:vec2<u32> = load %arg_0
- %6:vec2<u32> = load %arg_1
- %7:vec2<u32> = max %5, %6
- %res:ptr<function, vec2<u32>, read_write> = var, %7
- %9:vec2<u32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_320815(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %max_320815
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_320815(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %max_320815
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_320815(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %max_320815
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/max/34956e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.ir.msl
index 502cf23..1b9b5e9 100644
--- a/test/tint/builtins/gen/var/max/34956e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void max_34956e(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 arg_1 = half2(1.0h);
+ half2 res = max(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_34956e = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_1:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %5:vec2<f16> = load %arg_0
- %6:vec2<f16> = load %arg_1
- %7:vec2<f16> = max %5, %6
- %res:ptr<function, vec2<f16>, read_write> = var, %7
- %9:vec2<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_34956e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %max_34956e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_34956e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %max_34956e
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_34956e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %max_34956e
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/max/445169.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/max/445169.wgsl.expected.ir.msl
index bbc95b7..4df90cc 100644
--- a/test/tint/builtins/gen/var/max/445169.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/max/445169.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void max_445169(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 arg_1 = half3(1.0h);
+ half3 res = max(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_445169 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_1:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %5:vec3<f16> = load %arg_0
- %6:vec3<f16> = load %arg_1
- %7:vec3<f16> = max %5, %6
- %res:ptr<function, vec3<f16>, read_write> = var, %7
- %9:vec3<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_445169(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %max_445169
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_445169(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %max_445169
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_445169(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %max_445169
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/max/44a39d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/max/44a39d.wgsl.expected.ir.msl
index 992d41f..b41170f 100644
--- a/test/tint/builtins/gen/var/max/44a39d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/max/44a39d.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void max_44a39d(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float arg_1 = 1.0f;
+ float res = max(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_44a39d = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %arg_1:ptr<function, f32, read_write> = var, 1.0f
- %5:f32 = load %arg_0
- %6:f32 = load %arg_1
- %7:f32 = max %5, %6
- %res:ptr<function, f32, read_write> = var, %7
- %9:f32 = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_44a39d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %max_44a39d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_44a39d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %max_44a39d
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_44a39d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %max_44a39d
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/max/453e04.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/max/453e04.wgsl.expected.ir.msl
index f614d96..aff8bd6 100644
--- a/test/tint/builtins/gen/var/max/453e04.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/max/453e04.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void max_453e04(tint_module_vars_struct tint_module_vars) {
+ uint4 arg_0 = uint4(1u);
+ uint4 arg_1 = uint4(1u);
+ uint4 res = max(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_453e04 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %arg_1:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %5:vec4<u32> = load %arg_0
- %6:vec4<u32> = load %arg_1
- %7:vec4<u32> = max %5, %6
- %res:ptr<function, vec4<u32>, read_write> = var, %7
- %9:vec4<u32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_453e04(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %max_453e04
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_453e04(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %max_453e04
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_453e04(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %max_453e04
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/max/462050.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/max/462050.wgsl.expected.ir.msl
index 2a0f47c..e8b220b 100644
--- a/test/tint/builtins/gen/var/max/462050.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/max/462050.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void max_462050(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 arg_1 = float2(1.0f);
+ float2 res = max(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_462050 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_1:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %5:vec2<f32> = load %arg_0
- %6:vec2<f32> = load %arg_1
- %7:vec2<f32> = max %5, %6
- %res:ptr<function, vec2<f32>, read_write> = var, %7
- %9:vec2<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_462050(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %max_462050
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_462050(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %max_462050
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_462050(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %max_462050
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.ir.msl
index f46ed4c..2245d43 100644
--- a/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void max_4883ac(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 arg_1 = float3(1.0f);
+ float3 res = max(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_4883ac = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_1:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %5:vec3<f32> = load %arg_0
- %6:vec3<f32> = load %arg_1
- %7:vec3<f32> = max %5, %6
- %res:ptr<function, vec3<f32>, read_write> = var, %7
- %9:vec3<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_4883ac(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %max_4883ac
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_4883ac(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %max_4883ac
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_4883ac(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %max_4883ac
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.ir.msl
index 023b4b7..e1da8d1 100644
--- a/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void max_85e6bc(tint_module_vars_struct tint_module_vars) {
+ int4 arg_0 = int4(1);
+ int4 arg_1 = int4(1);
+ int4 res = max(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_85e6bc = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %arg_1:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %5:vec4<i32> = load %arg_0
- %6:vec4<i32> = load %arg_1
- %7:vec4<i32> = max %5, %6
- %res:ptr<function, vec4<i32>, read_write> = var, %7
- %9:vec4<i32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_85e6bc(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %max_85e6bc
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_85e6bc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %max_85e6bc
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_85e6bc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %max_85e6bc
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/max/a93419.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/max/a93419.wgsl.expected.ir.msl
index 8819b3a..7fdb67d 100644
--- a/test/tint/builtins/gen/var/max/a93419.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/max/a93419.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void max_a93419(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 arg_1 = float4(1.0f);
+ float4 res = max(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_a93419 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_1:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %5:vec4<f32> = load %arg_0
- %6:vec4<f32> = load %arg_1
- %7:vec4<f32> = max %5, %6
- %res:ptr<function, vec4<f32>, read_write> = var, %7
- %9:vec4<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_a93419(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %max_a93419
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_a93419(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %max_a93419
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_a93419(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %max_a93419
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.ir.msl
index 28f7ea7..becaed6 100644
--- a/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void max_b1b73a(tint_module_vars_struct tint_module_vars) {
+ uint3 arg_0 = uint3(1u);
+ uint3 arg_1 = uint3(1u);
+ uint3 res = max(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_b1b73a = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %arg_1:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %5:vec3<u32> = load %arg_0
- %6:vec3<u32> = load %arg_1
- %7:vec3<u32> = max %5, %6
- %res:ptr<function, vec3<u32>, read_write> = var, %7
- %9:vec3<u32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_b1b73a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %max_b1b73a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_b1b73a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %max_b1b73a
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_b1b73a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %max_b1b73a
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/max/ce7c30.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/max/ce7c30.wgsl.expected.ir.msl
index 264afe5..57eb8d8 100644
--- a/test/tint/builtins/gen/var/max/ce7c30.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/max/ce7c30.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void max_ce7c30(tint_module_vars_struct tint_module_vars) {
+ int arg_0 = 1;
+ int arg_1 = 1;
+ int res = max(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_ce7c30 = func():void {
- $B2: {
- %arg_0:ptr<function, i32, read_write> = var, 1i
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:i32 = load %arg_0
- %6:i32 = load %arg_1
- %7:i32 = max %5, %6
- %res:ptr<function, i32, read_write> = var, %7
- %9:i32 = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_ce7c30(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %max_ce7c30
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_ce7c30(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %max_ce7c30
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_ce7c30(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %max_ce7c30
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.ir.msl
index d8612f2..cf1eaa8 100644
--- a/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void max_e14f2b(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 arg_1 = half4(1.0h);
+ half4 res = max(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_e14f2b = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_1:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %5:vec4<f16> = load %arg_0
- %6:vec4<f16> = load %arg_1
- %7:vec4<f16> = max %5, %6
- %res:ptr<function, vec4<f16>, read_write> = var, %7
- %9:vec4<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_e14f2b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %max_e14f2b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_e14f2b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %max_e14f2b
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_e14f2b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %max_e14f2b
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.ir.msl
index ee228be..f42e94d 100644
--- a/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void max_e8192f(tint_module_vars_struct tint_module_vars) {
+ int2 arg_0 = int2(1);
+ int2 arg_1 = int2(1);
+ int2 res = max(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%max_e8192f = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %arg_1:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %5:vec2<i32> = load %arg_0
- %6:vec2<i32> = load %arg_1
- %7:vec2<i32> = max %5, %6
- %res:ptr<function, vec2<i32>, read_write> = var, %7
- %9:vec2<i32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ max_e8192f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %max_e8192f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_e8192f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %max_e8192f
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ max_e8192f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %max_e8192f
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.ir.msl
index 5688d7a..61af3ef 100644
--- a/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void min_03c7e3(tint_module_vars_struct tint_module_vars) {
+ int2 arg_0 = int2(1);
+ int2 arg_1 = int2(1);
+ int2 res = min(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_03c7e3 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %arg_1:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %5:vec2<i32> = load %arg_0
- %6:vec2<i32> = load %arg_1
- %7:vec2<i32> = min %5, %6
- %res:ptr<function, vec2<i32>, read_write> = var, %7
- %9:vec2<i32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_03c7e3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %min_03c7e3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_03c7e3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %min_03c7e3
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_03c7e3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %min_03c7e3
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.ir.msl
index 87bf497..c655f69 100644
--- a/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void min_0dc614(tint_module_vars_struct tint_module_vars) {
+ uint4 arg_0 = uint4(1u);
+ uint4 arg_1 = uint4(1u);
+ uint4 res = min(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_0dc614 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %arg_1:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %5:vec4<u32> = load %arg_0
- %6:vec4<u32> = load %arg_1
- %7:vec4<u32> = min %5, %6
- %res:ptr<function, vec4<u32>, read_write> = var, %7
- %9:vec4<u32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_0dc614(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %min_0dc614
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_0dc614(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %min_0dc614
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_0dc614(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %min_0dc614
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.ir.msl
index 8595f0e..aeb28c0 100644
--- a/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void min_3941e1(tint_module_vars_struct tint_module_vars) {
+ int4 arg_0 = int4(1);
+ int4 arg_1 = int4(1);
+ int4 res = min(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_3941e1 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %arg_1:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %5:vec4<i32> = load %arg_0
- %6:vec4<i32> = load %arg_1
- %7:vec4<i32> = min %5, %6
- %res:ptr<function, vec4<i32>, read_write> = var, %7
- %9:vec4<i32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_3941e1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %min_3941e1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_3941e1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %min_3941e1
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_3941e1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %min_3941e1
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/min/46c5d3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/min/46c5d3.wgsl.expected.ir.msl
index 9a14261..564a54c 100644
--- a/test/tint/builtins/gen/var/min/46c5d3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/min/46c5d3.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void min_46c5d3(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ uint arg_1 = 1u;
+ uint res = min(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_46c5d3 = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %5:u32 = load %arg_0
- %6:u32 = load %arg_1
- %7:u32 = min %5, %6
- %res:ptr<function, u32, read_write> = var, %7
- %9:u32 = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_46c5d3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %min_46c5d3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_46c5d3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %min_46c5d3
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_46c5d3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %min_46c5d3
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.ir.msl
index 46ff55e..917caa2 100644
--- a/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void min_7c710a(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 arg_1 = half4(1.0h);
+ half4 res = min(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_7c710a = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_1:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %5:vec4<f16> = load %arg_0
- %6:vec4<f16> = load %arg_1
- %7:vec4<f16> = min %5, %6
- %res:ptr<function, vec4<f16>, read_write> = var, %7
- %9:vec4<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_7c710a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %min_7c710a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_7c710a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %min_7c710a
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_7c710a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %min_7c710a
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.ir.msl
index ef545f0..b1279ab 100644
--- a/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void min_82b28f(tint_module_vars_struct tint_module_vars) {
+ uint2 arg_0 = uint2(1u);
+ uint2 arg_1 = uint2(1u);
+ uint2 res = min(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_82b28f = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %arg_1:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %5:vec2<u32> = load %arg_0
- %6:vec2<u32> = load %arg_1
- %7:vec2<u32> = min %5, %6
- %res:ptr<function, vec2<u32>, read_write> = var, %7
- %9:vec2<u32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_82b28f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %min_82b28f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_82b28f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %min_82b28f
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_82b28f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %min_82b28f
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.ir.msl
index 2a9a278..bdb02f6 100644
--- a/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void min_93cfc4(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 arg_1 = float3(1.0f);
+ float3 res = min(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_93cfc4 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_1:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %5:vec3<f32> = load %arg_0
- %6:vec3<f32> = load %arg_1
- %7:vec3<f32> = min %5, %6
- %res:ptr<function, vec3<f32>, read_write> = var, %7
- %9:vec3<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_93cfc4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %min_93cfc4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_93cfc4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %min_93cfc4
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_93cfc4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %min_93cfc4
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/min/a45171.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/min/a45171.wgsl.expected.ir.msl
index 273db93..b9664d7 100644
--- a/test/tint/builtins/gen/var/min/a45171.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/min/a45171.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void min_a45171(tint_module_vars_struct tint_module_vars) {
+ int3 arg_0 = int3(1);
+ int3 arg_1 = int3(1);
+ int3 res = min(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_a45171 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %arg_1:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %5:vec3<i32> = load %arg_0
- %6:vec3<i32> = load %arg_1
- %7:vec3<i32> = min %5, %6
- %res:ptr<function, vec3<i32>, read_write> = var, %7
- %9:vec3<i32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_a45171(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %min_a45171
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_a45171(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %min_a45171
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_a45171(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %min_a45171
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.ir.msl
index 7f3f049..f74cee3 100644
--- a/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void min_aa28ad(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 arg_1 = float2(1.0f);
+ float2 res = min(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_aa28ad = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_1:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %5:vec2<f32> = load %arg_0
- %6:vec2<f32> = load %arg_1
- %7:vec2<f32> = min %5, %6
- %res:ptr<function, vec2<f32>, read_write> = var, %7
- %9:vec2<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_aa28ad(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %min_aa28ad
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_aa28ad(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %min_aa28ad
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_aa28ad(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %min_aa28ad
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.ir.msl
index 72b5a8d..a3ab5cb 100644
--- a/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void min_ab0acd(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 arg_1 = half3(1.0h);
+ half3 res = min(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_ab0acd = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_1:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %5:vec3<f16> = load %arg_0
- %6:vec3<f16> = load %arg_1
- %7:vec3<f16> = min %5, %6
- %res:ptr<function, vec3<f16>, read_write> = var, %7
- %9:vec3<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_ab0acd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %min_ab0acd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_ab0acd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %min_ab0acd
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_ab0acd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %min_ab0acd
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.ir.msl
index 37292f0..41bbfdc 100644
--- a/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void min_ac84d6(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half arg_1 = 1.0h;
+ half res = min(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_ac84d6 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %arg_1:ptr<function, f16, read_write> = var, 1.0h
- %5:f16 = load %arg_0
- %6:f16 = load %arg_1
- %7:f16 = min %5, %6
- %res:ptr<function, f16, read_write> = var, %7
- %9:f16 = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_ac84d6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %min_ac84d6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_ac84d6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %min_ac84d6
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_ac84d6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %min_ac84d6
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/min/af326d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/min/af326d.wgsl.expected.ir.msl
index c505a27..e684165 100644
--- a/test/tint/builtins/gen/var/min/af326d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/min/af326d.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void min_af326d(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float arg_1 = 1.0f;
+ float res = min(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_af326d = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %arg_1:ptr<function, f32, read_write> = var, 1.0f
- %5:f32 = load %arg_0
- %6:f32 = load %arg_1
- %7:f32 = min %5, %6
- %res:ptr<function, f32, read_write> = var, %7
- %9:f32 = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_af326d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %min_af326d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_af326d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %min_af326d
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_af326d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %min_af326d
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.ir.msl
index 2cf9b05..c1cf364 100644
--- a/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void min_c70bb7(tint_module_vars_struct tint_module_vars) {
+ uint3 arg_0 = uint3(1u);
+ uint3 arg_1 = uint3(1u);
+ uint3 res = min(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_c70bb7 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %arg_1:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %5:vec3<u32> = load %arg_0
- %6:vec3<u32> = load %arg_1
- %7:vec3<u32> = min %5, %6
- %res:ptr<function, vec3<u32>, read_write> = var, %7
- %9:vec3<u32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_c70bb7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %min_c70bb7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_c70bb7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %min_c70bb7
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_c70bb7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %min_c70bb7
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/min/c73147.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/min/c73147.wgsl.expected.ir.msl
index 22d0af0..1aa731b 100644
--- a/test/tint/builtins/gen/var/min/c73147.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/min/c73147.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void min_c73147(tint_module_vars_struct tint_module_vars) {
+ int arg_0 = 1;
+ int arg_1 = 1;
+ int res = min(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_c73147 = func():void {
- $B2: {
- %arg_0:ptr<function, i32, read_write> = var, 1i
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %5:i32 = load %arg_0
- %6:i32 = load %arg_1
- %7:i32 = min %5, %6
- %res:ptr<function, i32, read_write> = var, %7
- %9:i32 = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_c73147(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %min_c73147
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_c73147(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %min_c73147
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_c73147(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %min_c73147
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.ir.msl
index 0762bef..2615488 100644
--- a/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void min_c76fa6(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 arg_1 = float4(1.0f);
+ float4 res = min(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_c76fa6 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_1:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %5:vec4<f32> = load %arg_0
- %6:vec4<f32> = load %arg_1
- %7:vec4<f32> = min %5, %6
- %res:ptr<function, vec4<f32>, read_write> = var, %7
- %9:vec4<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_c76fa6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %min_c76fa6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_c76fa6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %min_c76fa6
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_c76fa6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %min_c76fa6
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.ir.msl
index ebd0e21..86f0d90 100644
--- a/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void min_e780f9(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 arg_1 = half2(1.0h);
+ half2 res = min(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%min_e780f9 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_1:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %5:vec2<f16> = load %arg_0
- %6:vec2<f16> = load %arg_1
- %7:vec2<f16> = min %5, %6
- %res:ptr<function, vec2<f16>, read_write> = var, %7
- %9:vec2<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ min_e780f9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %min_e780f9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_e780f9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %min_e780f9
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ min_e780f9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %min_e780f9
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.ir.msl
index aeb0010..8bd6d7e 100644
--- a/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void mix_0c8c33(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 arg_1 = float3(1.0f);
+ float3 arg_2 = float3(1.0f);
+ float3 res = mix(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_0c8c33 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_1:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_2:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %6:vec3<f32> = load %arg_0
- %7:vec3<f32> = load %arg_1
- %8:vec3<f32> = load %arg_2
- %9:vec3<f32> = mix %6, %7, %8
- %res:ptr<function, vec3<f32>, read_write> = var, %9
- %11:vec3<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_0c8c33(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %mix_0c8c33
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_0c8c33(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %mix_0c8c33
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_0c8c33(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %mix_0c8c33
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.ir.msl
index 1b060d7..b212b2b 100644
--- a/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void mix_1faeb1(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 arg_1 = float4(1.0f);
+ float arg_2 = 1.0f;
+ float4 res = mix(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_1faeb1 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_1:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_2:ptr<function, f32, read_write> = var, 1.0f
- %6:vec4<f32> = load %arg_0
- %7:vec4<f32> = load %arg_1
- %8:f32 = load %arg_2
- %9:vec4<f32> = mix %6, %7, %8
- %res:ptr<function, vec4<f32>, read_write> = var, %9
- %11:vec4<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_1faeb1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %mix_1faeb1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_1faeb1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %mix_1faeb1
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_1faeb1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %mix_1faeb1
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.ir.msl
index 005198c..5df4b4d 100644
--- a/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void mix_2fadab(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 arg_1 = float2(1.0f);
+ float arg_2 = 1.0f;
+ float2 res = mix(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_2fadab = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_1:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_2:ptr<function, f32, read_write> = var, 1.0f
- %6:vec2<f32> = load %arg_0
- %7:vec2<f32> = load %arg_1
- %8:f32 = load %arg_2
- %9:vec2<f32> = mix %6, %7, %8
- %res:ptr<function, vec2<f32>, read_write> = var, %9
- %11:vec2<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_2fadab(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %mix_2fadab
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_2fadab(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %mix_2fadab
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_2fadab(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %mix_2fadab
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/mix/315264.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/mix/315264.wgsl.expected.ir.msl
index 39af80e..f93b5f3 100644
--- a/test/tint/builtins/gen/var/mix/315264.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/mix/315264.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void mix_315264(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 arg_1 = float3(1.0f);
+ float arg_2 = 1.0f;
+ float3 res = mix(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_315264 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_1:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_2:ptr<function, f32, read_write> = var, 1.0f
- %6:vec3<f32> = load %arg_0
- %7:vec3<f32> = load %arg_1
- %8:f32 = load %arg_2
- %9:vec3<f32> = mix %6, %7, %8
- %res:ptr<function, vec3<f32>, read_write> = var, %9
- %11:vec3<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_315264(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %mix_315264
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_315264(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %mix_315264
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_315264(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %mix_315264
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.ir.msl
index bdf101f..4c86d12 100644
--- a/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void mix_38cbbb(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half arg_1 = 1.0h;
+ half arg_2 = 1.0h;
+ half res = mix(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_38cbbb = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %arg_1:ptr<function, f16, read_write> = var, 1.0h
- %arg_2:ptr<function, f16, read_write> = var, 1.0h
- %6:f16 = load %arg_0
- %7:f16 = load %arg_1
- %8:f16 = load %arg_2
- %9:f16 = mix %6, %7, %8
- %res:ptr<function, f16, read_write> = var, %9
- %11:f16 = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_38cbbb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %mix_38cbbb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_38cbbb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %mix_38cbbb
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_38cbbb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %mix_38cbbb
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/mix/4f0b5e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/mix/4f0b5e.wgsl.expected.ir.msl
index ec6e3e6..31d3366 100644
--- a/test/tint/builtins/gen/var/mix/4f0b5e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/mix/4f0b5e.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void mix_4f0b5e(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float arg_1 = 1.0f;
+ float arg_2 = 1.0f;
+ float res = mix(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_4f0b5e = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %arg_1:ptr<function, f32, read_write> = var, 1.0f
- %arg_2:ptr<function, f32, read_write> = var, 1.0f
- %6:f32 = load %arg_0
- %7:f32 = load %arg_1
- %8:f32 = load %arg_2
- %9:f32 = mix %6, %7, %8
- %res:ptr<function, f32, read_write> = var, %9
- %11:f32 = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_4f0b5e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %mix_4f0b5e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_4f0b5e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %mix_4f0b5e
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_4f0b5e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %mix_4f0b5e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.ir.msl
index b79aba10..50e3e28 100644
--- a/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void mix_63f2fd(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 arg_1 = half3(1.0h);
+ half3 arg_2 = half3(1.0h);
+ half3 res = mix(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_63f2fd = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_1:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_2:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %6:vec3<f16> = load %arg_0
- %7:vec3<f16> = load %arg_1
- %8:vec3<f16> = load %arg_2
- %9:vec3<f16> = mix %6, %7, %8
- %res:ptr<function, vec3<f16>, read_write> = var, %9
- %11:vec3<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_63f2fd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %mix_63f2fd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_63f2fd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %mix_63f2fd
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_63f2fd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %mix_63f2fd
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.ir.msl
index a9484c0..75ff4e4 100644
--- a/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void mix_6f8adc(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 arg_1 = float2(1.0f);
+ float2 arg_2 = float2(1.0f);
+ float2 res = mix(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_6f8adc = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_1:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_2:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %6:vec2<f32> = load %arg_0
- %7:vec2<f32> = load %arg_1
- %8:vec2<f32> = load %arg_2
- %9:vec2<f32> = mix %6, %7, %8
- %res:ptr<function, vec2<f32>, read_write> = var, %9
- %11:vec2<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_6f8adc(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %mix_6f8adc
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_6f8adc(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %mix_6f8adc
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_6f8adc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %mix_6f8adc
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.ir.msl
index fa632b2..91159cf 100644
--- a/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void mix_98ee3e(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 arg_1 = half2(1.0h);
+ half2 arg_2 = half2(1.0h);
+ half2 res = mix(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_98ee3e = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_1:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_2:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %6:vec2<f16> = load %arg_0
- %7:vec2<f16> = load %arg_1
- %8:vec2<f16> = load %arg_2
- %9:vec2<f16> = mix %6, %7, %8
- %res:ptr<function, vec2<f16>, read_write> = var, %9
- %11:vec2<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_98ee3e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %mix_98ee3e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_98ee3e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %mix_98ee3e
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_98ee3e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %mix_98ee3e
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.ir.msl
index b0ef4cf..9fae069 100644
--- a/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void mix_c1aec6(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 arg_1 = half3(1.0h);
+ half arg_2 = 1.0h;
+ half3 res = mix(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_c1aec6 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_1:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_2:ptr<function, f16, read_write> = var, 1.0h
- %6:vec3<f16> = load %arg_0
- %7:vec3<f16> = load %arg_1
- %8:f16 = load %arg_2
- %9:vec3<f16> = mix %6, %7, %8
- %res:ptr<function, vec3<f16>, read_write> = var, %9
- %11:vec3<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_c1aec6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %mix_c1aec6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_c1aec6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %mix_c1aec6
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_c1aec6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %mix_c1aec6
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.ir.msl
index b47d596..d84f2ed 100644
--- a/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void mix_c37ede(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 arg_1 = float4(1.0f);
+ float4 arg_2 = float4(1.0f);
+ float4 res = mix(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_c37ede = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_1:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_2:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %6:vec4<f32> = load %arg_0
- %7:vec4<f32> = load %arg_1
- %8:vec4<f32> = load %arg_2
- %9:vec4<f32> = mix %6, %7, %8
- %res:ptr<function, vec4<f32>, read_write> = var, %9
- %11:vec4<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_c37ede(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %mix_c37ede
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_c37ede(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %mix_c37ede
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_c37ede(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %mix_c37ede
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.ir.msl
index 49ae0ec..a30d822 100644
--- a/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void mix_e46a83(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 arg_1 = half2(1.0h);
+ half arg_2 = 1.0h;
+ half2 res = mix(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_e46a83 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_1:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_2:ptr<function, f16, read_write> = var, 1.0h
- %6:vec2<f16> = load %arg_0
- %7:vec2<f16> = load %arg_1
- %8:f16 = load %arg_2
- %9:vec2<f16> = mix %6, %7, %8
- %res:ptr<function, vec2<f16>, read_write> = var, %9
- %11:vec2<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_e46a83(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %mix_e46a83
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_e46a83(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %mix_e46a83
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_e46a83(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %mix_e46a83
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.ir.msl
index a5c2ec6..47cbc63 100644
--- a/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void mix_ee2468(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 arg_1 = half4(1.0h);
+ half4 arg_2 = half4(1.0h);
+ half4 res = mix(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_ee2468 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_1:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_2:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %6:vec4<f16> = load %arg_0
- %7:vec4<f16> = load %arg_1
- %8:vec4<f16> = load %arg_2
- %9:vec4<f16> = mix %6, %7, %8
- %res:ptr<function, vec4<f16>, read_write> = var, %9
- %11:vec4<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_ee2468(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %mix_ee2468
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_ee2468(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %mix_ee2468
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_ee2468(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %mix_ee2468
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.ir.msl
index f239fa5..62bc78b 100644
--- a/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void mix_f1a543(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 arg_1 = half4(1.0h);
+ half arg_2 = 1.0h;
+ half4 res = mix(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%mix_f1a543 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_1:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_2:ptr<function, f16, read_write> = var, 1.0h
- %6:vec4<f16> = load %arg_0
- %7:vec4<f16> = load %arg_1
- %8:f16 = load %arg_2
- %9:vec4<f16> = mix %6, %7, %8
- %res:ptr<function, vec4<f16>, read_write> = var, %9
- %11:vec4<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ mix_f1a543(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %mix_f1a543
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_f1a543(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %mix_f1a543
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ mix_f1a543(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %mix_f1a543
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.ir.msl
index 96a12e7..3004278 100644
--- a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void normalize_39d5ec(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 res = normalize(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%normalize_39d5ec = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = normalize %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ normalize_39d5ec(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %normalize_39d5ec
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_39d5ec(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %normalize_39d5ec
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_39d5ec(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %normalize_39d5ec
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.ir.msl
index 5032c0d..1e20bd2 100644
--- a/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void normalize_64d8c0(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = normalize(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%normalize_64d8c0 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = normalize %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ normalize_64d8c0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %normalize_64d8c0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_64d8c0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %normalize_64d8c0
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_64d8c0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %normalize_64d8c0
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.ir.msl
index 9139b6a..26fac32 100644
--- a/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void normalize_7990f3(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 res = normalize(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%normalize_7990f3 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = normalize %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ normalize_7990f3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %normalize_7990f3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_7990f3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %normalize_7990f3
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_7990f3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %normalize_7990f3
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.ir.msl
index e129cb5..271140a 100644
--- a/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void normalize_9a0aab(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = normalize(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%normalize_9a0aab = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = normalize %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ normalize_9a0aab(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %normalize_9a0aab
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_9a0aab(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %normalize_9a0aab
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_9a0aab(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %normalize_9a0aab
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.ir.msl
index 3c03f38..8735048 100644
--- a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void normalize_b8cb8d(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 res = normalize(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%normalize_b8cb8d = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = normalize %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ normalize_b8cb8d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %normalize_b8cb8d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_b8cb8d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %normalize_b8cb8d
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_b8cb8d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %normalize_b8cb8d
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.ir.msl
index 3b602b7..fe572bc 100644
--- a/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void normalize_fc2ef1(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = normalize(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%normalize_fc2ef1 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = normalize %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ normalize_fc2ef1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %normalize_fc2ef1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_fc2ef1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %normalize_fc2ef1
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ normalize_fc2ef1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %normalize_fc2ef1
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.ir.msl
index 206b592..6262b73 100644
--- a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void pack2x16snorm_6c169b(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ uint res = pack_float_to_snorm2x16(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pack2x16snorm_6c169b = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:u32 = pack2x16snorm %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pack2x16snorm_6c169b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %pack2x16snorm_6c169b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack2x16snorm_6c169b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %pack2x16snorm_6c169b
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack2x16snorm_6c169b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %pack2x16snorm_6c169b
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.ir.msl
index 59c7894..2ba7581 100644
--- a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void pack2x16unorm_0f08e4(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ uint res = pack_float_to_unorm2x16(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pack2x16unorm_0f08e4 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:u32 = pack2x16unorm %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pack2x16unorm_0f08e4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %pack2x16unorm_0f08e4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack2x16unorm_0f08e4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %pack2x16unorm_0f08e4
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack2x16unorm_0f08e4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %pack2x16unorm_0f08e4
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.ir.msl
index 020f7f6..d94d408 100644
--- a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void pack4x8snorm_4d22e7(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ uint res = pack_float_to_snorm4x8(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pack4x8snorm_4d22e7 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:u32 = pack4x8snorm %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pack4x8snorm_4d22e7(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %pack4x8snorm_4d22e7
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack4x8snorm_4d22e7(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %pack4x8snorm_4d22e7
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack4x8snorm_4d22e7(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %pack4x8snorm_4d22e7
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.ir.msl
index cad827a..b1fbcd0 100644
--- a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void pack4x8unorm_95c456(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ uint res = pack_float_to_unorm4x8(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pack4x8unorm_95c456 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:u32 = pack4x8unorm %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pack4x8unorm_95c456(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %pack4x8unorm_95c456
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack4x8unorm_95c456(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %pack4x8unorm_95c456
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pack4x8unorm_95c456(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %pack4x8unorm_95c456
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.ir.msl
index f4fc973..dc47ec4 100644
--- a/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void pow_04a908(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 arg_1 = float4(1.0f);
+ float4 res = pow(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pow_04a908 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_1:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %5:vec4<f32> = load %arg_0
- %6:vec4<f32> = load %arg_1
- %7:vec4<f32> = pow %5, %6
- %res:ptr<function, vec4<f32>, read_write> = var, %7
- %9:vec4<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pow_04a908(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %pow_04a908
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_04a908(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %pow_04a908
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_04a908(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %pow_04a908
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/pow/46e029.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/pow/46e029.wgsl.expected.ir.msl
index 217cf24..f1c8d94 100644
--- a/test/tint/builtins/gen/var/pow/46e029.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/pow/46e029.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void pow_46e029(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float arg_1 = 1.0f;
+ float res = pow(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pow_46e029 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %arg_1:ptr<function, f32, read_write> = var, 1.0f
- %5:f32 = load %arg_0
- %6:f32 = load %arg_1
- %7:f32 = pow %5, %6
- %res:ptr<function, f32, read_write> = var, %7
- %9:f32 = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pow_46e029(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %pow_46e029
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_46e029(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %pow_46e029
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_46e029(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %pow_46e029
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.ir.msl
index 52adb59..900391d 100644
--- a/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void pow_4a46c9(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 arg_1 = float3(1.0f);
+ float3 res = pow(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pow_4a46c9 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_1:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %5:vec3<f32> = load %arg_0
- %6:vec3<f32> = load %arg_1
- %7:vec3<f32> = pow %5, %6
- %res:ptr<function, vec3<f32>, read_write> = var, %7
- %9:vec3<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pow_4a46c9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %pow_4a46c9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_4a46c9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %pow_4a46c9
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_4a46c9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %pow_4a46c9
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.ir.msl
index 0df94f1..cd394a4 100644
--- a/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void pow_4f33b2(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 arg_1 = half4(1.0h);
+ half4 res = pow(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pow_4f33b2 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_1:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %5:vec4<f16> = load %arg_0
- %6:vec4<f16> = load %arg_1
- %7:vec4<f16> = pow %5, %6
- %res:ptr<function, vec4<f16>, read_write> = var, %7
- %9:vec4<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pow_4f33b2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %pow_4f33b2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_4f33b2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %pow_4f33b2
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_4f33b2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %pow_4f33b2
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.ir.msl
index dc2a161..63fc2f9 100644
--- a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void pow_ce9ef5(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half arg_1 = 1.0h;
+ half res = pow(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pow_ce9ef5 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %arg_1:ptr<function, f16, read_write> = var, 1.0h
- %5:f16 = load %arg_0
- %6:f16 = load %arg_1
- %7:f16 = pow %5, %6
- %res:ptr<function, f16, read_write> = var, %7
- %9:f16 = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pow_ce9ef5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %pow_ce9ef5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_ce9ef5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %pow_ce9ef5
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_ce9ef5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %pow_ce9ef5
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.ir.msl
index d514778..0eb76ee 100644
--- a/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void pow_e60ea5(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 arg_1 = float2(1.0f);
+ float2 res = pow(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pow_e60ea5 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_1:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %5:vec2<f32> = load %arg_0
- %6:vec2<f32> = load %arg_1
- %7:vec2<f32> = pow %5, %6
- %res:ptr<function, vec2<f32>, read_write> = var, %7
- %9:vec2<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pow_e60ea5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %pow_e60ea5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_e60ea5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %pow_e60ea5
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_e60ea5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %pow_e60ea5
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.ir.msl
index 0601ac2..1be21ce 100644
--- a/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void pow_f37b25(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 arg_1 = half2(1.0h);
+ half2 res = pow(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pow_f37b25 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_1:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %5:vec2<f16> = load %arg_0
- %6:vec2<f16> = load %arg_1
- %7:vec2<f16> = pow %5, %6
- %res:ptr<function, vec2<f16>, read_write> = var, %7
- %9:vec2<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pow_f37b25(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %pow_f37b25
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_f37b25(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %pow_f37b25
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_f37b25(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %pow_f37b25
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.ir.msl
index 2a55345..116b8d5 100644
--- a/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void pow_fa5429(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 arg_1 = half3(1.0h);
+ half3 res = pow(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%pow_fa5429 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_1:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %5:vec3<f16> = load %arg_0
- %6:vec3<f16> = load %arg_1
- %7:vec3<f16> = pow %5, %6
- %res:ptr<function, vec3<f16>, read_write> = var, %7
- %9:vec3<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ pow_fa5429(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %pow_fa5429
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_fa5429(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %pow_fa5429
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ pow_fa5429(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %pow_fa5429
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.ir.msl
index 75689f3..7cbbc13 100644
--- a/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void reflect_05357e(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 arg_1 = float4(1.0f);
+ float4 res = reflect(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reflect_05357e = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_1:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %5:vec4<f32> = load %arg_0
- %6:vec4<f32> = load %arg_1
- %7:vec4<f32> = reflect %5, %6
- %res:ptr<function, vec4<f32>, read_write> = var, %7
- %9:vec4<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reflect_05357e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %reflect_05357e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_05357e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %reflect_05357e
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_05357e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %reflect_05357e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.ir.msl
index c27379c..83d6103 100644
--- a/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void reflect_310de5(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 arg_1 = half4(1.0h);
+ half4 res = reflect(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reflect_310de5 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_1:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %5:vec4<f16> = load %arg_0
- %6:vec4<f16> = load %arg_1
- %7:vec4<f16> = reflect %5, %6
- %res:ptr<function, vec4<f16>, read_write> = var, %7
- %9:vec4<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reflect_310de5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %reflect_310de5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_310de5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %reflect_310de5
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_310de5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %reflect_310de5
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.ir.msl
index 4fdf6f1..9c03d83 100644
--- a/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void reflect_61ca21(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 arg_1 = half3(1.0h);
+ half3 res = reflect(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reflect_61ca21 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_1:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %5:vec3<f16> = load %arg_0
- %6:vec3<f16> = load %arg_1
- %7:vec3<f16> = reflect %5, %6
- %res:ptr<function, vec3<f16>, read_write> = var, %7
- %9:vec3<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reflect_61ca21(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %reflect_61ca21
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_61ca21(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %reflect_61ca21
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_61ca21(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %reflect_61ca21
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.ir.msl
index d5d1cc9..ef2ec84 100644
--- a/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void reflect_b61e10(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 arg_1 = float2(1.0f);
+ float2 res = reflect(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reflect_b61e10 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_1:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %5:vec2<f32> = load %arg_0
- %6:vec2<f32> = load %arg_1
- %7:vec2<f32> = reflect %5, %6
- %res:ptr<function, vec2<f32>, read_write> = var, %7
- %9:vec2<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reflect_b61e10(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %reflect_b61e10
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_b61e10(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %reflect_b61e10
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_b61e10(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %reflect_b61e10
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.ir.msl
index bcfce1d..c1bcdd2 100644
--- a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void reflect_bb15ac(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 arg_1 = half2(1.0h);
+ half2 res = reflect(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reflect_bb15ac = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_1:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %5:vec2<f16> = load %arg_0
- %6:vec2<f16> = load %arg_1
- %7:vec2<f16> = reflect %5, %6
- %res:ptr<function, vec2<f16>, read_write> = var, %7
- %9:vec2<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reflect_bb15ac(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %reflect_bb15ac
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_bb15ac(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %reflect_bb15ac
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_bb15ac(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %reflect_bb15ac
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.ir.msl
index 35a6fc8..02a3ce7 100644
--- a/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void reflect_f47fdb(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 arg_1 = float3(1.0f);
+ float3 res = reflect(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reflect_f47fdb = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_1:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %5:vec3<f32> = load %arg_0
- %6:vec3<f32> = load %arg_1
- %7:vec3<f32> = reflect %5, %6
- %res:ptr<function, vec3<f32>, read_write> = var, %7
- %9:vec3<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reflect_f47fdb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %reflect_f47fdb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_f47fdb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %reflect_f47fdb
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reflect_f47fdb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %reflect_f47fdb
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.ir.msl
index c76effc..d427a20 100644
--- a/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void refract_0594ba(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 arg_1 = half4(1.0h);
+ half arg_2 = 1.0h;
+ half4 res = refract(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%refract_0594ba = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_1:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_2:ptr<function, f16, read_write> = var, 1.0h
- %6:vec4<f16> = load %arg_0
- %7:vec4<f16> = load %arg_1
- %8:f16 = load %arg_2
- %9:vec4<f16> = refract %6, %7, %8
- %res:ptr<function, vec4<f16>, read_write> = var, %9
- %11:vec4<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ refract_0594ba(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %refract_0594ba
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_0594ba(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %refract_0594ba
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_0594ba(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %refract_0594ba
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.ir.msl
index 5cfbc2e..0f703bd 100644
--- a/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void refract_570cb3(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 arg_1 = half2(1.0h);
+ half arg_2 = 1.0h;
+ half2 res = refract(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%refract_570cb3 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_1:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_2:ptr<function, f16, read_write> = var, 1.0h
- %6:vec2<f16> = load %arg_0
- %7:vec2<f16> = load %arg_1
- %8:f16 = load %arg_2
- %9:vec2<f16> = refract %6, %7, %8
- %res:ptr<function, vec2<f16>, read_write> = var, %9
- %11:vec2<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ refract_570cb3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %refract_570cb3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_570cb3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %refract_570cb3
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_570cb3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %refract_570cb3
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.ir.msl
index 8b366c9..b2e2efa 100644
--- a/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void refract_7e02e6(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 arg_1 = float4(1.0f);
+ float arg_2 = 1.0f;
+ float4 res = refract(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%refract_7e02e6 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_1:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_2:ptr<function, f32, read_write> = var, 1.0f
- %6:vec4<f32> = load %arg_0
- %7:vec4<f32> = load %arg_1
- %8:f32 = load %arg_2
- %9:vec4<f32> = refract %6, %7, %8
- %res:ptr<function, vec4<f32>, read_write> = var, %9
- %11:vec4<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ refract_7e02e6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %refract_7e02e6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_7e02e6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %refract_7e02e6
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_7e02e6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %refract_7e02e6
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.ir.msl
index 3f22a37..8ce88f2 100644
--- a/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void refract_8984af(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 arg_1 = half3(1.0h);
+ half arg_2 = 1.0h;
+ half3 res = refract(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%refract_8984af = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_1:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_2:ptr<function, f16, read_write> = var, 1.0h
- %6:vec3<f16> = load %arg_0
- %7:vec3<f16> = load %arg_1
- %8:f16 = load %arg_2
- %9:vec3<f16> = refract %6, %7, %8
- %res:ptr<function, vec3<f16>, read_write> = var, %9
- %11:vec3<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ refract_8984af(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %refract_8984af
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_8984af(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %refract_8984af
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_8984af(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %refract_8984af
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.ir.msl
index f862ccd..4041ddc 100644
--- a/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void refract_cbc1d2(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 arg_1 = float3(1.0f);
+ float arg_2 = 1.0f;
+ float3 res = refract(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%refract_cbc1d2 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_1:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_2:ptr<function, f32, read_write> = var, 1.0f
- %6:vec3<f32> = load %arg_0
- %7:vec3<f32> = load %arg_1
- %8:f32 = load %arg_2
- %9:vec3<f32> = refract %6, %7, %8
- %res:ptr<function, vec3<f32>, read_write> = var, %9
- %11:vec3<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ refract_cbc1d2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %refract_cbc1d2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_cbc1d2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %refract_cbc1d2
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_cbc1d2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %refract_cbc1d2
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.ir.msl
index fbaa36b..8a17195 100644
--- a/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void refract_cd905f(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 arg_1 = float2(1.0f);
+ float arg_2 = 1.0f;
+ float2 res = refract(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%refract_cd905f = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_1:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_2:ptr<function, f32, read_write> = var, 1.0f
- %6:vec2<f32> = load %arg_0
- %7:vec2<f32> = load %arg_1
- %8:f32 = load %arg_2
- %9:vec2<f32> = refract %6, %7, %8
- %res:ptr<function, vec2<f32>, read_write> = var, %9
- %11:vec2<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ refract_cd905f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %refract_cd905f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_cd905f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %refract_cd905f
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ refract_cd905f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %refract_cd905f
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.ir.msl
index 9d12e5a..6d7942b 100644
--- a/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void reverseBits_222177(tint_module_vars_struct tint_module_vars) {
+ int2 arg_0 = int2(1);
+ int2 res = reverse_bits(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reverseBits_222177 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %arg_0
- %5:vec2<i32> = reverseBits %4
- %res:ptr<function, vec2<i32>, read_write> = var, %5
- %7:vec2<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reverseBits_222177(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %reverseBits_222177
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_222177(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %reverseBits_222177
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_222177(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %reverseBits_222177
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.ir.msl
index 18ac66b..c2a7515 100644
--- a/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void reverseBits_35fea9(tint_module_vars_struct tint_module_vars) {
+ uint4 arg_0 = uint4(1u);
+ uint4 res = reverse_bits(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reverseBits_35fea9 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %arg_0
- %5:vec4<u32> = reverseBits %4
- %res:ptr<function, vec4<u32>, read_write> = var, %5
- %7:vec4<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reverseBits_35fea9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %reverseBits_35fea9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_35fea9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %reverseBits_35fea9
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_35fea9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %reverseBits_35fea9
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.ir.msl
index 4fdc773..3edf689 100644
--- a/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void reverseBits_4dbd6f(tint_module_vars_struct tint_module_vars) {
+ int4 arg_0 = int4(1);
+ int4 res = reverse_bits(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reverseBits_4dbd6f = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %arg_0
- %5:vec4<i32> = reverseBits %4
- %res:ptr<function, vec4<i32>, read_write> = var, %5
- %7:vec4<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reverseBits_4dbd6f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %reverseBits_4dbd6f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_4dbd6f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %reverseBits_4dbd6f
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_4dbd6f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %reverseBits_4dbd6f
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/reverseBits/7c4269.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/reverseBits/7c4269.wgsl.expected.ir.msl
index cecca3a..3f08e9b 100644
--- a/test/tint/builtins/gen/var/reverseBits/7c4269.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/reverseBits/7c4269.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void reverseBits_7c4269(tint_module_vars_struct tint_module_vars) {
+ int arg_0 = 1;
+ int res = reverse_bits(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reverseBits_7c4269 = func():void {
- $B2: {
- %arg_0:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %arg_0
- %5:i32 = reverseBits %4
- %res:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reverseBits_7c4269(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %reverseBits_7c4269
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_7c4269(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %reverseBits_7c4269
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_7c4269(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %reverseBits_7c4269
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.ir.msl
index 2cd63ee..32fa702 100644
--- a/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void reverseBits_a6ccd4(tint_module_vars_struct tint_module_vars) {
+ uint3 arg_0 = uint3(1u);
+ uint3 res = reverse_bits(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reverseBits_a6ccd4 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %arg_0
- %5:vec3<u32> = reverseBits %4
- %res:ptr<function, vec3<u32>, read_write> = var, %5
- %7:vec3<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reverseBits_a6ccd4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %reverseBits_a6ccd4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_a6ccd4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %reverseBits_a6ccd4
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_a6ccd4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %reverseBits_a6ccd4
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.ir.msl
index e15dc81..0586abc 100644
--- a/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void reverseBits_c21bc1(tint_module_vars_struct tint_module_vars) {
+ int3 arg_0 = int3(1);
+ int3 res = reverse_bits(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reverseBits_c21bc1 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %arg_0
- %5:vec3<i32> = reverseBits %4
- %res:ptr<function, vec3<i32>, read_write> = var, %5
- %7:vec3<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reverseBits_c21bc1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %reverseBits_c21bc1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_c21bc1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %reverseBits_c21bc1
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_c21bc1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %reverseBits_c21bc1
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.ir.msl
index e93ffff..bc73900 100644
--- a/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void reverseBits_e1f4c1(tint_module_vars_struct tint_module_vars) {
+ uint2 arg_0 = uint2(1u);
+ uint2 res = reverse_bits(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reverseBits_e1f4c1 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %arg_0
- %5:vec2<u32> = reverseBits %4
- %res:ptr<function, vec2<u32>, read_write> = var, %5
- %7:vec2<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reverseBits_e1f4c1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %reverseBits_e1f4c1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_e1f4c1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %reverseBits_e1f4c1
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_e1f4c1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %reverseBits_e1f4c1
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/reverseBits/e31adf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/reverseBits/e31adf.wgsl.expected.ir.msl
index 85718ee..0022a2a 100644
--- a/test/tint/builtins/gen/var/reverseBits/e31adf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/reverseBits/e31adf.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void reverseBits_e31adf(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ uint res = reverse_bits(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%reverseBits_e31adf = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %arg_0
- %5:u32 = reverseBits %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ reverseBits_e31adf(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %reverseBits_e31adf
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_e31adf(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %reverseBits_e31adf
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ reverseBits_e31adf(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %reverseBits_e31adf
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.ir.msl
index dcf1d25..55f0efa 100644
--- a/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void round_106c0b(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(3.5f);
+ float4 res = rint(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%round_106c0b = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(3.5f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = round %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ round_106c0b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %round_106c0b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_106c0b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %round_106c0b
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_106c0b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %round_106c0b
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.ir.msl
index 2dbfd2e..7bb30e6 100644
--- a/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void round_1c7897(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(3.5f);
+ float3 res = rint(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%round_1c7897 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(3.5f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = round %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ round_1c7897(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %round_1c7897
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_1c7897(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %round_1c7897
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_1c7897(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %round_1c7897
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.ir.msl
index 999ee07..4d58e98 100644
--- a/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void round_52c84d(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(3.5f);
+ float2 res = rint(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%round_52c84d = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(3.5f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = round %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ round_52c84d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %round_52c84d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_52c84d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %round_52c84d
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_52c84d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %round_52c84d
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.ir.msl
index 3930685..831026d 100644
--- a/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void round_9078ef(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 3.5h;
+ half res = rint(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%round_9078ef = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 3.5h
- %4:f16 = load %arg_0
- %5:f16 = round %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ round_9078ef(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %round_9078ef
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_9078ef(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %round_9078ef
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_9078ef(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %round_9078ef
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/round/9edc38.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/round/9edc38.wgsl.expected.ir.msl
index aa7db0c..a56d116 100644
--- a/test/tint/builtins/gen/var/round/9edc38.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/round/9edc38.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void round_9edc38(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 3.5f;
+ float res = rint(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%round_9edc38 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 3.5f
- %4:f32 = load %arg_0
- %5:f32 = round %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ round_9edc38(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %round_9edc38
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_9edc38(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %round_9edc38
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_9edc38(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %round_9edc38
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.ir.msl
index 797c05f..13d3d9d 100644
--- a/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void round_d87e84(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(3.5h);
+ half2 res = rint(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%round_d87e84 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(3.5h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = round %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ round_d87e84(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %round_d87e84
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_d87e84(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %round_d87e84
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_d87e84(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %round_d87e84
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.ir.msl
index a5c7b1b..d34f2a4 100644
--- a/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void round_e1bba2(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(3.5h);
+ half3 res = rint(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%round_e1bba2 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(3.5h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = round %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ round_e1bba2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %round_e1bba2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_e1bba2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %round_e1bba2
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_e1bba2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %round_e1bba2
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.ir.msl
index fa30809..90f18af 100644
--- a/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void round_f665b5(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(3.5h);
+ half4 res = rint(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%round_f665b5 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(3.5h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = round %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ round_f665b5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %round_f665b5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_f665b5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %round_f665b5
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ round_f665b5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %round_f665b5
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/saturate/270da5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/saturate/270da5.wgsl.expected.ir.msl
index e6e7a19..001d7d6 100644
--- a/test/tint/builtins/gen/var/saturate/270da5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/saturate/270da5.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void saturate_270da5(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 2.0f;
+ float res = saturate(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%saturate_270da5 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 2.0f
- %4:f32 = load %arg_0
- %5:f32 = saturate %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ saturate_270da5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %saturate_270da5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_270da5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %saturate_270da5
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_270da5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %saturate_270da5
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.ir.msl
index 5d87372..0a81eaf 100644
--- a/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void saturate_462535(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(2.0h);
+ half3 res = saturate(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%saturate_462535 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(2.0h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = saturate %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ saturate_462535(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %saturate_462535
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_462535(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %saturate_462535
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_462535(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %saturate_462535
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/saturate/51567f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/saturate/51567f.wgsl.expected.ir.msl
index 635b753..21a24f4 100644
--- a/test/tint/builtins/gen/var/saturate/51567f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/saturate/51567f.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void saturate_51567f(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(2.0f);
+ float2 res = saturate(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%saturate_51567f = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(2.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = saturate %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ saturate_51567f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %saturate_51567f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_51567f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %saturate_51567f
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_51567f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %saturate_51567f
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/saturate/6bcddf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/saturate/6bcddf.wgsl.expected.ir.msl
index 3d9cbe0..554a470 100644
--- a/test/tint/builtins/gen/var/saturate/6bcddf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/saturate/6bcddf.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void saturate_6bcddf(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(2.0f);
+ float3 res = saturate(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%saturate_6bcddf = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(2.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = saturate %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ saturate_6bcddf(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %saturate_6bcddf
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_6bcddf(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %saturate_6bcddf
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_6bcddf(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %saturate_6bcddf
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/saturate/a5b571.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/saturate/a5b571.wgsl.expected.ir.msl
index df4f811..6f9b95c 100644
--- a/test/tint/builtins/gen/var/saturate/a5b571.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/saturate/a5b571.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void saturate_a5b571(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(2.0f);
+ float4 res = saturate(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%saturate_a5b571 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(2.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = saturate %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ saturate_a5b571(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %saturate_a5b571
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_a5b571(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %saturate_a5b571
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_a5b571(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %saturate_a5b571
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.ir.msl
index e1ce087..f5d2a2f 100644
--- a/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void saturate_cd2028(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(2.0h);
+ half2 res = saturate(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%saturate_cd2028 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(2.0h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = saturate %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ saturate_cd2028(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %saturate_cd2028
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_cd2028(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %saturate_cd2028
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_cd2028(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %saturate_cd2028
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.ir.msl
index cfef079..6d40fc4 100644
--- a/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void saturate_dcde71(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(2.0h);
+ half4 res = saturate(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%saturate_dcde71 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(2.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = saturate %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ saturate_dcde71(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %saturate_dcde71
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_dcde71(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %saturate_dcde71
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_dcde71(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %saturate_dcde71
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.ir.msl
index 7e1cc52..1b8e3ef 100644
--- a/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void saturate_e8df56(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 2.0h;
+ half res = saturate(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%saturate_e8df56 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 2.0h
- %4:f16 = load %arg_0
- %5:f16 = saturate %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ saturate_e8df56(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %saturate_e8df56
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_e8df56(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %saturate_e8df56
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ saturate_e8df56(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %saturate_e8df56
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/00b848.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/00b848.wgsl.expected.ir.msl
index 473c1b7..6f25f9a 100644
--- a/test/tint/builtins/gen/var/select/00b848.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/00b848.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void select_00b848(tint_module_vars_struct tint_module_vars) {
+ int2 arg_0 = int2(1);
+ int2 arg_1 = int2(1);
+ bool2 arg_2 = bool2(true);
+ int2 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_00b848 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %arg_1:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %arg_2:ptr<function, vec2<bool>, read_write> = var, vec2<bool>(true)
- %6:vec2<i32> = load %arg_0
- %7:vec2<i32> = load %arg_1
- %8:vec2<bool> = load %arg_2
- %9:vec2<i32> = select %6, %7, %8
- %res:ptr<function, vec2<i32>, read_write> = var, %9
- %11:vec2<i32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_00b848(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_00b848
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_00b848(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_00b848
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_00b848(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_00b848
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.ir.msl
index 5f4508c..1c0692c 100644
--- a/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void select_01e2cd(tint_module_vars_struct tint_module_vars) {
+ int3 arg_0 = int3(1);
+ int3 arg_1 = int3(1);
+ bool3 arg_2 = bool3(true);
+ int3 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_01e2cd = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %arg_1:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %arg_2:ptr<function, vec3<bool>, read_write> = var, vec3<bool>(true)
- %6:vec3<i32> = load %arg_0
- %7:vec3<i32> = load %arg_1
- %8:vec3<bool> = load %arg_2
- %9:vec3<i32> = select %6, %7, %8
- %res:ptr<function, vec3<i32>, read_write> = var, %9
- %11:vec3<i32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_01e2cd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_01e2cd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_01e2cd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_01e2cd
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_01e2cd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_01e2cd
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.ir.msl
index ca45189..fbb0278 100644
--- a/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void select_087ea4(tint_module_vars_struct tint_module_vars) {
+ uint4 arg_0 = uint4(1u);
+ uint4 arg_1 = uint4(1u);
+ bool arg_2 = true;
+ uint4 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_087ea4 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %arg_1:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:vec4<u32> = load %arg_0
- %7:vec4<u32> = load %arg_1
- %8:bool = load %arg_2
- %9:vec4<u32> = select %6, %7, %8
- %res:ptr<function, vec4<u32>, read_write> = var, %9
- %11:vec4<u32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_087ea4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_087ea4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_087ea4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_087ea4
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_087ea4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_087ea4
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.ir.msl
index e478b41..0a77ffc 100644
--- a/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void select_10e73b(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half arg_1 = 1.0h;
+ bool arg_2 = true;
+ half res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_10e73b = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %arg_1:ptr<function, f16, read_write> = var, 1.0h
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:f16 = load %arg_0
- %7:f16 = load %arg_1
- %8:bool = load %arg_2
- %9:f16 = select %6, %7, %8
- %res:ptr<function, f16, read_write> = var, %9
- %11:f16 = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_10e73b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_10e73b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_10e73b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_10e73b
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_10e73b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_10e73b
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.ir.msl
index 2c8e6c7..22dffdf 100644
--- a/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void select_1ada2a(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 arg_1 = half3(1.0h);
+ bool arg_2 = true;
+ half3 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_1ada2a = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_1:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:vec3<f16> = load %arg_0
- %7:vec3<f16> = load %arg_1
- %8:bool = load %arg_2
- %9:vec3<f16> = select %6, %7, %8
- %res:ptr<function, vec3<f16>, read_write> = var, %9
- %11:vec3<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_1ada2a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_1ada2a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_1ada2a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_1ada2a
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_1ada2a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_1ada2a
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.ir.msl
index ac6c03d..c819386 100644
--- a/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void select_1e960b(tint_module_vars_struct tint_module_vars) {
+ uint2 arg_0 = uint2(1u);
+ uint2 arg_1 = uint2(1u);
+ bool2 arg_2 = bool2(true);
+ uint2 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_1e960b = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %arg_1:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %arg_2:ptr<function, vec2<bool>, read_write> = var, vec2<bool>(true)
- %6:vec2<u32> = load %arg_0
- %7:vec2<u32> = load %arg_1
- %8:vec2<bool> = load %arg_2
- %9:vec2<u32> = select %6, %7, %8
- %res:ptr<function, vec2<u32>, read_write> = var, %9
- %11:vec2<u32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_1e960b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_1e960b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_1e960b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_1e960b
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_1e960b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_1e960b
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/266aff.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/266aff.wgsl.expected.ir.msl
index c8a0441..6fb6f4c 100644
--- a/test/tint/builtins/gen/var/select/266aff.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/266aff.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void select_266aff(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 arg_1 = float2(1.0f);
+ bool2 arg_2 = bool2(true);
+ float2 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_266aff = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_1:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_2:ptr<function, vec2<bool>, read_write> = var, vec2<bool>(true)
- %6:vec2<f32> = load %arg_0
- %7:vec2<f32> = load %arg_1
- %8:vec2<bool> = load %arg_2
- %9:vec2<f32> = select %6, %7, %8
- %res:ptr<function, vec2<f32>, read_write> = var, %9
- %11:vec2<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_266aff(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_266aff
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_266aff(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_266aff
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_266aff(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_266aff
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.ir.msl
index 26f4b6a..023b990 100644
--- a/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void select_28a27e(tint_module_vars_struct tint_module_vars) {
+ uint3 arg_0 = uint3(1u);
+ uint3 arg_1 = uint3(1u);
+ bool3 arg_2 = bool3(true);
+ uint3 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_28a27e = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %arg_1:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %arg_2:ptr<function, vec3<bool>, read_write> = var, vec3<bool>(true)
- %6:vec3<u32> = load %arg_0
- %7:vec3<u32> = load %arg_1
- %8:vec3<bool> = load %arg_2
- %9:vec3<u32> = select %6, %7, %8
- %res:ptr<function, vec3<u32>, read_write> = var, %9
- %11:vec3<u32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_28a27e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_28a27e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_28a27e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_28a27e
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_28a27e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_28a27e
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.ir.msl
index a0eef48..a103f29 100644
--- a/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.ir.msl
@@ -1,50 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void select_3c25ce(tint_module_vars_struct tint_module_vars) {
+ bool3 arg_0 = bool3(true);
+ bool3 arg_1 = bool3(true);
+ bool arg_2 = true;
+ bool3 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all((res == bool3(false))));
}
-
-%select_3c25ce = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<bool>, read_write> = var, vec3<bool>(true)
- %arg_1:ptr<function, vec3<bool>, read_write> = var, vec3<bool>(true)
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:vec3<bool> = load %arg_0
- %7:vec3<bool> = load %arg_1
- %8:bool = load %arg_2
- %9:vec3<bool> = select %6, %7, %8
- %res:ptr<function, vec3<bool>, read_write> = var, %9
- %11:vec3<bool> = load %res
- %12:vec3<bool> = eq %11, vec3<bool>(false)
- %13:bool = all %12
- %14:i32 = select 0i, 1i, %13
- store %prevent_dce, %14
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_3c25ce(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %16:void = call %select_3c25ce
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_3c25ce(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %18:void = call %select_3c25ce
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_3c25ce(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %20:void = call %select_3c25ce
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/416e14.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/416e14.wgsl.expected.ir.msl
index e008134..a44a712 100644
--- a/test/tint/builtins/gen/var/select/416e14.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/416e14.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void select_416e14(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float arg_1 = 1.0f;
+ bool arg_2 = true;
+ float res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_416e14 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %arg_1:ptr<function, f32, read_write> = var, 1.0f
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:f32 = load %arg_0
- %7:f32 = load %arg_1
- %8:bool = load %arg_2
- %9:f32 = select %6, %7, %8
- %res:ptr<function, f32, read_write> = var, %9
- %11:f32 = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_416e14(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_416e14
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_416e14(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_416e14
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_416e14(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_416e14
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/51b047.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/51b047.wgsl.expected.ir.msl
index d5f0315..8bff5e4 100644
--- a/test/tint/builtins/gen/var/select/51b047.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/51b047.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void select_51b047(tint_module_vars_struct tint_module_vars) {
+ uint2 arg_0 = uint2(1u);
+ uint2 arg_1 = uint2(1u);
+ bool arg_2 = true;
+ uint2 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_51b047 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %arg_1:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:vec2<u32> = load %arg_0
- %7:vec2<u32> = load %arg_1
- %8:bool = load %arg_2
- %9:vec2<u32> = select %6, %7, %8
- %res:ptr<function, vec2<u32>, read_write> = var, %9
- %11:vec2<u32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_51b047(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_51b047
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_51b047(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_51b047
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_51b047(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_51b047
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/53d518.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.ir.msl
index 4f80447..321477f 100644
--- a/test/tint/builtins/gen/var/select/53d518.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void select_53d518(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 arg_1 = half3(1.0h);
+ bool3 arg_2 = bool3(true);
+ half3 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_53d518 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_1:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_2:ptr<function, vec3<bool>, read_write> = var, vec3<bool>(true)
- %6:vec3<f16> = load %arg_0
- %7:vec3<f16> = load %arg_1
- %8:vec3<bool> = load %arg_2
- %9:vec3<f16> = select %6, %7, %8
- %res:ptr<function, vec3<f16>, read_write> = var, %9
- %11:vec3<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_53d518(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_53d518
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_53d518(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_53d518
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_53d518(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_53d518
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/713567.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/713567.wgsl.expected.ir.msl
index 2b27364..7ead401 100644
--- a/test/tint/builtins/gen/var/select/713567.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/713567.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void select_713567(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 arg_1 = float4(1.0f);
+ bool arg_2 = true;
+ float4 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_713567 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_1:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:vec4<f32> = load %arg_0
- %7:vec4<f32> = load %arg_1
- %8:bool = load %arg_2
- %9:vec4<f32> = select %6, %7, %8
- %res:ptr<function, vec4<f32>, read_write> = var, %9
- %11:vec4<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_713567(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_713567
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_713567(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_713567
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_713567(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_713567
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.ir.msl
index 2088f2ef..1d4bf8d 100644
--- a/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void select_78be5f(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 arg_1 = float3(1.0f);
+ bool arg_2 = true;
+ float3 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_78be5f = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_1:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:vec3<f32> = load %arg_0
- %7:vec3<f32> = load %arg_1
- %8:bool = load %arg_2
- %9:vec3<f32> = select %6, %7, %8
- %res:ptr<function, vec3<f32>, read_write> = var, %9
- %11:vec3<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_78be5f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_78be5f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_78be5f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_78be5f
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_78be5f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_78be5f
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.ir.msl
index 6fd3737..7183ddd 100644
--- a/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.ir.msl
@@ -1,50 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void select_80a9a9(tint_module_vars_struct tint_module_vars) {
+ bool3 arg_0 = bool3(true);
+ bool3 arg_1 = bool3(true);
+ bool3 arg_2 = bool3(true);
+ bool3 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all((res == bool3(false))));
}
-
-%select_80a9a9 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<bool>, read_write> = var, vec3<bool>(true)
- %arg_1:ptr<function, vec3<bool>, read_write> = var, vec3<bool>(true)
- %arg_2:ptr<function, vec3<bool>, read_write> = var, vec3<bool>(true)
- %6:vec3<bool> = load %arg_0
- %7:vec3<bool> = load %arg_1
- %8:vec3<bool> = load %arg_2
- %9:vec3<bool> = select %6, %7, %8
- %res:ptr<function, vec3<bool>, read_write> = var, %9
- %11:vec3<bool> = load %res
- %12:vec3<bool> = eq %11, vec3<bool>(false)
- %13:bool = all %12
- %14:i32 = select 0i, 1i, %13
- store %prevent_dce, %14
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_80a9a9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %16:void = call %select_80a9a9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_80a9a9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %18:void = call %select_80a9a9
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_80a9a9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %20:void = call %select_80a9a9
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.ir.msl
index 527ef6a..d28216c 100644
--- a/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void select_830dd9(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 arg_1 = half4(1.0h);
+ bool arg_2 = true;
+ half4 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_830dd9 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_1:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:vec4<f16> = load %arg_0
- %7:vec4<f16> = load %arg_1
- %8:bool = load %arg_2
- %9:vec4<f16> = select %6, %7, %8
- %res:ptr<function, vec4<f16>, read_write> = var, %9
- %11:vec4<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_830dd9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_830dd9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_830dd9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_830dd9
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_830dd9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_830dd9
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.ir.msl
index 3cad55d..8e2e0db 100644
--- a/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void select_86f9bd(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 arg_1 = half2(1.0h);
+ bool arg_2 = true;
+ half2 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_86f9bd = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_1:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:vec2<f16> = load %arg_0
- %7:vec2<f16> = load %arg_1
- %8:bool = load %arg_2
- %9:vec2<f16> = select %6, %7, %8
- %res:ptr<function, vec2<f16>, read_write> = var, %9
- %11:vec2<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_86f9bd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_86f9bd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_86f9bd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_86f9bd
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_86f9bd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_86f9bd
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.ir.msl
index 08be126..07220eb 100644
--- a/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void select_8fa62c(tint_module_vars_struct tint_module_vars) {
+ int3 arg_0 = int3(1);
+ int3 arg_1 = int3(1);
+ bool arg_2 = true;
+ int3 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_8fa62c = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %arg_1:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:vec3<i32> = load %arg_0
- %7:vec3<i32> = load %arg_1
- %8:bool = load %arg_2
- %9:vec3<i32> = select %6, %7, %8
- %res:ptr<function, vec3<i32>, read_write> = var, %9
- %11:vec3<i32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_8fa62c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_8fa62c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_8fa62c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_8fa62c
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_8fa62c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_8fa62c
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/99f883.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/99f883.wgsl.expected.ir.msl
index e51b3c8..ab485be 100644
--- a/test/tint/builtins/gen/var/select/99f883.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/99f883.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void select_99f883(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ uint arg_1 = 1u;
+ bool arg_2 = true;
+ uint res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_99f883 = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %arg_1:ptr<function, u32, read_write> = var, 1u
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:u32 = load %arg_0
- %7:u32 = load %arg_1
- %8:bool = load %arg_2
- %9:u32 = select %6, %7, %8
- %res:ptr<function, u32, read_write> = var, %9
- %11:u32 = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_99f883(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_99f883
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_99f883(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_99f883
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_99f883(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_99f883
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.ir.msl
index 93c0009..ca71a11 100644
--- a/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void select_a081f1(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 arg_1 = half4(1.0h);
+ bool4 arg_2 = bool4(true);
+ half4 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_a081f1 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_1:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_2:ptr<function, vec4<bool>, read_write> = var, vec4<bool>(true)
- %6:vec4<f16> = load %arg_0
- %7:vec4<f16> = load %arg_1
- %8:vec4<bool> = load %arg_2
- %9:vec4<f16> = select %6, %7, %8
- %res:ptr<function, vec4<f16>, read_write> = var, %9
- %11:vec4<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_a081f1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_a081f1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_a081f1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_a081f1
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_a081f1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_a081f1
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.ir.msl
index 2f2ea14..8a12ffc 100644
--- a/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void select_a2860e(tint_module_vars_struct tint_module_vars) {
+ int4 arg_0 = int4(1);
+ int4 arg_1 = int4(1);
+ bool4 arg_2 = bool4(true);
+ int4 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_a2860e = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %arg_1:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %arg_2:ptr<function, vec4<bool>, read_write> = var, vec4<bool>(true)
- %6:vec4<i32> = load %arg_0
- %7:vec4<i32> = load %arg_1
- %8:vec4<bool> = load %arg_2
- %9:vec4<i32> = select %6, %7, %8
- %res:ptr<function, vec4<i32>, read_write> = var, %9
- %11:vec4<i32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_a2860e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_a2860e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_a2860e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_a2860e
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_a2860e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_a2860e
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.ir.msl
index 3b21dd6..b9bc063 100644
--- a/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void select_ab069f(tint_module_vars_struct tint_module_vars) {
+ int4 arg_0 = int4(1);
+ int4 arg_1 = int4(1);
+ bool arg_2 = true;
+ int4 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_ab069f = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %arg_1:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:vec4<i32> = load %arg_0
- %7:vec4<i32> = load %arg_1
- %8:bool = load %arg_2
- %9:vec4<i32> = select %6, %7, %8
- %res:ptr<function, vec4<i32>, read_write> = var, %9
- %11:vec4<i32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_ab069f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_ab069f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_ab069f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_ab069f
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_ab069f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_ab069f
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/b04721.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/b04721.wgsl.expected.ir.msl
index 115ae90..3b34960 100644
--- a/test/tint/builtins/gen/var/select/b04721.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/b04721.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void select_b04721(tint_module_vars_struct tint_module_vars) {
+ uint3 arg_0 = uint3(1u);
+ uint3 arg_1 = uint3(1u);
+ bool arg_2 = true;
+ uint3 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_b04721 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %arg_1:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:vec3<u32> = load %arg_0
- %7:vec3<u32> = load %arg_1
- %8:bool = load %arg_2
- %9:vec3<u32> = select %6, %7, %8
- %res:ptr<function, vec3<u32>, read_write> = var, %9
- %11:vec3<u32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_b04721(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_b04721
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_b04721(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_b04721
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_b04721(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_b04721
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.ir.msl
index 2317f05..997a4c4 100644
--- a/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void select_bb447f(tint_module_vars_struct tint_module_vars) {
+ int2 arg_0 = int2(1);
+ int2 arg_1 = int2(1);
+ bool arg_2 = true;
+ int2 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_bb447f = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %arg_1:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:vec2<i32> = load %arg_0
- %7:vec2<i32> = load %arg_1
- %8:bool = load %arg_2
- %9:vec2<i32> = select %6, %7, %8
- %res:ptr<function, vec2<i32>, read_write> = var, %9
- %11:vec2<i32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_bb447f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_bb447f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_bb447f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_bb447f
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_bb447f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_bb447f
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.ir.msl
index ce9e36c..cf6c7cd 100644
--- a/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void select_bb8aae(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 arg_1 = float4(1.0f);
+ bool4 arg_2 = bool4(true);
+ float4 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_bb8aae = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_1:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_2:ptr<function, vec4<bool>, read_write> = var, vec4<bool>(true)
- %6:vec4<f32> = load %arg_0
- %7:vec4<f32> = load %arg_1
- %8:vec4<bool> = load %arg_2
- %9:vec4<f32> = select %6, %7, %8
- %res:ptr<function, vec4<f32>, read_write> = var, %9
- %11:vec4<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_bb8aae(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_bb8aae
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_bb8aae(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_bb8aae
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_bb8aae(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_bb8aae
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.ir.msl
index 28f58c2..602c1b7 100644
--- a/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void select_bf3d29(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 arg_1 = float2(1.0f);
+ bool arg_2 = true;
+ float2 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_bf3d29 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_1:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:vec2<f32> = load %arg_0
- %7:vec2<f32> = load %arg_1
- %8:bool = load %arg_2
- %9:vec2<f32> = select %6, %7, %8
- %res:ptr<function, vec2<f32>, read_write> = var, %9
- %11:vec2<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_bf3d29(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_bf3d29
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_bf3d29(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_bf3d29
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_bf3d29(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_bf3d29
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.ir.msl
index d147d7b..80bcd92 100644
--- a/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.ir.msl
@@ -1,50 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void select_c31f9e(tint_module_vars_struct tint_module_vars) {
+ bool arg_0 = true;
+ bool arg_1 = true;
+ bool arg_2 = true;
+ bool res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all(!(res)));
}
-
-%select_c31f9e = func():void {
- $B2: {
- %arg_0:ptr<function, bool, read_write> = var, true
- %arg_1:ptr<function, bool, read_write> = var, true
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:bool = load %arg_0
- %7:bool = load %arg_1
- %8:bool = load %arg_2
- %9:bool = select %6, %7, %8
- %res:ptr<function, bool, read_write> = var, %9
- %11:bool = load %res
- %12:bool = eq %11, false
- %13:bool = all %12
- %14:i32 = select 0i, 1i, %13
- store %prevent_dce, %14
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_c31f9e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %16:void = call %select_c31f9e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_c31f9e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %18:void = call %select_c31f9e
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_c31f9e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %20:void = call %select_c31f9e
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.ir.msl
index a7274ef..a524329 100644
--- a/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.ir.msl
@@ -1,50 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void select_c41bd1(tint_module_vars_struct tint_module_vars) {
+ bool4 arg_0 = bool4(true);
+ bool4 arg_1 = bool4(true);
+ bool arg_2 = true;
+ bool4 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all((res == bool4(false))));
}
-
-%select_c41bd1 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<bool>, read_write> = var, vec4<bool>(true)
- %arg_1:ptr<function, vec4<bool>, read_write> = var, vec4<bool>(true)
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:vec4<bool> = load %arg_0
- %7:vec4<bool> = load %arg_1
- %8:bool = load %arg_2
- %9:vec4<bool> = select %6, %7, %8
- %res:ptr<function, vec4<bool>, read_write> = var, %9
- %11:vec4<bool> = load %res
- %12:vec4<bool> = eq %11, vec4<bool>(false)
- %13:bool = all %12
- %14:i32 = select 0i, 1i, %13
- store %prevent_dce, %14
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_c41bd1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %16:void = call %select_c41bd1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_c41bd1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %18:void = call %select_c41bd1
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_c41bd1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %20:void = call %select_c41bd1
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.ir.msl
index 1608310..ea1a188 100644
--- a/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void select_c4a4ef(tint_module_vars_struct tint_module_vars) {
+ uint4 arg_0 = uint4(1u);
+ uint4 arg_1 = uint4(1u);
+ bool4 arg_2 = bool4(true);
+ uint4 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_c4a4ef = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %arg_1:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %arg_2:ptr<function, vec4<bool>, read_write> = var, vec4<bool>(true)
- %6:vec4<u32> = load %arg_0
- %7:vec4<u32> = load %arg_1
- %8:vec4<bool> = load %arg_2
- %9:vec4<u32> = select %6, %7, %8
- %res:ptr<function, vec4<u32>, read_write> = var, %9
- %11:vec4<u32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_c4a4ef(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_c4a4ef
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_c4a4ef(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_c4a4ef
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_c4a4ef(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_c4a4ef
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.ir.msl
index 82ab349..0b86f07 100644
--- a/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.ir.msl
@@ -1,50 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void select_cb9301(tint_module_vars_struct tint_module_vars) {
+ bool2 arg_0 = bool2(true);
+ bool2 arg_1 = bool2(true);
+ bool2 arg_2 = bool2(true);
+ bool2 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all((res == bool2(false))));
}
-
-%select_cb9301 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<bool>, read_write> = var, vec2<bool>(true)
- %arg_1:ptr<function, vec2<bool>, read_write> = var, vec2<bool>(true)
- %arg_2:ptr<function, vec2<bool>, read_write> = var, vec2<bool>(true)
- %6:vec2<bool> = load %arg_0
- %7:vec2<bool> = load %arg_1
- %8:vec2<bool> = load %arg_2
- %9:vec2<bool> = select %6, %7, %8
- %res:ptr<function, vec2<bool>, read_write> = var, %9
- %11:vec2<bool> = load %res
- %12:vec2<bool> = eq %11, vec2<bool>(false)
- %13:bool = all %12
- %14:i32 = select 0i, 1i, %13
- store %prevent_dce, %14
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_cb9301(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %16:void = call %select_cb9301
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_cb9301(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %18:void = call %select_cb9301
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_cb9301(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %20:void = call %select_cb9301
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.ir.msl
index ce9ca97..28157b3 100644
--- a/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.ir.msl
@@ -1,50 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void select_e3e028(tint_module_vars_struct tint_module_vars) {
+ bool4 arg_0 = bool4(true);
+ bool4 arg_1 = bool4(true);
+ bool4 arg_2 = bool4(true);
+ bool4 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all((res == bool4(false))));
}
-
-%select_e3e028 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<bool>, read_write> = var, vec4<bool>(true)
- %arg_1:ptr<function, vec4<bool>, read_write> = var, vec4<bool>(true)
- %arg_2:ptr<function, vec4<bool>, read_write> = var, vec4<bool>(true)
- %6:vec4<bool> = load %arg_0
- %7:vec4<bool> = load %arg_1
- %8:vec4<bool> = load %arg_2
- %9:vec4<bool> = select %6, %7, %8
- %res:ptr<function, vec4<bool>, read_write> = var, %9
- %11:vec4<bool> = load %res
- %12:vec4<bool> = eq %11, vec4<bool>(false)
- %13:bool = all %12
- %14:i32 = select 0i, 1i, %13
- store %prevent_dce, %14
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_e3e028(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %16:void = call %select_e3e028
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_e3e028(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %18:void = call %select_e3e028
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_e3e028(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %20:void = call %select_e3e028
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.ir.msl
index 51ee2c3..bd72a20 100644
--- a/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void select_ebfea2(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 arg_1 = float3(1.0f);
+ bool3 arg_2 = bool3(true);
+ float3 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_ebfea2 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_1:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_2:ptr<function, vec3<bool>, read_write> = var, vec3<bool>(true)
- %6:vec3<f32> = load %arg_0
- %7:vec3<f32> = load %arg_1
- %8:vec3<bool> = load %arg_2
- %9:vec3<f32> = select %6, %7, %8
- %res:ptr<function, vec3<f32>, read_write> = var, %9
- %11:vec3<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_ebfea2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_ebfea2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_ebfea2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_ebfea2
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_ebfea2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_ebfea2
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.ir.msl
index 3bafce6..58c72d7 100644
--- a/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void select_ed7c13(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 arg_1 = half2(1.0h);
+ bool2 arg_2 = bool2(true);
+ half2 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_ed7c13 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_1:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_2:ptr<function, vec2<bool>, read_write> = var, vec2<bool>(true)
- %6:vec2<f16> = load %arg_0
- %7:vec2<f16> = load %arg_1
- %8:vec2<bool> = load %arg_2
- %9:vec2<f16> = select %6, %7, %8
- %res:ptr<function, vec2<f16>, read_write> = var, %9
- %11:vec2<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_ed7c13(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_ed7c13
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_ed7c13(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_ed7c13
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_ed7c13(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_ed7c13
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.ir.msl
index 6b3157d..844bfcd 100644
--- a/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void select_ed8a15(tint_module_vars_struct tint_module_vars) {
+ int arg_0 = 1;
+ int arg_1 = 1;
+ bool arg_2 = true;
+ int res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%select_ed8a15 = func():void {
- $B2: {
- %arg_0:ptr<function, i32, read_write> = var, 1i
- %arg_1:ptr<function, i32, read_write> = var, 1i
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:i32 = load %arg_0
- %7:i32 = load %arg_1
- %8:bool = load %arg_2
- %9:i32 = select %6, %7, %8
- %res:ptr<function, i32, read_write> = var, %9
- %11:i32 = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_ed8a15(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %select_ed8a15
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_ed8a15(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %select_ed8a15
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_ed8a15(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %select_ed8a15
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.ir.msl
index 42adc09..6597256 100644
--- a/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.ir.msl
@@ -1,50 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void select_fb7e53(tint_module_vars_struct tint_module_vars) {
+ bool2 arg_0 = bool2(true);
+ bool2 arg_1 = bool2(true);
+ bool arg_2 = true;
+ bool2 res = select(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = select(0, 1, all((res == bool2(false))));
}
-
-%select_fb7e53 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<bool>, read_write> = var, vec2<bool>(true)
- %arg_1:ptr<function, vec2<bool>, read_write> = var, vec2<bool>(true)
- %arg_2:ptr<function, bool, read_write> = var, true
- %6:vec2<bool> = load %arg_0
- %7:vec2<bool> = load %arg_1
- %8:bool = load %arg_2
- %9:vec2<bool> = select %6, %7, %8
- %res:ptr<function, vec2<bool>, read_write> = var, %9
- %11:vec2<bool> = load %res
- %12:vec2<bool> = eq %11, vec2<bool>(false)
- %13:bool = all %12
- %14:i32 = select 0i, 1i, %13
- store %prevent_dce, %14
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ select_fb7e53(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %16:void = call %select_fb7e53
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_fb7e53(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %18:void = call %select_fb7e53
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ select_fb7e53(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %20:void = call %select_fb7e53
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sign/159665.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sign/159665.wgsl.expected.ir.msl
index 5a9a2da..c76c0b1 100644
--- a/test/tint/builtins/gen/var/sign/159665.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sign/159665.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void sign_159665(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = sign(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_159665 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = sign %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_159665(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sign_159665
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_159665(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sign_159665
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_159665(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sign_159665
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sign/160933.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.ir.msl
index 162958d..ce9c705 100644
--- a/test/tint/builtins/gen/var/sign/160933.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void sign_160933(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 res = sign(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_160933 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = sign %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_160933(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sign_160933
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_160933(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sign_160933
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_160933(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sign_160933
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.ir.msl
index 1fabbf9..1ee9052 100644
--- a/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void sign_5d283a(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 res = sign(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_5d283a = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = sign %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_5d283a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sign_5d283a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_5d283a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sign_5d283a
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_5d283a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sign_5d283a
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.ir.msl
index 04c153b..cd14344 100644
--- a/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void sign_7c85ea(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half res = sign(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_7c85ea = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %arg_0
- %5:f16 = sign %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_7c85ea(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sign_7c85ea
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_7c85ea(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sign_7c85ea
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_7c85ea(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sign_7c85ea
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.ir.msl
index b92315f..eb8ba1a 100644
--- a/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void sign_b8f634(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = sign(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_b8f634 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = sign %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_b8f634(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sign_b8f634
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_b8f634(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sign_b8f634
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_b8f634(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sign_b8f634
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.ir.msl
index 8d3e3f0..de696bb 100644
--- a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void sign_ccdb3c(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 res = sign(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_ccdb3c = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = sign %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_ccdb3c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sign_ccdb3c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_ccdb3c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sign_ccdb3c
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_ccdb3c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sign_ccdb3c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.ir.msl
index 879c635..98faf56 100644
--- a/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void sign_d065d8(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = sign(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_d065d8 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = sign %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_d065d8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sign_d065d8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_d065d8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sign_d065d8
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_d065d8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sign_d065d8
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sign/dd790e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sign/dd790e.wgsl.expected.ir.msl
index 42a2757..4cb5e3a 100644
--- a/test/tint/builtins/gen/var/sign/dd790e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sign/dd790e.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void sign_dd790e(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = sign(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sign_dd790e = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = sign %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sign_dd790e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sign_dd790e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_dd790e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sign_dd790e
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sign_dd790e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sign_dd790e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.ir.msl
index 49c3ca3..46b51bf 100644
--- a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void sin_01f241(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.57079637050628662109f);
+ float3 res = sin(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sin_01f241 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.57079637050628662109f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = sin %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sin_01f241(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sin_01f241
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_01f241(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sin_01f241
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_01f241(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sin_01f241
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.ir.msl
index 8729c61..79bbb6f 100644
--- a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void sin_2c903b(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.5703125h);
+ half3 res = sin(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sin_2c903b = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.5703125h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = sin %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sin_2c903b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sin_2c903b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_2c903b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sin_2c903b
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_2c903b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sin_2c903b
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.ir.msl
index 7886ef4..35d8648 100644
--- a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void sin_3cca11(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.5703125h);
+ half2 res = sin(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sin_3cca11 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.5703125h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = sin %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sin_3cca11(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sin_3cca11
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_3cca11(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sin_3cca11
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_3cca11(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sin_3cca11
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.ir.msl
index 549b117..6c60060 100644
--- a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void sin_4e3979(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.57079637050628662109f);
+ float4 res = sin(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sin_4e3979 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.57079637050628662109f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = sin %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sin_4e3979(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sin_4e3979
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_4e3979(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sin_4e3979
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_4e3979(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sin_4e3979
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.ir.msl
index f625cf9..068913e 100644
--- a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void sin_5c0712(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.5703125h);
+ half4 res = sin(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sin_5c0712 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.5703125h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = sin %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sin_5c0712(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sin_5c0712
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_5c0712(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sin_5c0712
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_5c0712(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sin_5c0712
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.ir.msl
index 8771b75..19814f2 100644
--- a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void sin_66a59f(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.5703125h;
+ half res = sin(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sin_66a59f = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.5703125h
- %4:f16 = load %arg_0
- %5:f16 = sin %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sin_66a59f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sin_66a59f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_66a59f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sin_66a59f
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_66a59f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sin_66a59f
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.ir.msl
index 9444a90..35ef9cf 100644
--- a/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void sin_b78c91(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.57079637050628662109f;
+ float res = sin(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sin_b78c91 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.57079637050628662109f
- %4:f32 = load %arg_0
- %5:f32 = sin %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sin_b78c91(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sin_b78c91
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_b78c91(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sin_b78c91
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_b78c91(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sin_b78c91
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.ir.msl
index 8b0ea0a..ca4f580 100644
--- a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void sin_fc8bc4(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.57079637050628662109f);
+ float2 res = sin(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sin_fc8bc4 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.57079637050628662109f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = sin %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sin_fc8bc4(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sin_fc8bc4
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_fc8bc4(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sin_fc8bc4
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sin_fc8bc4(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sin_fc8bc4
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.ir.msl
index 9228a17..3de51d6 100644
--- a/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void sinh_0908c1(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 res = sinh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sinh_0908c1 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = sinh %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sinh_0908c1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sinh_0908c1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_0908c1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sinh_0908c1
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_0908c1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sinh_0908c1
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.ir.msl
index 0606302..3745789 100644
--- a/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void sinh_445e33(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = sinh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sinh_445e33 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = sinh %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sinh_445e33(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sinh_445e33
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_445e33(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sinh_445e33
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_445e33(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sinh_445e33
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.ir.msl
index 0c7f4bf..f8bc21c 100644
--- a/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void sinh_69cce2(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half res = sinh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sinh_69cce2 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %arg_0
- %5:f16 = sinh %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sinh_69cce2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sinh_69cce2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_69cce2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sinh_69cce2
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_69cce2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sinh_69cce2
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sinh/7bb598.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sinh/7bb598.wgsl.expected.ir.msl
index 8860a73..502ebe2 100644
--- a/test/tint/builtins/gen/var/sinh/7bb598.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sinh/7bb598.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void sinh_7bb598(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = sinh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sinh_7bb598 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = sinh %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sinh_7bb598(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sinh_7bb598
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_7bb598(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sinh_7bb598
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_7bb598(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sinh_7bb598
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.ir.msl
index 38afa99..406e4c8 100644
--- a/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void sinh_924f19(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 res = sinh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sinh_924f19 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = sinh %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sinh_924f19(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sinh_924f19
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_924f19(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sinh_924f19
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_924f19(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sinh_924f19
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.ir.msl
index f30b4e6..b254c96 100644
--- a/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void sinh_b9860e(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = sinh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sinh_b9860e = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = sinh %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sinh_b9860e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sinh_b9860e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_b9860e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sinh_b9860e
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_b9860e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sinh_b9860e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.ir.msl
index 1622cb5..71992b7 100644
--- a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void sinh_ba7e25(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 res = sinh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sinh_ba7e25 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = sinh %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sinh_ba7e25(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sinh_ba7e25
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_ba7e25(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sinh_ba7e25
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_ba7e25(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sinh_ba7e25
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.ir.msl
index 1c68067..ff20d58 100644
--- a/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void sinh_c9a5eb(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = sinh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sinh_c9a5eb = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = sinh %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sinh_c9a5eb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sinh_c9a5eb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_c9a5eb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sinh_c9a5eb
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sinh_c9a5eb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sinh_c9a5eb
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.ir.msl
index 888ad07..811eec9 100644
--- a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void smoothstep_12c031(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(2.0h);
+ half2 arg_1 = half2(4.0h);
+ half2 arg_2 = half2(3.0h);
+ half2 res = smoothstep(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%smoothstep_12c031 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(2.0h)
- %arg_1:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(4.0h)
- %arg_2:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(3.0h)
- %6:vec2<f16> = load %arg_0
- %7:vec2<f16> = load %arg_1
- %8:vec2<f16> = load %arg_2
- %9:vec2<f16> = smoothstep %6, %7, %8
- %res:ptr<function, vec2<f16>, read_write> = var, %9
- %11:vec2<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ smoothstep_12c031(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %smoothstep_12c031
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_12c031(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %smoothstep_12c031
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_12c031(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %smoothstep_12c031
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.ir.msl
index f287a5a..55e8b05 100644
--- a/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void smoothstep_392c19(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(2.0f);
+ float2 arg_1 = float2(4.0f);
+ float2 arg_2 = float2(3.0f);
+ float2 res = smoothstep(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%smoothstep_392c19 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(2.0f)
- %arg_1:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(4.0f)
- %arg_2:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(3.0f)
- %6:vec2<f32> = load %arg_0
- %7:vec2<f32> = load %arg_1
- %8:vec2<f32> = load %arg_2
- %9:vec2<f32> = smoothstep %6, %7, %8
- %res:ptr<function, vec2<f32>, read_write> = var, %9
- %11:vec2<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ smoothstep_392c19(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %smoothstep_392c19
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_392c19(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %smoothstep_392c19
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_392c19(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %smoothstep_392c19
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.ir.msl
index b4506a9..bdbebac 100644
--- a/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void smoothstep_40864c(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(2.0f);
+ float4 arg_1 = float4(4.0f);
+ float4 arg_2 = float4(3.0f);
+ float4 res = smoothstep(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%smoothstep_40864c = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(2.0f)
- %arg_1:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(4.0f)
- %arg_2:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(3.0f)
- %6:vec4<f32> = load %arg_0
- %7:vec4<f32> = load %arg_1
- %8:vec4<f32> = load %arg_2
- %9:vec4<f32> = smoothstep %6, %7, %8
- %res:ptr<function, vec4<f32>, read_write> = var, %9
- %11:vec4<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ smoothstep_40864c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %smoothstep_40864c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_40864c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %smoothstep_40864c
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_40864c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %smoothstep_40864c
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.ir.msl
index c47c494..ab748c5 100644
--- a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void smoothstep_586e12(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 2.0h;
+ half arg_1 = 4.0h;
+ half arg_2 = 3.0h;
+ half res = smoothstep(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%smoothstep_586e12 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 2.0h
- %arg_1:ptr<function, f16, read_write> = var, 4.0h
- %arg_2:ptr<function, f16, read_write> = var, 3.0h
- %6:f16 = load %arg_0
- %7:f16 = load %arg_1
- %8:f16 = load %arg_2
- %9:f16 = smoothstep %6, %7, %8
- %res:ptr<function, f16, read_write> = var, %9
- %11:f16 = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ smoothstep_586e12(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %smoothstep_586e12
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_586e12(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %smoothstep_586e12
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_586e12(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %smoothstep_586e12
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/smoothstep/6c4975.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/smoothstep/6c4975.wgsl.expected.ir.msl
index 5ac7acc..99f294d 100644
--- a/test/tint/builtins/gen/var/smoothstep/6c4975.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/smoothstep/6c4975.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void smoothstep_6c4975(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 2.0f;
+ float arg_1 = 4.0f;
+ float arg_2 = 3.0f;
+ float res = smoothstep(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%smoothstep_6c4975 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 2.0f
- %arg_1:ptr<function, f32, read_write> = var, 4.0f
- %arg_2:ptr<function, f32, read_write> = var, 3.0f
- %6:f32 = load %arg_0
- %7:f32 = load %arg_1
- %8:f32 = load %arg_2
- %9:f32 = smoothstep %6, %7, %8
- %res:ptr<function, f32, read_write> = var, %9
- %11:f32 = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ smoothstep_6c4975(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %smoothstep_6c4975
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_6c4975(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %smoothstep_6c4975
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_6c4975(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %smoothstep_6c4975
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.ir.msl
index adca0d7..2be8298 100644
--- a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void smoothstep_6e7a74(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(2.0h);
+ half3 arg_1 = half3(4.0h);
+ half3 arg_2 = half3(3.0h);
+ half3 res = smoothstep(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%smoothstep_6e7a74 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(2.0h)
- %arg_1:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(4.0h)
- %arg_2:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(3.0h)
- %6:vec3<f16> = load %arg_0
- %7:vec3<f16> = load %arg_1
- %8:vec3<f16> = load %arg_2
- %9:vec3<f16> = smoothstep %6, %7, %8
- %res:ptr<function, vec3<f16>, read_write> = var, %9
- %11:vec3<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ smoothstep_6e7a74(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %smoothstep_6e7a74
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_6e7a74(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %smoothstep_6e7a74
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_6e7a74(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %smoothstep_6e7a74
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.ir.msl
index dd28c77..79a57fa 100644
--- a/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void smoothstep_aad1db(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(2.0f);
+ float3 arg_1 = float3(4.0f);
+ float3 arg_2 = float3(3.0f);
+ float3 res = smoothstep(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%smoothstep_aad1db = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(2.0f)
- %arg_1:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(4.0f)
- %arg_2:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(3.0f)
- %6:vec3<f32> = load %arg_0
- %7:vec3<f32> = load %arg_1
- %8:vec3<f32> = load %arg_2
- %9:vec3<f32> = smoothstep %6, %7, %8
- %res:ptr<function, vec3<f32>, read_write> = var, %9
- %11:vec3<f32> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ smoothstep_aad1db(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %smoothstep_aad1db
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_aad1db(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %smoothstep_aad1db
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_aad1db(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %smoothstep_aad1db
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.ir.msl
index ac939c4..23b9e6b 100644
--- a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.ir.msl
@@ -1,47 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void smoothstep_c43ebd(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(2.0h);
+ half4 arg_1 = half4(4.0h);
+ half4 arg_2 = half4(3.0h);
+ half4 res = smoothstep(arg_0, arg_1, arg_2);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%smoothstep_c43ebd = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(2.0h)
- %arg_1:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(4.0h)
- %arg_2:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(3.0h)
- %6:vec4<f16> = load %arg_0
- %7:vec4<f16> = load %arg_1
- %8:vec4<f16> = load %arg_2
- %9:vec4<f16> = smoothstep %6, %7, %8
- %res:ptr<function, vec4<f16>, read_write> = var, %9
- %11:vec4<f16> = load %res
- store %prevent_dce, %11
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ smoothstep_c43ebd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %13:void = call %smoothstep_c43ebd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_c43ebd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %15:void = call %smoothstep_c43ebd
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ smoothstep_c43ebd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %17:void = call %smoothstep_c43ebd
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sqrt/20c74e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sqrt/20c74e.wgsl.expected.ir.msl
index 52d1ca3..95511ae 100644
--- a/test/tint/builtins/gen/var/sqrt/20c74e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sqrt/20c74e.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void sqrt_20c74e(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = sqrt(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sqrt_20c74e = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = sqrt %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sqrt_20c74e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sqrt_20c74e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_20c74e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sqrt_20c74e
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_20c74e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sqrt_20c74e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.ir.msl
index b5ba61d..5b557ba 100644
--- a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void sqrt_803d1c(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 res = sqrt(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sqrt_803d1c = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = sqrt %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sqrt_803d1c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sqrt_803d1c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_803d1c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sqrt_803d1c
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_803d1c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sqrt_803d1c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.ir.msl
index 134a9ac..7e2c7f7 100644
--- a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void sqrt_895a0c(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 res = sqrt(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sqrt_895a0c = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = sqrt %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sqrt_895a0c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sqrt_895a0c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_895a0c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sqrt_895a0c
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_895a0c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sqrt_895a0c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.ir.msl
index b08e923..6984e20 100644
--- a/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void sqrt_8c7024(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = sqrt(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sqrt_8c7024 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = sqrt %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sqrt_8c7024(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sqrt_8c7024
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_8c7024(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sqrt_8c7024
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_8c7024(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sqrt_8c7024
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.ir.msl
index 0bcbe40..a1a8e57 100644
--- a/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void sqrt_aa0d7a(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = sqrt(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sqrt_aa0d7a = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = sqrt %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sqrt_aa0d7a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sqrt_aa0d7a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_aa0d7a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sqrt_aa0d7a
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_aa0d7a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sqrt_aa0d7a
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.ir.msl
index 32d4546..ec38f59 100644
--- a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void sqrt_d9ab4d(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 res = sqrt(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sqrt_d9ab4d = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = sqrt %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sqrt_d9ab4d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sqrt_d9ab4d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_d9ab4d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sqrt_d9ab4d
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_d9ab4d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sqrt_d9ab4d
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.ir.msl
index 14e52ff..24a28c5 100644
--- a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void sqrt_ec33e9(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half res = sqrt(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sqrt_ec33e9 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %arg_0
- %5:f16 = sqrt %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sqrt_ec33e9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sqrt_ec33e9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_ec33e9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sqrt_ec33e9
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_ec33e9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sqrt_ec33e9
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.ir.msl
index 6f6b5c9..43e4799 100644
--- a/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void sqrt_f8c59a(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = sqrt(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%sqrt_f8c59a = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = sqrt %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ sqrt_f8c59a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %sqrt_f8c59a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_f8c59a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %sqrt_f8c59a
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ sqrt_f8c59a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %sqrt_f8c59a
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.ir.msl
index b47ef2e..5a2724e 100644
--- a/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void step_07cb06(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 arg_1 = half2(1.0h);
+ half2 res = step(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%step_07cb06 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %arg_1:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %5:vec2<f16> = load %arg_0
- %6:vec2<f16> = load %arg_1
- %7:vec2<f16> = step %5, %6
- %res:ptr<function, vec2<f16>, read_write> = var, %7
- %9:vec2<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ step_07cb06(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %step_07cb06
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_07cb06(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %step_07cb06
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_07cb06(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %step_07cb06
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/step/0b073b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/step/0b073b.wgsl.expected.ir.msl
index d7e2286..d460c5f 100644
--- a/test/tint/builtins/gen/var/step/0b073b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/step/0b073b.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void step_0b073b(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float arg_1 = 1.0f;
+ float res = step(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%step_0b073b = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %arg_1:ptr<function, f32, read_write> = var, 1.0f
- %5:f32 = load %arg_0
- %6:f32 = load %arg_1
- %7:f32 = step %5, %6
- %res:ptr<function, f32, read_write> = var, %7
- %9:f32 = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ step_0b073b(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %step_0b073b
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_0b073b(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %step_0b073b
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_0b073b(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %step_0b073b
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/step/19accd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/step/19accd.wgsl.expected.ir.msl
index 67bcf1b..67aa9b5 100644
--- a/test/tint/builtins/gen/var/step/19accd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/step/19accd.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void step_19accd(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 arg_1 = float2(1.0f);
+ float2 res = step(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%step_19accd = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %arg_1:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %5:vec2<f32> = load %arg_0
- %6:vec2<f32> = load %arg_1
- %7:vec2<f32> = step %5, %6
- %res:ptr<function, vec2<f32>, read_write> = var, %7
- %9:vec2<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ step_19accd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %step_19accd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_19accd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %step_19accd
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_19accd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %step_19accd
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/step/334303.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/step/334303.wgsl.expected.ir.msl
index 4c972d9..c1b1383 100644
--- a/test/tint/builtins/gen/var/step/334303.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/step/334303.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void step_334303(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 arg_1 = float3(1.0f);
+ float3 res = step(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%step_334303 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %arg_1:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %5:vec3<f32> = load %arg_0
- %6:vec3<f32> = load %arg_1
- %7:vec3<f32> = step %5, %6
- %res:ptr<function, vec3<f32>, read_write> = var, %7
- %9:vec3<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ step_334303(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %step_334303
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_334303(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %step_334303
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_334303(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %step_334303
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/step/630d07.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.ir.msl
index 96e266c..dd1b453 100644
--- a/test/tint/builtins/gen/var/step/630d07.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void step_630d07(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half arg_1 = 1.0h;
+ half res = step(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%step_630d07 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %arg_1:ptr<function, f16, read_write> = var, 1.0h
- %5:f16 = load %arg_0
- %6:f16 = load %arg_1
- %7:f16 = step %5, %6
- %res:ptr<function, f16, read_write> = var, %7
- %9:f16 = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ step_630d07(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %step_630d07
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_630d07(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %step_630d07
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_630d07(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %step_630d07
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/step/baa320.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.ir.msl
index ac9ea8f..5c81d06 100644
--- a/test/tint/builtins/gen/var/step/baa320.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void step_baa320(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 arg_1 = half4(1.0h);
+ half4 res = step(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%step_baa320 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %arg_1:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %5:vec4<f16> = load %arg_0
- %6:vec4<f16> = load %arg_1
- %7:vec4<f16> = step %5, %6
- %res:ptr<function, vec4<f16>, read_write> = var, %7
- %9:vec4<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ step_baa320(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %step_baa320
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_baa320(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %step_baa320
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_baa320(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %step_baa320
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.ir.msl
index f4e39fb..b3bfa59 100644
--- a/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void step_cc6b61(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 arg_1 = half3(1.0h);
+ half3 res = step(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%step_cc6b61 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %arg_1:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %5:vec3<f16> = load %arg_0
- %6:vec3<f16> = load %arg_1
- %7:vec3<f16> = step %5, %6
- %res:ptr<function, vec3<f16>, read_write> = var, %7
- %9:vec3<f16> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ step_cc6b61(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %step_cc6b61
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_cc6b61(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %step_cc6b61
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_cc6b61(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %step_cc6b61
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.ir.msl
index 5c957da..b6053e5 100644
--- a/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.ir.msl
@@ -1,45 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void step_e2b337(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 arg_1 = float4(1.0f);
+ float4 res = step(arg_0, arg_1);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%step_e2b337 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %arg_1:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %5:vec4<f32> = load %arg_0
- %6:vec4<f32> = load %arg_1
- %7:vec4<f32> = step %5, %6
- %res:ptr<function, vec4<f32>, read_write> = var, %7
- %9:vec4<f32> = load %res
- store %prevent_dce, %9
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ step_e2b337(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %step_e2b337
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_e2b337(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %step_e2b337
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ step_e2b337(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %step_e2b337
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.ir.msl
index 5b86f72..c939e00 100644
--- a/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void tan_244e2a(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = tan(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tan_244e2a = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = tan %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tan_244e2a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %tan_244e2a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_244e2a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %tan_244e2a
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_244e2a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %tan_244e2a
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/tan/2f030e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/tan/2f030e.wgsl.expected.ir.msl
index f1b9e9c..47f96e4 100644
--- a/test/tint/builtins/gen/var/tan/2f030e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/tan/2f030e.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void tan_2f030e(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = tan(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tan_2f030e = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = tan %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tan_2f030e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %tan_2f030e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_2f030e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %tan_2f030e
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_2f030e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %tan_2f030e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.ir.msl
index a03f089..f177016 100644
--- a/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void tan_539e54(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 res = tan(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tan_539e54 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = tan %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tan_539e54(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %tan_539e54
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_539e54(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %tan_539e54
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_539e54(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %tan_539e54
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.ir.msl
index a77fd63..91119f7 100644
--- a/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void tan_7ea104(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = tan(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tan_7ea104 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = tan %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tan_7ea104(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %tan_7ea104
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_7ea104(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %tan_7ea104
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_7ea104(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %tan_7ea104
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.ir.msl
index 3faa8c9..493dfc02 100644
--- a/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void tan_8ce3e9(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = tan(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tan_8ce3e9 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = tan %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tan_8ce3e9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %tan_8ce3e9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_8ce3e9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %tan_8ce3e9
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_8ce3e9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %tan_8ce3e9
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.ir.msl
index 43387ff..a195911 100644
--- a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void tan_9f7c9c(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 res = tan(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tan_9f7c9c = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = tan %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tan_9f7c9c(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %tan_9f7c9c
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_9f7c9c(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %tan_9f7c9c
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_9f7c9c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %tan_9f7c9c
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.ir.msl
index d3b03ca..46fa02b 100644
--- a/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void tan_d4d491(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half res = tan(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tan_d4d491 = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %arg_0
- %5:f16 = tan %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tan_d4d491(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %tan_d4d491
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_d4d491(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %tan_d4d491
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_d4d491(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %tan_d4d491
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.ir.msl
index 289579e..6b3485e 100644
--- a/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void tan_db0456(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 res = tan(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tan_db0456 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = tan %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tan_db0456(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %tan_db0456
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_db0456(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %tan_db0456
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tan_db0456(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %tan_db0456
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.ir.msl
index f9ce377..cd76564 100644
--- a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void tanh_06a4fe(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 res = tanh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tanh_06a4fe = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = tanh %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tanh_06a4fe(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %tanh_06a4fe
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_06a4fe(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %tanh_06a4fe
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_06a4fe(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %tanh_06a4fe
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.ir.msl
index f7c0d06..22db0c0 100644
--- a/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void tanh_5663c5(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = tanh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tanh_5663c5 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = tanh %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tanh_5663c5(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %tanh_5663c5
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_5663c5(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %tanh_5663c5
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_5663c5(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %tanh_5663c5
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.ir.msl
index 9b2f253..e1c2f4f 100644
--- a/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void tanh_5724b3(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = tanh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tanh_5724b3 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = tanh %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tanh_5724b3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %tanh_5724b3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_5724b3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %tanh_5724b3
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_5724b3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %tanh_5724b3
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.ir.msl
index 3d455c3..ff5a564 100644
--- a/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void tanh_5b19af(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half res = tanh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tanh_5b19af = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %arg_0
- %5:f16 = tanh %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tanh_5b19af(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %tanh_5b19af
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_5b19af(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %tanh_5b19af
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_5b19af(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %tanh_5b19af
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.ir.msl
index a0a001f..60f9e49 100644
--- a/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void tanh_6d105a(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 res = tanh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tanh_6d105a = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = tanh %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tanh_6d105a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %tanh_6d105a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_6d105a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %tanh_6d105a
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_6d105a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %tanh_6d105a
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.ir.msl
index 2880a7e..2861cc4 100644
--- a/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void tanh_9f9fb9(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = tanh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tanh_9f9fb9 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = tanh %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tanh_9f9fb9(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %tanh_9f9fb9
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_9f9fb9(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %tanh_9f9fb9
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_9f9fb9(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %tanh_9f9fb9
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/tanh/c15fdb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/tanh/c15fdb.wgsl.expected.ir.msl
index 115b35d..f98c2ef 100644
--- a/test/tint/builtins/gen/var/tanh/c15fdb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/tanh/c15fdb.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void tanh_c15fdb(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = tanh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tanh_c15fdb = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = tanh %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tanh_c15fdb(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %tanh_c15fdb
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_c15fdb(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %tanh_c15fdb
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_c15fdb(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %tanh_c15fdb
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.ir.msl
index 5f17487..68381d6 100644
--- a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void tanh_e8efb3(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 res = tanh(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%tanh_e8efb3 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = tanh %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ tanh_e8efb3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %tanh_e8efb3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_e8efb3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %tanh_e8efb3
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ tanh_e8efb3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %tanh_e8efb3
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.ir.msl
index 897a716..5451a28 100644
--- a/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.ir.msl
@@ -1,29 +1,58 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_GammaTransferParams {
+ float G;
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ uint padding;
+};
+struct tint_ExternalTextureParams {
+ uint numPlanes;
+ uint doYuvToRgbConversionOnly;
+ float3x4 yuvToRgbConversionMatrix;
+ tint_GammaTransferParams gammaDecodeParams;
+ tint_GammaTransferParams gammaEncodeParams;
+ float3x3 gamutConversionMatrix;
+ float3x2 sampleTransform;
+ float3x2 loadTransform;
+ float2 samplePlane0RectMin;
+ float2 samplePlane0RectMax;
+ float2 samplePlane1RectMin;
+ float2 samplePlane1RectMax;
+ uint2 visibleSize;
+ float2 plane1CoordFactor;
+};
+struct tint_module_vars_struct {
+ texture2d<float, access::sample> arg_0_plane0;
+ texture2d<float, access::sample> arg_0_plane1;
+ const constant tint_ExternalTextureParams* arg_0_params;
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-
-@group(1) @binding(0) var arg_0 : texture_external;
-
-fn textureDimensions_cdc6c9() {
- var res : vec2<u32> = textureDimensions(arg_0);
- prevent_dce = res;
+void textureDimensions_cdc6c9(tint_module_vars_struct tint_module_vars) {
+ uint2 res = ((*tint_module_vars.arg_0_params).visibleSize + uint2(1u));
+ (*tint_module_vars.prevent_dce) = res;
}
-
-@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
- textureDimensions_cdc6c9();
- return vec4<f32>();
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ textureDimensions_cdc6c9(tint_module_vars);
+ return float4(0.0f);
}
-
-@fragment
-fn fragment_main() {
- textureDimensions_cdc6c9();
+fragment void fragment_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+ textureDimensions_cdc6c9(tint_module_vars);
}
-
-@compute @workgroup_size(1)
-fn compute_main() {
- textureDimensions_cdc6c9();
+kernel void compute_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+ textureDimensions_cdc6c9(tint_module_vars);
}
-
-Failed to generate: error: ExternalTextureOptions missing binding entry for [group: 1, binding: 0]
+vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
+}
diff --git a/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.ir.msl
index 261fed0..460669d 100644
--- a/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.ir.msl
@@ -1,57 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3x3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat3x3<f16>, read_write> = var @binding_point(2, 0)
+void tint_store_and_preserve_padding(device half3x3* const target, half3x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
+ (*target)[2u] = value_param[2u];
}
-
-%transpose_06794e = func():void {
- $B2: {
- %arg_0:ptr<function, mat3x3<f16>, read_write> = var, mat3x3<f16>(vec3<f16>(1.0h))
- %4:mat3x3<f16> = load %arg_0
- %5:mat3x3<f16> = transpose %4
- %res:ptr<function, mat3x3<f16>, read_write> = var, %5
- %7:mat3x3<f16> = load %res
- %8:void = call %tint_store_and_preserve_padding, %prevent_dce, %7
- ret
- }
+void transpose_06794e(tint_module_vars_struct tint_module_vars) {
+ half3x3 arg_0 = half3x3(half3(1.0h), half3(1.0h), half3(1.0h));
+ half3x3 res = transpose(arg_0);
+ tint_store_and_preserve_padding(tint_module_vars.prevent_dce, res);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %transpose_06794e
- ret vec4<f32>(0.0f)
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_06794e(tint_module_vars);
+ return float4(0.0f);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %transpose_06794e
- ret
- }
+fragment void fragment_main(device half3x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_06794e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %transpose_06794e
- ret
- }
+kernel void compute_main(device half3x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_06794e(tint_module_vars);
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f16>, read_write>, %value_param:mat3x3<f16>):void {
- $B6: {
- %18:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %19:vec3<f16> = access %value_param, 0u
- store %18, %19
- %20:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %21:vec3<f16> = access %value_param, 1u
- store %20, %21
- %22:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %23:vec3<f16> = access %value_param, 2u
- store %22, %23
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.ir.msl
index 311ca78..64f642c 100644
--- a/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3x4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat3x4<f32>, read_write> = var @binding_point(2, 0)
+void transpose_2585cd(tint_module_vars_struct tint_module_vars) {
+ float4x3 arg_0 = float4x3(float3(1.0f), float3(1.0f), float3(1.0f), float3(1.0f));
+ float3x4 res = transpose(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_2585cd = func():void {
- $B2: {
- %arg_0:ptr<function, mat4x3<f32>, read_write> = var, mat4x3<f32>(vec3<f32>(1.0f))
- %4:mat4x3<f32> = load %arg_0
- %5:mat3x4<f32> = transpose %4
- %res:ptr<function, mat3x4<f32>, read_write> = var, %5
- %7:mat3x4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_2585cd(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %transpose_2585cd
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_2585cd(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %transpose_2585cd
- ret
- }
+kernel void compute_main(device float3x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_2585cd(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %transpose_2585cd
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.ir.msl
index 9263541..0c7aec3 100644
--- a/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2x2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat2x2<f32>, read_write> = var @binding_point(2, 0)
+void transpose_31d679(tint_module_vars_struct tint_module_vars) {
+ float2x2 arg_0 = float2x2(float2(1.0f), float2(1.0f));
+ float2x2 res = transpose(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_31d679 = func():void {
- $B2: {
- %arg_0:ptr<function, mat2x2<f32>, read_write> = var, mat2x2<f32>(vec2<f32>(1.0f))
- %4:mat2x2<f32> = load %arg_0
- %5:mat2x2<f32> = transpose %4
- %res:ptr<function, mat2x2<f32>, read_write> = var, %5
- %7:mat2x2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_31d679(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %transpose_31d679
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_31d679(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %transpose_31d679
- ret
- }
+kernel void compute_main(device float2x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_31d679(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %transpose_31d679
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.ir.msl
index 6313de0..7a8fb3f 100644
--- a/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2x4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat2x4<f32>, read_write> = var @binding_point(2, 0)
+void transpose_31e37e(tint_module_vars_struct tint_module_vars) {
+ float4x2 arg_0 = float4x2(float2(1.0f), float2(1.0f), float2(1.0f), float2(1.0f));
+ float2x4 res = transpose(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_31e37e = func():void {
- $B2: {
- %arg_0:ptr<function, mat4x2<f32>, read_write> = var, mat4x2<f32>(vec2<f32>(1.0f))
- %4:mat4x2<f32> = load %arg_0
- %5:mat2x4<f32> = transpose %4
- %res:ptr<function, mat2x4<f32>, read_write> = var, %5
- %7:mat2x4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_31e37e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %transpose_31e37e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_31e37e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %transpose_31e37e
- ret
- }
+kernel void compute_main(device float2x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_31e37e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %transpose_31e37e
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.ir.msl
index ad91d30..46d71fc 100644
--- a/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4x2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat4x2<f32>, read_write> = var @binding_point(2, 0)
+void transpose_4ce359(tint_module_vars_struct tint_module_vars) {
+ float2x4 arg_0 = float2x4(float4(1.0f), float4(1.0f));
+ float4x2 res = transpose(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_4ce359 = func():void {
- $B2: {
- %arg_0:ptr<function, mat2x4<f32>, read_write> = var, mat2x4<f32>(vec4<f32>(1.0f))
- %4:mat2x4<f32> = load %arg_0
- %5:mat4x2<f32> = transpose %4
- %res:ptr<function, mat4x2<f32>, read_write> = var, %5
- %7:mat4x2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_4ce359(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %transpose_4ce359
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_4ce359(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %transpose_4ce359
- ret
- }
+kernel void compute_main(device float4x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_4ce359(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %transpose_4ce359
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.ir.msl
index 29afba3..cf9778c 100644
--- a/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3x2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat3x2<f32>, read_write> = var @binding_point(2, 0)
+void transpose_4dc9a1(tint_module_vars_struct tint_module_vars) {
+ float2x3 arg_0 = float2x3(float3(1.0f), float3(1.0f));
+ float3x2 res = transpose(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_4dc9a1 = func():void {
- $B2: {
- %arg_0:ptr<function, mat2x3<f32>, read_write> = var, mat2x3<f32>(vec3<f32>(1.0f))
- %4:mat2x3<f32> = load %arg_0
- %5:mat3x2<f32> = transpose %4
- %res:ptr<function, mat3x2<f32>, read_write> = var, %5
- %7:mat3x2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_4dc9a1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %transpose_4dc9a1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_4dc9a1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %transpose_4dc9a1
- ret
- }
+kernel void compute_main(device float3x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_4dc9a1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %transpose_4dc9a1
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.ir.msl
index 359592b..7a39210 100644
--- a/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2x4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat2x4<f16>, read_write> = var @binding_point(2, 0)
+void transpose_5edd96(tint_module_vars_struct tint_module_vars) {
+ half4x2 arg_0 = half4x2(half2(1.0h), half2(1.0h), half2(1.0h), half2(1.0h));
+ half2x4 res = transpose(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_5edd96 = func():void {
- $B2: {
- %arg_0:ptr<function, mat4x2<f16>, read_write> = var, mat4x2<f16>(vec2<f16>(1.0h))
- %4:mat4x2<f16> = load %arg_0
- %5:mat2x4<f16> = transpose %4
- %res:ptr<function, mat2x4<f16>, read_write> = var, %5
- %7:mat2x4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_5edd96(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %transpose_5edd96
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_5edd96(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %transpose_5edd96
- ret
- }
+kernel void compute_main(device half2x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_5edd96(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %transpose_5edd96
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.ir.msl
index 044ac83..cf29419 100644
--- a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3x4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat3x4<f16>, read_write> = var @binding_point(2, 0)
+void transpose_5f36bf(tint_module_vars_struct tint_module_vars) {
+ half4x3 arg_0 = half4x3(half3(1.0h), half3(1.0h), half3(1.0h), half3(1.0h));
+ half3x4 res = transpose(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_5f36bf = func():void {
- $B2: {
- %arg_0:ptr<function, mat4x3<f16>, read_write> = var, mat4x3<f16>(vec3<f16>(1.0h))
- %4:mat4x3<f16> = load %arg_0
- %5:mat3x4<f16> = transpose %4
- %res:ptr<function, mat3x4<f16>, read_write> = var, %5
- %7:mat3x4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_5f36bf(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %transpose_5f36bf
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_5f36bf(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %transpose_5f36bf
- ret
- }
+kernel void compute_main(device half3x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_5f36bf(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %transpose_5f36bf
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.ir.msl
index 8a1ed4f..995a38a 100644
--- a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2x2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat2x2<f16>, read_write> = var @binding_point(2, 0)
+void transpose_7be8b2(tint_module_vars_struct tint_module_vars) {
+ half2x2 arg_0 = half2x2(half2(1.0h), half2(1.0h));
+ half2x2 res = transpose(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_7be8b2 = func():void {
- $B2: {
- %arg_0:ptr<function, mat2x2<f16>, read_write> = var, mat2x2<f16>(vec2<f16>(1.0h))
- %4:mat2x2<f16> = load %arg_0
- %5:mat2x2<f16> = transpose %4
- %res:ptr<function, mat2x2<f16>, read_write> = var, %5
- %7:mat2x2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_7be8b2(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %transpose_7be8b2
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_7be8b2(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %transpose_7be8b2
- ret
- }
+kernel void compute_main(device half2x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_7be8b2(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %transpose_7be8b2
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.ir.msl
index e306750..8e80fa7 100644
--- a/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4x4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat4x4<f16>, read_write> = var @binding_point(2, 0)
+void transpose_844869(tint_module_vars_struct tint_module_vars) {
+ half4x4 arg_0 = half4x4(half4(1.0h), half4(1.0h), half4(1.0h), half4(1.0h));
+ half4x4 res = transpose(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_844869 = func():void {
- $B2: {
- %arg_0:ptr<function, mat4x4<f16>, read_write> = var, mat4x4<f16>(vec4<f16>(1.0h))
- %4:mat4x4<f16> = load %arg_0
- %5:mat4x4<f16> = transpose %4
- %res:ptr<function, mat4x4<f16>, read_write> = var, %5
- %7:mat4x4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_844869(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %transpose_844869
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_844869(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %transpose_844869
- ret
- }
+kernel void compute_main(device half4x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_844869(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %transpose_844869
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.ir.msl
index 2657ea6..1b709b5 100644
--- a/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.ir.msl
@@ -1,57 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3x3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat3x3<f32>, read_write> = var @binding_point(2, 0)
+void tint_store_and_preserve_padding(device float3x3* const target, float3x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
+ (*target)[2u] = value_param[2u];
}
-
-%transpose_854336 = func():void {
- $B2: {
- %arg_0:ptr<function, mat3x3<f32>, read_write> = var, mat3x3<f32>(vec3<f32>(1.0f))
- %4:mat3x3<f32> = load %arg_0
- %5:mat3x3<f32> = transpose %4
- %res:ptr<function, mat3x3<f32>, read_write> = var, %5
- %7:mat3x3<f32> = load %res
- %8:void = call %tint_store_and_preserve_padding, %prevent_dce, %7
- ret
- }
+void transpose_854336(tint_module_vars_struct tint_module_vars) {
+ float3x3 arg_0 = float3x3(float3(1.0f), float3(1.0f), float3(1.0f));
+ float3x3 res = transpose(arg_0);
+ tint_store_and_preserve_padding(tint_module_vars.prevent_dce, res);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %transpose_854336
- ret vec4<f32>(0.0f)
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_854336(tint_module_vars);
+ return float4(0.0f);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %transpose_854336
- ret
- }
+fragment void fragment_main(device float3x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_854336(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %transpose_854336
- ret
- }
+kernel void compute_main(device float3x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_854336(tint_module_vars);
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f32>, read_write>, %value_param:mat3x3<f32>):void {
- $B6: {
- %18:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %19:vec3<f32> = access %value_param, 0u
- store %18, %19
- %20:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %21:vec3<f32> = access %value_param, 1u
- store %20, %21
- %22:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %23:vec3<f32> = access %value_param, 2u
- store %22, %23
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.ir.msl
index 97b23bd..e50daca 100644
--- a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.ir.msl
@@ -1,60 +1,36 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4x3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat4x3<f16>, read_write> = var @binding_point(2, 0)
+void tint_store_and_preserve_padding(device half4x3* const target, half4x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
+ (*target)[2u] = value_param[2u];
+ (*target)[3u] = value_param[3u];
}
-
-%transpose_8c06ce = func():void {
- $B2: {
- %arg_0:ptr<function, mat3x4<f16>, read_write> = var, mat3x4<f16>(vec4<f16>(1.0h))
- %4:mat3x4<f16> = load %arg_0
- %5:mat4x3<f16> = transpose %4
- %res:ptr<function, mat4x3<f16>, read_write> = var, %5
- %7:mat4x3<f16> = load %res
- %8:void = call %tint_store_and_preserve_padding, %prevent_dce, %7
- ret
- }
+void transpose_8c06ce(tint_module_vars_struct tint_module_vars) {
+ half3x4 arg_0 = half3x4(half4(1.0h), half4(1.0h), half4(1.0h));
+ half4x3 res = transpose(arg_0);
+ tint_store_and_preserve_padding(tint_module_vars.prevent_dce, res);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %transpose_8c06ce
- ret vec4<f32>(0.0f)
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_8c06ce(tint_module_vars);
+ return float4(0.0f);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %transpose_8c06ce
- ret
- }
+fragment void fragment_main(device half4x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_8c06ce(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %transpose_8c06ce
- ret
- }
+kernel void compute_main(device half4x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_8c06ce(tint_module_vars);
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f16>, read_write>, %value_param:mat4x3<f16>):void {
- $B6: {
- %18:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %19:vec3<f16> = access %value_param, 0u
- store %18, %19
- %20:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %21:vec3<f16> = access %value_param, 1u
- store %20, %21
- %22:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %23:vec3<f16> = access %value_param, 2u
- store %22, %23
- %24:ptr<storage, vec3<f16>, read_write> = access %target, 3u
- %25:vec3<f16> = access %value_param, 3u
- store %24, %25
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.ir.msl
index 78b0244..32751e7 100644
--- a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.ir.msl
@@ -1,54 +1,34 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2x3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat2x3<f16>, read_write> = var @binding_point(2, 0)
+void tint_store_and_preserve_padding(device half2x3* const target, half2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%transpose_b9ad1f = func():void {
- $B2: {
- %arg_0:ptr<function, mat3x2<f16>, read_write> = var, mat3x2<f16>(vec2<f16>(1.0h))
- %4:mat3x2<f16> = load %arg_0
- %5:mat2x3<f16> = transpose %4
- %res:ptr<function, mat2x3<f16>, read_write> = var, %5
- %7:mat2x3<f16> = load %res
- %8:void = call %tint_store_and_preserve_padding, %prevent_dce, %7
- ret
- }
+void transpose_b9ad1f(tint_module_vars_struct tint_module_vars) {
+ half3x2 arg_0 = half3x2(half2(1.0h), half2(1.0h), half2(1.0h));
+ half2x3 res = transpose(arg_0);
+ tint_store_and_preserve_padding(tint_module_vars.prevent_dce, res);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %transpose_b9ad1f
- ret vec4<f32>(0.0f)
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_b9ad1f(tint_module_vars);
+ return float4(0.0f);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %transpose_b9ad1f
- ret
- }
+fragment void fragment_main(device half2x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_b9ad1f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %transpose_b9ad1f
- ret
- }
+kernel void compute_main(device half2x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_b9ad1f(tint_module_vars);
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f16>, read_write>, %value_param:mat2x3<f16>):void {
- $B6: {
- %18:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %19:vec3<f16> = access %value_param, 0u
- store %18, %19
- %20:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %21:vec3<f16> = access %value_param, 1u
- store %20, %21
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.ir.msl
index 1efa863..678f9b6 100644
--- a/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4x4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat4x4<f32>, read_write> = var @binding_point(2, 0)
+void transpose_c1b600(tint_module_vars_struct tint_module_vars) {
+ float4x4 arg_0 = float4x4(float4(1.0f), float4(1.0f), float4(1.0f), float4(1.0f));
+ float4x4 res = transpose(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_c1b600 = func():void {
- $B2: {
- %arg_0:ptr<function, mat4x4<f32>, read_write> = var, mat4x4<f32>(vec4<f32>(1.0f))
- %4:mat4x4<f32> = load %arg_0
- %5:mat4x4<f32> = transpose %4
- %res:ptr<function, mat4x4<f32>, read_write> = var, %5
- %7:mat4x4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_c1b600(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %transpose_c1b600
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_c1b600(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %transpose_c1b600
- ret
- }
+kernel void compute_main(device float4x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_c1b600(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %transpose_c1b600
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4x4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.ir.msl
index 5356256..abae6f6 100644
--- a/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3x2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat3x2<f16>, read_write> = var @binding_point(2, 0)
+void transpose_d6faec(tint_module_vars_struct tint_module_vars) {
+ half2x3 arg_0 = half2x3(half3(1.0h), half3(1.0h));
+ half3x2 res = transpose(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_d6faec = func():void {
- $B2: {
- %arg_0:ptr<function, mat2x3<f16>, read_write> = var, mat2x3<f16>(vec3<f16>(1.0h))
- %4:mat2x3<f16> = load %arg_0
- %5:mat3x2<f16> = transpose %4
- %res:ptr<function, mat3x2<f16>, read_write> = var, %5
- %7:mat3x2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_d6faec(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %transpose_d6faec
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_d6faec(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %transpose_d6faec
- ret
- }
+kernel void compute_main(device half3x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_d6faec(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %transpose_d6faec
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.ir.msl
index cec83cb..8d69f3e 100644
--- a/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.ir.msl
@@ -1,60 +1,36 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4x3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat4x3<f32>, read_write> = var @binding_point(2, 0)
+void tint_store_and_preserve_padding(device float4x3* const target, float4x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
+ (*target)[2u] = value_param[2u];
+ (*target)[3u] = value_param[3u];
}
-
-%transpose_d8f8ba = func():void {
- $B2: {
- %arg_0:ptr<function, mat3x4<f32>, read_write> = var, mat3x4<f32>(vec4<f32>(1.0f))
- %4:mat3x4<f32> = load %arg_0
- %5:mat4x3<f32> = transpose %4
- %res:ptr<function, mat4x3<f32>, read_write> = var, %5
- %7:mat4x3<f32> = load %res
- %8:void = call %tint_store_and_preserve_padding, %prevent_dce, %7
- ret
- }
+void transpose_d8f8ba(tint_module_vars_struct tint_module_vars) {
+ float3x4 arg_0 = float3x4(float4(1.0f), float4(1.0f), float4(1.0f));
+ float4x3 res = transpose(arg_0);
+ tint_store_and_preserve_padding(tint_module_vars.prevent_dce, res);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %transpose_d8f8ba
- ret vec4<f32>(0.0f)
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_d8f8ba(tint_module_vars);
+ return float4(0.0f);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %transpose_d8f8ba
- ret
- }
+fragment void fragment_main(device float4x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_d8f8ba(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %transpose_d8f8ba
- ret
- }
+kernel void compute_main(device float4x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_d8f8ba(tint_module_vars);
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f32>, read_write>, %value_param:mat4x3<f32>):void {
- $B6: {
- %18:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %19:vec3<f32> = access %value_param, 0u
- store %18, %19
- %20:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %21:vec3<f32> = access %value_param, 1u
- store %20, %21
- %22:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %23:vec3<f32> = access %value_param, 2u
- store %22, %23
- %24:ptr<storage, vec3<f32>, read_write> = access %target, 3u
- %25:vec3<f32> = access %value_param, 3u
- store %24, %25
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.ir.msl
index 0959c68..e8f25c0 100644
--- a/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.ir.msl
@@ -1,54 +1,34 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2x3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat2x3<f32>, read_write> = var @binding_point(2, 0)
+void tint_store_and_preserve_padding(device float2x3* const target, float2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%transpose_ed4bdc = func():void {
- $B2: {
- %arg_0:ptr<function, mat3x2<f32>, read_write> = var, mat3x2<f32>(vec2<f32>(1.0f))
- %4:mat3x2<f32> = load %arg_0
- %5:mat2x3<f32> = transpose %4
- %res:ptr<function, mat2x3<f32>, read_write> = var, %5
- %7:mat2x3<f32> = load %res
- %8:void = call %tint_store_and_preserve_padding, %prevent_dce, %7
- ret
- }
+void transpose_ed4bdc(tint_module_vars_struct tint_module_vars) {
+ float3x2 arg_0 = float3x2(float2(1.0f), float2(1.0f), float2(1.0f));
+ float2x3 res = transpose(arg_0);
+ tint_store_and_preserve_padding(tint_module_vars.prevent_dce, res);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %11:void = call %transpose_ed4bdc
- ret vec4<f32>(0.0f)
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_ed4bdc(tint_module_vars);
+ return float4(0.0f);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %transpose_ed4bdc
- ret
- }
+fragment void fragment_main(device float2x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_ed4bdc(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %15:void = call %transpose_ed4bdc
- ret
- }
+kernel void compute_main(device float2x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_ed4bdc(tint_module_vars);
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f32>, read_write>, %value_param:mat2x3<f32>):void {
- $B6: {
- %18:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %19:vec3<f32> = access %value_param, 0u
- store %18, %19
- %20:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %21:vec3<f32> = access %value_param, 1u
- store %20, %21
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2x3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.ir.msl
index 5ad9494..11587a6 100644
--- a/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4x2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, mat4x2<f16>, read_write> = var @binding_point(2, 0)
+void transpose_faeb05(tint_module_vars_struct tint_module_vars) {
+ half2x4 arg_0 = half2x4(half4(1.0h), half4(1.0h));
+ half4x2 res = transpose(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%transpose_faeb05 = func():void {
- $B2: {
- %arg_0:ptr<function, mat2x4<f16>, read_write> = var, mat2x4<f16>(vec4<f16>(1.0h))
- %4:mat2x4<f16> = load %arg_0
- %5:mat4x2<f16> = transpose %4
- %res:ptr<function, mat4x2<f16>, read_write> = var, %5
- %7:mat4x2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ transpose_faeb05(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %transpose_faeb05
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_faeb05(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %transpose_faeb05
- ret
- }
+kernel void compute_main(device half4x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ transpose_faeb05(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %transpose_faeb05
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4x2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.ir.msl
index 5d4dd5d..2df2bd5 100644
--- a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void trunc_103ab8(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.5h);
+ half3 res = trunc(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%trunc_103ab8 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.5h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = trunc %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ trunc_103ab8(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %trunc_103ab8
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_103ab8(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %trunc_103ab8
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_103ab8(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %trunc_103ab8
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.ir.msl
index b5a2a06..a9910a1 100644
--- a/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void trunc_562d05(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.5f);
+ float3 res = trunc(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%trunc_562d05 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.5f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = trunc %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ trunc_562d05(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %trunc_562d05
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_562d05(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %trunc_562d05
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_562d05(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %trunc_562d05
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.ir.msl
index e5831e0..70bbe95 100644
--- a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void trunc_a56109(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.5h);
+ half2 res = trunc(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%trunc_a56109 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.5h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = trunc %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ trunc_a56109(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %trunc_a56109
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_a56109(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %trunc_a56109
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_a56109(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %trunc_a56109
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.ir.msl
index 080e32e..a9a61eb 100644
--- a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void trunc_cc2b0d(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.5h;
+ half res = trunc(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%trunc_cc2b0d = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.5h
- %4:f16 = load %arg_0
- %5:f16 = trunc %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ trunc_cc2b0d(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %trunc_cc2b0d
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_cc2b0d(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %trunc_cc2b0d
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_cc2b0d(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %trunc_cc2b0d
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.ir.msl
index 974ed09..e0fa2d3 100644
--- a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void trunc_ce7c17(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.5h);
+ half4 res = trunc(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%trunc_ce7c17 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.5h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = trunc %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ trunc_ce7c17(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %trunc_ce7c17
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_ce7c17(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %trunc_ce7c17
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_ce7c17(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %trunc_ce7c17
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.ir.msl
index 9147f0c..8381bdc 100644
--- a/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void trunc_e183aa(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.5f);
+ float4 res = trunc(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%trunc_e183aa = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.5f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = trunc %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ trunc_e183aa(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %trunc_e183aa
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_e183aa(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %trunc_e183aa
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_e183aa(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %trunc_e183aa
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/trunc/eb83df.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/trunc/eb83df.wgsl.expected.ir.msl
index 5e9ad23..9a9baa1 100644
--- a/test/tint/builtins/gen/var/trunc/eb83df.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/trunc/eb83df.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void trunc_eb83df(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.5f;
+ float res = trunc(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%trunc_eb83df = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.5f
- %4:f32 = load %arg_0
- %5:f32 = trunc %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ trunc_eb83df(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %trunc_eb83df
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_eb83df(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %trunc_eb83df
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_eb83df(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %trunc_eb83df
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.ir.msl
index 8be7106..93d1512 100644
--- a/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void trunc_f370d3(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.5f);
+ float2 res = trunc(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%trunc_f370d3 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.5f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = trunc %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ trunc_f370d3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %trunc_f370d3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_f370d3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %trunc_f370d3
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ trunc_f370d3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %trunc_f370d3
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/unpack2x16snorm/b4aea6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/unpack2x16snorm/b4aea6.wgsl.expected.ir.msl
index b1436dc..e196ede 100644
--- a/test/tint/builtins/gen/var/unpack2x16snorm/b4aea6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/unpack2x16snorm/b4aea6.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void unpack2x16snorm_b4aea6(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ float2 res = unpack_snorm2x16_to_float(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%unpack2x16snorm_b4aea6 = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %arg_0
- %5:vec2<f32> = unpack2x16snorm %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ unpack2x16snorm_b4aea6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %unpack2x16snorm_b4aea6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack2x16snorm_b4aea6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %unpack2x16snorm_b4aea6
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack2x16snorm_b4aea6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %unpack2x16snorm_b4aea6
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/unpack2x16unorm/7699c0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/unpack2x16unorm/7699c0.wgsl.expected.ir.msl
index 9e0567e..1141868 100644
--- a/test/tint/builtins/gen/var/unpack2x16unorm/7699c0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/unpack2x16unorm/7699c0.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void unpack2x16unorm_7699c0(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ float2 res = unpack_unorm2x16_to_float(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%unpack2x16unorm_7699c0 = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %arg_0
- %5:vec2<f32> = unpack2x16unorm %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ unpack2x16unorm_7699c0(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %unpack2x16unorm_7699c0
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack2x16unorm_7699c0(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %unpack2x16unorm_7699c0
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack2x16unorm_7699c0(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %unpack2x16unorm_7699c0
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/unpack4x8snorm/523fb3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/unpack4x8snorm/523fb3.wgsl.expected.ir.msl
index 555db7f..b3313b4 100644
--- a/test/tint/builtins/gen/var/unpack4x8snorm/523fb3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/unpack4x8snorm/523fb3.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void unpack4x8snorm_523fb3(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ float4 res = unpack_snorm4x8_to_float(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%unpack4x8snorm_523fb3 = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %arg_0
- %5:vec4<f32> = unpack4x8snorm %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ unpack4x8snorm_523fb3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %unpack4x8snorm_523fb3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack4x8snorm_523fb3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %unpack4x8snorm_523fb3
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack4x8snorm_523fb3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %unpack4x8snorm_523fb3
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/unpack4x8unorm/750c74.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/unpack4x8unorm/750c74.wgsl.expected.ir.msl
index 463fb4c..9d88a95 100644
--- a/test/tint/builtins/gen/var/unpack4x8unorm/750c74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/unpack4x8unorm/750c74.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void unpack4x8unorm_750c74(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ float4 res = unpack_unorm4x8_to_float(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%unpack4x8unorm_750c74 = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %arg_0
- %5:vec4<f32> = unpack4x8unorm %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ unpack4x8unorm_750c74(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %unpack4x8unorm_750c74
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack4x8unorm_750c74(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %unpack4x8unorm_750c74
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ unpack4x8unorm_750c74(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %unpack4x8unorm_750c74
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/workgroupUniformLoad/37307c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/workgroupUniformLoad/37307c.wgsl.expected.ir.msl
index f8281db..83d8d9b 100644
--- a/test/tint/builtins/gen/var/workgroupUniformLoad/37307c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/workgroupUniformLoad/37307c.wgsl.expected.ir.msl
@@ -1,41 +1,28 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup uint* arg_0;
+ device uint* prevent_dce;
+};
+struct tint_symbol_1 {
+ uint tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, u32, read_write> = var
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void workgroupUniformLoad_37307c(tint_module_vars_struct tint_module_vars) {
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ uint const v = (*tint_module_vars.arg_0);
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ uint res = v;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%workgroupUniformLoad_37307c = func():void {
- $B2: {
- %4:void = msl.threadgroup_barrier 4u
- %5:u32 = load %arg_0
- %6:u32 = let %5
- %7:void = msl.threadgroup_barrier 4u
- %res:ptr<function, u32, read_write> = var, %6
- %9:u32 = load %res
- store %prevent_dce, %9
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ (*tint_module_vars.arg_0) = 0u;
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ workgroupUniformLoad_37307c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %12:bool = eq %tint_local_index, 0u
- if %12 [t: $B4] { # if_1
- $B4: { # true
- store %arg_0, 0u
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %workgroupUniformLoad_37307c
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v_1).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/workgroupUniformLoad/7a857c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/workgroupUniformLoad/7a857c.wgsl.expected.ir.msl
index e2eb2fb..d8a9f7a 100644
--- a/test/tint/builtins/gen/var/workgroupUniformLoad/7a857c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/workgroupUniformLoad/7a857c.wgsl.expected.ir.msl
@@ -1,41 +1,28 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup float* arg_0;
+ device float* prevent_dce;
+};
+struct tint_symbol_1 {
+ float tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, f32, read_write> = var
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void workgroupUniformLoad_7a857c(tint_module_vars_struct tint_module_vars) {
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ float const v = (*tint_module_vars.arg_0);
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ float res = v;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%workgroupUniformLoad_7a857c = func():void {
- $B2: {
- %4:void = msl.threadgroup_barrier 4u
- %5:f32 = load %arg_0
- %6:f32 = let %5
- %7:void = msl.threadgroup_barrier 4u
- %res:ptr<function, f32, read_write> = var, %6
- %9:f32 = load %res
- store %prevent_dce, %9
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ (*tint_module_vars.arg_0) = 0.0f;
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ workgroupUniformLoad_7a857c(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %12:bool = eq %tint_local_index, 0u
- if %12 [t: $B4] { # if_1
- $B4: { # true
- store %arg_0, 0.0f
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %workgroupUniformLoad_7a857c
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]], device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v_1).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/workgroupUniformLoad/9d33de.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/workgroupUniformLoad/9d33de.wgsl.expected.ir.msl
index 3bb3f44..248acb8 100644
--- a/test/tint/builtins/gen/var/workgroupUniformLoad/9d33de.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/workgroupUniformLoad/9d33de.wgsl.expected.ir.msl
@@ -1,41 +1,28 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup int* arg_0;
+ device int* prevent_dce;
+};
+struct tint_symbol_1 {
+ int tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, i32, read_write> = var
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void workgroupUniformLoad_9d33de(tint_module_vars_struct tint_module_vars) {
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ int const v = (*tint_module_vars.arg_0);
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ int res = v;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%workgroupUniformLoad_9d33de = func():void {
- $B2: {
- %4:void = msl.threadgroup_barrier 4u
- %5:i32 = load %arg_0
- %6:i32 = let %5
- %7:void = msl.threadgroup_barrier 4u
- %res:ptr<function, i32, read_write> = var, %6
- %9:i32 = load %res
- store %prevent_dce, %9
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ (*tint_module_vars.arg_0) = 0;
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ workgroupUniformLoad_9d33de(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %12:bool = eq %tint_local_index, 0u
- if %12 [t: $B4] { # if_1
- $B4: { # true
- store %arg_0, 0i
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %workgroupUniformLoad_9d33de
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v_1).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/workgroupUniformLoad/e07d08.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/workgroupUniformLoad/e07d08.wgsl.expected.ir.msl
index bd29073..8eabaf9 100644
--- a/test/tint/builtins/gen/var/workgroupUniformLoad/e07d08.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/workgroupUniformLoad/e07d08.wgsl.expected.ir.msl
@@ -1,41 +1,28 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup half* arg_0;
+ device half* prevent_dce;
+};
+struct tint_symbol_1 {
+ half tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %arg_0:ptr<workgroup, f16, read_write> = var
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void workgroupUniformLoad_e07d08(tint_module_vars_struct tint_module_vars) {
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ half const v = (*tint_module_vars.arg_0);
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ half res = v;
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%workgroupUniformLoad_e07d08 = func():void {
- $B2: {
- %4:void = msl.threadgroup_barrier 4u
- %5:f16 = load %arg_0
- %6:f16 = let %5
- %7:void = msl.threadgroup_barrier 4u
- %res:ptr<function, f16, read_write> = var, %6
- %9:f16 = load %res
- store %prevent_dce, %9
- ret
+void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
+ if ((tint_local_index == 0u)) {
+ (*tint_module_vars.arg_0) = 0.0h;
}
+ threadgroup_barrier(mem_flags::mem_threadgroup);
+ workgroupUniformLoad_e07d08(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func(%tint_local_index:u32 [@local_invocation_index]):void {
- $B3: {
- %12:bool = eq %tint_local_index, 0u
- if %12 [t: $B4] { # if_1
- $B4: { # true
- store %arg_0, 0.0h
- exit_if # if_1
- }
- }
- %13:void = msl.threadgroup_barrier 4u
- %14:void = call %workgroupUniformLoad_e07d08
- ret
- }
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]], device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v_1).tint_symbol), .prevent_dce=prevent_dce};
+ compute_main_inner(tint_local_index, tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl.expected.ir.msl
index 85fa6d0..86dfdfa 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl.expected.ir.msl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl.expected.ir.msl
@@ -1,63 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+};
+struct InnerS {
+ int v;
+};
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
-}
+struct OuterS {
+ tint_array<InnerS, 8> a1;
+};
-InnerS = struct @align(4) {
- v:i32 @offset(0)
-}
-
-OuterS = struct @align(4) {
- a1:array<InnerS, 8> @offset(0)
-}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %v:ptr<function, InnerS, read_write> = var
- %s1:ptr<function, OuterS, read_write> = var
- loop [i: $B3, b: $B4, c: $B5] { # loop_1
- $B3: { # initializer
- %i:ptr<function, i32, read_write> = var, 0i
- next_iteration # -> $B4
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms};
+ InnerS v = {};
+ OuterS s1 = {};
+ {
+ int i = 0;
+ while(true) {
+ if ((i < 4)) {
+ } else {
+ break;
}
- $B4: { # body
- %6:i32 = load %i
- %7:bool = lt %6, 4i
- if %7 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %8:ptr<uniform, u32, read> = access %uniforms, 0u
- %9:u32 = load %8
- %10:ptr<function, InnerS, read_write> = access %s1, 0u, %9
- %11:InnerS = load %v
- store %10, %11
- continue # -> $B5
+ s1.a1[(*tint_module_vars.uniforms).i] = v;
+ {
+ i = (i + 1);
}
- $B5: { # continuing
- %12:i32 = load %i
- %13:i32 = add %12, 1i
- store %i, %13
- next_iteration # -> $B4
- }
+ continue;
}
- ret
}
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl.expected.ir.msl
index 1b45f1c..0fa13b3 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl.expected.ir.msl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl.expected.ir.msl
@@ -1,63 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+};
+struct InnerS {
+ int v;
+};
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
-}
+struct OuterS {
+ tint_array<InnerS, 8> a1;
+};
-InnerS = struct @align(4) {
- v:i32 @offset(0)
-}
-
-OuterS = struct @align(4) {
- a1:array<InnerS, 8> @offset(0)
-}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %v:ptr<function, InnerS, read_write> = var
- %s1:ptr<function, OuterS, read_write> = var
- loop [i: $B3, b: $B4, c: $B5] { # loop_1
- $B3: { # initializer
- %i:ptr<function, i32, read_write> = var, 0i
- next_iteration # -> $B4
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms};
+ InnerS v = {};
+ OuterS s1 = {};
+ {
+ int i = 0;
+ while(true) {
+ if ((i < 4)) {
+ } else {
+ break;
}
- $B4: { # body
- %6:i32 = load %i
- %7:bool = lt %6, 4i
- if %7 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %8:i32 = load %i
- %9:i32 = add %8, 1i
- store %i, %9
- continue # -> $B5
+ i = (i + 1);
+ {
+ s1.a1[(*tint_module_vars.uniforms).i] = v;
}
- $B5: { # continuing
- %10:ptr<uniform, u32, read> = access %uniforms, 0u
- %11:u32 = load %10
- %12:ptr<function, InnerS, read_write> = access %s1, 0u, %11
- %13:InnerS = load %v
- store %12, %13
- next_iteration # -> $B4
- }
+ continue;
}
- ret
}
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl.expected.ir.msl
index 67592eb..7c8ce28 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl.expected.ir.msl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl.expected.ir.msl
@@ -1,63 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+};
+struct InnerS {
+ int v;
+};
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
-}
+struct OuterS {
+ tint_array<InnerS, 8> a1;
+};
-InnerS = struct @align(4) {
- v:i32 @offset(0)
-}
-
-OuterS = struct @align(4) {
- a1:array<InnerS, 8> @offset(0)
-}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %v:ptr<function, InnerS, read_write> = var
- %s1:ptr<function, OuterS, read_write> = var
- %i:ptr<function, i32, read_write> = var, 0i
- loop [i: $B3, b: $B4, c: $B5] { # loop_1
- $B3: { # initializer
- %6:ptr<uniform, u32, read> = access %uniforms, 0u
- %7:u32 = load %6
- %8:ptr<function, InnerS, read_write> = access %s1, 0u, %7
- %9:InnerS = load %v
- store %8, %9
- next_iteration # -> $B4
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms};
+ InnerS v = {};
+ OuterS s1 = {};
+ int i = 0;
+ {
+ s1.a1[(*tint_module_vars.uniforms).i] = v;
+ while(true) {
+ if ((i < 4)) {
+ } else {
+ break;
}
- $B4: { # body
- %10:i32 = load %i
- %11:bool = lt %10, 4i
- if %11 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- continue # -> $B5
+ {
+ i = (i + 1);
}
- $B5: { # continuing
- %12:i32 = load %i
- %13:i32 = add %12, 1i
- store %i, %13
- next_iteration # -> $B4
- }
+ continue;
}
- ret
}
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.ir.msl
index f9ea47d..25ee37e 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.ir.msl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.ir.msl
@@ -1,54 +1,44 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+ uint j;
+};
+struct tint_module_vars_struct {
+ thread uint* nextIndex;
+ const constant Uniforms* uniforms;
+};
+struct InnerS {
+ int v;
+};
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
- j:u32 @offset(4)
-}
+struct S1 {
+ tint_array<InnerS, 8> a2;
+};
+struct OuterS {
+ tint_array<S1, 8> a1;
+};
-InnerS = struct @align(4) {
- v:i32 @offset(0)
+uint getNextIndex(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.nextIndex) = ((*tint_module_vars.nextIndex) + 1u);
+ return (*tint_module_vars.nextIndex);
}
-
-S1 = struct @align(4) {
- a2:array<InnerS, 8> @offset(0)
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ thread uint nextIndex = 0u;
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.nextIndex=(&nextIndex), .uniforms=uniforms};
+ InnerS v = {};
+ OuterS s = {};
+ uint const v_1 = getNextIndex(tint_module_vars);
+ s.a1[v_1].a2[(*tint_module_vars.uniforms).j] = v;
}
-
-OuterS = struct @align(4) {
- a1:array<S1, 8> @offset(0)
-}
-
-$B1: { # root
- %nextIndex:ptr<private, u32, read_write> = var
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
-}
-
-%getNextIndex = func():u32 {
- $B2: {
- %4:u32 = load %nextIndex
- %5:u32 = add %4, 1u
- store %nextIndex, %5
- %6:u32 = load %nextIndex
- ret %6
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %v:ptr<function, InnerS, read_write> = var
- %s:ptr<function, OuterS, read_write> = var
- %10:u32 = call %getNextIndex
- %11:ptr<uniform, u32, read> = access %uniforms, 1u
- %12:u32 = load %11
- %13:ptr<function, InnerS, read_write> = access %s, 0u, %10, 0u, %12
- %14:InnerS = load %v
- store %13, %14
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl.expected.ir.msl
index d012c12..ae6313b 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl.expected.ir.msl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl.expected.ir.msl
@@ -1,38 +1,33 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+};
+struct InnerS {
+ int v;
+};
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
+struct OuterS {
+ tint_array<InnerS, 8> a1;
+};
+
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms};
+ InnerS v = {};
+ OuterS s1 = {};
+ s1.a1[(*tint_module_vars.uniforms).i] = v;
}
-
-InnerS = struct @align(4) {
- v:i32 @offset(0)
-}
-
-OuterS = struct @align(4) {
- a1:array<InnerS, 8> @offset(0)
-}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %v:ptr<function, InnerS, read_write> = var
- %s1:ptr<function, OuterS, read_write> = var
- %5:ptr<uniform, u32, read> = access %uniforms, 0u
- %6:u32 = load %5
- %7:ptr<function, InnerS, read_write> = access %s1, 0u, %6
- %8:InnerS = load %v
- store %7, %8
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl.expected.ir.msl
index f0e4240..8953702 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl.expected.ir.msl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl.expected.ir.msl
@@ -1,41 +1,34 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+ uint j;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+};
+struct InnerS {
+ int v;
+};
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
- j:u32 @offset(4)
+struct OuterS {
+ tint_array<tint_array<InnerS, 8>, 8> a1;
+};
+
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms};
+ InnerS v = {};
+ OuterS s1 = {};
+ s1.a1[(*tint_module_vars.uniforms).i][(*tint_module_vars.uniforms).j] = v;
}
-
-InnerS = struct @align(4) {
- v:i32 @offset(0)
-}
-
-OuterS = struct @align(4) {
- a1:array<array<InnerS, 8>, 8> @offset(0)
-}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %v:ptr<function, InnerS, read_write> = var
- %s1:ptr<function, OuterS, read_write> = var
- %5:ptr<uniform, u32, read> = access %uniforms, 0u
- %6:u32 = load %5
- %7:ptr<uniform, u32, read> = access %uniforms, 1u
- %8:u32 = load %7
- %9:ptr<function, InnerS, read_write> = access %s1, 0u, %6, %8
- %10:InnerS = load %v
- store %9, %10
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl.expected.ir.msl
index 9ae981a..490ea3f 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl.expected.ir.msl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl.expected.ir.msl
@@ -1,42 +1,36 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+};
+struct InnerS {
+ int v;
+};
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
+struct S1 {
+ InnerS s2;
+};
+struct OuterS {
+ tint_array<S1, 8> a1;
+};
+
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms};
+ InnerS v = {};
+ OuterS s1 = {};
+ s1.a1[(*tint_module_vars.uniforms).i].s2 = v;
}
-
-InnerS = struct @align(4) {
- v:i32 @offset(0)
-}
-
-S1 = struct @align(4) {
- s2:InnerS @offset(0)
-}
-
-OuterS = struct @align(4) {
- a1:array<S1, 8> @offset(0)
-}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %v:ptr<function, InnerS, read_write> = var
- %s1:ptr<function, OuterS, read_write> = var
- %5:ptr<uniform, u32, read> = access %uniforms, 0u
- %6:u32 = load %5
- %7:ptr<function, InnerS, read_write> = access %s1, 0u, %6, 0u
- %8:InnerS = load %v
- store %7, %8
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl.expected.ir.msl
index ef33361..1d455b6 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl.expected.ir.msl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl.expected.ir.msl
@@ -1,45 +1,37 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+ uint j;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+};
+struct InnerS {
+ int v;
+};
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
- j:u32 @offset(4)
+struct S1 {
+ tint_array<InnerS, 8> a2;
+};
+struct OuterS {
+ tint_array<S1, 8> a1;
+};
+
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms};
+ InnerS v = {};
+ OuterS s = {};
+ s.a1[(*tint_module_vars.uniforms).i].a2[(*tint_module_vars.uniforms).j] = v;
}
-
-InnerS = struct @align(4) {
- v:i32 @offset(0)
-}
-
-S1 = struct @align(4) {
- a2:array<InnerS, 8> @offset(0)
-}
-
-OuterS = struct @align(4) {
- a1:array<S1, 8> @offset(0)
-}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %v:ptr<function, InnerS, read_write> = var
- %s:ptr<function, OuterS, read_write> = var
- %5:ptr<uniform, u32, read> = access %uniforms, 0u
- %6:u32 = load %5
- %7:ptr<uniform, u32, read> = access %uniforms, 1u
- %8:u32 = load %7
- %9:ptr<function, InnerS, read_write> = access %s, 0u, %6, 0u, %8
- %10:InnerS = load %v
- store %9, %10
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.ir.msl
index 35d20bc..39e9d0f 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.ir.msl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.ir.msl
@@ -1,38 +1,33 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+};
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
+struct InnerS {
+ int v;
+};
+struct OuterS {
+ tint_array<InnerS, 1> a1;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+ device OuterS* s1;
+};
+
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]], device OuterS* s1 [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms, .s1=s1};
+ InnerS v = {};
+ (*tint_module_vars.s1).a1[(*tint_module_vars.uniforms).i] = v;
}
-
-InnerS = struct @align(4) {
- v:i32 @offset(0)
-}
-
-OuterS = struct @align(4) {
- a1:array<InnerS> @offset(0)
-}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
- %s1:ptr<storage, OuterS, read_write> = var @binding_point(0, 0)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %v:ptr<function, InnerS, read_write> = var
- %5:ptr<uniform, u32, read> = access %uniforms, 0u
- %6:u32 = load %5
- %7:ptr<storage, InnerS, read_write> = access %s1, 0u, %6
- %8:InnerS = load %v
- store %7, %8
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.ir.msl
index 52d754a..753be4c 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.ir.msl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.ir.msl
@@ -1,45 +1,37 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+ uint j;
+};
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
- j:u32 @offset(4)
+struct InnerS {
+ int v;
+};
+struct S1 {
+ tint_array<InnerS, 8> a2;
+};
+struct OuterS {
+ tint_array<S1, 1> a1;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+ device OuterS* s;
+};
+
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]], device OuterS* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms, .s=s};
+ InnerS v = {};
+ (*tint_module_vars.s).a1[(*tint_module_vars.uniforms).i].a2[(*tint_module_vars.uniforms).j] = v;
}
-
-InnerS = struct @align(4) {
- v:i32 @offset(0)
-}
-
-S1 = struct @align(4) {
- a2:array<InnerS, 8> @offset(0)
-}
-
-OuterS = struct @align(4) {
- a1:array<S1> @offset(0)
-}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
- %s:ptr<storage, OuterS, read_write> = var @binding_point(0, 0)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %v:ptr<function, InnerS, read_write> = var
- %5:ptr<uniform, u32, read> = access %uniforms, 0u
- %6:u32 = load %5
- %7:ptr<uniform, u32, read> = access %uniforms, 1u
- %8:u32 = load %7
- %9:ptr<storage, InnerS, read_write> = access %s, 0u, %6, 0u, %8
- %10:InnerS = load %v
- store %9, %10
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl.expected.ir.msl
index c09b9ac..8e865c1 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl.expected.ir.msl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl.expected.ir.msl
@@ -1,38 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+};
+struct OuterS {
+ float2x4 m1;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms};
+ OuterS s1 = {};
+ s1.m1[(*tint_module_vars.uniforms).i] = float4(1.0f);
+ s1.m1[(*tint_module_vars.uniforms).i][(*tint_module_vars.uniforms).i] = 1.0f;
}
-
-OuterS = struct @align(16) {
- m1:mat2x4<f32> @offset(0)
-}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %s1:ptr<function, OuterS, read_write> = var
- %4:ptr<uniform, u32, read> = access %uniforms, 0u
- %5:u32 = load %4
- %6:ptr<function, vec4<f32>, read_write> = access %s1, 0u, %5
- store %6, vec4<f32>(1.0f)
- %7:ptr<uniform, u32, read> = access %uniforms, 0u
- %8:u32 = load %7
- %9:ptr<function, vec4<f32>, read_write> = access %s1, 0u, %8
- %10:ptr<uniform, u32, read> = access %uniforms, 0u
- %11:u32 = load %10
- store_vector_element %9, %11, 1.0f
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl.expected.ir.msl
index eebc54e..c65e40d 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl.expected.ir.msl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl.expected.ir.msl
@@ -1,44 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+};
+struct InnerS {
+ int v;
+};
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
+struct OuterS {
+ tint_array<InnerS, 8> a1;
+ tint_array<InnerS, 8> a2;
+};
+
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms};
+ InnerS v = {};
+ OuterS s1 = {};
+ s1.a1[(*tint_module_vars.uniforms).i] = v;
+ s1.a2[(*tint_module_vars.uniforms).i] = v;
}
-
-InnerS = struct @align(4) {
- v:i32 @offset(0)
-}
-
-OuterS = struct @align(4) {
- a1:array<InnerS, 8> @offset(0)
- a2:array<InnerS, 8> @offset(32)
-}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %v:ptr<function, InnerS, read_write> = var
- %s1:ptr<function, OuterS, read_write> = var
- %5:ptr<uniform, u32, read> = access %uniforms, 0u
- %6:u32 = load %5
- %7:ptr<function, InnerS, read_write> = access %s1, 0u, %6
- %8:InnerS = load %v
- store %7, %8
- %9:ptr<uniform, u32, read> = access %uniforms, 0u
- %10:u32 = load %9
- %11:ptr<function, InnerS, read_write> = access %s1, 1u, %10
- %12:InnerS = load %v
- store %11, %12
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl.expected.ir.msl
index b7fb051..58c4471 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl.expected.ir.msl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl.expected.ir.msl
@@ -1,42 +1,36 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+};
+struct InnerS {
+ int v;
+};
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
+struct S1 {
+ tint_array<InnerS, 8> a;
+};
+struct OuterS {
+ S1 s2;
+};
+
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms};
+ InnerS v = {};
+ OuterS s1 = {};
+ s1.s2.a[(*tint_module_vars.uniforms).i] = v;
}
-
-InnerS = struct @align(4) {
- v:i32 @offset(0)
-}
-
-S1 = struct @align(4) {
- a:array<InnerS, 8> @offset(0)
-}
-
-OuterS = struct @align(4) {
- s2:S1 @offset(0)
-}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %v:ptr<function, InnerS, read_write> = var
- %s1:ptr<function, OuterS, read_write> = var
- %5:ptr<uniform, u32, read> = access %uniforms, 0u
- %6:u32 = load %5
- %7:ptr<function, InnerS, read_write> = access %s1, 0u, 0u, %6
- %8:InnerS = load %v
- store %7, %8
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl.expected.ir.msl
index d9e8175..7fab113 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl.expected.ir.msl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl.expected.ir.msl
@@ -1,32 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+};
+struct OuterS {
+ float3 v1;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms};
+ OuterS s1 = {};
+ s1.v1[(*tint_module_vars.uniforms).i] = 1.0f;
}
-
-OuterS = struct @align(16) {
- v1:vec3<f32> @offset(0)
-}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %s1:ptr<function, OuterS, read_write> = var
- %4:ptr<function, vec3<f32>, read_write> = access %s1, 0u
- %5:ptr<uniform, u32, read> = access %uniforms, 0u
- %6:u32 = load %5
- store_vector_element %4, %6, 1.0f
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl.expected.ir.msl
index b136b18..c9647c1 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl.expected.ir.msl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl.expected.ir.msl
@@ -1,46 +1,34 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+};
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
-}
+struct OuterS {
+ tint_array<uint, 8> a1;
+};
-OuterS = struct @align(4) {
- a1:array<u32, 8> @offset(0)
+uint f(uint i) {
+ return (i + 1u);
}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms};
+ OuterS s1 = {};
+ float3 v = 0.0f;
+ v[s1.a1[(*tint_module_vars.uniforms).i]] = 1.0f;
+ v[f(s1.a1[(*tint_module_vars.uniforms).i])] = 1.0f;
}
-
-%f = func(%i:u32):u32 {
- $B2: {
- %4:u32 = add %i, 1u
- ret %4
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %s1:ptr<function, OuterS, read_write> = var
- %v:ptr<function, vec3<f32>, read_write> = var
- %8:ptr<uniform, u32, read> = access %uniforms, 0u
- %9:u32 = load %8
- %10:ptr<function, u32, read_write> = access %s1, 0u, %9
- %11:u32 = load %10
- store_vector_element %v, %11, 1.0f
- %12:ptr<uniform, u32, read> = access %uniforms, 0u
- %13:u32 = load %12
- %14:ptr<function, u32, read_write> = access %s1, 0u, %13
- %15:u32 = load %14
- %16:u32 = call %f, %15
- store_vector_element %v, %16, 1.0f
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer.wgsl.expected.ir.msl
index bc00b8c..81b57a3 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer.wgsl.expected.ir.msl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer.wgsl.expected.ir.msl
@@ -1,39 +1,34 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Uniforms {
+ uint i;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+};
+struct InnerS {
+ int v;
+};
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
+struct OuterS {
+ tint_array<InnerS, 8> a1;
+};
+
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms};
+ InnerS v = {};
+ OuterS s1 = {};
+ thread InnerS* const p = (&s1.a1[(*tint_module_vars.uniforms).i]);
+ (*p) = v;
}
-
-InnerS = struct @align(4) {
- v:i32 @offset(0)
-}
-
-OuterS = struct @align(4) {
- a1:array<InnerS, 8> @offset(0)
-}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %v:ptr<function, InnerS, read_write> = var
- %s1:ptr<function, OuterS, read_write> = var
- %5:ptr<uniform, u32, read> = access %uniforms, 0u
- %6:u32 = load %5
- %7:ptr<function, InnerS, read_write> = access %s1, 0u, %6
- %p:ptr<function, InnerS, read_write> = let %7
- %9:InnerS = load %v
- store %p, %9
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl.expected.ir.msl
index 281a01ca..2934a1e 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl.expected.ir.msl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl.expected.ir.msl
@@ -1,44 +1,36 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+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];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Uniforms = struct @align(4) {
- i:u32 @offset(0)
-}
+struct InnerS {
+ int v;
+};
+struct OuterS {
+ tint_array<InnerS, 8> a1;
+};
+struct Uniforms {
+ uint i;
+};
+struct tint_module_vars_struct {
+ const constant Uniforms* uniforms;
+};
-InnerS = struct @align(4) {
- v:i32 @offset(0)
+void f(thread OuterS* const p, tint_module_vars_struct tint_module_vars) {
+ InnerS v = {};
+ (*p).a1[(*tint_module_vars.uniforms).i] = v;
}
-
-OuterS = struct @align(4) {
- a1:array<InnerS, 8> @offset(0)
+kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms};
+ OuterS s1 = {};
+ f((&s1), tint_module_vars);
}
-
-$B1: { # root
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(1, 4)
-}
-
-%f = func(%p:ptr<function, OuterS, read_write>):void {
- $B2: {
- %v:ptr<function, InnerS, read_write> = var
- %5:ptr<uniform, u32, read> = access %uniforms, 0u
- %6:u32 = load %5
- %7:ptr<function, InnerS, read_write> = access %p, 0u, %6
- %8:InnerS = load %v
- store %7, %8
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %s1:ptr<function, OuterS, read_write> = var
- %11:void = call %f, %s1
- ret
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************