[msl] Handle pointers in printer
Add helper for determining whether a value is emitted as an actual
pointer or not, and use that to determine if dereference or address-of
operators are needed.
Bug: 42251016
Change-Id: I101260575c18a98d847823b8f83b0375b4b49cd5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/188346
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: James Price <jrprice@google.com>
diff --git a/src/tint/lang/msl/writer/printer/discard_test.cc b/src/tint/lang/msl/writer/printer/discard_test.cc
index d0ccbb5..954118a 100644
--- a/src/tint/lang/msl/writer/printer/discard_test.cc
+++ b/src/tint/lang/msl/writer/printer/discard_test.cc
@@ -32,9 +32,7 @@
namespace tint::msl::writer {
namespace {
-// TODO(jrprice): Disabled as DemoteToHelper introduces module-scope variables, which are not
-// handled correctly yet.
-TEST_F(MslPrinterTest, DISABLED_Discard) {
+TEST_F(MslPrinterTest, Discard) {
auto* func = b.Function("foo", ty.void_());
b.Append(func->Block(), [&] {
auto* if_ = b.If(true);
@@ -45,24 +43,27 @@
b.Return(func);
});
- auto* ep = b.Function("main", ty.void_());
- ep->SetStage(core::ir::Function::PipelineStage::kFragment);
+ auto* ep = b.Function("frag_main", ty.void_(), core::ir::Function::PipelineStage::kFragment);
b.Append(ep->Block(), [&] {
b.Call(func);
b.Return(ep);
});
ASSERT_TRUE(Generate()) << err_ << output_;
- EXPECT_EQ(output_, MetalHeader() + R"(
-thread bool continue_execution = true;
-void foo() {
+ EXPECT_EQ(output_, MetalHeader() + R"(struct tint_module_vars_struct {
+ thread bool* continue_execution;
+};
+
+void foo(tint_module_vars_struct tint_module_vars) {
if (true) {
- continue_execution = false;
+ (*tint_module_vars.continue_execution) = false;
}
}
-fragment void main() {
- foo();
- if (!(continue_execution)) {
+fragment void frag_main() {
+ thread bool continue_execution = true;
+ tint_module_vars_struct const tint_module_vars = {.continue_execution=(&continue_execution)};
+ foo(tint_module_vars);
+ if (!((*tint_module_vars.continue_execution))) {
discard_fragment();
}
}
diff --git a/src/tint/lang/msl/writer/printer/printer.cc b/src/tint/lang/msl/writer/printer/printer.cc
index 02da70d..35f1519 100644
--- a/src/tint/lang/msl/writer/printer/printer.cc
+++ b/src/tint/lang/msl/writer/printer/printer.cc
@@ -191,6 +191,60 @@
return array_template_name_;
}
+ /// Check if a value is emitted as an actual pointer (instead of a reference).
+ /// @param value the value to check
+ /// @returns true if @p value will be emitted as an actual pointer
+ bool IsRealPointer(const core::ir::Value* value) {
+ if (value->Is<core::ir::FunctionParam>()) {
+ // Pointer parameters are always emitted as actual pointers.
+ return true;
+ }
+ return Switch(
+ value->As<core::ir::InstructionResult>()->Instruction(),
+ [&](const core::ir::Var*) {
+ // Variable declarations are always references.
+ return false;
+ },
+ [&](const core::ir::Let*) {
+ // Let declarations capture actual pointers.
+ return true;
+ },
+ [&](const core::ir::Access* a) {
+ // Access instruction emission always dereferences the source.
+ // We only produce a pointer when extracting a pointer from a composite value.
+ return !a->Object()->Type()->Is<core::type::Pointer>() &&
+ a->Result(0)->Type()->Is<core::type::Pointer>();
+ });
+ }
+
+ /// Emit @p param value, dereferencing it if it is an actual pointer.
+ /// @param out the output stream to write to
+ /// @param value the value to emit
+ template <typename OUT>
+ void EmitAndDerefIfNeeded(OUT& out, const core::ir::Value* value) {
+ if (value && value->Type()->Is<core::type::Pointer>() && IsRealPointer(value)) {
+ out << "(*";
+ EmitValue(out, value);
+ out << ")";
+ } else {
+ EmitValue(out, value);
+ }
+ }
+
+ /// Emit @p param value, taking its address if it is not an actual pointer.
+ /// @param out the output stream to write to
+ /// @param value the value to emit
+ template <typename OUT>
+ void EmitAndTakeAddressIfNeeded(OUT& out, const core::ir::Value* value) {
+ if (value && value->Type()->Is<core::type::Pointer>() && !IsRealPointer(value)) {
+ out << "(&";
+ EmitValue(out, value);
+ out << ")";
+ } else {
+ EmitValue(out, value);
+ }
+ }
+
/// Emit the function
/// @param func the function to emit
void EmitFunction(const core::ir::Function* func) {
@@ -353,7 +407,7 @@
[&](const core::ir::CoreUnary* u) { EmitUnary(out, u); }, //
[&](const core::ir::Convert* b) { EmitConvert(out, b); }, //
[&](const core::ir::Let* l) { out << NameOf(l->Result(0)); }, //
- [&](const core::ir::Load* l) { EmitValue(out, l->From()); }, //
+ [&](const core::ir::Load* l) { EmitLoad(out, l); }, //
[&](const core::ir::Construct* c) { EmitConstruct(out, c); }, //
[&](const core::ir::Var* var) { out << NameOf(var->Result(0)); }, //
[&](const core::ir::Bitcast* b) { EmitBitcast(out, b); }, //
@@ -504,7 +558,7 @@
auto out = Line();
EmitType(out, l->Result(0)->Type());
out << " const " << NameOf(l->Result(0)) << " = ";
- EmitValue(out, l->Value());
+ EmitAndTakeAddressIfNeeded(out, l->Value());
out << ";";
}
@@ -612,7 +666,7 @@
void EmitStoreVectorElement(const core::ir::StoreVectorElement* l) {
auto out = Line();
- EmitValue(out, l->To());
+ EmitAndDerefIfNeeded(out, l->To());
out << "[";
EmitValue(out, l->Index());
out << "] = ";
@@ -621,7 +675,7 @@
}
void EmitLoadVectorElement(StringStream& out, const core::ir::LoadVectorElement* l) {
- EmitValue(out, l->From());
+ EmitAndDerefIfNeeded(out, l->From());
out << "[";
EmitValue(out, l->Index());
out << "]";
@@ -692,11 +746,16 @@
/// Emit a discard instruction
void EmitDiscard() { Line() << "discard_fragment();"; }
+ /// Emit a load
+ void EmitLoad(StringStream& out, const core::ir::Load* l) {
+ EmitAndDerefIfNeeded(out, l->From());
+ }
+
/// Emit a store
void EmitStore(const core::ir::Store* s) {
auto out = Line();
- EmitValue(out, s->To());
+ EmitAndDerefIfNeeded(out, s->To());
out << " = ";
EmitValue(out, s->From());
out << ";";
@@ -713,7 +772,7 @@
/// Emit an accessor
void EmitAccess(StringStream& out, const core::ir::Access* a) {
- EmitValue(out, a->Object());
+ EmitAndDerefIfNeeded(out, a->Object());
auto* current_type = a->Object()->Type();
for (auto* index : a->Indices()) {
@@ -786,7 +845,7 @@
}
++i;
- EmitValue(out, arg);
+ EmitAndTakeAddressIfNeeded(out, arg);
}
out << ")";
}
@@ -918,7 +977,7 @@
}
++i;
- EmitValue(out, arg);
+ EmitAndTakeAddressIfNeeded(out, arg);
}
out << ")";
}
@@ -950,7 +1009,7 @@
// Emit field designators for structures to account for padding members.
auto name = struct_ty->Members()[i]->Name().Name();
out << "." << name << "=";
- EmitValue(out, arg);
+ EmitAndTakeAddressIfNeeded(out, arg);
i++;
}
out << "}";
diff --git a/src/tint/lang/msl/writer/printer/var_test.cc b/src/tint/lang/msl/writer/printer/var_test.cc
index 6aa7227..2cc2671 100644
--- a/src/tint/lang/msl/writer/printer/var_test.cc
+++ b/src/tint/lang/msl/writer/printer/var_test.cc
@@ -247,29 +247,37 @@
)");
}
-// TODO(jrprice): Requires ModuleScopeVarToEntryPointParam transform
-TEST_F(MslPrinterTest, DISABLED_VarGlobalPrivate) {
+TEST_F(MslPrinterTest, VarGlobalPrivate) {
core::ir::Var* v = nullptr;
- b.Append(mod.root_block, [&] { v = b.Var("v", ty.ptr<core::AddressSpace::kPrivate, f32>()); });
+ b.Append(mod.root_block, [&] { //
+ v = b.Var("v", ty.ptr<core::AddressSpace::kPrivate, f32>());
+ });
- auto* func = b.Function("foo", ty.void_());
- b.Append(func->Block(), [&] {
+ auto* foo = b.Function("foo", ty.void_());
+ b.Append(foo->Block(), [&] {
auto* ld = b.Load(v->Result(0));
- auto* a = b.Var("a", ty.ptr<core::AddressSpace::kFunction, f32>());
- a->SetInitializer(ld->Result(0));
- b.Return(func);
+ b.Let("a", ld);
+ b.Return(foo);
+ });
+
+ auto* frag = b.Function("frag", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(frag->Block(), [&] {
+ b.Call(foo);
+ b.Return(frag);
});
ASSERT_TRUE(Generate()) << err_ << output_;
- EXPECT_EQ(output_, MetalHeader() + R"(
-struct tint_private_vars_struct {
- float a;
+ EXPECT_EQ(output_, MetalHeader() + R"(struct tint_module_vars_struct {
+ thread float* v;
};
-void foo() {
- thread tint_private_vars_struct tint_private_vars = {};
- float const a = tint_private_vars.a;
- return;
+void foo(tint_module_vars_struct tint_module_vars) {
+ float const a = (*tint_module_vars.v);
+}
+fragment void frag() {
+ thread float v = 0.0f;
+ tint_module_vars_struct const tint_module_vars = {.v=(&v)};
+ foo(tint_module_vars);
}
)");
}
diff --git a/test/tint/access/let/matrix.wgsl.expected.ir.msl b/test/tint/access/let/matrix.wgsl.expected.ir.msl
index 6b2dc0c..78f095c 100644
--- a/test/tint/access/let/matrix.wgsl.expected.ir.msl
+++ b/test/tint/access/let/matrix.wgsl.expected.ir.msl
@@ -1,25 +1,13 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 0)
+kernel void tint_symbol(device float* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ float3x3 const m = float3x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f));
+ float3 const v = m[1];
+ float const f = v[1];
+ (*tint_module_vars.s) = f;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:mat3x3<f32> = let mat3x3<f32>(vec3<f32>(1.0f, 2.0f, 3.0f), vec3<f32>(4.0f, 5.0f, 6.0f), vec3<f32>(7.0f, 8.0f, 9.0f))
- %4:vec3<f32> = access %m, 1i
- %v:vec3<f32> = let %4
- %6:f32 = access %v, 1i
- %f:f32 = let %6
- store %s, %f
- 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/access/let/vector.wgsl.expected.ir.msl b/test/tint/access/let/vector.wgsl.expected.ir.msl
index 646cdc4..f989433 100644
--- a/test/tint/access/let/vector.wgsl.expected.ir.msl
+++ b/test/tint/access/let/vector.wgsl.expected.ir.msl
@@ -1,32 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %s:ptr<storage, vec3<f32>, read_write> = var @binding_point(0, 0)
+kernel void tint_symbol(device float3* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ float3 const v = float3(1.0f, 2.0f, 3.0f);
+ float const scalar = v[1u];
+ float2 const swizzle2 = v.xz;
+ float3 const swizzle3 = v.xzy;
+ float3 const v_1 = float3(scalar);
+ (*tint_module_vars.s) = ((v_1 + float3(swizzle2, 1.0f)) + swizzle3);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %v:vec3<f32> = let vec3<f32>(1.0f, 2.0f, 3.0f)
- %4:f32 = access %v, 1u
- %scalar:f32 = let %4
- %6:vec2<f32> = swizzle %v, xz
- %swizzle2:vec2<f32> = let %6
- %8:vec3<f32> = swizzle %v, xzy
- %swizzle3:vec3<f32> = let %8
- %10:vec3<f32> = construct %scalar
- %11:vec3<f32> = let %10
- %12:vec3<f32> = construct %swizzle2, 1.0f
- %13:vec3<f32> = add %11, %12
- %14:vec3<f32> = add %13, %swizzle3
- store %s, %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/access/var/matrix.wgsl.expected.ir.msl b/test/tint/access/var/matrix.wgsl.expected.ir.msl
index b8b4503..523b128 100644
--- a/test/tint/access/var/matrix.wgsl.expected.ir.msl
+++ b/test/tint/access/var/matrix.wgsl.expected.ir.msl
@@ -1,26 +1,13 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 0)
+kernel void tint_symbol(device float* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ float3x3 m = float3x3(0.0f);
+ float3 const v = m[1];
+ float const f = v[1];
+ (*tint_module_vars.s) = f;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:ptr<function, mat3x3<f32>, read_write> = var
- %4:ptr<function, vec3<f32>, read_write> = access %m, 1i
- %5:vec3<f32> = load %4
- %v:vec3<f32> = let %5
- %7:f32 = access %v, 1i
- %f:f32 = let %7
- store %s, %f
- 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/access/var/vector.wgsl.expected.ir.msl b/test/tint/access/var/vector.wgsl.expected.ir.msl
index f02d995..810771b 100644
--- a/test/tint/access/var/vector.wgsl.expected.ir.msl
+++ b/test/tint/access/var/vector.wgsl.expected.ir.msl
@@ -1,34 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %s:ptr<storage, vec3<f32>, read_write> = var @binding_point(0, 0)
+kernel void tint_symbol(device float3* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ float3 v = 0.0f;
+ float const scalar = v[1u];
+ float2 const swizzle2 = v.xz;
+ float3 const swizzle3 = v.xzy;
+ float3 const v_1 = float3(scalar);
+ (*tint_module_vars.s) = ((v_1 + float3(swizzle2, 1.0f)) + swizzle3);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %v:ptr<function, vec3<f32>, read_write> = var
- %4:f32 = load_vector_element %v, 1u
- %scalar:f32 = let %4
- %6:vec3<f32> = load %v
- %7:vec2<f32> = swizzle %6, xz
- %swizzle2:vec2<f32> = let %7
- %9:vec3<f32> = load %v
- %10:vec3<f32> = swizzle %9, xzy
- %swizzle3:vec3<f32> = let %10
- %12:vec3<f32> = construct %scalar
- %13:vec3<f32> = let %12
- %14:vec3<f32> = construct %swizzle2, 1.0f
- %15:vec3<f32> = add %13, %14
- %16:vec3<f32> = add %15, %swizzle3
- store %s, %16
- 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/array/assign_to_subexpr.wgsl.expected.ir.msl b/test/tint/array/assign_to_subexpr.wgsl.expected.ir.msl
index 3412478..ca8e408 100644
--- a/test/tint/array/assign_to_subexpr.wgsl.expected.ir.msl
+++ b/test/tint/array/assign_to_subexpr.wgsl.expected.ir.msl
@@ -1,54 +1,40 @@
-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: S = struct @align(4) {
- arr:array<i32, 4> @offset(0)
-}
+struct S {
+ tint_array<int, 4> arr;
+};
+struct tint_module_vars_struct {
+ device int* s;
+};
-$B1: { # root
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 0)
+int foo() {
+ tint_array<int, 4> const src = tint_array<int, 4>{};
+ tint_array<int, 4> dst = {};
+ S dst_struct = {};
+ tint_array<tint_array<int, 4>, 2> dst_array = {};
+ thread tint_array<int, 4>* const dst_ptr = (&dst);
+ thread S* const dst_struct_ptr = (&dst_struct);
+ thread tint_array<tint_array<int, 4>, 2>* const dst_array_ptr = (&dst_array);
+ dst_struct.arr = src;
+ dst_array[1] = src;
+ (*dst_ptr) = src;
+ (*dst_struct_ptr).arr = src;
+ (*dst_array_ptr)[0] = src;
+ return (((*dst_ptr)[0] + (*dst_struct_ptr).arr[0]) + (*dst_array_ptr)[0][0]);
}
-
-%foo = func():i32 {
- $B2: {
- %src:array<i32, 4> = let array<i32, 4>(0i)
- %dst:ptr<function, array<i32, 4>, read_write> = var
- %dst_struct:ptr<function, S, read_write> = var
- %dst_array:ptr<function, array<array<i32, 4>, 2>, read_write> = var
- %dst_ptr:ptr<function, array<i32, 4>, read_write> = let %dst
- %dst_struct_ptr:ptr<function, S, read_write> = let %dst_struct
- %dst_array_ptr:ptr<function, array<array<i32, 4>, 2>, read_write> = let %dst_array
- %10:ptr<function, array<i32, 4>, read_write> = access %dst_struct, 0u
- store %10, %src
- %11:ptr<function, array<i32, 4>, read_write> = access %dst_array, 1i
- store %11, %src
- store %dst_ptr, %src
- %12:ptr<function, array<i32, 4>, read_write> = access %dst_struct_ptr, 0u
- store %12, %src
- %13:ptr<function, array<i32, 4>, read_write> = access %dst_array_ptr, 0i
- store %13, %src
- %14:ptr<function, i32, read_write> = access %dst_ptr, 0i
- %15:i32 = load %14
- %16:ptr<function, i32, read_write> = access %dst_struct_ptr, 0u, 0i
- %17:i32 = load %16
- %18:i32 = add %15, %17
- %19:ptr<function, i32, read_write> = access %dst_array_ptr, 0i, 0i
- %20:i32 = load %19
- %21:i32 = add %18, %20
- ret %21
- }
+kernel void tint_symbol(device int* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ (*tint_module_vars.s) = foo();
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %23:i32 = call %foo
- store %s, %23
- 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/array/function_parameter.wgsl.expected.ir.msl b/test/tint/array/function_parameter.wgsl.expected.ir.msl
index f87eadf..a150de7 100644
--- a/test/tint/array/function_parameter.wgsl.expected.ir.msl
+++ b/test/tint/array/function_parameter.wgsl.expected.ir.msl
@@ -1,49 +1,37 @@
-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: $B1: { # root
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 0)
-}
+struct tint_module_vars_struct {
+ device float* s;
+};
-%f1 = func(%a:array<f32, 4>):f32 {
- $B2: {
- %4:f32 = access %a, 3i
- ret %4
- }
+float f1(tint_array<float, 4> a) {
+ return a[3];
}
-%f2 = func(%a_1:array<array<f32, 4>, 3>):f32 { # %a_1: 'a'
- $B3: {
- %7:f32 = access %a_1, 2i, 3i
- ret %7
- }
+float f2(tint_array<tint_array<float, 4>, 3> a) {
+ return a[2][3];
}
-%f3 = func(%a_2:array<array<array<f32, 4>, 3>, 2>):f32 { # %a_2: 'a'
- $B4: {
- %10:f32 = access %a_2, 1i, 2i, 3i
- ret %10
- }
+float f3(tint_array<tint_array<tint_array<float, 4>, 3>, 2> a) {
+ return a[1][2][3];
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %a1:array<f32, 4> = let array<f32, 4>(0.0f)
- %a2:array<array<f32, 4>, 3> = let array<array<f32, 4>, 3>(array<f32, 4>(0.0f))
- %a3:array<array<array<f32, 4>, 3>, 2> = let array<array<array<f32, 4>, 3>, 2>(array<array<f32, 4>, 3>(array<f32, 4>(0.0f)))
- %15:f32 = call %f1, %a1
- %v1:f32 = let %15
- %17:f32 = call %f2, %a2
- %v2:f32 = let %17
- %19:f32 = call %f3, %a3
- %v3:f32 = let %19
- %21:f32 = add %v1, %v2
- %22:f32 = add %21, %v3
- store %s, %22
- ret
- }
+kernel void tint_symbol(device float* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ tint_array<float, 4> const a1 = tint_array<float, 4>{};
+ tint_array<tint_array<float, 4>, 3> const a2 = tint_array<tint_array<float, 4>, 3>{};
+ tint_array<tint_array<tint_array<float, 4>, 3>, 2> const a3 = tint_array<tint_array<tint_array<float, 4>, 3>, 2>{};
+ float const v1 = f1(a1);
+ float const v2 = f2(a2);
+ float const v3 = f3(a3);
+ (*tint_module_vars.s) = ((v1 + v2) + v3);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/array/function_return_type.wgsl.expected.ir.msl b/test/tint/array/function_return_type.wgsl.expected.ir.msl
index 70e6a1c..16f9e96 100644
--- a/test/tint/array/function_return_type.wgsl.expected.ir.msl
+++ b/test/tint/array/function_return_type.wgsl.expected.ir.msl
@@ -1,56 +1,37 @@
-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: $B1: { # root
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 0)
-}
+struct tint_module_vars_struct {
+ device float* s;
+};
-%f1 = func():array<f32, 4> {
- $B2: {
- ret array<f32, 4>(0.0f)
- }
+tint_array<float, 4> f1() {
+ return tint_array<float, 4>{};
}
-%f2 = func():array<array<f32, 4>, 3> {
- $B3: {
- %4:array<f32, 4> = call %f1
- %5:array<f32, 4> = let %4
- %6:array<f32, 4> = call %f1
- %7:array<f32, 4> = let %6
- %8:array<f32, 4> = call %f1
- %9:array<array<f32, 4>, 3> = construct %5, %7, %8
- ret %9
- }
+tint_array<tint_array<float, 4>, 3> f2() {
+ tint_array<float, 4> const v = f1();
+ tint_array<float, 4> const v_1 = f1();
+ return tint_array<tint_array<float, 4>, 3>{v, v_1, f1()};
}
-%f3 = func():array<array<array<f32, 4>, 3>, 2> {
- $B4: {
- %11:array<array<f32, 4>, 3> = call %f2
- %12:array<array<f32, 4>, 3> = let %11
- %13:array<array<f32, 4>, 3> = call %f2
- %14:array<array<array<f32, 4>, 3>, 2> = construct %12, %13
- ret %14
- }
+tint_array<tint_array<tint_array<float, 4>, 3>, 2> f3() {
+ tint_array<tint_array<float, 4>, 3> const v_2 = f2();
+ return tint_array<tint_array<tint_array<float, 4>, 3>, 2>{v_2, f2()};
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %16:array<f32, 4> = call %f1
- %a1:array<f32, 4> = let %16
- %18:array<array<f32, 4>, 3> = call %f2
- %a2:array<array<f32, 4>, 3> = let %18
- %20:array<array<array<f32, 4>, 3>, 2> = call %f3
- %a3:array<array<array<f32, 4>, 3>, 2> = let %20
- %22:f32 = access %a1, 0i
- %23:f32 = access %a2, 0i, 0i
- %24:f32 = add %22, %23
- %25:f32 = access %a3, 0i, 0i, 0i
- %26:f32 = add %24, %25
- store %s, %26
- ret
- }
+kernel void tint_symbol(device float* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ tint_array<float, 4> const a1 = f1();
+ tint_array<tint_array<float, 4>, 3> const a2 = f2();
+ tint_array<tint_array<tint_array<float, 4>, 3>, 2> const a3 = f3();
+ (*tint_module_vars.s) = ((a1[0] + a2[0][0]) + a3[0][0][0]);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/array/size.wgsl.expected.ir.msl b/test/tint/array/size.wgsl.expected.ir.msl
index 21a9191..3474538 100644
--- a/test/tint/array/size.wgsl.expected.ir.msl
+++ b/test/tint/array/size.wgsl.expected.ir.msl
@@ -1,47 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* s;
+};
+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: $B1: { # root
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 0)
+
+fragment void tint_symbol(device float* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ tint_array<float, 4> signed_literal = {};
+ tint_array<float, 4> unsigned_literal = {};
+ tint_array<float, 4> signed_constant = {};
+ tint_array<float, 4> unsigned_constant = {};
+ tint_array<float, 4> shr_const_expr = {};
+ unsigned_literal = signed_literal;
+ signed_constant = signed_literal;
+ unsigned_constant = signed_literal;
+ shr_const_expr = signed_literal;
+ (*tint_module_vars.s) = ((((signed_literal[0] + unsigned_literal[0]) + signed_constant[0]) + unsigned_constant[0]) + shr_const_expr[0]);
}
-
-%tint_symbol = @fragment func():void {
- $B2: {
- %signed_literal:ptr<function, array<f32, 4>, read_write> = var
- %unsigned_literal:ptr<function, array<f32, 4>, read_write> = var
- %signed_constant:ptr<function, array<f32, 4>, read_write> = var
- %unsigned_constant:ptr<function, array<f32, 4>, read_write> = var
- %shr_const_expr:ptr<function, array<f32, 4>, read_write> = var
- %8:array<f32, 4> = load %signed_literal
- store %unsigned_literal, %8
- %9:array<f32, 4> = load %signed_literal
- store %signed_constant, %9
- %10:array<f32, 4> = load %signed_literal
- store %unsigned_constant, %10
- %11:array<f32, 4> = load %signed_literal
- store %shr_const_expr, %11
- %12:ptr<function, f32, read_write> = access %signed_literal, 0i
- %13:f32 = load %12
- %14:ptr<function, f32, read_write> = access %unsigned_literal, 0i
- %15:f32 = load %14
- %16:f32 = add %13, %15
- %17:ptr<function, f32, read_write> = access %signed_constant, 0i
- %18:f32 = load %17
- %19:f32 = add %16, %18
- %20:ptr<function, f32, read_write> = access %unsigned_constant, 0i
- %21:f32 = load %20
- %22:f32 = add %19, %21
- %23:ptr<function, f32, read_write> = access %shr_const_expr, 0i
- %24:f32 = load %23
- %25:f32 = add %22, %24
- store %s, %25
- 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/array/type_initializer.wgsl.expected.ir.msl b/test/tint/array/type_initializer.wgsl.expected.ir.msl
index 99abaa1..a590be4 100644
--- a/test/tint/array/type_initializer.wgsl.expected.ir.msl
+++ b/test/tint/array/type_initializer.wgsl.expected.ir.msl
@@ -1,76 +1,36 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* s;
+};
+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: $B1: { # root
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 0)
+
+kernel void tint_symbol(device int* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ int const x = 42;
+ tint_array<int, 4> const empty = tint_array<int, 4>{};
+ tint_array<int, 4> const nonempty = tint_array<int, 4>{1, 2, 3, 4};
+ tint_array<int, 4> const nonempty_with_expr = tint_array<int, 4>{1, x, (x + 1), nonempty[3]};
+ tint_array<tint_array<tint_array<int, 4>, 3>, 2> const nested_empty = tint_array<tint_array<tint_array<int, 4>, 3>, 2>{};
+ tint_array<tint_array<tint_array<int, 4>, 3>, 2> const nested_nonempty = tint_array<tint_array<tint_array<int, 4>, 3>, 2>{tint_array<tint_array<int, 4>, 3>{tint_array<int, 4>{1, 2, 3, 4}, tint_array<int, 4>{5, 6, 7, 8}, tint_array<int, 4>{9, 10, 11, 12}}, tint_array<tint_array<int, 4>, 3>{tint_array<int, 4>{13, 14, 15, 16}, tint_array<int, 4>{17, 18, 19, 20}, tint_array<int, 4>{21, 22, 23, 24}}};
+ tint_array<int, 4> const v = tint_array<int, 4>{1, 2, x, (x + 1)};
+ tint_array<tint_array<tint_array<int, 4>, 3>, 2> const nested_nonempty_with_expr = tint_array<tint_array<tint_array<int, 4>, 3>, 2>{tint_array<tint_array<int, 4>, 3>{v, tint_array<int, 4>{5, 6, nonempty[2], (nonempty[3] + 1)}, nonempty}, nested_nonempty[1]};
+ int const subexpr_empty = 0;
+ int const subexpr_nonempty = 3;
+ int const subexpr_nonempty_with_expr = tint_array<int, 4>{1, x, (x + 1), nonempty[3]}[2];
+ tint_array<int, 4> const subexpr_nested_empty = tint_array<int, 4>{};
+ tint_array<int, 4> const subexpr_nested_nonempty = tint_array<int, 4>{5, 6, 7, 8};
+ tint_array<int, 4> const subexpr_nested_nonempty_with_expr = tint_array<tint_array<int, 4>, 2>{tint_array<int, 4>{1, x, (x + 1), nonempty[3]}, nested_nonempty[1][2]}[1];
+ (*tint_module_vars.s) = (((((((((((empty[0] + nonempty[0]) + nonempty_with_expr[0]) + nested_empty[0][0][0]) + nested_nonempty[0][0][0]) + nested_nonempty_with_expr[0][0][0]) + subexpr_empty) + subexpr_nonempty) + subexpr_nonempty_with_expr) + subexpr_nested_empty[0]) + subexpr_nested_nonempty[0]) + subexpr_nested_nonempty_with_expr[0]);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %x:i32 = let 42i
- %empty:array<i32, 4> = let array<i32, 4>(0i)
- %nonempty:array<i32, 4> = let array<i32, 4>(1i, 2i, 3i, 4i)
- %6:i32 = add %x, 1i
- %7:i32 = access %nonempty, 3i
- %8:array<i32, 4> = construct 1i, %x, %6, %7
- %nonempty_with_expr:array<i32, 4> = let %8
- %nested_empty:array<array<array<i32, 4>, 3>, 2> = let array<array<array<i32, 4>, 3>, 2>(array<array<i32, 4>, 3>(array<i32, 4>(0i)))
- %nested_nonempty:array<array<array<i32, 4>, 3>, 2> = let array<array<array<i32, 4>, 3>, 2>(array<array<i32, 4>, 3>(array<i32, 4>(1i, 2i, 3i, 4i), array<i32, 4>(5i, 6i, 7i, 8i), array<i32, 4>(9i, 10i, 11i, 12i)), array<array<i32, 4>, 3>(array<i32, 4>(13i, 14i, 15i, 16i), array<i32, 4>(17i, 18i, 19i, 20i), array<i32, 4>(21i, 22i, 23i, 24i)))
- %12:i32 = add %x, 1i
- %13:array<i32, 4> = construct 1i, 2i, %x, %12
- %14:array<i32, 4> = let %13
- %15:i32 = access %nonempty, 2i
- %16:i32 = access %nonempty, 3i
- %17:i32 = add %16, 1i
- %18:array<i32, 4> = construct 5i, 6i, %15, %17
- %19:array<array<i32, 4>, 3> = construct %14, %18, %nonempty
- %20:array<array<i32, 4>, 3> = access %nested_nonempty, 1i
- %21:array<array<array<i32, 4>, 3>, 2> = construct %19, %20
- %nested_nonempty_with_expr:array<array<array<i32, 4>, 3>, 2> = let %21
- %subexpr_empty:i32 = let 0i
- %subexpr_nonempty:i32 = let 3i
- %25:i32 = add %x, 1i
- %26:i32 = access %nonempty, 3i
- %27:array<i32, 4> = construct 1i, %x, %25, %26
- %28:i32 = access %27, 2i
- %subexpr_nonempty_with_expr:i32 = let %28
- %subexpr_nested_empty:array<i32, 4> = let array<i32, 4>(0i)
- %subexpr_nested_nonempty:array<i32, 4> = let array<i32, 4>(5i, 6i, 7i, 8i)
- %32:i32 = add %x, 1i
- %33:i32 = access %nonempty, 3i
- %34:array<i32, 4> = construct 1i, %x, %32, %33
- %35:array<i32, 4> = access %nested_nonempty, 1i, 2i
- %36:array<array<i32, 4>, 2> = construct %34, %35
- %37:array<i32, 4> = access %36, 1i
- %subexpr_nested_nonempty_with_expr:array<i32, 4> = let %37
- %39:i32 = access %empty, 0i
- %40:i32 = access %nonempty, 0i
- %41:i32 = add %39, %40
- %42:i32 = access %nonempty_with_expr, 0i
- %43:i32 = add %41, %42
- %44:i32 = access %nested_empty, 0i, 0i, 0i
- %45:i32 = add %43, %44
- %46:i32 = access %nested_nonempty, 0i, 0i, 0i
- %47:i32 = add %45, %46
- %48:i32 = access %nested_nonempty_with_expr, 0i, 0i, 0i
- %49:i32 = add %47, %48
- %50:i32 = add %49, %subexpr_empty
- %51:i32 = add %50, %subexpr_nonempty
- %52:i32 = add %51, %subexpr_nonempty_with_expr
- %53:i32 = access %subexpr_nested_empty, 0i
- %54:i32 = add %52, %53
- %55:i32 = access %subexpr_nested_nonempty, 0i
- %56:i32 = add %54, %55
- %57:i32 = access %subexpr_nested_nonempty_with_expr, 0i
- %58:i32 = add %56, %57
- store %s, %58
- 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/benchmark/atan2-const-eval.wgsl.expected.ir.msl b/test/tint/benchmark/atan2-const-eval.wgsl.expected.ir.msl
deleted file mode 100644
index 9bcc7b5..0000000
--- a/test/tint/benchmark/atan2-const-eval.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,2023 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Output = struct @align(4) {
- value:f32 @offset(0)
-}
-
-$B1: { # root
- %outputs:ptr<storage, array<Output, 1000>, read_write> = var @binding_point(0, 0)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %3:ptr<storage, f32, read_write> = access %outputs, 0i, 0u
- store %3, -2.35619449615478515625f
- %4:ptr<storage, f32, read_write> = access %outputs, 1i, 0u
- store %4, -3.14159250259399414062f
- %5:ptr<storage, f32, read_write> = access %outputs, 2i, 0u
- store %5, -3.14159250259399414062f
- %6:ptr<storage, f32, read_write> = access %outputs, 3i, 0u
- store %6, -3.14159250259399414062f
- %7:ptr<storage, f32, read_write> = access %outputs, 4i, 0u
- store %7, -3.14159250259399414062f
- %8:ptr<storage, f32, read_write> = access %outputs, 5i, 0u
- store %8, -3.14159250259399414062f
- %9:ptr<storage, f32, read_write> = access %outputs, 6i, 0u
- store %9, -3.14159250259399414062f
- %10:ptr<storage, f32, read_write> = access %outputs, 7i, 0u
- store %10, -3.14159250259399414062f
- %11:ptr<storage, f32, read_write> = access %outputs, 8i, 0u
- store %11, -3.14159250259399414062f
- %12:ptr<storage, f32, read_write> = access %outputs, 9i, 0u
- store %12, -3.14159250259399414062f
- %13:ptr<storage, f32, read_write> = access %outputs, 10i, 0u
- store %13, -3.14159250259399414062f
- %14:ptr<storage, f32, read_write> = access %outputs, 11i, 0u
- store %14, -3.14159250259399414062f
- %15:ptr<storage, f32, read_write> = access %outputs, 12i, 0u
- store %15, -3.14159250259399414062f
- %16:ptr<storage, f32, read_write> = access %outputs, 13i, 0u
- store %16, -3.14159250259399414062f
- %17:ptr<storage, f32, read_write> = access %outputs, 14i, 0u
- store %17, -3.14159250259399414062f
- %18:ptr<storage, f32, read_write> = access %outputs, 15i, 0u
- store %18, -3.14159250259399414062f
- %19:ptr<storage, f32, read_write> = access %outputs, 16i, 0u
- store %19, -3.14159250259399414062f
- %20:ptr<storage, f32, read_write> = access %outputs, 17i, 0u
- store %20, -3.14159250259399414062f
- %21:ptr<storage, f32, read_write> = access %outputs, 18i, 0u
- store %21, -3.14159250259399414062f
- %22:ptr<storage, f32, read_write> = access %outputs, 19i, 0u
- store %22, -3.14159250259399414062f
- %23:ptr<storage, f32, read_write> = access %outputs, 20i, 0u
- store %23, -3.14159250259399414062f
- %24:ptr<storage, f32, read_write> = access %outputs, 21i, 0u
- store %24, -3.14159250259399414062f
- %25:ptr<storage, f32, read_write> = access %outputs, 22i, 0u
- store %25, -3.14159250259399414062f
- %26:ptr<storage, f32, read_write> = access %outputs, 23i, 0u
- store %26, -3.14159250259399414062f
- %27:ptr<storage, f32, read_write> = access %outputs, 24i, 0u
- store %27, -3.14159250259399414062f
- %28:ptr<storage, f32, read_write> = access %outputs, 25i, 0u
- store %28, -3.14159250259399414062f
- %29:ptr<storage, f32, read_write> = access %outputs, 26i, 0u
- store %29, -3.14159250259399414062f
- %30:ptr<storage, f32, read_write> = access %outputs, 27i, 0u
- store %30, -3.14159250259399414062f
- %31:ptr<storage, f32, read_write> = access %outputs, 28i, 0u
- store %31, -3.14159250259399414062f
- %32:ptr<storage, f32, read_write> = access %outputs, 29i, 0u
- store %32, -3.14159250259399414062f
- %33:ptr<storage, f32, read_write> = access %outputs, 30i, 0u
- store %33, -3.14159250259399414062f
- %34:ptr<storage, f32, read_write> = access %outputs, 31i, 0u
- store %34, -3.14159250259399414062f
- %35:ptr<storage, f32, read_write> = access %outputs, 32i, 0u
- store %35, -3.14159250259399414062f
- %36:ptr<storage, f32, read_write> = access %outputs, 33i, 0u
- store %36, -3.14159250259399414062f
- %37:ptr<storage, f32, read_write> = access %outputs, 34i, 0u
- store %37, -3.14159250259399414062f
- %38:ptr<storage, f32, read_write> = access %outputs, 35i, 0u
- store %38, -3.14159250259399414062f
- %39:ptr<storage, f32, read_write> = access %outputs, 36i, 0u
- store %39, -3.14159250259399414062f
- %40:ptr<storage, f32, read_write> = access %outputs, 37i, 0u
- store %40, -3.14159250259399414062f
- %41:ptr<storage, f32, read_write> = access %outputs, 38i, 0u
- store %41, -3.14159250259399414062f
- %42:ptr<storage, f32, read_write> = access %outputs, 39i, 0u
- store %42, -3.14159250259399414062f
- %43:ptr<storage, f32, read_write> = access %outputs, 40i, 0u
- store %43, -3.14159250259399414062f
- %44:ptr<storage, f32, read_write> = access %outputs, 41i, 0u
- store %44, -3.14159250259399414062f
- %45:ptr<storage, f32, read_write> = access %outputs, 42i, 0u
- store %45, -3.14159250259399414062f
- %46:ptr<storage, f32, read_write> = access %outputs, 43i, 0u
- store %46, -3.14159250259399414062f
- %47:ptr<storage, f32, read_write> = access %outputs, 44i, 0u
- store %47, -3.14159250259399414062f
- %48:ptr<storage, f32, read_write> = access %outputs, 45i, 0u
- store %48, -3.14159250259399414062f
- %49:ptr<storage, f32, read_write> = access %outputs, 46i, 0u
- store %49, -3.14159250259399414062f
- %50:ptr<storage, f32, read_write> = access %outputs, 47i, 0u
- store %50, -3.14159250259399414062f
- %51:ptr<storage, f32, read_write> = access %outputs, 48i, 0u
- store %51, -3.14159250259399414062f
- %52:ptr<storage, f32, read_write> = access %outputs, 49i, 0u
- store %52, -3.14159250259399414062f
- %53:ptr<storage, f32, read_write> = access %outputs, 50i, 0u
- store %53, -2.35619449615478515625f
- %54:ptr<storage, f32, read_write> = access %outputs, 51i, 0u
- store %54, -2.29743862152099609375f
- %55:ptr<storage, f32, read_write> = access %outputs, 52i, 0u
- store %55, -2.23183941841125488281f
- %56:ptr<storage, f32, read_write> = access %outputs, 53i, 0u
- store %56, -2.15879893302917480469f
- %57:ptr<storage, f32, read_write> = access %outputs, 54i, 0u
- store %57, -2.07789492607116699219f
- %58:ptr<storage, f32, read_write> = access %outputs, 55i, 0u
- store %58, -1.98902058601379394531f
- %59:ptr<storage, f32, read_write> = access %outputs, 56i, 0u
- store %59, -1.89254689216613769531f
- %60:ptr<storage, f32, read_write> = access %outputs, 57i, 0u
- store %60, -1.78946542739868164062f
- %61:ptr<storage, f32, read_write> = access %outputs, 58i, 0u
- store %61, -1.68145358562469482422f
- %62:ptr<storage, f32, read_write> = access %outputs, 59i, 0u
- store %62, -1.57079648971557617188f
- %63:ptr<storage, f32, read_write> = access %outputs, 60i, 0u
- store %63, -1.57079637050628662109f
- %64:ptr<storage, f32, read_write> = access %outputs, 61i, 0u
- store %64, -1.57079625129699707031f
- %65:ptr<storage, f32, read_write> = access %outputs, 62i, 0u
- store %65, -1.46013903617858886719f
- %66:ptr<storage, f32, read_write> = access %outputs, 63i, 0u
- store %66, -1.35212731361389160156f
- %67:ptr<storage, f32, read_write> = access %outputs, 64i, 0u
- store %67, -1.24904572963714599609f
- %68:ptr<storage, f32, read_write> = access %outputs, 65i, 0u
- store %68, -1.15257203578948974609f
- %69:ptr<storage, f32, read_write> = access %outputs, 66i, 0u
- store %69, -1.06369781494140625f
- %70:ptr<storage, f32, read_write> = access %outputs, 67i, 0u
- store %70, -0.98279374837875366211f
- %71:ptr<storage, f32, read_write> = access %outputs, 68i, 0u
- store %71, -0.90975320339202880859f
- %72:ptr<storage, f32, read_write> = access %outputs, 69i, 0u
- store %72, -0.84415400028228759766f
- %73:ptr<storage, f32, read_write> = access %outputs, 70i, 0u
- store %73, -0.78539818525314331055f
- %74:ptr<storage, f32, read_write> = access %outputs, 71i, 0u
- store %74, -0.78539818525314331055f
- %75:ptr<storage, f32, read_write> = access %outputs, 72i, 0u
- store %75, 0.0f
- %76:ptr<storage, f32, read_write> = access %outputs, 73i, 0u
- store %76, 0.0f
- %77:ptr<storage, f32, read_write> = access %outputs, 74i, 0u
- store %77, 0.0f
- %78:ptr<storage, f32, read_write> = access %outputs, 75i, 0u
- store %78, 0.0f
- %79:ptr<storage, f32, read_write> = access %outputs, 76i, 0u
- store %79, 0.0f
- %80:ptr<storage, f32, read_write> = access %outputs, 77i, 0u
- store %80, 0.0f
- %81:ptr<storage, f32, read_write> = access %outputs, 78i, 0u
- store %81, 0.0f
- %82:ptr<storage, f32, read_write> = access %outputs, 79i, 0u
- store %82, 0.0f
- %83:ptr<storage, f32, read_write> = access %outputs, 80i, 0u
- store %83, 0.0f
- %84:ptr<storage, f32, read_write> = access %outputs, 81i, 0u
- store %84, 0.0f
- %85:ptr<storage, f32, read_write> = access %outputs, 82i, 0u
- store %85, 0.0f
- %86:ptr<storage, f32, read_write> = access %outputs, 83i, 0u
- store %86, 0.0f
- %87:ptr<storage, f32, read_write> = access %outputs, 84i, 0u
- store %87, 0.0f
- %88:ptr<storage, f32, read_write> = access %outputs, 85i, 0u
- store %88, 0.0f
- %89:ptr<storage, f32, read_write> = access %outputs, 86i, 0u
- store %89, 0.0f
- %90:ptr<storage, f32, read_write> = access %outputs, 87i, 0u
- store %90, 0.0f
- %91:ptr<storage, f32, read_write> = access %outputs, 88i, 0u
- store %91, 0.0f
- %92:ptr<storage, f32, read_write> = access %outputs, 89i, 0u
- store %92, 0.0f
- %93:ptr<storage, f32, read_write> = access %outputs, 90i, 0u
- store %93, 0.0f
- %94:ptr<storage, f32, read_write> = access %outputs, 91i, 0u
- store %94, 0.0f
- %95:ptr<storage, f32, read_write> = access %outputs, 92i, 0u
- store %95, 0.0f
- %96:ptr<storage, f32, read_write> = access %outputs, 93i, 0u
- store %96, 0.0f
- %97:ptr<storage, f32, read_write> = access %outputs, 94i, 0u
- store %97, 0.0f
- %98:ptr<storage, f32, read_write> = access %outputs, 95i, 0u
- store %98, 0.0f
- %99:ptr<storage, f32, read_write> = access %outputs, 96i, 0u
- store %99, 0.0f
- %100:ptr<storage, f32, read_write> = access %outputs, 97i, 0u
- store %100, 0.0f
- %101:ptr<storage, f32, read_write> = access %outputs, 98i, 0u
- store %101, 0.0f
- %102:ptr<storage, f32, read_write> = access %outputs, 99i, 0u
- store %102, 0.0f
- %103:ptr<storage, f32, read_write> = access %outputs, 100i, 0u
- store %103, 0.0f
- %104:ptr<storage, f32, read_write> = access %outputs, 101i, 0u
- store %104, 0.0f
- %105:ptr<storage, f32, read_write> = access %outputs, 102i, 0u
- store %105, 0.0f
- %106:ptr<storage, f32, read_write> = access %outputs, 103i, 0u
- store %106, 0.0f
- %107:ptr<storage, f32, read_write> = access %outputs, 104i, 0u
- store %107, 0.0f
- %108:ptr<storage, f32, read_write> = access %outputs, 105i, 0u
- store %108, 0.0f
- %109:ptr<storage, f32, read_write> = access %outputs, 106i, 0u
- store %109, 0.0f
- %110:ptr<storage, f32, read_write> = access %outputs, 107i, 0u
- store %110, 0.0f
- %111:ptr<storage, f32, read_write> = access %outputs, 108i, 0u
- store %111, 0.0f
- %112:ptr<storage, f32, read_write> = access %outputs, 109i, 0u
- store %112, 0.0f
- %113:ptr<storage, f32, read_write> = access %outputs, 110i, 0u
- store %113, 0.0f
- %114:ptr<storage, f32, read_write> = access %outputs, 111i, 0u
- store %114, 0.0f
- %115:ptr<storage, f32, read_write> = access %outputs, 112i, 0u
- store %115, 0.0f
- %116:ptr<storage, f32, read_write> = access %outputs, 113i, 0u
- store %116, 0.0f
- %117:ptr<storage, f32, read_write> = access %outputs, 114i, 0u
- store %117, 0.0f
- %118:ptr<storage, f32, read_write> = access %outputs, 115i, 0u
- store %118, 0.0f
- %119:ptr<storage, f32, read_write> = access %outputs, 116i, 0u
- store %119, 0.0f
- %120:ptr<storage, f32, read_write> = access %outputs, 117i, 0u
- store %120, 0.0f
- %121:ptr<storage, f32, read_write> = access %outputs, 118i, 0u
- store %121, 0.0f
- %122:ptr<storage, f32, read_write> = access %outputs, 119i, 0u
- store %122, 0.0f
- %123:ptr<storage, f32, read_write> = access %outputs, 120i, 0u
- store %123, 0.0f
- %124:ptr<storage, f32, read_write> = access %outputs, 121i, 0u
- store %124, -2.35619449615478515625f
- %125:ptr<storage, f32, read_write> = access %outputs, 122i, 0u
- store %125, -2.89661407470703125f
- %126:ptr<storage, f32, read_write> = access %outputs, 123i, 0u
- store %126, -3.03093552589416503906f
- %127:ptr<storage, f32, read_write> = access %outputs, 124i, 0u
- store %127, -3.07917380332946777344f
- %128:ptr<storage, f32, read_write> = access %outputs, 125i, 0u
- store %128, -3.1016139984130859375f
- %129:ptr<storage, f32, read_write> = access %outputs, 126i, 0u
- store %129, -3.11382198333740234375f
- %130:ptr<storage, f32, read_write> = access %outputs, 127i, 0u
- store %130, -3.1211872100830078125f
- %131:ptr<storage, f32, read_write> = access %outputs, 128i, 0u
- store %131, -3.12596893310546875f
- %132:ptr<storage, f32, read_write> = access %outputs, 129i, 0u
- store %132, -3.1292476654052734375f
- %133:ptr<storage, f32, read_write> = access %outputs, 130i, 0u
- store %133, -3.13159298896789550781f
- %134:ptr<storage, f32, read_write> = access %outputs, 131i, 0u
- store %134, -3.13332843780517578125f
- %135:ptr<storage, f32, read_write> = access %outputs, 132i, 0u
- store %135, -3.13464832305908203125f
- %136:ptr<storage, f32, read_write> = access %outputs, 133i, 0u
- store %136, -3.13567566871643066406f
- %137:ptr<storage, f32, read_write> = access %outputs, 134i, 0u
- store %137, -3.13649058341979980469f
- %138:ptr<storage, f32, read_write> = access %outputs, 135i, 0u
- store %138, -3.13714814186096191406f
- %139:ptr<storage, f32, read_write> = access %outputs, 136i, 0u
- store %139, -3.13768649101257324219f
- %140:ptr<storage, f32, read_write> = access %outputs, 137i, 0u
- store %140, -3.13813257217407226562f
- %141:ptr<storage, f32, read_write> = access %outputs, 138i, 0u
- store %141, -3.13850617408752441406f
- %142:ptr<storage, f32, read_write> = access %outputs, 139i, 0u
- store %142, -3.1388225555419921875f
- %143:ptr<storage, f32, read_write> = access %outputs, 140i, 0u
- store %143, -3.13909268379211425781f
- %144:ptr<storage, f32, read_write> = access %outputs, 141i, 0u
- store %144, -3.13932514190673828125f
- %145:ptr<storage, f32, read_write> = access %outputs, 142i, 0u
- store %145, -3.13952660560607910156f
- %146:ptr<storage, f32, read_write> = access %outputs, 143i, 0u
- store %146, -3.13970232009887695312f
- %147:ptr<storage, f32, read_write> = access %outputs, 144i, 0u
- store %147, -3.13985657691955566406f
- %148:ptr<storage, f32, read_write> = access %outputs, 145i, 0u
- store %148, -3.13999271392822265625f
- %149:ptr<storage, f32, read_write> = access %outputs, 146i, 0u
- store %149, -3.14011335372924804688f
- %150:ptr<storage, f32, read_write> = access %outputs, 147i, 0u
- store %150, -3.14022088050842285156f
- %151:ptr<storage, f32, read_write> = access %outputs, 148i, 0u
- store %151, -3.14031720161437988281f
- %152:ptr<storage, f32, read_write> = access %outputs, 149i, 0u
- store %152, -3.14040350914001464844f
- %153:ptr<storage, f32, read_write> = access %outputs, 150i, 0u
- store %153, -3.14048147201538085938f
- %154:ptr<storage, f32, read_write> = access %outputs, 151i, 0u
- store %154, -3.14055204391479492188f
- %155:ptr<storage, f32, read_write> = access %outputs, 152i, 0u
- store %155, -3.14061617851257324219f
- %156:ptr<storage, f32, read_write> = access %outputs, 153i, 0u
- store %156, -3.14067435264587402344f
- %157:ptr<storage, f32, read_write> = access %outputs, 154i, 0u
- store %157, -3.14072751998901367188f
- %158:ptr<storage, f32, read_write> = access %outputs, 155i, 0u
- store %158, -3.14077639579772949219f
- %159:ptr<storage, f32, read_write> = access %outputs, 156i, 0u
- store %159, -3.14082098007202148438f
- %160:ptr<storage, f32, read_write> = access %outputs, 157i, 0u
- store %160, -3.14086222648620605469f
- %161:ptr<storage, f32, read_write> = access %outputs, 158i, 0u
- store %161, -3.14090013504028320312f
- %162:ptr<storage, f32, read_write> = access %outputs, 159i, 0u
- store %162, -3.14093518257141113281f
- %163:ptr<storage, f32, read_write> = access %outputs, 160i, 0u
- store %163, -3.14096760749816894531f
- %164:ptr<storage, f32, read_write> = access %outputs, 161i, 0u
- store %164, -3.14099788665771484375f
- %165:ptr<storage, f32, read_write> = access %outputs, 162i, 0u
- store %165, -3.14102578163146972656f
- %166:ptr<storage, f32, read_write> = access %outputs, 163i, 0u
- store %166, -3.14105176925659179688f
- %167:ptr<storage, f32, read_write> = access %outputs, 164i, 0u
- store %167, -3.14107608795166015625f
- %168:ptr<storage, f32, read_write> = access %outputs, 165i, 0u
- store %168, -3.14109873771667480469f
- %169:ptr<storage, f32, read_write> = access %outputs, 166i, 0u
- store %169, -3.14111995697021484375f
- %170:ptr<storage, f32, read_write> = access %outputs, 167i, 0u
- store %170, -3.141139984130859375f
- %171:ptr<storage, f32, read_write> = access %outputs, 168i, 0u
- store %171, -3.14115858078002929688f
- %172:ptr<storage, f32, read_write> = access %outputs, 169i, 0u
- store %172, -3.1411762237548828125f
- %173:ptr<storage, f32, read_write> = access %outputs, 170i, 0u
- store %173, -1.57079637050628662109f
- %174:ptr<storage, f32, read_write> = access %outputs, 171i, 0u
- store %174, -1.57079637050628662109f
- %175:ptr<storage, f32, read_write> = access %outputs, 172i, 0u
- store %175, -1.57079637050628662109f
- %176:ptr<storage, f32, read_write> = access %outputs, 173i, 0u
- store %176, -1.57079637050628662109f
- %177:ptr<storage, f32, read_write> = access %outputs, 174i, 0u
- store %177, -1.57079637050628662109f
- %178:ptr<storage, f32, read_write> = access %outputs, 175i, 0u
- store %178, -1.57079637050628662109f
- %179:ptr<storage, f32, read_write> = access %outputs, 176i, 0u
- store %179, -1.57079637050628662109f
- %180:ptr<storage, f32, read_write> = access %outputs, 177i, 0u
- store %180, -1.57079637050628662109f
- %181:ptr<storage, f32, read_write> = access %outputs, 178i, 0u
- store %181, -1.57079637050628662109f
- %182:ptr<storage, f32, read_write> = access %outputs, 179i, 0u
- store %182, -1.57079637050628662109f
- %183:ptr<storage, f32, read_write> = access %outputs, 180i, 0u
- store %183, -1.57079637050628662109f
- %184:ptr<storage, f32, read_write> = access %outputs, 181i, 0u
- store %184, -1.57079637050628662109f
- %185:ptr<storage, f32, read_write> = access %outputs, 182i, 0u
- store %185, -1.57079637050628662109f
- %186:ptr<storage, f32, read_write> = access %outputs, 183i, 0u
- store %186, -1.57079637050628662109f
- %187:ptr<storage, f32, read_write> = access %outputs, 184i, 0u
- store %187, -1.57079637050628662109f
- %188:ptr<storage, f32, read_write> = access %outputs, 185i, 0u
- store %188, -1.57079637050628662109f
- %189:ptr<storage, f32, read_write> = access %outputs, 186i, 0u
- store %189, -1.57079637050628662109f
- %190:ptr<storage, f32, read_write> = access %outputs, 187i, 0u
- store %190, -1.57079637050628662109f
- %191:ptr<storage, f32, read_write> = access %outputs, 188i, 0u
- store %191, -1.57079637050628662109f
- %192:ptr<storage, f32, read_write> = access %outputs, 189i, 0u
- store %192, -1.57079637050628662109f
- %193:ptr<storage, f32, read_write> = access %outputs, 190i, 0u
- store %193, -1.57079637050628662109f
- %194:ptr<storage, f32, read_write> = access %outputs, 191i, 0u
- store %194, -1.57079637050628662109f
- %195:ptr<storage, f32, read_write> = access %outputs, 192i, 0u
- store %195, -0.78539818525314331055f
- %196:ptr<storage, f32, read_write> = access %outputs, 193i, 0u
- store %196, -0.24497866630554199219f
- %197:ptr<storage, f32, read_write> = access %outputs, 194i, 0u
- store %197, -0.11065722256898880005f
- %198:ptr<storage, f32, read_write> = access %outputs, 195i, 0u
- store %198, -0.06241881102323532104f
- %199:ptr<storage, f32, read_write> = access %outputs, 196i, 0u
- store %199, -0.03997868672013282776f
- %200:ptr<storage, f32, read_write> = access %outputs, 197i, 0u
- store %200, -0.02777063660323619843f
- %201:ptr<storage, f32, read_write> = access %outputs, 198i, 0u
- store %201, -0.02040532976388931274f
- %202:ptr<storage, f32, read_write> = access %outputs, 199i, 0u
- store %202, -0.01562372874468564987f
- %203:ptr<storage, f32, read_write> = access %outputs, 200i, 0u
- store %203, -0.01234505139291286469f
- %204:ptr<storage, f32, read_write> = access %outputs, 201i, 0u
- store %204, -0.00999966636300086975f
- %205:ptr<storage, f32, read_write> = access %outputs, 202i, 0u
- store %205, -0.00826427526772022247f
- %206:ptr<storage, f32, read_write> = access %outputs, 203i, 0u
- store %206, -0.00694433273747563362f
- %207:ptr<storage, f32, read_write> = access %outputs, 204i, 0u
- store %207, -0.00591709092259407043f
- %208:ptr<storage, f32, read_write> = access %outputs, 205i, 0u
- store %208, -0.00510199647396802902f
- %209:ptr<storage, f32, read_write> = access %outputs, 206i, 0u
- store %209, -0.00444441521540284157f
- %210:ptr<storage, f32, read_write> = access %outputs, 207i, 0u
- store %210, -0.00390623020939528942f
- %211:ptr<storage, f32, read_write> = access %outputs, 208i, 0u
- store %211, -0.00346019375137984753f
- %212:ptr<storage, f32, read_write> = access %outputs, 209i, 0u
- store %212, -0.00308640976436436176f
- %213:ptr<storage, f32, read_write> = access %outputs, 210i, 0u
- store %213, -0.00277007604017853737f
- %214:ptr<storage, f32, read_write> = access %outputs, 211i, 0u
- store %214, -0.00249999458901584148f
- %215:ptr<storage, f32, read_write> = access %outputs, 212i, 0u
- store %215, -0.00226756976917386055f
- %216:ptr<storage, f32, read_write> = access %outputs, 213i, 0u
- store %216, -0.0020661128219217062f
- %217:ptr<storage, f32, read_write> = access %outputs, 214i, 0u
- store %217, -0.00189035700168460608f
- %218:ptr<storage, f32, read_write> = access %outputs, 215i, 0u
- store %218, -0.00173610937781631947f
- %219:ptr<storage, f32, read_write> = access %outputs, 216i, 0u
- store %219, -0.00159999867901206017f
- %220:ptr<storage, f32, read_write> = access %outputs, 217i, 0u
- store %220, -0.00147928891237825155f
- %221:ptr<storage, f32, read_write> = access %outputs, 218i, 0u
- store %221, -0.00137174129486083984f
- %222:ptr<storage, f32, read_write> = access %outputs, 219i, 0u
- store %222, -0.00127550947945564985f
- %223:ptr<storage, f32, read_write> = access %outputs, 220i, 0u
- store %223, -0.00118906015995889902f
- %224:ptr<storage, f32, read_write> = access %outputs, 221i, 0u
- store %224, -0.00111111055593937635f
- %225:ptr<storage, f32, read_write> = access %outputs, 222i, 0u
- store %225, -0.00104058231227099895f
- %226:ptr<storage, f32, read_write> = access %outputs, 223i, 0u
- store %226, -0.00097656220896169543f
- %227:ptr<storage, f32, read_write> = access %outputs, 224i, 0u
- store %227, -0.00091827340656891465f
- %228:ptr<storage, f32, read_write> = access %outputs, 225i, 0u
- store %228, -0.00086505169747397304f
- %229:ptr<storage, f32, read_write> = access %outputs, 226i, 0u
- store %229, -0.00081632629735395312f
- %230:ptr<storage, f32, read_write> = access %outputs, 227i, 0u
- store %230, -0.00077160476939752698f
- %231:ptr<storage, f32, read_write> = access %outputs, 228i, 0u
- store %231, -0.00073046010220423341f
- %232:ptr<storage, f32, read_write> = access %outputs, 229i, 0u
- store %232, -0.00069252063985913992f
- %233:ptr<storage, f32, read_write> = access %outputs, 230i, 0u
- store %233, -0.00065746204927563667f
- %234:ptr<storage, f32, read_write> = access %outputs, 231i, 0u
- store %234, -0.00062499986961483955f
- %235:ptr<storage, f32, read_write> = access %outputs, 232i, 0u
- store %235, -0.00059488392435014248f
- %236:ptr<storage, f32, read_write> = access %outputs, 233i, 0u
- store %236, -0.00056689337361603975f
- %237:ptr<storage, f32, read_write> = access %outputs, 234i, 0u
- store %237, -0.00054083281429484487f
- %238:ptr<storage, f32, read_write> = access %outputs, 235i, 0u
- store %238, -0.00051652890397235751f
- %239:ptr<storage, f32, read_write> = access %outputs, 236i, 0u
- store %239, -0.00049382715951651335f
- %240:ptr<storage, f32, read_write> = access %outputs, 237i, 0u
- store %240, -0.00047258977429009974f
- %241:ptr<storage, f32, read_write> = access %outputs, 238i, 0u
- store %241, -0.00045269349357113242f
- %242:ptr<storage, f32, read_write> = access %outputs, 239i, 0u
- store %242, -0.00043402775190770626f
- %243:ptr<storage, f32, read_write> = access %outputs, 240i, 0u
- store %243, -0.0004164931015111506f
- %244:ptr<storage, f32, read_write> = access %outputs, 241i, 0u
- store %244, -2.35619449615478515625f
- %245:ptr<storage, f32, read_write> = access %outputs, 242i, 0u
- store %245, -2.72336840629577636719f
- %246:ptr<storage, f32, read_write> = access %outputs, 243i, 0u
- store %246, -2.89661407470703125f
- %247:ptr<storage, f32, read_write> = access %outputs, 244i, 0u
- store %247, -2.98293733596801757812f
- %248:ptr<storage, f32, read_write> = access %outputs, 245i, 0u
- store %248, -3.03093552589416503906f
- %249:ptr<storage, f32, read_write> = access %outputs, 246i, 0u
- store %249, -3.0601406097412109375f
- %250:ptr<storage, f32, read_write> = access %outputs, 247i, 0u
- store %250, -3.07917380332946777344f
- %251:ptr<storage, f32, read_write> = access %outputs, 248i, 0u
- store %251, -3.09225010871887207031f
- %252:ptr<storage, f32, read_write> = access %outputs, 249i, 0u
- store %252, -3.1016139984130859375f
- %253:ptr<storage, f32, read_write> = access %outputs, 250i, 0u
- store %253, -3.10854673385620117188f
- %254:ptr<storage, f32, read_write> = access %outputs, 251i, 0u
- store %254, -3.11382198333740234375f
- %255:ptr<storage, f32, read_write> = access %outputs, 252i, 0u
- store %255, -3.11792850494384765625f
- %256:ptr<storage, f32, read_write> = access %outputs, 253i, 0u
- store %256, -3.1211872100830078125f
- %257:ptr<storage, f32, read_write> = access %outputs, 254i, 0u
- store %257, -3.12381672859191894531f
- %258:ptr<storage, f32, read_write> = access %outputs, 255i, 0u
- store %258, -3.12596893310546875f
- %259:ptr<storage, f32, read_write> = access %outputs, 256i, 0u
- store %259, -3.12775278091430664062f
- %260:ptr<storage, f32, read_write> = access %outputs, 257i, 0u
- store %260, -3.1292476654052734375f
- %261:ptr<storage, f32, read_write> = access %outputs, 258i, 0u
- store %261, -3.13051271438598632812f
- %262:ptr<storage, f32, read_write> = access %outputs, 259i, 0u
- store %262, -3.13159298896789550781f
- %263:ptr<storage, f32, read_write> = access %outputs, 260i, 0u
- store %263, -3.1325225830078125f
- %264:ptr<storage, f32, read_write> = access %outputs, 261i, 0u
- store %264, -3.13332843780517578125f
- %265:ptr<storage, f32, read_write> = access %outputs, 262i, 0u
- store %265, -3.1340312957763671875f
- %266:ptr<storage, f32, read_write> = access %outputs, 263i, 0u
- store %266, -3.13464832305908203125f
- %267:ptr<storage, f32, read_write> = access %outputs, 264i, 0u
- store %267, -3.13519263267517089844f
- %268:ptr<storage, f32, read_write> = access %outputs, 265i, 0u
- store %268, -3.13567566871643066406f
- %269:ptr<storage, f32, read_write> = access %outputs, 266i, 0u
- store %269, -3.13610577583312988281f
- %270:ptr<storage, f32, read_write> = access %outputs, 267i, 0u
- store %270, -3.13649058341979980469f
- %271:ptr<storage, f32, read_write> = access %outputs, 268i, 0u
- store %271, -3.13683652877807617188f
- %272:ptr<storage, f32, read_write> = access %outputs, 269i, 0u
- store %272, -3.13714814186096191406f
- %273:ptr<storage, f32, read_write> = access %outputs, 270i, 0u
- store %273, -3.13743042945861816406f
- %274:ptr<storage, f32, read_write> = access %outputs, 271i, 0u
- store %274, -3.13768649101257324219f
- %275:ptr<storage, f32, read_write> = access %outputs, 272i, 0u
- store %275, -3.13791966438293457031f
- %276:ptr<storage, f32, read_write> = access %outputs, 273i, 0u
- store %276, -3.13813257217407226562f
- %277:ptr<storage, f32, read_write> = access %outputs, 274i, 0u
- store %277, -3.13832736015319824219f
- %278:ptr<storage, f32, read_write> = access %outputs, 275i, 0u
- store %278, -3.13850617408752441406f
- %279:ptr<storage, f32, read_write> = access %outputs, 276i, 0u
- store %279, -3.13867092132568359375f
- %280:ptr<storage, f32, read_write> = access %outputs, 277i, 0u
- store %280, -3.1388225555419921875f
- %281:ptr<storage, f32, read_write> = access %outputs, 278i, 0u
- store %281, -3.13896274566650390625f
- %282:ptr<storage, f32, read_write> = access %outputs, 279i, 0u
- store %282, -3.13909268379211425781f
- %283:ptr<storage, f32, read_write> = access %outputs, 280i, 0u
- store %283, -3.13921308517456054688f
- %284:ptr<storage, f32, read_write> = access %outputs, 281i, 0u
- store %284, -3.13932514190673828125f
- %285:ptr<storage, f32, read_write> = access %outputs, 282i, 0u
- store %285, -3.13942933082580566406f
- %286:ptr<storage, f32, read_write> = access %outputs, 283i, 0u
- store %286, -3.13952660560607910156f
- %287:ptr<storage, f32, read_write> = access %outputs, 284i, 0u
- store %287, -3.13961744308471679688f
- %288:ptr<storage, f32, read_write> = access %outputs, 285i, 0u
- store %288, -3.13970232009887695312f
- %289:ptr<storage, f32, read_write> = access %outputs, 286i, 0u
- store %289, -3.139781951904296875f
- %290:ptr<storage, f32, read_write> = access %outputs, 287i, 0u
- store %290, -3.13985657691955566406f
- %291:ptr<storage, f32, read_write> = access %outputs, 288i, 0u
- store %291, -3.13992667198181152344f
- %292:ptr<storage, f32, read_write> = access %outputs, 289i, 0u
- store %292, -1.57079637050628662109f
- %293:ptr<storage, f32, read_write> = access %outputs, 290i, 0u
- store %293, -1.57079637050628662109f
- %294:ptr<storage, f32, read_write> = access %outputs, 291i, 0u
- store %294, -1.57079637050628662109f
- %295:ptr<storage, f32, read_write> = access %outputs, 292i, 0u
- store %295, -1.57079637050628662109f
- %296:ptr<storage, f32, read_write> = access %outputs, 293i, 0u
- store %296, -1.57079637050628662109f
- %297:ptr<storage, f32, read_write> = access %outputs, 294i, 0u
- store %297, -1.57079637050628662109f
- %298:ptr<storage, f32, read_write> = access %outputs, 295i, 0u
- store %298, -1.57079637050628662109f
- %299:ptr<storage, f32, read_write> = access %outputs, 296i, 0u
- store %299, -1.57079637050628662109f
- %300:ptr<storage, f32, read_write> = access %outputs, 297i, 0u
- store %300, -1.57079637050628662109f
- %301:ptr<storage, f32, read_write> = access %outputs, 298i, 0u
- store %301, -1.57079637050628662109f
- %302:ptr<storage, f32, read_write> = access %outputs, 299i, 0u
- store %302, -1.57079637050628662109f
- %303:ptr<storage, f32, read_write> = access %outputs, 300i, 0u
- store %303, -1.57079637050628662109f
- %304:ptr<storage, f32, read_write> = access %outputs, 301i, 0u
- store %304, -1.57079637050628662109f
- %305:ptr<storage, f32, read_write> = access %outputs, 302i, 0u
- store %305, -1.57079637050628662109f
- %306:ptr<storage, f32, read_write> = access %outputs, 303i, 0u
- store %306, -1.57079637050628662109f
- %307:ptr<storage, f32, read_write> = access %outputs, 304i, 0u
- store %307, -1.57079637050628662109f
- %308:ptr<storage, f32, read_write> = access %outputs, 305i, 0u
- store %308, -1.57079637050628662109f
- %309:ptr<storage, f32, read_write> = access %outputs, 306i, 0u
- store %309, -1.57079637050628662109f
- %310:ptr<storage, f32, read_write> = access %outputs, 307i, 0u
- store %310, -1.57079637050628662109f
- %311:ptr<storage, f32, read_write> = access %outputs, 308i, 0u
- store %311, -1.57079637050628662109f
- %312:ptr<storage, f32, read_write> = access %outputs, 309i, 0u
- store %312, -1.57079637050628662109f
- %313:ptr<storage, f32, read_write> = access %outputs, 310i, 0u
- store %313, -1.57079637050628662109f
- %314:ptr<storage, f32, read_write> = access %outputs, 311i, 0u
- store %314, -1.32581770420074462891f
- %315:ptr<storage, f32, read_write> = access %outputs, 312i, 0u
- store %315, -0.78539818525314331055f
- %316:ptr<storage, f32, read_write> = access %outputs, 313i, 0u
- store %316, -0.418224334716796875f
- %317:ptr<storage, f32, read_write> = access %outputs, 314i, 0u
- store %317, -0.24497866630554199219f
- %318:ptr<storage, f32, read_write> = access %outputs, 315i, 0u
- store %318, -0.15865525603294372559f
- %319:ptr<storage, f32, read_write> = access %outputs, 316i, 0u
- store %319, -0.11065722256898880005f
- %320:ptr<storage, f32, read_write> = access %outputs, 317i, 0u
- store %320, -0.0814520418643951416f
- %321:ptr<storage, f32, read_write> = access %outputs, 318i, 0u
- store %321, -0.06241881102323532104f
- %322:ptr<storage, f32, read_write> = access %outputs, 319i, 0u
- store %322, -0.04934263229370117188f
- %323:ptr<storage, f32, read_write> = access %outputs, 320i, 0u
- store %323, -0.03997868672013282776f
- %324:ptr<storage, f32, read_write> = access %outputs, 321i, 0u
- store %324, -0.03304581716656684875f
- %325:ptr<storage, f32, read_write> = access %outputs, 322i, 0u
- store %325, -0.02777063660323619843f
- %326:ptr<storage, f32, read_write> = access %outputs, 323i, 0u
- store %326, -0.02366422116756439209f
- %327:ptr<storage, f32, read_write> = access %outputs, 324i, 0u
- store %327, -0.02040532976388931274f
- %328:ptr<storage, f32, read_write> = access %outputs, 325i, 0u
- store %328, -0.01777590438723564148f
- %329:ptr<storage, f32, read_write> = access %outputs, 326i, 0u
- store %329, -0.01562372874468564987f
- %330:ptr<storage, f32, read_write> = access %outputs, 327i, 0u
- store %330, -0.01383994705975055695f
- %331:ptr<storage, f32, read_write> = access %outputs, 328i, 0u
- store %331, -0.01234505139291286469f
- %332:ptr<storage, f32, read_write> = access %outputs, 329i, 0u
- store %332, -0.0110798785462975502f
- %333:ptr<storage, f32, read_write> = access %outputs, 330i, 0u
- store %333, -0.00999966636300086975f
- %334:ptr<storage, f32, read_write> = access %outputs, 331i, 0u
- store %334, -0.00907004624605178833f
- %335:ptr<storage, f32, read_write> = access %outputs, 332i, 0u
- store %335, -0.00826427526772022247f
- %336:ptr<storage, f32, read_write> = access %outputs, 333i, 0u
- store %336, -0.00756129296496510506f
- %337:ptr<storage, f32, read_write> = access %outputs, 334i, 0u
- store %337, -0.00694433273747563362f
- %338:ptr<storage, f32, read_write> = access %outputs, 335i, 0u
- store %338, -0.0063999127596616745f
- %339:ptr<storage, f32, read_write> = access %outputs, 336i, 0u
- store %339, -0.00591709092259407043f
- %340:ptr<storage, f32, read_write> = access %outputs, 337i, 0u
- store %340, -0.00548691349104046822f
- %341:ptr<storage, f32, read_write> = access %outputs, 338i, 0u
- store %341, -0.00510199647396802902f
- %342:ptr<storage, f32, read_write> = access %outputs, 339i, 0u
- store %342, -0.00475620664656162262f
- %343:ptr<storage, f32, read_write> = access %outputs, 340i, 0u
- store %343, -0.00444441521540284157f
- %344:ptr<storage, f32, read_write> = access %outputs, 341i, 0u
- store %344, -0.00416230689734220505f
- %345:ptr<storage, f32, read_write> = access %outputs, 342i, 0u
- store %345, -0.00390623020939528942f
- %346:ptr<storage, f32, read_write> = access %outputs, 343i, 0u
- store %346, -0.0036730780266225338f
- %347:ptr<storage, f32, read_write> = access %outputs, 344i, 0u
- store %347, -0.00346019375137984753f
- %348:ptr<storage, f32, read_write> = access %outputs, 345i, 0u
- store %348, -0.00326529424637556076f
- %349:ptr<storage, f32, read_write> = access %outputs, 346i, 0u
- store %349, -0.00308640976436436176f
- %350:ptr<storage, f32, read_write> = access %outputs, 347i, 0u
- store %350, -0.0029218324925750494f
- %351:ptr<storage, f32, read_write> = access %outputs, 348i, 0u
- store %351, -0.00277007604017853737f
- %352:ptr<storage, f32, read_write> = access %outputs, 349i, 0u
- store %352, -0.002629842609167099f
- %353:ptr<storage, f32, read_write> = access %outputs, 350i, 0u
- store %353, -0.00249999458901584148f
- %354:ptr<storage, f32, read_write> = access %outputs, 351i, 0u
- store %354, -0.00237953150644898415f
- %355:ptr<storage, f32, read_write> = access %outputs, 352i, 0u
- store %355, -0.00226756976917386055f
- %356:ptr<storage, f32, read_write> = access %outputs, 353i, 0u
- store %356, -0.00216332799755036831f
- %357:ptr<storage, f32, read_write> = access %outputs, 354i, 0u
- store %357, -0.0020661128219217062f
- %358:ptr<storage, f32, read_write> = access %outputs, 355i, 0u
- store %358, -0.0019753060769289732f
- %359:ptr<storage, f32, read_write> = access %outputs, 356i, 0u
- store %359, -0.00189035700168460608f
- %360:ptr<storage, f32, read_write> = access %outputs, 357i, 0u
- store %360, -0.00181077211163938046f
- %361:ptr<storage, f32, read_write> = access %outputs, 358i, 0u
- store %361, -0.00173610937781631947f
- %362:ptr<storage, f32, read_write> = access %outputs, 359i, 0u
- store %362, -0.00166597100906074047f
- %363:ptr<storage, f32, read_write> = access %outputs, 360i, 0u
- store %363, -2.35619449615478515625f
- %364:ptr<storage, f32, read_write> = access %outputs, 361i, 0u
- store %364, -2.62920331954956054688f
- %365:ptr<storage, f32, read_write> = access %outputs, 362i, 0u
- store %365, -2.79603719711303710938f
- %366:ptr<storage, f32, read_write> = access %outputs, 363i, 0u
- store %366, -2.89661407470703125f
- %367:ptr<storage, f32, read_write> = access %outputs, 364i, 0u
- store %367, -2.9599437713623046875f
- %368:ptr<storage, f32, read_write> = access %outputs, 365i, 0u
- store %368, -3.00188374519348144531f
- %369:ptr<storage, f32, read_write> = access %outputs, 366i, 0u
- store %369, -3.03093552589416503906f
- %370:ptr<storage, f32, read_write> = access %outputs, 367i, 0u
- store %370, -3.05183458328247070312f
- %371:ptr<storage, f32, read_write> = access %outputs, 368i, 0u
- store %371, -3.06734919548034667969f
- %372:ptr<storage, f32, read_write> = access %outputs, 369i, 0u
- store %372, -3.07917380332946777344f
- %373:ptr<storage, f32, read_write> = access %outputs, 370i, 0u
- store %373, -3.0883884429931640625f
- %374:ptr<storage, f32, read_write> = access %outputs, 371i, 0u
- store %374, -3.09570646286010742188f
- %375:ptr<storage, f32, read_write> = access %outputs, 372i, 0u
- store %375, -3.1016139984130859375f
- %376:ptr<storage, f32, read_write> = access %outputs, 373i, 0u
- store %376, -3.10645079612731933594f
- %377:ptr<storage, f32, read_write> = access %outputs, 374i, 0u
- store %377, -3.11046075820922851562f
- %378:ptr<storage, f32, read_write> = access %outputs, 375i, 0u
- store %378, -3.11382198333740234375f
- %379:ptr<storage, f32, read_write> = access %outputs, 376i, 0u
- store %379, -3.11666703224182128906f
- %380:ptr<storage, f32, read_write> = access %outputs, 377i, 0u
- store %380, -3.11909651756286621094f
- %381:ptr<storage, f32, read_write> = access %outputs, 378i, 0u
- store %381, -3.1211872100830078125f
- %382:ptr<storage, f32, read_write> = access %outputs, 379i, 0u
- store %382, -3.12299966812133789062f
- %383:ptr<storage, f32, read_write> = access %outputs, 380i, 0u
- store %383, -3.12458109855651855469f
- %384:ptr<storage, f32, read_write> = access %outputs, 381i, 0u
- store %384, -3.12596893310546875f
- %385:ptr<storage, f32, read_write> = access %outputs, 382i, 0u
- store %385, -3.12719368934631347656f
- %386:ptr<storage, f32, read_write> = access %outputs, 383i, 0u
- store %386, -3.12827992439270019531f
- %387:ptr<storage, f32, read_write> = access %outputs, 384i, 0u
- store %387, -3.1292476654052734375f
- %388:ptr<storage, f32, read_write> = access %outputs, 385i, 0u
- store %388, -3.1301136016845703125f
- %389:ptr<storage, f32, read_write> = access %outputs, 386i, 0u
- store %389, -3.13089156150817871094f
- %390:ptr<storage, f32, read_write> = access %outputs, 387i, 0u
- store %390, -3.13159298896789550781f
- %391:ptr<storage, f32, read_write> = access %outputs, 388i, 0u
- store %391, -3.13222765922546386719f
- %392:ptr<storage, f32, read_write> = access %outputs, 389i, 0u
- store %392, -3.13280391693115234375f
- %393:ptr<storage, f32, read_write> = access %outputs, 390i, 0u
- store %393, -3.13332843780517578125f
- %394:ptr<storage, f32, read_write> = access %outputs, 391i, 0u
- store %394, -3.13380742073059082031f
- %395:ptr<storage, f32, read_write> = access %outputs, 392i, 0u
- store %395, -3.13424587249755859375f
- %396:ptr<storage, f32, read_write> = access %outputs, 393i, 0u
- store %396, -3.13464832305908203125f
- %397:ptr<storage, f32, read_write> = access %outputs, 394i, 0u
- store %397, -3.13501858711242675781f
- %398:ptr<storage, f32, read_write> = access %outputs, 395i, 0u
- store %398, -3.13536000251770019531f
- %399:ptr<storage, f32, read_write> = access %outputs, 396i, 0u
- store %399, -3.13567566871643066406f
- %400:ptr<storage, f32, read_write> = access %outputs, 397i, 0u
- store %400, -3.13596773147583007812f
- %401:ptr<storage, f32, read_write> = access %outputs, 398i, 0u
- store %401, -3.13623881340026855469f
- %402:ptr<storage, f32, read_write> = access %outputs, 399i, 0u
- store %402, -3.13649058341979980469f
- %403:ptr<storage, f32, read_write> = access %outputs, 400i, 0u
- store %403, -3.13672518730163574219f
- %404:ptr<storage, f32, read_write> = access %outputs, 401i, 0u
- store %404, -3.136943817138671875f
- %405:ptr<storage, f32, read_write> = access %outputs, 402i, 0u
- store %405, -3.13714814186096191406f
- %406:ptr<storage, f32, read_write> = access %outputs, 403i, 0u
- store %406, -3.13733935356140136719f
- %407:ptr<storage, f32, read_write> = access %outputs, 404i, 0u
- store %407, -3.13751840591430664062f
- %408:ptr<storage, f32, read_write> = access %outputs, 405i, 0u
- store %408, -3.13768649101257324219f
- %409:ptr<storage, f32, read_write> = access %outputs, 406i, 0u
- store %409, -3.13784432411193847656f
- %410:ptr<storage, f32, read_write> = access %outputs, 407i, 0u
- store %410, -1.57079637050628662109f
- %411:ptr<storage, f32, read_write> = access %outputs, 408i, 0u
- store %411, -1.57079637050628662109f
- %412:ptr<storage, f32, read_write> = access %outputs, 409i, 0u
- store %412, -1.57079637050628662109f
- %413:ptr<storage, f32, read_write> = access %outputs, 410i, 0u
- store %413, -1.57079637050628662109f
- %414:ptr<storage, f32, read_write> = access %outputs, 411i, 0u
- store %414, -1.57079637050628662109f
- %415:ptr<storage, f32, read_write> = access %outputs, 412i, 0u
- store %415, -1.57079637050628662109f
- %416:ptr<storage, f32, read_write> = access %outputs, 413i, 0u
- store %416, -1.57079637050628662109f
- %417:ptr<storage, f32, read_write> = access %outputs, 414i, 0u
- store %417, -1.57079637050628662109f
- %418:ptr<storage, f32, read_write> = access %outputs, 415i, 0u
- store %418, -1.57079637050628662109f
- %419:ptr<storage, f32, read_write> = access %outputs, 416i, 0u
- store %419, -1.57079637050628662109f
- %420:ptr<storage, f32, read_write> = access %outputs, 417i, 0u
- store %420, -1.57079637050628662109f
- %421:ptr<storage, f32, read_write> = access %outputs, 418i, 0u
- store %421, -1.57079637050628662109f
- %422:ptr<storage, f32, read_write> = access %outputs, 419i, 0u
- store %422, -1.57079637050628662109f
- %423:ptr<storage, f32, read_write> = access %outputs, 420i, 0u
- store %423, -1.57079637050628662109f
- %424:ptr<storage, f32, read_write> = access %outputs, 421i, 0u
- store %424, -1.57079637050628662109f
- %425:ptr<storage, f32, read_write> = access %outputs, 422i, 0u
- store %425, -1.57079637050628662109f
- %426:ptr<storage, f32, read_write> = access %outputs, 423i, 0u
- store %426, -1.57079637050628662109f
- %427:ptr<storage, f32, read_write> = access %outputs, 424i, 0u
- store %427, -1.57079637050628662109f
- %428:ptr<storage, f32, read_write> = access %outputs, 425i, 0u
- store %428, -1.57079637050628662109f
- %429:ptr<storage, f32, read_write> = access %outputs, 426i, 0u
- store %429, -1.57079637050628662109f
- %430:ptr<storage, f32, read_write> = access %outputs, 427i, 0u
- store %430, -1.57079637050628662109f
- %431:ptr<storage, f32, read_write> = access %outputs, 428i, 0u
- store %431, -1.57079637050628662109f
- %432:ptr<storage, f32, read_write> = access %outputs, 429i, 0u
- store %432, -1.46013915538787841797f
- %433:ptr<storage, f32, read_write> = access %outputs, 430i, 0u
- store %433, -1.15257203578948974609f
- %434:ptr<storage, f32, read_write> = access %outputs, 431i, 0u
- store %434, -0.78539818525314331055f
- %435:ptr<storage, f32, read_write> = access %outputs, 432i, 0u
- store %435, -0.51238942146301269531f
- %436:ptr<storage, f32, read_write> = access %outputs, 433i, 0u
- store %436, -0.34555554389953613281f
- %437:ptr<storage, f32, read_write> = access %outputs, 434i, 0u
- store %437, -0.24497866630554199219f
- %438:ptr<storage, f32, read_write> = access %outputs, 435i, 0u
- store %438, -0.18164882063865661621f
- %439:ptr<storage, f32, read_write> = access %outputs, 436i, 0u
- store %439, -0.13970887660980224609f
- %440:ptr<storage, f32, read_write> = access %outputs, 437i, 0u
- store %440, -0.11065721511840820312f
- %441:ptr<storage, f32, read_write> = access %outputs, 438i, 0u
- store %441, -0.08975817263126373291f
- %442:ptr<storage, f32, read_write> = access %outputs, 439i, 0u
- store %442, -0.07424345612525939941f
- %443:ptr<storage, f32, read_write> = access %outputs, 440i, 0u
- store %443, -0.06241881102323532104f
- %444:ptr<storage, f32, read_write> = access %outputs, 441i, 0u
- store %444, -0.05320417881011962891f
- %445:ptr<storage, f32, read_write> = access %outputs, 442i, 0u
- store %445, -0.0458861328661441803f
- %446:ptr<storage, f32, read_write> = access %outputs, 443i, 0u
- store %446, -0.03997868672013282776f
- %447:ptr<storage, f32, read_write> = access %outputs, 444i, 0u
- store %447, -0.03514177724719047546f
- %448:ptr<storage, f32, read_write> = access %outputs, 445i, 0u
- store %448, -0.03113180585205554962f
- %449:ptr<storage, f32, read_write> = access %outputs, 446i, 0u
- store %449, -0.02777063474059104919f
- %450:ptr<storage, f32, read_write> = access %outputs, 447i, 0u
- store %450, -0.02492558397352695465f
- %451:ptr<storage, f32, read_write> = access %outputs, 448i, 0u
- store %451, -0.02249620296061038971f
- %452:ptr<storage, f32, read_write> = access %outputs, 449i, 0u
- store %452, -0.02040532976388931274f
- %453:ptr<storage, f32, read_write> = access %outputs, 450i, 0u
- store %453, -0.01859289966523647308f
- %454:ptr<storage, f32, read_write> = access %outputs, 451i, 0u
- store %454, -0.01701159216463565826f
- %455:ptr<storage, f32, read_write> = access %outputs, 452i, 0u
- store %455, -0.01562372874468564987f
- %456:ptr<storage, f32, read_write> = access %outputs, 453i, 0u
- store %456, -0.01439900510013103485f
- %457:ptr<storage, f32, read_write> = access %outputs, 454i, 0u
- store %457, -0.01331282313913106918f
- %458:ptr<storage, f32, read_write> = access %outputs, 455i, 0u
- store %458, -0.01234505139291286469f
- %459:ptr<storage, f32, read_write> = access %outputs, 456i, 0u
- store %459, -0.01147908717393875122f
- %460:ptr<storage, f32, read_write> = access %outputs, 457i, 0u
- store %460, -0.01070113759487867355f
- %461:ptr<storage, f32, read_write> = access %outputs, 458i, 0u
- store %461, -0.00999966636300086975f
- %462:ptr<storage, f32, read_write> = access %outputs, 459i, 0u
- store %462, -0.00936497095972299576f
- %463:ptr<storage, f32, read_write> = access %outputs, 460i, 0u
- store %463, -0.00878883618861436844f
- %464:ptr<storage, f32, read_write> = access %outputs, 461i, 0u
- store %464, -0.00826427433639764786f
- %465:ptr<storage, f32, read_write> = access %outputs, 462i, 0u
- store %465, -0.0077853095717728138f
- %466:ptr<storage, f32, read_write> = access %outputs, 463i, 0u
- store %466, -0.0073468061164021492f
- %467:ptr<storage, f32, read_write> = access %outputs, 464i, 0u
- store %467, -0.00694433273747563362f
- %468:ptr<storage, f32, read_write> = access %outputs, 465i, 0u
- store %468, -0.00657404679805040359f
- %469:ptr<storage, f32, read_write> = access %outputs, 466i, 0u
- store %469, -0.00623260624706745148f
- %470:ptr<storage, f32, read_write> = access %outputs, 467i, 0u
- store %470, -0.00591709045693278313f
- %471:ptr<storage, f32, read_write> = access %outputs, 468i, 0u
- store %471, -0.00562494015321135521f
- %472:ptr<storage, f32, read_write> = access %outputs, 469i, 0u
- store %472, -0.00535390479490160942f
- %473:ptr<storage, f32, read_write> = access %outputs, 470i, 0u
- store %473, -0.00510199647396802902f
- %474:ptr<storage, f32, read_write> = access %outputs, 471i, 0u
- store %474, -0.0048674573190510273f
- %475:ptr<storage, f32, read_write> = access %outputs, 472i, 0u
- store %475, -0.00464872689917683601f
- %476:ptr<storage, f32, read_write> = access %outputs, 473i, 0u
- store %476, -0.00444441521540284157f
- %477:ptr<storage, f32, read_write> = access %outputs, 474i, 0u
- store %477, -0.00425328267738223076f
- %478:ptr<storage, f32, read_write> = access %outputs, 475i, 0u
- store %478, -0.00407421914860606194f
- %479:ptr<storage, f32, read_write> = access %outputs, 476i, 0u
- store %479, -0.00390623020939528942f
- %480:ptr<storage, f32, read_write> = access %outputs, 477i, 0u
- store %480, -0.00374842062592506409f
- %481:ptr<storage, f32, read_write> = access %outputs, 478i, 0u
- store %481, -2.35619449615478515625f
- %482:ptr<storage, f32, read_write> = access %outputs, 479i, 0u
- store %482, -2.57227945327758789062f
- %483:ptr<storage, f32, read_write> = access %outputs, 480i, 0u
- store %483, -2.72336840629577636719f
- %484:ptr<storage, f32, read_write> = access %outputs, 481i, 0u
- store %484, -2.82597708702087402344f
- %485:ptr<storage, f32, read_write> = access %outputs, 482i, 0u
- store %485, -2.89661407470703125f
- %486:ptr<storage, f32, read_write> = access %outputs, 483i, 0u
- store %486, -2.94657230377197265625f
- %487:ptr<storage, f32, read_write> = access %outputs, 484i, 0u
- store %487, -2.98293733596801757812f
- %488:ptr<storage, f32, read_write> = access %outputs, 485i, 0u
- store %488, -3.01012396812438964844f
- %489:ptr<storage, f32, read_write> = access %outputs, 486i, 0u
- store %489, -3.03093552589416503906f
- %490:ptr<storage, f32, read_write> = access %outputs, 487i, 0u
- store %490, -3.04719948768615722656f
- %491:ptr<storage, f32, read_write> = access %outputs, 488i, 0u
- store %491, -3.0601406097412109375f
- %492:ptr<storage, f32, read_write> = access %outputs, 489i, 0u
- store %492, -3.07060098648071289062f
- %493:ptr<storage, f32, read_write> = access %outputs, 490i, 0u
- store %493, -3.07917380332946777344f
- %494:ptr<storage, f32, read_write> = access %outputs, 491i, 0u
- store %494, -3.08628582954406738281f
- %495:ptr<storage, f32, read_write> = access %outputs, 492i, 0u
- store %495, -3.09225010871887207031f
- %496:ptr<storage, f32, read_write> = access %outputs, 493i, 0u
- store %496, -3.09730029106140136719f
- %497:ptr<storage, f32, read_write> = access %outputs, 494i, 0u
- store %497, -3.1016139984130859375f
- %498:ptr<storage, f32, read_write> = access %outputs, 495i, 0u
- store %498, -3.10532736778259277344f
- %499:ptr<storage, f32, read_write> = access %outputs, 496i, 0u
- store %499, -3.10854673385620117188f
- %500:ptr<storage, f32, read_write> = access %outputs, 497i, 0u
- store %500, -3.11135601997375488281f
- %501:ptr<storage, f32, read_write> = access %outputs, 498i, 0u
- store %501, -3.11382198333740234375f
- %502:ptr<storage, f32, read_write> = access %outputs, 499i, 0u
- store %502, -3.11599826812744140625f
- %503:ptr<storage, f32, read_write> = access %outputs, 500i, 0u
- store %503, -3.11792850494384765625f
- %504:ptr<storage, f32, read_write> = access %outputs, 501i, 0u
- store %504, -3.11964821815490722656f
- %505:ptr<storage, f32, read_write> = access %outputs, 502i, 0u
- store %505, -3.1211872100830078125f
- %506:ptr<storage, f32, read_write> = access %outputs, 503i, 0u
- store %506, -3.122570037841796875f
- %507:ptr<storage, f32, read_write> = access %outputs, 504i, 0u
- store %507, -3.12381672859191894531f
- %508:ptr<storage, f32, read_write> = access %outputs, 505i, 0u
- store %508, -3.12494492530822753906f
- %509:ptr<storage, f32, read_write> = access %outputs, 506i, 0u
- store %509, -3.12596893310546875f
- %510:ptr<storage, f32, read_write> = access %outputs, 507i, 0u
- store %510, -3.12690138816833496094f
- %511:ptr<storage, f32, read_write> = access %outputs, 508i, 0u
- store %511, -3.12775278091430664062f
- %512:ptr<storage, f32, read_write> = access %outputs, 509i, 0u
- store %512, -3.12853217124938964844f
- %513:ptr<storage, f32, read_write> = access %outputs, 510i, 0u
- store %513, -3.1292476654052734375f
- %514:ptr<storage, f32, read_write> = access %outputs, 511i, 0u
- store %514, -3.12990593910217285156f
- %515:ptr<storage, f32, read_write> = access %outputs, 512i, 0u
- store %515, -3.13051271438598632812f
- %516:ptr<storage, f32, read_write> = access %outputs, 513i, 0u
- store %516, -3.13107371330261230469f
- %517:ptr<storage, f32, read_write> = access %outputs, 514i, 0u
- store %517, -3.13159298896789550781f
- %518:ptr<storage, f32, read_write> = access %outputs, 515i, 0u
- store %518, -3.13207483291625976562f
- %519:ptr<storage, f32, read_write> = access %outputs, 516i, 0u
- store %519, -3.1325225830078125f
- %520:ptr<storage, f32, read_write> = access %outputs, 517i, 0u
- store %520, -3.13293957710266113281f
- %521:ptr<storage, f32, read_write> = access %outputs, 518i, 0u
- store %521, -3.13332843780517578125f
- %522:ptr<storage, f32, read_write> = access %outputs, 519i, 0u
- store %522, -3.13369154930114746094f
- %523:ptr<storage, f32, read_write> = access %outputs, 520i, 0u
- store %523, -3.1340312957763671875f
- %524:ptr<storage, f32, read_write> = access %outputs, 521i, 0u
- store %524, -3.13434958457946777344f
- %525:ptr<storage, f32, read_write> = access %outputs, 522i, 0u
- store %525, -3.13464832305908203125f
- %526:ptr<storage, f32, read_write> = access %outputs, 523i, 0u
- store %526, -3.13492894172668457031f
- %527:ptr<storage, f32, read_write> = access %outputs, 524i, 0u
- store %527, -1.57079637050628662109f
- %528:ptr<storage, f32, read_write> = access %outputs, 525i, 0u
- store %528, -1.57079637050628662109f
- %529:ptr<storage, f32, read_write> = access %outputs, 526i, 0u
- store %529, -1.57079637050628662109f
- %530:ptr<storage, f32, read_write> = access %outputs, 527i, 0u
- store %530, -1.57079637050628662109f
- %531:ptr<storage, f32, read_write> = access %outputs, 528i, 0u
- store %531, -1.57079637050628662109f
- %532:ptr<storage, f32, read_write> = access %outputs, 529i, 0u
- store %532, -1.57079637050628662109f
- %533:ptr<storage, f32, read_write> = access %outputs, 530i, 0u
- store %533, -1.57079637050628662109f
- %534:ptr<storage, f32, read_write> = access %outputs, 531i, 0u
- store %534, -1.57079637050628662109f
- %535:ptr<storage, f32, read_write> = access %outputs, 532i, 0u
- store %535, -1.57079637050628662109f
- %536:ptr<storage, f32, read_write> = access %outputs, 533i, 0u
- store %536, -1.57079637050628662109f
- %537:ptr<storage, f32, read_write> = access %outputs, 534i, 0u
- store %537, -1.57079637050628662109f
- %538:ptr<storage, f32, read_write> = access %outputs, 535i, 0u
- store %538, -1.57079637050628662109f
- %539:ptr<storage, f32, read_write> = access %outputs, 536i, 0u
- store %539, -1.57079637050628662109f
- %540:ptr<storage, f32, read_write> = access %outputs, 537i, 0u
- store %540, -1.57079637050628662109f
- %541:ptr<storage, f32, read_write> = access %outputs, 538i, 0u
- store %541, -1.57079637050628662109f
- %542:ptr<storage, f32, read_write> = access %outputs, 539i, 0u
- store %542, -1.57079637050628662109f
- %543:ptr<storage, f32, read_write> = access %outputs, 540i, 0u
- store %543, -1.57079637050628662109f
- %544:ptr<storage, f32, read_write> = access %outputs, 541i, 0u
- store %544, -1.57079637050628662109f
- %545:ptr<storage, f32, read_write> = access %outputs, 542i, 0u
- store %545, -1.57079637050628662109f
- %546:ptr<storage, f32, read_write> = access %outputs, 543i, 0u
- store %546, -1.57079637050628662109f
- %547:ptr<storage, f32, read_write> = access %outputs, 544i, 0u
- store %547, -1.57079637050628662109f
- %548:ptr<storage, f32, read_write> = access %outputs, 545i, 0u
- store %548, -1.57079637050628662109f
- %549:ptr<storage, f32, read_write> = access %outputs, 546i, 0u
- store %549, -1.50837755203247070312f
- %550:ptr<storage, f32, read_write> = access %outputs, 547i, 0u
- store %550, -1.32581770420074462891f
- %551:ptr<storage, f32, read_write> = access %outputs, 548i, 0u
- store %551, -1.058406829833984375f
- %552:ptr<storage, f32, read_write> = access %outputs, 549i, 0u
- store %552, -0.78539818525314331055f
- %553:ptr<storage, f32, read_write> = access %outputs, 550i, 0u
- store %553, -0.56931316852569580078f
- %554:ptr<storage, f32, read_write> = access %outputs, 551i, 0u
- store %554, -0.418224334716796875f
- %555:ptr<storage, f32, read_write> = access %outputs, 552i, 0u
- store %555, -0.31561565399169921875f
- %556:ptr<storage, f32, read_write> = access %outputs, 553i, 0u
- store %556, -0.24497866630554199219f
- %557:ptr<storage, f32, read_write> = access %outputs, 554i, 0u
- store %557, -0.19502025842666625977f
- %558:ptr<storage, f32, read_write> = access %outputs, 555i, 0u
- store %558, -0.15865525603294372559f
- %559:ptr<storage, f32, read_write> = access %outputs, 556i, 0u
- store %559, -0.13146869838237762451f
- %560:ptr<storage, f32, read_write> = access %outputs, 557i, 0u
- store %560, -0.11065722256898880005f
- %561:ptr<storage, f32, read_write> = access %outputs, 558i, 0u
- store %561, -0.09439320117235183716f
- %562:ptr<storage, f32, read_write> = access %outputs, 559i, 0u
- store %562, -0.0814520418643951416f
- %563:ptr<storage, f32, read_write> = access %outputs, 560i, 0u
- store %563, -0.07099160552024841309f
- %564:ptr<storage, f32, read_write> = access %outputs, 561i, 0u
- store %564, -0.06241881102323532104f
- %565:ptr<storage, f32, read_write> = access %outputs, 562i, 0u
- store %565, -0.05530686303973197937f
- %566:ptr<storage, f32, read_write> = access %outputs, 563i, 0u
- store %566, -0.04934263229370117188f
- %567:ptr<storage, f32, read_write> = access %outputs, 564i, 0u
- store %567, -0.0442923419177532196f
- %568:ptr<storage, f32, read_write> = access %outputs, 565i, 0u
- store %568, -0.03997868672013282776f
- %569:ptr<storage, f32, read_write> = access %outputs, 566i, 0u
- store %569, -0.03626527264714241028f
- %570:ptr<storage, f32, read_write> = access %outputs, 567i, 0u
- store %570, -0.03304581716656684875f
- %571:ptr<storage, f32, read_write> = access %outputs, 568i, 0u
- store %571, -0.03023652918636798859f
- %572:ptr<storage, f32, read_write> = access %outputs, 569i, 0u
- store %572, -0.02777063660323619843f
- %573:ptr<storage, f32, read_write> = access %outputs, 570i, 0u
- store %573, -0.02559441141784191132f
- %574:ptr<storage, f32, read_write> = access %outputs, 571i, 0u
- store %574, -0.02366422116756439209f
- %575:ptr<storage, f32, read_write> = access %outputs, 572i, 0u
- store %575, -0.02194435149431228638f
- %576:ptr<storage, f32, read_write> = access %outputs, 573i, 0u
- store %576, -0.02040532976388931274f
- %577:ptr<storage, f32, read_write> = access %outputs, 574i, 0u
- store %577, -0.01902267523109912872f
- %578:ptr<storage, f32, read_write> = access %outputs, 575i, 0u
- store %578, -0.01777590438723564148f
- %579:ptr<storage, f32, read_write> = access %outputs, 576i, 0u
- store %579, -0.01664778590202331543f
- %580:ptr<storage, f32, read_write> = access %outputs, 577i, 0u
- store %580, -0.01562372874468564987f
- %581:ptr<storage, f32, read_write> = access %outputs, 578i, 0u
- store %581, -0.01469132117927074432f
- %582:ptr<storage, f32, read_write> = access %outputs, 579i, 0u
- store %582, -0.01383994705975055695f
- %583:ptr<storage, f32, read_write> = access %outputs, 580i, 0u
- store %583, -0.01306048128753900528f
- %584:ptr<storage, f32, read_write> = access %outputs, 581i, 0u
- store %584, -0.01234505139291286469f
- %585:ptr<storage, f32, read_write> = access %outputs, 582i, 0u
- store %585, -0.0116868307814002037f
- %586:ptr<storage, f32, read_write> = access %outputs, 583i, 0u
- store %586, -0.0110798785462975502f
- %587:ptr<storage, f32, read_write> = access %outputs, 584i, 0u
- store %587, -0.01051900628954172134f
- %588:ptr<storage, f32, read_write> = access %outputs, 585i, 0u
- store %588, -0.00999966636300086975f
- %589:ptr<storage, f32, read_write> = access %outputs, 586i, 0u
- store %589, -0.0095178559422492981f
- %590:ptr<storage, f32, read_write> = access %outputs, 587i, 0u
- store %590, -0.00907004624605178833f
- %591:ptr<storage, f32, read_write> = access %outputs, 588i, 0u
- store %591, -0.00865310989320278168f
- %592:ptr<storage, f32, read_write> = access %outputs, 589i, 0u
- store %592, -0.00826427526772022247f
- %593:ptr<storage, f32, read_write> = access %outputs, 590i, 0u
- store %593, -0.00790107063949108124f
- %594:ptr<storage, f32, read_write> = access %outputs, 591i, 0u
- store %594, -0.00756129296496510506f
- %595:ptr<storage, f32, read_write> = access %outputs, 592i, 0u
- store %595, -0.00724296970292925835f
- %596:ptr<storage, f32, read_write> = access %outputs, 593i, 0u
- store %596, -0.00694433273747563362f
- %597:ptr<storage, f32, read_write> = access %outputs, 594i, 0u
- store %597, -0.00666379136964678764f
- %598:ptr<storage, f32, read_write> = access %outputs, 595i, 0u
- store %598, -2.35619449615478515625f
- %599:ptr<storage, f32, read_write> = access %outputs, 596i, 0u
- store %599, -2.5346050262451171875f
- %600:ptr<storage, f32, read_write> = access %outputs, 597i, 0u
- store %600, -2.6698150634765625f
- %601:ptr<storage, f32, read_write> = access %outputs, 598i, 0u
- store %601, -2.76919412612915039062f
- %602:ptr<storage, f32, read_write> = access %outputs, 599i, 0u
- store %602, -2.84222650527954101562f
- %603:ptr<storage, f32, read_write> = access %outputs, 600i, 0u
- store %603, -2.89661407470703125f
- %604:ptr<storage, f32, read_write> = access %outputs, 601i, 0u
- store %604, -2.93784785270690917969f
- %605:ptr<storage, f32, read_write> = access %outputs, 602i, 0u
- store %605, -2.96969485282897949219f
- %606:ptr<storage, f32, read_write> = access %outputs, 603i, 0u
- store %606, -2.99472880363464355469f
- %607:ptr<storage, f32, read_write> = access %outputs, 604i, 0u
- store %607, -3.0147266387939453125f
- %608:ptr<storage, f32, read_write> = access %outputs, 605i, 0u
- store %608, -3.03093552589416503906f
- %609:ptr<storage, f32, read_write> = access %outputs, 606i, 0u
- store %609, -3.04424500465393066406f
- %610:ptr<storage, f32, read_write> = access %outputs, 607i, 0u
- store %610, -3.05530238151550292969f
- %611:ptr<storage, f32, read_write> = access %outputs, 608i, 0u
- store %611, -3.0645847320556640625f
- %612:ptr<storage, f32, read_write> = access %outputs, 609i, 0u
- store %612, -3.07245087623596191406f
- %613:ptr<storage, f32, read_write> = access %outputs, 610i, 0u
- store %613, -3.07917380332946777344f
- %614:ptr<storage, f32, read_write> = access %outputs, 611i, 0u
- store %614, -3.08496403694152832031f
- %615:ptr<storage, f32, read_write> = access %outputs, 612i, 0u
- store %615, -3.08998560905456542969f
- %616:ptr<storage, f32, read_write> = access %outputs, 613i, 0u
- store %616, -3.09436869621276855469f
- %617:ptr<storage, f32, read_write> = access %outputs, 614i, 0u
- store %617, -3.098217010498046875f
- %618:ptr<storage, f32, read_write> = access %outputs, 615i, 0u
- store %618, -3.1016139984130859375f
- %619:ptr<storage, f32, read_write> = access %outputs, 616i, 0u
- store %619, -3.10462713241577148438f
- %620:ptr<storage, f32, read_write> = access %outputs, 617i, 0u
- store %620, -3.10731244087219238281f
- %621:ptr<storage, f32, read_write> = access %outputs, 618i, 0u
- store %621, -3.10971570014953613281f
- %622:ptr<storage, f32, read_write> = access %outputs, 619i, 0u
- store %622, -3.11187481880187988281f
- %623:ptr<storage, f32, read_write> = access %outputs, 620i, 0u
- store %623, -3.11382198333740234375f
- %624:ptr<storage, f32, read_write> = access %outputs, 621i, 0u
- store %624, -3.11558389663696289062f
- %625:ptr<storage, f32, read_write> = access %outputs, 622i, 0u
- store %625, -3.11718344688415527344f
- %626:ptr<storage, f32, read_write> = access %outputs, 623i, 0u
- store %626, -3.11863994598388671875f
- %627:ptr<storage, f32, read_write> = access %outputs, 624i, 0u
- store %627, -3.11996984481811523438f
- %628:ptr<storage, f32, read_write> = access %outputs, 625i, 0u
- store %628, -3.1211872100830078125f
- %629:ptr<storage, f32, read_write> = access %outputs, 626i, 0u
- store %629, -3.1223049163818359375f
- %630:ptr<storage, f32, read_write> = access %outputs, 627i, 0u
- store %630, -3.12333321571350097656f
- %631:ptr<storage, f32, read_write> = access %outputs, 628i, 0u
- store %631, -3.12428140640258789062f
- %632:ptr<storage, f32, read_write> = access %outputs, 629i, 0u
- store %632, -3.12515759468078613281f
- %633:ptr<storage, f32, read_write> = access %outputs, 630i, 0u
- store %633, -3.12596893310546875f
- %634:ptr<storage, f32, read_write> = access %outputs, 631i, 0u
- store %634, -3.12672162055969238281f
- %635:ptr<storage, f32, read_write> = access %outputs, 632i, 0u
- store %635, -3.12742137908935546875f
- %636:ptr<storage, f32, read_write> = access %outputs, 633i, 0u
- store %636, -3.1280727386474609375f
- %637:ptr<storage, f32, read_write> = access %outputs, 634i, 0u
- store %637, -3.12868022918701171875f
- %638:ptr<storage, f32, read_write> = access %outputs, 635i, 0u
- store %638, -3.1292476654052734375f
- %639:ptr<storage, f32, read_write> = access %outputs, 636i, 0u
- store %639, -3.12977838516235351562f
- %640:ptr<storage, f32, read_write> = access %outputs, 637i, 0u
- store %640, -3.130275726318359375f
- %641:ptr<storage, f32, read_write> = access %outputs, 638i, 0u
- store %641, -3.13074231147766113281f
- %642:ptr<storage, f32, read_write> = access %outputs, 639i, 0u
- store %642, -3.13118076324462890625f
- %643:ptr<storage, f32, read_write> = access %outputs, 640i, 0u
- store %643, -1.57079637050628662109f
- %644:ptr<storage, f32, read_write> = access %outputs, 641i, 0u
- store %644, -1.57079637050628662109f
- %645:ptr<storage, f32, read_write> = access %outputs, 642i, 0u
- store %645, -1.57079637050628662109f
- %646:ptr<storage, f32, read_write> = access %outputs, 643i, 0u
- store %646, -1.57079637050628662109f
- %647:ptr<storage, f32, read_write> = access %outputs, 644i, 0u
- store %647, -1.57079637050628662109f
- %648:ptr<storage, f32, read_write> = access %outputs, 645i, 0u
- store %648, -1.57079637050628662109f
- %649:ptr<storage, f32, read_write> = access %outputs, 646i, 0u
- store %649, -1.57079637050628662109f
- %650:ptr<storage, f32, read_write> = access %outputs, 647i, 0u
- store %650, -1.57079637050628662109f
- %651:ptr<storage, f32, read_write> = access %outputs, 648i, 0u
- store %651, -1.57079637050628662109f
- %652:ptr<storage, f32, read_write> = access %outputs, 649i, 0u
- store %652, -1.57079637050628662109f
- %653:ptr<storage, f32, read_write> = access %outputs, 650i, 0u
- store %653, -1.57079637050628662109f
- %654:ptr<storage, f32, read_write> = access %outputs, 651i, 0u
- store %654, -1.57079637050628662109f
- %655:ptr<storage, f32, read_write> = access %outputs, 652i, 0u
- store %655, -1.57079637050628662109f
- %656:ptr<storage, f32, read_write> = access %outputs, 653i, 0u
- store %656, -1.57079637050628662109f
- %657:ptr<storage, f32, read_write> = access %outputs, 654i, 0u
- store %657, -1.57079637050628662109f
- %658:ptr<storage, f32, read_write> = access %outputs, 655i, 0u
- store %658, -1.57079637050628662109f
- %659:ptr<storage, f32, read_write> = access %outputs, 656i, 0u
- store %659, -1.57079637050628662109f
- %660:ptr<storage, f32, read_write> = access %outputs, 657i, 0u
- store %660, -1.57079637050628662109f
- %661:ptr<storage, f32, read_write> = access %outputs, 658i, 0u
- store %661, -1.57079637050628662109f
- %662:ptr<storage, f32, read_write> = access %outputs, 659i, 0u
- store %662, -1.57079637050628662109f
- %663:ptr<storage, f32, read_write> = access %outputs, 660i, 0u
- store %663, -1.57079637050628662109f
- %664:ptr<storage, f32, read_write> = access %outputs, 661i, 0u
- store %664, -1.57079637050628662109f
- %665:ptr<storage, f32, read_write> = access %outputs, 662i, 0u
- store %665, -1.53081762790679931641f
- %666:ptr<storage, f32, read_write> = access %outputs, 663i, 0u
- store %666, -1.41214108467102050781f
- %667:ptr<storage, f32, read_write> = access %outputs, 664i, 0u
- store %667, -1.22524082660675048828f
- %668:ptr<storage, f32, read_write> = access %outputs, 665i, 0u
- store %668, -1.00148320198059082031f
- %669:ptr<storage, f32, read_write> = access %outputs, 666i, 0u
- store %669, -0.78539818525314331055f
- %670:ptr<storage, f32, read_write> = access %outputs, 667i, 0u
- store %670, -0.60698771476745605469f
- %671:ptr<storage, f32, read_write> = access %outputs, 668i, 0u
- store %671, -0.47177752852439880371f
- %672:ptr<storage, f32, read_write> = access %outputs, 669i, 0u
- store %672, -0.37239846587181091309f
- %673:ptr<storage, f32, read_write> = access %outputs, 670i, 0u
- store %673, -0.29936623573303222656f
- %674:ptr<storage, f32, read_write> = access %outputs, 671i, 0u
- store %674, -0.24497866630554199219f
- %675:ptr<storage, f32, read_write> = access %outputs, 672i, 0u
- store %675, -0.20374469459056854248f
- %676:ptr<storage, f32, read_write> = access %outputs, 673i, 0u
- store %676, -0.17189773917198181152f
- %677:ptr<storage, f32, read_write> = access %outputs, 674i, 0u
- store %677, -0.1468639075756072998f
- %678:ptr<storage, f32, read_write> = access %outputs, 675i, 0u
- store %678, -0.12686598300933837891f
- %679:ptr<storage, f32, read_write> = access %outputs, 676i, 0u
- store %679, -0.11065722256898880005f
- %680:ptr<storage, f32, read_write> = access %outputs, 677i, 0u
- store %680, -0.09734757989645004272f
- %681:ptr<storage, f32, read_write> = access %outputs, 678i, 0u
- store %681, -0.08629038184881210327f
- %682:ptr<storage, f32, read_write> = access %outputs, 679i, 0u
- store %682, -0.07700791209936141968f
- %683:ptr<storage, f32, read_write> = access %outputs, 680i, 0u
- store %683, -0.06914168596267700195f
- %684:ptr<storage, f32, read_write> = access %outputs, 681i, 0u
- store %684, -0.06241881102323532104f
- %685:ptr<storage, f32, read_write> = access %outputs, 682i, 0u
- store %685, -0.05662873387336730957f
- %686:ptr<storage, f32, read_write> = access %outputs, 683i, 0u
- store %686, -0.05160703137516975403f
- %687:ptr<storage, f32, read_write> = access %outputs, 684i, 0u
- store %687, -0.04722384735941886902f
- %688:ptr<storage, f32, read_write> = access %outputs, 685i, 0u
- store %688, -0.04337555542588233948f
- %689:ptr<storage, f32, read_write> = access %outputs, 686i, 0u
- store %689, -0.03997869044542312622f
- %690:ptr<storage, f32, read_write> = access %outputs, 687i, 0u
- store %690, -0.03696540370583534241f
- %691:ptr<storage, f32, read_write> = access %outputs, 688i, 0u
- store %691, -0.0342801213264465332f
- %692:ptr<storage, f32, read_write> = access %outputs, 689i, 0u
- store %692, -0.03187695518136024475f
- %693:ptr<storage, f32, read_write> = access %outputs, 690i, 0u
- store %693, -0.02971776574850082397f
- %694:ptr<storage, f32, read_write> = access %outputs, 691i, 0u
- store %694, -0.02777063660323619843f
- %695:ptr<storage, f32, read_write> = access %outputs, 692i, 0u
- store %695, -0.02600870281457901001f
- %696:ptr<storage, f32, read_write> = access %outputs, 693i, 0u
- store %696, -0.02440921403467655182f
- %697:ptr<storage, f32, read_write> = access %outputs, 694i, 0u
- store %697, -0.02295281179249286652f
- %698:ptr<storage, f32, read_write> = access %outputs, 695i, 0u
- store %698, -0.02162292785942554474f
- %699:ptr<storage, f32, read_write> = access %outputs, 696i, 0u
- store %699, -0.02040532976388931274f
- %700:ptr<storage, f32, read_write> = access %outputs, 697i, 0u
- store %700, -0.01928773149847984314f
- %701:ptr<storage, f32, read_write> = access %outputs, 698i, 0u
- store %701, -0.01825947687029838562f
- %702:ptr<storage, f32, read_write> = access %outputs, 699i, 0u
- store %702, -0.01731128990650177002f
- %703:ptr<storage, f32, read_write> = access %outputs, 700i, 0u
- store %703, -0.0164350755512714386f
- %704:ptr<storage, f32, read_write> = access %outputs, 701i, 0u
- store %704, -0.01562372874468564987f
- %705:ptr<storage, f32, read_write> = access %outputs, 702i, 0u
- store %705, -0.01487100403755903244f
- %706:ptr<storage, f32, read_write> = access %outputs, 703i, 0u
- store %706, -0.01417138706892728806f
- %707:ptr<storage, f32, read_write> = access %outputs, 704i, 0u
- store %707, -0.01351999863982200623f
- %708:ptr<storage, f32, read_write> = access %outputs, 705i, 0u
- store %708, -0.01291250623762607574f
- %709:ptr<storage, f32, read_write> = access %outputs, 706i, 0u
- store %709, -0.0123450523242354393f
- %710:ptr<storage, f32, read_write> = access %outputs, 707i, 0u
- store %710, -0.0118141956627368927f
- %711:ptr<storage, f32, read_write> = access %outputs, 708i, 0u
- store %711, -0.01131685543805360794f
- %712:ptr<storage, f32, read_write> = access %outputs, 709i, 0u
- store %712, -0.01085026934742927551f
- %713:ptr<storage, f32, read_write> = access %outputs, 710i, 0u
- store %713, -0.01041195262223482132f
- %714:ptr<storage, f32, read_write> = access %outputs, 711i, 0u
- store %714, -2.35619449615478515625f
- %715:ptr<storage, f32, read_write> = access %outputs, 712i, 0u
- store %715, -2.50795960426330566406f
- %716:ptr<storage, f32, read_write> = access %outputs, 713i, 0u
- store %716, -2.62920331954956054688f
- %717:ptr<storage, f32, read_write> = access %outputs, 714i, 0u
- store %717, -2.72336840629577636719f
- %718:ptr<storage, f32, read_write> = access %outputs, 715i, 0u
- store %718, -2.79603719711303710938f
- %719:ptr<storage, f32, read_write> = access %outputs, 716i, 0u
- store %719, -2.85241198539733886719f
- %720:ptr<storage, f32, read_write> = access %outputs, 717i, 0u
- store %720, -2.89661407470703125f
- %721:ptr<storage, f32, read_write> = access %outputs, 718i, 0u
- store %721, -2.93171191215515136719f
- %722:ptr<storage, f32, read_write> = access %outputs, 719i, 0u
- store %722, -2.9599437713623046875f
- %723:ptr<storage, f32, read_write> = access %outputs, 720i, 0u
- store %723, -2.98293733596801757812f
- %724:ptr<storage, f32, read_write> = access %outputs, 721i, 0u
- store %724, -3.00188374519348144531f
- %725:ptr<storage, f32, read_write> = access %outputs, 722i, 0u
- store %725, -3.01766347885131835938f
- %726:ptr<storage, f32, read_write> = access %outputs, 723i, 0u
- store %726, -3.03093552589416503906f
- %727:ptr<storage, f32, read_write> = access %outputs, 724i, 0u
- store %727, -3.04219818115234375f
- %728:ptr<storage, f32, read_write> = access %outputs, 725i, 0u
- store %728, -3.05183458328247070312f
- %729:ptr<storage, f32, read_write> = access %outputs, 726i, 0u
- store %729, -3.0601406097412109375f
- %730:ptr<storage, f32, read_write> = access %outputs, 727i, 0u
- store %730, -3.06734919548034667969f
- %731:ptr<storage, f32, read_write> = access %outputs, 728i, 0u
- store %731, -3.07364439964294433594f
- %732:ptr<storage, f32, read_write> = access %outputs, 729i, 0u
- store %732, -3.07917380332946777344f
- %733:ptr<storage, f32, read_write> = access %outputs, 730i, 0u
- store %733, -3.08405613899230957031f
- %734:ptr<storage, f32, read_write> = access %outputs, 731i, 0u
- store %734, -3.0883884429931640625f
- %735:ptr<storage, f32, read_write> = access %outputs, 732i, 0u
- store %735, -3.09225010871887207031f
- %736:ptr<storage, f32, read_write> = access %outputs, 733i, 0u
- store %736, -3.09570646286010742188f
- %737:ptr<storage, f32, read_write> = access %outputs, 734i, 0u
- store %737, -3.09881258010864257812f
- %738:ptr<storage, f32, read_write> = access %outputs, 735i, 0u
- store %738, -3.1016139984130859375f
- %739:ptr<storage, f32, read_write> = access %outputs, 736i, 0u
- store %739, -3.10414910316467285156f
- %740:ptr<storage, f32, read_write> = access %outputs, 737i, 0u
- store %740, -3.10645079612731933594f
- %741:ptr<storage, f32, read_write> = access %outputs, 738i, 0u
- store %741, -3.10854673385620117188f
- %742:ptr<storage, f32, read_write> = access %outputs, 739i, 0u
- store %742, -3.11046075820922851562f
- %743:ptr<storage, f32, read_write> = access %outputs, 740i, 0u
- store %743, -3.11221337318420410156f
- %744:ptr<storage, f32, read_write> = access %outputs, 741i, 0u
- store %744, -3.11382198333740234375f
- %745:ptr<storage, f32, read_write> = access %outputs, 742i, 0u
- store %745, -3.11530208587646484375f
- %746:ptr<storage, f32, read_write> = access %outputs, 743i, 0u
- store %746, -3.11666703224182128906f
- %747:ptr<storage, f32, read_write> = access %outputs, 744i, 0u
- store %747, -3.11792850494384765625f
- %748:ptr<storage, f32, read_write> = access %outputs, 745i, 0u
- store %748, -3.11909651756286621094f
- %749:ptr<storage, f32, read_write> = access %outputs, 746i, 0u
- store %749, -3.1201801300048828125f
- %750:ptr<storage, f32, read_write> = access %outputs, 747i, 0u
- store %750, -3.1211872100830078125f
- %751:ptr<storage, f32, read_write> = access %outputs, 748i, 0u
- store %751, -3.12212514877319335938f
- %752:ptr<storage, f32, read_write> = access %outputs, 749i, 0u
- store %752, -3.12299966812133789062f
- %753:ptr<storage, f32, read_write> = access %outputs, 750i, 0u
- store %753, -3.12381672859191894531f
- %754:ptr<storage, f32, read_write> = access %outputs, 751i, 0u
- store %754, -3.12458109855651855469f
- %755:ptr<storage, f32, read_write> = access %outputs, 752i, 0u
- store %755, -3.12529706954956054688f
- %756:ptr<storage, f32, read_write> = access %outputs, 753i, 0u
- store %756, -3.12596893310546875f
- %757:ptr<storage, f32, read_write> = access %outputs, 754i, 0u
- store %757, -3.12660002708435058594f
- %758:ptr<storage, f32, read_write> = access %outputs, 755i, 0u
- store %758, -1.57079637050628662109f
- %759:ptr<storage, f32, read_write> = access %outputs, 756i, 0u
- store %759, -1.57079637050628662109f
- %760:ptr<storage, f32, read_write> = access %outputs, 757i, 0u
- store %760, -1.57079637050628662109f
- %761:ptr<storage, f32, read_write> = access %outputs, 758i, 0u
- store %761, -1.57079637050628662109f
- %762:ptr<storage, f32, read_write> = access %outputs, 759i, 0u
- store %762, -1.57079637050628662109f
- %763:ptr<storage, f32, read_write> = access %outputs, 760i, 0u
- store %763, -1.57079637050628662109f
- %764:ptr<storage, f32, read_write> = access %outputs, 761i, 0u
- store %764, -1.57079637050628662109f
- %765:ptr<storage, f32, read_write> = access %outputs, 762i, 0u
- store %765, -1.57079637050628662109f
- %766:ptr<storage, f32, read_write> = access %outputs, 763i, 0u
- store %766, -1.57079637050628662109f
- %767:ptr<storage, f32, read_write> = access %outputs, 764i, 0u
- store %767, -1.57079637050628662109f
- %768:ptr<storage, f32, read_write> = access %outputs, 765i, 0u
- store %768, -1.57079637050628662109f
- %769:ptr<storage, f32, read_write> = access %outputs, 766i, 0u
- store %769, -1.57079637050628662109f
- %770:ptr<storage, f32, read_write> = access %outputs, 767i, 0u
- store %770, -1.57079637050628662109f
- %771:ptr<storage, f32, read_write> = access %outputs, 768i, 0u
- store %771, -1.57079637050628662109f
- %772:ptr<storage, f32, read_write> = access %outputs, 769i, 0u
- store %772, -1.57079637050628662109f
- %773:ptr<storage, f32, read_write> = access %outputs, 770i, 0u
- store %773, -1.57079637050628662109f
- %774:ptr<storage, f32, read_write> = access %outputs, 771i, 0u
- store %774, -1.57079637050628662109f
- %775:ptr<storage, f32, read_write> = access %outputs, 772i, 0u
- store %775, -1.57079637050628662109f
- %776:ptr<storage, f32, read_write> = access %outputs, 773i, 0u
- store %776, -1.57079637050628662109f
- %777:ptr<storage, f32, read_write> = access %outputs, 774i, 0u
- store %777, -1.57079637050628662109f
- %778:ptr<storage, f32, read_write> = access %outputs, 775i, 0u
- store %778, -1.57079637050628662109f
- %779:ptr<storage, f32, read_write> = access %outputs, 776i, 0u
- store %779, -1.57079637050628662109f
- %780:ptr<storage, f32, read_write> = access %outputs, 777i, 0u
- store %780, -1.54302573204040527344f
- %781:ptr<storage, f32, read_write> = access %outputs, 778i, 0u
- store %781, -1.46013915538787841797f
- %782:ptr<storage, f32, read_write> = access %outputs, 779i, 0u
- store %782, -1.32581770420074462891f
- %783:ptr<storage, f32, read_write> = access %outputs, 780i, 0u
- store %783, -1.15257203578948974609f
- %784:ptr<storage, f32, read_write> = access %outputs, 781i, 0u
- store %784, -0.96380865573883056641f
- %785:ptr<storage, f32, read_write> = access %outputs, 782i, 0u
- store %785, -0.78539818525314331055f
- %786:ptr<storage, f32, read_write> = access %outputs, 783i, 0u
- store %786, -0.63363301753997802734f
- %787:ptr<storage, f32, read_write> = access %outputs, 784i, 0u
- store %787, -0.51238942146301269531f
- %788:ptr<storage, f32, read_write> = access %outputs, 785i, 0u
- store %788, -0.4182243049144744873f
- %789:ptr<storage, f32, read_write> = access %outputs, 786i, 0u
- store %789, -0.34555554389953613281f
- %790:ptr<storage, f32, read_write> = access %outputs, 787i, 0u
- store %790, -0.28918060660362243652f
- %791:ptr<storage, f32, read_write> = access %outputs, 788i, 0u
- store %791, -0.24497866630554199219f
- %792:ptr<storage, f32, read_write> = access %outputs, 789i, 0u
- store %792, -0.20988072454929351807f
- %793:ptr<storage, f32, read_write> = access %outputs, 790i, 0u
- store %793, -0.18164882063865661621f
- %794:ptr<storage, f32, read_write> = access %outputs, 791i, 0u
- store %794, -0.15865525603294372559f
- %795:ptr<storage, f32, read_write> = access %outputs, 792i, 0u
- store %795, -0.13970887660980224609f
- %796:ptr<storage, f32, read_write> = access %outputs, 793i, 0u
- store %796, -0.12392909824848175049f
- %797:ptr<storage, f32, read_write> = access %outputs, 794i, 0u
- store %797, -0.11065721511840820312f
- %798:ptr<storage, f32, read_write> = access %outputs, 795i, 0u
- store %798, -0.09939437359571456909f
- %799:ptr<storage, f32, read_write> = access %outputs, 796i, 0u
- store %799, -0.08975817263126373291f
- %800:ptr<storage, f32, read_write> = access %outputs, 797i, 0u
- store %800, -0.0814520418643951416f
- %801:ptr<storage, f32, read_write> = access %outputs, 798i, 0u
- store %801, -0.07424345612525939941f
- %802:ptr<storage, f32, read_write> = access %outputs, 799i, 0u
- store %802, -0.067948170006275177f
- %803:ptr<storage, f32, read_write> = access %outputs, 800i, 0u
- store %803, -0.06241881102323532104f
- %804:ptr<storage, f32, read_write> = access %outputs, 801i, 0u
- store %804, -0.05753642693161964417f
- %805:ptr<storage, f32, read_write> = access %outputs, 802i, 0u
- store %805, -0.05320417881011962891f
- %806:ptr<storage, f32, read_write> = access %outputs, 803i, 0u
- store %806, -0.04934263229370117188f
- %807:ptr<storage, f32, read_write> = access %outputs, 804i, 0u
- store %807, -0.0458861328661441803f
- %808:ptr<storage, f32, read_write> = access %outputs, 805i, 0u
- store %808, -0.04278006777167320251f
- %809:ptr<storage, f32, read_write> = access %outputs, 806i, 0u
- store %809, -0.03997868672013282776f
- %810:ptr<storage, f32, read_write> = access %outputs, 807i, 0u
- store %810, -0.03744347020983695984f
- %811:ptr<storage, f32, read_write> = access %outputs, 808i, 0u
- store %811, -0.03514177724719047546f
- %812:ptr<storage, f32, read_write> = access %outputs, 809i, 0u
- store %812, -0.03304581716656684875f
- %813:ptr<storage, f32, read_write> = access %outputs, 810i, 0u
- store %813, -0.03113180585205554962f
- %814:ptr<storage, f32, read_write> = access %outputs, 811i, 0u
- store %814, -0.02937929704785346985f
- %815:ptr<storage, f32, read_write> = access %outputs, 812i, 0u
- store %815, -0.02777063474059104919f
- %816:ptr<storage, f32, read_write> = access %outputs, 813i, 0u
- store %816, -0.02629050798714160919f
- %817:ptr<storage, f32, read_write> = access %outputs, 814i, 0u
- store %817, -0.02492558397352695465f
- %818:ptr<storage, f32, read_write> = access %outputs, 815i, 0u
- store %818, -0.02366421930491924286f
- %819:ptr<storage, f32, read_write> = access %outputs, 816i, 0u
- store %819, -0.02249620296061038971f
- %820:ptr<storage, f32, read_write> = access %outputs, 817i, 0u
- store %820, -0.02141254954040050507f
- %821:ptr<storage, f32, read_write> = access %outputs, 818i, 0u
- store %821, -0.02040532976388931274f
- %822:ptr<storage, f32, read_write> = access %outputs, 819i, 0u
- store %822, -0.01946752332150936127f
- %823:ptr<storage, f32, read_write> = access %outputs, 820i, 0u
- store %823, -0.01859289966523647308f
- %824:ptr<storage, f32, read_write> = access %outputs, 821i, 0u
- store %824, -0.01777590624988079071f
- %825:ptr<storage, f32, read_write> = access %outputs, 822i, 0u
- store %825, -0.01701159216463565826f
- %826:ptr<storage, f32, read_write> = access %outputs, 823i, 0u
- store %826, -0.01629552431404590607f
- %827:ptr<storage, f32, read_write> = access %outputs, 824i, 0u
- store %827, -0.01562372874468564987f
- %828:ptr<storage, f32, read_write> = access %outputs, 825i, 0u
- store %828, -0.01499262917786836624f
- %829:ptr<storage, f32, read_write> = access %outputs, 826i, 0u
- store %829, -2.35619449615478515625f
- %830:ptr<storage, f32, read_write> = access %outputs, 827i, 0u
- store %830, -2.48816633224487304688f
- %831:ptr<storage, f32, read_write> = access %outputs, 828i, 0u
- store %831, -2.59754991531372070312f
- %832:ptr<storage, f32, read_write> = access %outputs, 829i, 0u
- store %832, -2.68597698211669921875f
- %833:ptr<storage, f32, read_write> = access %outputs, 830i, 0u
- store %833, -2.7568187713623046875f
- %834:ptr<storage, f32, read_write> = access %outputs, 831i, 0u
- store %834, -2.81360507011413574219f
- %835:ptr<storage, f32, read_write> = access %outputs, 832i, 0u
- store %835, -2.85938978195190429688f
- %836:ptr<storage, f32, read_write> = access %outputs, 833i, 0u
- store %836, -2.89661407470703125f
- %837:ptr<storage, f32, read_write> = access %outputs, 834i, 0u
- store %837, -2.92716288566589355469f
- %838:ptr<storage, f32, read_write> = access %outputs, 835i, 0u
- store %838, -2.95247387886047363281f
- %839:ptr<storage, f32, read_write> = access %outputs, 836i, 0u
- store %839, -2.97363972663879394531f
- %840:ptr<storage, f32, read_write> = access %outputs, 837i, 0u
- store %840, -2.99149560928344726562f
- %841:ptr<storage, f32, read_write> = access %outputs, 838i, 0u
- store %841, -3.00668311119079589844f
- %842:ptr<storage, f32, read_write> = access %outputs, 839i, 0u
- store %842, -3.01970005035400390625f
- %843:ptr<storage, f32, read_write> = access %outputs, 840i, 0u
- store %843, -3.03093552589416503906f
- %844:ptr<storage, f32, read_write> = access %outputs, 841i, 0u
- store %844, -3.04069685935974121094f
- %845:ptr<storage, f32, read_write> = access %outputs, 842i, 0u
- store %845, -3.049228668212890625f
- %846:ptr<storage, f32, read_write> = access %outputs, 843i, 0u
- store %846, -3.05672740936279296875f
- %847:ptr<storage, f32, read_write> = access %outputs, 844i, 0u
- store %847, -3.0633525848388671875f
- %848:ptr<storage, f32, read_write> = access %outputs, 845i, 0u
- store %848, -3.06923389434814453125f
- %849:ptr<storage, f32, read_write> = access %outputs, 846i, 0u
- store %849, -3.0744781494140625f
- %850:ptr<storage, f32, read_write> = access %outputs, 847i, 0u
- store %850, -3.07917380332946777344f
- %851:ptr<storage, f32, read_write> = access %outputs, 848i, 0u
- store %851, -3.08339452743530273438f
- %852:ptr<storage, f32, read_write> = access %outputs, 849i, 0u
- store %852, -3.08720183372497558594f
- %853:ptr<storage, f32, read_write> = access %outputs, 850i, 0u
- store %853, -3.09064817428588867188f
- %854:ptr<storage, f32, read_write> = access %outputs, 851i, 0u
- store %854, -3.09377765655517578125f
- %855:ptr<storage, f32, read_write> = access %outputs, 852i, 0u
- store %855, -3.09662747383117675781f
- %856:ptr<storage, f32, read_write> = access %outputs, 853i, 0u
- store %856, -3.09923052787780761719f
- %857:ptr<storage, f32, read_write> = access %outputs, 854i, 0u
- store %857, -3.1016139984130859375f
- %858:ptr<storage, f32, read_write> = access %outputs, 855i, 0u
- store %858, -3.10380196571350097656f
- %859:ptr<storage, f32, read_write> = access %outputs, 856i, 0u
- store %859, -3.10581541061401367188f
- %860:ptr<storage, f32, read_write> = access %outputs, 857i, 0u
- store %860, -3.10767221450805664062f
- %861:ptr<storage, f32, read_write> = access %outputs, 858i, 0u
- store %861, -3.10938811302185058594f
- %862:ptr<storage, f32, read_write> = access %outputs, 859i, 0u
- store %862, -3.1109771728515625f
- %863:ptr<storage, f32, read_write> = access %outputs, 860i, 0u
- store %863, -3.1124515533447265625f
- %864:ptr<storage, f32, read_write> = access %outputs, 861i, 0u
- store %864, -3.11382198333740234375f
- %865:ptr<storage, f32, read_write> = access %outputs, 862i, 0u
- store %865, -3.11509799957275390625f
- %866:ptr<storage, f32, read_write> = access %outputs, 863i, 0u
- store %866, -3.11628818511962890625f
- %867:ptr<storage, f32, read_write> = access %outputs, 864i, 0u
- store %867, -3.11739993095397949219f
- %868:ptr<storage, f32, read_write> = access %outputs, 865i, 0u
- store %868, -3.11843991279602050781f
- %869:ptr<storage, f32, read_write> = access %outputs, 866i, 0u
- store %869, -3.11941432952880859375f
- %870:ptr<storage, f32, read_write> = access %outputs, 867i, 0u
- store %870, -3.12032842636108398438f
- %871:ptr<storage, f32, read_write> = access %outputs, 868i, 0u
- store %871, -3.1211872100830078125f
- %872:ptr<storage, f32, read_write> = access %outputs, 869i, 0u
- store %872, -1.57079637050628662109f
- %873:ptr<storage, f32, read_write> = access %outputs, 870i, 0u
- store %873, -1.57079637050628662109f
- %874:ptr<storage, f32, read_write> = access %outputs, 871i, 0u
- store %874, -1.57079637050628662109f
- %875:ptr<storage, f32, read_write> = access %outputs, 872i, 0u
- store %875, -1.57079637050628662109f
- %876:ptr<storage, f32, read_write> = access %outputs, 873i, 0u
- store %876, -1.57079637050628662109f
- %877:ptr<storage, f32, read_write> = access %outputs, 874i, 0u
- store %877, -1.57079637050628662109f
- %878:ptr<storage, f32, read_write> = access %outputs, 875i, 0u
- store %878, -1.57079637050628662109f
- %879:ptr<storage, f32, read_write> = access %outputs, 876i, 0u
- store %879, -1.57079637050628662109f
- %880:ptr<storage, f32, read_write> = access %outputs, 877i, 0u
- store %880, -1.57079637050628662109f
- %881:ptr<storage, f32, read_write> = access %outputs, 878i, 0u
- store %881, -1.57079637050628662109f
- %882:ptr<storage, f32, read_write> = access %outputs, 879i, 0u
- store %882, -1.57079637050628662109f
- %883:ptr<storage, f32, read_write> = access %outputs, 880i, 0u
- store %883, -1.57079637050628662109f
- %884:ptr<storage, f32, read_write> = access %outputs, 881i, 0u
- store %884, -1.57079637050628662109f
- %885:ptr<storage, f32, read_write> = access %outputs, 882i, 0u
- store %885, -1.57079637050628662109f
- %886:ptr<storage, f32, read_write> = access %outputs, 883i, 0u
- store %886, -1.57079637050628662109f
- %887:ptr<storage, f32, read_write> = access %outputs, 884i, 0u
- store %887, -1.57079637050628662109f
- %888:ptr<storage, f32, read_write> = access %outputs, 885i, 0u
- store %888, -1.57079637050628662109f
- %889:ptr<storage, f32, read_write> = access %outputs, 886i, 0u
- store %889, -1.57079637050628662109f
- %890:ptr<storage, f32, read_write> = access %outputs, 887i, 0u
- store %890, -1.57079637050628662109f
- %891:ptr<storage, f32, read_write> = access %outputs, 888i, 0u
- store %891, -1.57079637050628662109f
- %892:ptr<storage, f32, read_write> = access %outputs, 889i, 0u
- store %892, -1.57079637050628662109f
- %893:ptr<storage, f32, read_write> = access %outputs, 890i, 0u
- store %893, -1.57079637050628662109f
- %894:ptr<storage, f32, read_write> = access %outputs, 891i, 0u
- store %894, -1.55039095878601074219f
- %895:ptr<storage, f32, read_write> = access %outputs, 892i, 0u
- store %895, -1.48934423923492431641f
- %896:ptr<storage, f32, read_write> = access %outputs, 893i, 0u
- store %896, -1.38914752006530761719f
- %897:ptr<storage, f32, read_write> = access %outputs, 894i, 0u
- store %897, -1.25518071651458740234f
- %898:ptr<storage, f32, read_write> = access %outputs, 895i, 0u
- store %898, -1.09901881217956542969f
- %899:ptr<storage, f32, read_write> = access %outputs, 896i, 0u
- store %899, -0.93716335296630859375f
- %900:ptr<storage, f32, read_write> = access %outputs, 897i, 0u
- store %900, -0.78539818525314331055f
- %901:ptr<storage, f32, read_write> = access %outputs, 898i, 0u
- store %901, -0.65342634916305541992f
- %902:ptr<storage, f32, read_write> = access %outputs, 899i, 0u
- store %902, -0.54404264688491821289f
- %903:ptr<storage, f32, read_write> = access %outputs, 900i, 0u
- store %903, -0.45561566948890686035f
- %904:ptr<storage, f32, read_write> = access %outputs, 901i, 0u
- store %904, -0.38477379083633422852f
- %905:ptr<storage, f32, read_write> = access %outputs, 902i, 0u
- store %905, -0.32798749208450317383f
- %906:ptr<storage, f32, read_write> = access %outputs, 903i, 0u
- store %906, -0.28220283985137939453f
- %907:ptr<storage, f32, read_write> = access %outputs, 904i, 0u
- store %907, -0.24497866630554199219f
- %908:ptr<storage, f32, read_write> = access %outputs, 905i, 0u
- store %908, -0.21442969143390655518f
- %909:ptr<storage, f32, read_write> = access %outputs, 906i, 0u
- store %909, -0.18911886215209960938f
- %910:ptr<storage, f32, read_write> = access %outputs, 907i, 0u
- store %910, -0.16795293986797332764f
- %911:ptr<storage, f32, read_write> = access %outputs, 908i, 0u
- store %911, -0.15009713172912597656f
- %912:ptr<storage, f32, read_write> = access %outputs, 909i, 0u
- store %912, -0.13490960001945495605f
- %913:ptr<storage, f32, read_write> = access %outputs, 910i, 0u
- store %913, -0.12189270555973052979f
- %914:ptr<storage, f32, read_write> = access %outputs, 911i, 0u
- store %914, -0.11065723001956939697f
- %915:ptr<storage, f32, read_write> = access %outputs, 912i, 0u
- store %915, -0.10089590400457382202f
- %916:ptr<storage, f32, read_write> = access %outputs, 913i, 0u
- store %916, -0.09236405044794082642f
- %917:ptr<storage, f32, read_write> = access %outputs, 914i, 0u
- store %917, -0.08486512303352355957f
- %918:ptr<storage, f32, read_write> = access %outputs, 915i, 0u
- store %918, -0.07823996990919113159f
- %919:ptr<storage, f32, read_write> = access %outputs, 916i, 0u
- store %919, -0.07235866039991378784f
- %920:ptr<storage, f32, read_write> = access %outputs, 917i, 0u
- store %920, -0.06711442023515701294f
- %921:ptr<storage, f32, read_write> = access %outputs, 918i, 0u
- store %921, -0.06241881102323532104f
- %922:ptr<storage, f32, read_write> = access %outputs, 919i, 0u
- store %922, -0.05819818004965782166f
- %923:ptr<storage, f32, read_write> = access %outputs, 920i, 0u
- store %923, -0.05439074710011482239f
- %924:ptr<storage, f32, read_write> = access %outputs, 921i, 0u
- store %924, -0.05094443634152412415f
- %925:ptr<storage, f32, read_write> = access %outputs, 922i, 0u
- store %925, -0.04781509190797805786f
- %926:ptr<storage, f32, read_write> = access %outputs, 923i, 0u
- store %926, -0.04496508091688156128f
- %927:ptr<storage, f32, read_write> = access %outputs, 924i, 0u
- store %927, -0.04236218705773353577f
- %928:ptr<storage, f32, read_write> = access %outputs, 925i, 0u
- store %928, -0.03997868672013282776f
- %929:ptr<storage, f32, read_write> = access %outputs, 926i, 0u
- store %929, -0.037790641188621521f
- %930:ptr<storage, f32, read_write> = access %outputs, 927i, 0u
- store %930, -0.03577727824449539185f
- %931:ptr<storage, f32, read_write> = access %outputs, 928i, 0u
- store %931, -0.03392050415277481079f
- %932:ptr<storage, f32, read_write> = access %outputs, 929i, 0u
- store %932, -0.03220450878143310547f
- %933:ptr<storage, f32, read_write> = access %outputs, 930i, 0u
- store %933, -0.0306154303252696991f
- %934:ptr<storage, f32, read_write> = access %outputs, 931i, 0u
- store %934, -0.02914106473326683044f
- %935:ptr<storage, f32, read_write> = access %outputs, 932i, 0u
- store %935, -0.02777063846588134766f
- %936:ptr<storage, f32, read_write> = access %outputs, 933i, 0u
- store %936, -0.02649461105465888977f
- %937:ptr<storage, f32, read_write> = access %outputs, 934i, 0u
- store %937, -0.02530451677739620209f
- %938:ptr<storage, f32, read_write> = access %outputs, 935i, 0u
- store %938, -0.02419281192123889923f
- %939:ptr<storage, f32, read_write> = access %outputs, 936i, 0u
- store %939, -0.02315276302397251129f
- %940:ptr<storage, f32, read_write> = access %outputs, 937i, 0u
- store %940, -0.02217834629118442535f
- %941:ptr<storage, f32, read_write> = access %outputs, 938i, 0u
- store %941, -0.02126415632665157318f
- %942:ptr<storage, f32, read_write> = access %outputs, 939i, 0u
- store %942, -0.02040533162653446198f
- %943:ptr<storage, f32, read_write> = access %outputs, 940i, 0u
- store %943, -2.35619449615478515625f
- %944:ptr<storage, f32, read_write> = access %outputs, 941i, 0u
- store %944, -2.47290301322937011719f
- %945:ptr<storage, f32, read_write> = access %outputs, 942i, 0u
- store %945, -2.57227945327758789062f
- %946:ptr<storage, f32, read_write> = access %outputs, 943i, 0u
- store %946, -2.6550731658935546875f
- %947:ptr<storage, f32, read_write> = access %outputs, 944i, 0u
- store %947, -2.72336840629577636719f
- %948:ptr<storage, f32, read_write> = access %outputs, 945i, 0u
- store %948, -2.77958369255065917969f
- %949:ptr<storage, f32, read_write> = access %outputs, 946i, 0u
- store %949, -2.82597708702087402344f
- %950:ptr<storage, f32, read_write> = access %outputs, 947i, 0u
- store %950, -2.86446738243103027344f
- %951:ptr<storage, f32, read_write> = access %outputs, 948i, 0u
- store %951, -2.89661407470703125f
- %952:ptr<storage, f32, read_write> = access %outputs, 949i, 0u
- store %952, -2.923656463623046875f
- %953:ptr<storage, f32, read_write> = access %outputs, 950i, 0u
- store %953, -2.94657230377197265625f
- %954:ptr<storage, f32, read_write> = access %outputs, 951i, 0u
- store %954, -2.96613049507141113281f
- %955:ptr<storage, f32, read_write> = access %outputs, 952i, 0u
- store %955, -2.98293733596801757812f
- %956:ptr<storage, f32, read_write> = access %outputs, 953i, 0u
- store %956, -2.99747419357299804688f
- %957:ptr<storage, f32, read_write> = access %outputs, 954i, 0u
- store %957, -3.01012396812438964844f
- %958:ptr<storage, f32, read_write> = access %outputs, 955i, 0u
- store %958, -3.02119469642639160156f
- %959:ptr<storage, f32, read_write> = access %outputs, 956i, 0u
- store %959, -3.03093552589416503906f
- %960:ptr<storage, f32, read_write> = access %outputs, 957i, 0u
- store %960, -3.03954839706420898438f
- %961:ptr<storage, f32, read_write> = access %outputs, 958i, 0u
- store %961, -3.04719948768615722656f
- %962:ptr<storage, f32, read_write> = access %outputs, 959i, 0u
- store %962, -3.0540256500244140625f
- %963:ptr<storage, f32, read_write> = access %outputs, 960i, 0u
- store %963, -3.0601406097412109375f
- %964:ptr<storage, f32, read_write> = access %outputs, 961i, 0u
- store %964, -3.06563925743103027344f
- %965:ptr<storage, f32, read_write> = access %outputs, 962i, 0u
- store %965, -3.07060098648071289062f
- %966:ptr<storage, f32, read_write> = access %outputs, 963i, 0u
- store %966, -3.07509350776672363281f
- %967:ptr<storage, f32, read_write> = access %outputs, 964i, 0u
- store %967, -3.07917380332946777344f
- %968:ptr<storage, f32, read_write> = access %outputs, 965i, 0u
- store %968, -3.08289074897766113281f
- %969:ptr<storage, f32, read_write> = access %outputs, 966i, 0u
- store %969, -3.08628582954406738281f
- %970:ptr<storage, f32, read_write> = access %outputs, 967i, 0u
- store %970, -3.08939528465270996094f
- %971:ptr<storage, f32, read_write> = access %outputs, 968i, 0u
- store %971, -3.09225010871887207031f
- %972:ptr<storage, f32, read_write> = access %outputs, 969i, 0u
- store %972, -3.0948772430419921875f
- %973:ptr<storage, f32, read_write> = access %outputs, 970i, 0u
- store %973, -3.09730029106140136719f
- %974:ptr<storage, f32, read_write> = access %outputs, 971i, 0u
- store %974, -3.09953999519348144531f
- %975:ptr<storage, f32, read_write> = access %outputs, 972i, 0u
- store %975, -3.1016139984130859375f
- %976:ptr<storage, f32, read_write> = access %outputs, 973i, 0u
- store %976, -3.10353851318359375f
- %977:ptr<storage, f32, read_write> = access %outputs, 974i, 0u
- store %977, -3.10532736778259277344f
- %978:ptr<storage, f32, read_write> = access %outputs, 975i, 0u
- store %978, -3.10699319839477539062f
- %979:ptr<storage, f32, read_write> = access %outputs, 976i, 0u
- store %979, -3.10854673385620117188f
- %980:ptr<storage, f32, read_write> = access %outputs, 977i, 0u
- store %980, -3.10999822616577148438f
- %981:ptr<storage, f32, read_write> = access %outputs, 978i, 0u
- store %981, -3.11135601997375488281f
- %982:ptr<storage, f32, read_write> = access %outputs, 979i, 0u
- store %982, -3.11262845993041992188f
- %983:ptr<storage, f32, read_write> = access %outputs, 980i, 0u
- store %983, -3.11382198333740234375f
- %984:ptr<storage, f32, read_write> = access %outputs, 981i, 0u
- store %984, -3.11494350433349609375f
- %985:ptr<storage, f32, read_write> = access %outputs, 982i, 0u
- store %985, -1.57079637050628662109f
- %986:ptr<storage, f32, read_write> = access %outputs, 983i, 0u
- store %986, -1.57079637050628662109f
- %987:ptr<storage, f32, read_write> = access %outputs, 984i, 0u
- store %987, -1.57079637050628662109f
- %988:ptr<storage, f32, read_write> = access %outputs, 985i, 0u
- store %988, -1.57079637050628662109f
- %989:ptr<storage, f32, read_write> = access %outputs, 986i, 0u
- store %989, -1.57079637050628662109f
- %990:ptr<storage, f32, read_write> = access %outputs, 987i, 0u
- store %990, -1.57079637050628662109f
- %991:ptr<storage, f32, read_write> = access %outputs, 988i, 0u
- store %991, -1.57079637050628662109f
- %992:ptr<storage, f32, read_write> = access %outputs, 989i, 0u
- store %992, -1.57079637050628662109f
- %993:ptr<storage, f32, read_write> = access %outputs, 990i, 0u
- store %993, -1.57079637050628662109f
- %994:ptr<storage, f32, read_write> = access %outputs, 991i, 0u
- store %994, -1.57079637050628662109f
- %995:ptr<storage, f32, read_write> = access %outputs, 992i, 0u
- store %995, -1.57079637050628662109f
- %996:ptr<storage, f32, read_write> = access %outputs, 993i, 0u
- store %996, -1.57079637050628662109f
- %997:ptr<storage, f32, read_write> = access %outputs, 994i, 0u
- store %997, -1.57079637050628662109f
- %998:ptr<storage, f32, read_write> = access %outputs, 995i, 0u
- store %998, -1.57079637050628662109f
- %999:ptr<storage, f32, read_write> = access %outputs, 996i, 0u
- store %999, -1.57079637050628662109f
- %1000:ptr<storage, f32, read_write> = access %outputs, 997i, 0u
- store %1000, -1.57079637050628662109f
- %1001:ptr<storage, f32, read_write> = access %outputs, 998i, 0u
- store %1001, -1.57079637050628662109f
- %1002:ptr<storage, f32, read_write> = access %outputs, 999i, 0u
- store %1002, -1.57079637050628662109f
- 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/benchmark/uniformity-analysis-pointer-parameters.wgsl.expected.ir.msl b/test/tint/benchmark/uniformity-analysis-pointer-parameters.wgsl.expected.ir.msl
deleted file mode 100644
index a66251b..0000000
--- a/test/tint/benchmark/uniformity-analysis-pointer-parameters.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,1681 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-void foo(thread int* const p0, thread int* const p1, thread int* const p2, thread int* const p3, thread int* const p4, thread int* const p5, thread int* const p6, thread int* const p7, thread int* const p8, thread int* const p9, thread int* const p10, thread int* const p11, thread int* const p12, thread int* const p13, thread int* const p14, thread int* const p15, thread int* const p16, thread int* const p17, thread int* const p18, thread int* const p19, thread int* const p20, thread int* const p21, thread int* const p22, thread int* const p23, thread int* const p24, thread int* const p25, thread int* const p26, thread int* const p27, thread int* const p28, thread int* const p29, thread int* const p30, thread int* const p31, thread int* const p32, thread int* const p33, thread int* const p34, thread int* const p35, thread int* const p36, thread int* const p37, thread int* const p38, thread int* const p39, thread int* const p40, thread int* const p41, thread int* const p42, thread int* const p43, thread int* const p44, thread int* const p45, thread int* const p46, thread int* const p47, thread int* const p48, thread int* const p49, thread int* const p50, thread int* const p51, thread int* const p52, thread int* const p53, thread int* const p54, thread int* const p55, thread int* const p56, thread int* const p57, thread int* const p58, thread int* const p59, thread int* const p60, thread int* const p61, thread int* const p62, thread int* const p63, thread int* const p64, thread int* const p65, thread int* const p66, thread int* const p67, thread int* const p68, thread int* const p69, thread int* const p70, thread int* const p71, thread int* const p72, thread int* const p73, thread int* const p74, thread int* const p75, thread int* const p76, thread int* const p77, thread int* const p78, thread int* const p79, thread int* const p80, thread int* const p81, thread int* const p82, thread int* const p83, thread int* const p84, thread int* const p85, thread int* const p86, thread int* const p87, thread int* const p88, thread int* const p89, thread int* const p90, thread int* const p91, thread int* const p92, thread int* const p93, thread int* const p94, thread int* const p95, thread int* const p96, thread int* const p97, thread int* const p98, thread int* const p99, thread int* const p100, thread int* const p101, thread int* const p102, thread int* const p103, thread int* const p104, thread int* const p105, thread int* const p106, thread int* const p107, thread int* const p108, thread int* const p109, thread int* const p110, thread int* const p111, thread int* const p112, thread int* const p113, thread int* const p114, thread int* const p115, thread int* const p116, thread int* const p117, thread int* const p118, thread int* const p119, thread int* const p120, thread int* const p121, thread int* const p122, thread int* const p123, thread int* const p124, thread int* const p125, thread int* const p126, thread int* const p127, thread int* const p128, thread int* const p129, thread int* const p130, thread int* const p131, thread int* const p132, thread int* const p133, thread int* const p134, thread int* const p135, thread int* const p136, thread int* const p137, thread int* const p138, thread int* const p139, thread int* const p140, thread int* const p141, thread int* const p142, thread int* const p143, thread int* const p144, thread int* const p145, thread int* const p146, thread int* const p147, thread int* const p148, thread int* const p149, thread int* const p150, thread int* const p151, thread int* const p152, thread int* const p153, thread int* const p154, thread int* const p155, thread int* const p156, thread int* const p157, thread int* const p158, thread int* const p159, thread int* const p160, thread int* const p161, thread int* const p162, thread int* const p163, thread int* const p164, thread int* const p165, thread int* const p166, thread int* const p167, thread int* const p168, thread int* const p169, thread int* const p170, thread int* const p171, thread int* const p172, thread int* const p173, thread int* const p174, thread int* const p175, thread int* const p176, thread int* const p177, thread int* const p178, thread int* const p179, thread int* const p180, thread int* const p181, thread int* const p182, thread int* const p183, thread int* const p184, thread int* const p185, thread int* const p186, thread int* const p187, thread int* const p188, thread int* const p189, thread int* const p190, thread int* const p191, thread int* const p192, thread int* const p193, thread int* const p194, thread int* const p195, thread int* const p196, thread int* const p197, thread int* const p198, thread int* const p199, thread int* const p200, thread int* const p201, thread int* const p202, thread int* const p203, thread int* const p204, thread int* const p205, thread int* const p206, thread int* const p207, thread int* const p208, thread int* const p209, thread int* const p210, thread int* const p211, thread int* const p212, thread int* const p213, thread int* const p214, thread int* const p215, thread int* const p216, thread int* const p217, thread int* const p218, thread int* const p219, thread int* const p220, thread int* const p221, thread int* const p222, thread int* const p223, thread int* const p224, thread int* const p225, thread int* const p226, thread int* const p227, thread int* const p228, thread int* const p229, thread int* const p230, thread int* const p231, thread int* const p232, thread int* const p233, thread int* const p234, thread int* const p235, thread int* const p236, thread int* const p237, thread int* const p238, thread int* const p239, thread int* const p240, thread int* const p241, thread int* const p242, thread int* const p243, thread int* const p244, thread int* const p245, thread int* const p246, thread int* const p247, thread int* const p248, thread int* const p249, thread int* const p250, thread int* const p251, thread int* const p252, thread int* const p253, thread int* const p254) {
- int rhs = (((((((p0 + p1) + p2) + p3) + p4) + p5) + p6) + p7);
- rhs = (rhs + (((((((p8 + p9) + p10) + p11) + p12) + p13) + p14) + p15));
- rhs = (rhs + (((((((p16 + p17) + p18) + p19) + p20) + p21) + p22) + p23));
- rhs = (rhs + (((((((p24 + p25) + p26) + p27) + p28) + p29) + p30) + p31));
- rhs = (rhs + (((((((p32 + p33) + p34) + p35) + p36) + p37) + p38) + p39));
- rhs = (rhs + (((((((p40 + p41) + p42) + p43) + p44) + p45) + p46) + p47));
- rhs = (rhs + (((((((p48 + p49) + p50) + p51) + p52) + p53) + p54) + p55));
- rhs = (rhs + (((((((p56 + p57) + p58) + p59) + p60) + p61) + p62) + p63));
- rhs = (rhs + (((((((p64 + p65) + p66) + p67) + p68) + p69) + p70) + p71));
- rhs = (rhs + (((((((p72 + p73) + p74) + p75) + p76) + p77) + p78) + p79));
- rhs = (rhs + (((((((p80 + p81) + p82) + p83) + p84) + p85) + p86) + p87));
- rhs = (rhs + (((((((p88 + p89) + p90) + p91) + p92) + p93) + p94) + p95));
- rhs = (rhs + (((((((p96 + p97) + p98) + p99) + p100) + p101) + p102) + p103));
- rhs = (rhs + (((((((p104 + p105) + p106) + p107) + p108) + p109) + p110) + p111));
- rhs = (rhs + (((((((p112 + p113) + p114) + p115) + p116) + p117) + p118) + p119));
- rhs = (rhs + (((((((p120 + p121) + p122) + p123) + p124) + p125) + p126) + p127));
- rhs = (rhs + (((((((p128 + p129) + p130) + p131) + p132) + p133) + p134) + p135));
- rhs = (rhs + (((((((p136 + p137) + p138) + p139) + p140) + p141) + p142) + p143));
- rhs = (rhs + (((((((p144 + p145) + p146) + p147) + p148) + p149) + p150) + p151));
- rhs = (rhs + (((((((p152 + p153) + p154) + p155) + p156) + p157) + p158) + p159));
- rhs = (rhs + (((((((p160 + p161) + p162) + p163) + p164) + p165) + p166) + p167));
- rhs = (rhs + (((((((p168 + p169) + p170) + p171) + p172) + p173) + p174) + p175));
- rhs = (rhs + (((((((p176 + p177) + p178) + p179) + p180) + p181) + p182) + p183));
- rhs = (rhs + (((((((p184 + p185) + p186) + p187) + p188) + p189) + p190) + p191));
- rhs = (rhs + (((((((p192 + p193) + p194) + p195) + p196) + p197) + p198) + p199));
- rhs = (rhs + (((((((p200 + p201) + p202) + p203) + p204) + p205) + p206) + p207));
- rhs = (rhs + (((((((p208 + p209) + p210) + p211) + p212) + p213) + p214) + p215));
- rhs = (rhs + (((((((p216 + p217) + p218) + p219) + p220) + p221) + p222) + p223));
- rhs = (rhs + (((((((p224 + p225) + p226) + p227) + p228) + p229) + p230) + p231));
- rhs = (rhs + (((((((p232 + p233) + p234) + p235) + p236) + p237) + p238) + p239));
- rhs = (rhs + (((((((p240 + p241) + p242) + p243) + p244) + p245) + p246) + p247));
- rhs = (rhs + ((((((p248 + p249) + p250) + p251) + p252) + p253) + p254));
- p1 = rhs;
- p2 = rhs;
- p3 = rhs;
- p4 = rhs;
- p5 = rhs;
- p6 = rhs;
- p7 = rhs;
- p8 = rhs;
- p9 = rhs;
- p10 = rhs;
- p11 = rhs;
- p12 = rhs;
- p13 = rhs;
- p14 = rhs;
- p15 = rhs;
- p16 = rhs;
- p17 = rhs;
- p18 = rhs;
- p19 = rhs;
- p20 = rhs;
- p21 = rhs;
- p22 = rhs;
- p23 = rhs;
- p24 = rhs;
- p25 = rhs;
- p26 = rhs;
- p27 = rhs;
- p28 = rhs;
- p29 = rhs;
- p30 = rhs;
- p31 = rhs;
- p32 = rhs;
- p33 = rhs;
- p34 = rhs;
- p35 = rhs;
- p36 = rhs;
- p37 = rhs;
- p38 = rhs;
- p39 = rhs;
- p40 = rhs;
- p41 = rhs;
- p42 = rhs;
- p43 = rhs;
- p44 = rhs;
- p45 = rhs;
- p46 = rhs;
- p47 = rhs;
- p48 = rhs;
- p49 = rhs;
- p50 = rhs;
- p51 = rhs;
- p52 = rhs;
- p53 = rhs;
- p54 = rhs;
- p55 = rhs;
- p56 = rhs;
- p57 = rhs;
- p58 = rhs;
- p59 = rhs;
- p60 = rhs;
- p61 = rhs;
- p62 = rhs;
- p63 = rhs;
- p64 = rhs;
- p65 = rhs;
- p66 = rhs;
- p67 = rhs;
- p68 = rhs;
- p69 = rhs;
- p70 = rhs;
- p71 = rhs;
- p72 = rhs;
- p73 = rhs;
- p74 = rhs;
- p75 = rhs;
- p76 = rhs;
- p77 = rhs;
- p78 = rhs;
- p79 = rhs;
- p80 = rhs;
- p81 = rhs;
- p82 = rhs;
- p83 = rhs;
- p84 = rhs;
- p85 = rhs;
- p86 = rhs;
- p87 = rhs;
- p88 = rhs;
- p89 = rhs;
- p90 = rhs;
- p91 = rhs;
- p92 = rhs;
- p93 = rhs;
- p94 = rhs;
- p95 = rhs;
- p96 = rhs;
- p97 = rhs;
- p98 = rhs;
- p99 = rhs;
- p100 = rhs;
- p101 = rhs;
- p102 = rhs;
- p103 = rhs;
- p104 = rhs;
- p105 = rhs;
- p106 = rhs;
- p107 = rhs;
- p108 = rhs;
- p109 = rhs;
- p110 = rhs;
- p111 = rhs;
- p112 = rhs;
- p113 = rhs;
- p114 = rhs;
- p115 = rhs;
- p116 = rhs;
- p117 = rhs;
- p118 = rhs;
- p119 = rhs;
- p120 = rhs;
- p121 = rhs;
- p122 = rhs;
- p123 = rhs;
- p124 = rhs;
- p125 = rhs;
- p126 = rhs;
- p127 = rhs;
- p128 = rhs;
- p129 = rhs;
- p130 = rhs;
- p131 = rhs;
- p132 = rhs;
- p133 = rhs;
- p134 = rhs;
- p135 = rhs;
- p136 = rhs;
- p137 = rhs;
- p138 = rhs;
- p139 = rhs;
- p140 = rhs;
- p141 = rhs;
- p142 = rhs;
- p143 = rhs;
- p144 = rhs;
- p145 = rhs;
- p146 = rhs;
- p147 = rhs;
- p148 = rhs;
- p149 = rhs;
- p150 = rhs;
- p151 = rhs;
- p152 = rhs;
- p153 = rhs;
- p154 = rhs;
- p155 = rhs;
- p156 = rhs;
- p157 = rhs;
- p158 = rhs;
- p159 = rhs;
- p160 = rhs;
- p161 = rhs;
- p162 = rhs;
- p163 = rhs;
- p164 = rhs;
- p165 = rhs;
- p166 = rhs;
- p167 = rhs;
- p168 = rhs;
- p169 = rhs;
- p170 = rhs;
- p171 = rhs;
- p172 = rhs;
- p173 = rhs;
- p174 = rhs;
- p175 = rhs;
- p176 = rhs;
- p177 = rhs;
- p178 = rhs;
- p179 = rhs;
- p180 = rhs;
- p181 = rhs;
- p182 = rhs;
- p183 = rhs;
- p184 = rhs;
- p185 = rhs;
- p186 = rhs;
- p187 = rhs;
- p188 = rhs;
- p189 = rhs;
- p190 = rhs;
- p191 = rhs;
- p192 = rhs;
- p193 = rhs;
- p194 = rhs;
- p195 = rhs;
- p196 = rhs;
- p197 = rhs;
- p198 = rhs;
- p199 = rhs;
- p200 = rhs;
- p201 = rhs;
- p202 = rhs;
- p203 = rhs;
- p204 = rhs;
- p205 = rhs;
- p206 = rhs;
- p207 = rhs;
- p208 = rhs;
- p209 = rhs;
- p210 = rhs;
- p211 = rhs;
- p212 = rhs;
- p213 = rhs;
- p214 = rhs;
- p215 = rhs;
- p216 = rhs;
- p217 = rhs;
- p218 = rhs;
- p219 = rhs;
- p220 = rhs;
- p221 = rhs;
- p222 = rhs;
- p223 = rhs;
- p224 = rhs;
- p225 = rhs;
- p226 = rhs;
- p227 = rhs;
- p228 = rhs;
- p229 = rhs;
- p230 = rhs;
- p231 = rhs;
- p232 = rhs;
- p233 = rhs;
- p234 = rhs;
- p235 = rhs;
- p236 = rhs;
- p237 = rhs;
- p238 = rhs;
- p239 = rhs;
- p240 = rhs;
- p241 = rhs;
- p242 = rhs;
- p243 = rhs;
- p244 = rhs;
- p245 = rhs;
- p246 = rhs;
- p247 = rhs;
- p248 = rhs;
- p249 = rhs;
- p250 = rhs;
- p251 = rhs;
- p252 = rhs;
- p253 = rhs;
- p254 = rhs;
-}
-void tint_symbol() {
- int v0 = 0;
- int v1 = 0;
- int v2 = 0;
- int v3 = 0;
- int v4 = 0;
- int v5 = 0;
- int v6 = 0;
- int v7 = 0;
- int v8 = 0;
- int v9 = 0;
- int v10 = 0;
- int v11 = 0;
- int v12 = 0;
- int v13 = 0;
- int v14 = 0;
- int v15 = 0;
- int v16 = 0;
- int v17 = 0;
- int v18 = 0;
- int v19 = 0;
- int v20 = 0;
- int v21 = 0;
- int v22 = 0;
- int v23 = 0;
- int v24 = 0;
- int v25 = 0;
- int v26 = 0;
- int v27 = 0;
- int v28 = 0;
- int v29 = 0;
- int v30 = 0;
- int v31 = 0;
- int v32 = 0;
- int v33 = 0;
- int v34 = 0;
- int v35 = 0;
- int v36 = 0;
- int v37 = 0;
- int v38 = 0;
- int v39 = 0;
- int v40 = 0;
- int v41 = 0;
- int v42 = 0;
- int v43 = 0;
- int v44 = 0;
- int v45 = 0;
- int v46 = 0;
- int v47 = 0;
- int v48 = 0;
- int v49 = 0;
- int v50 = 0;
- int v51 = 0;
- int v52 = 0;
- int v53 = 0;
- int v54 = 0;
- int v55 = 0;
- int v56 = 0;
- int v57 = 0;
- int v58 = 0;
- int v59 = 0;
- int v60 = 0;
- int v61 = 0;
- int v62 = 0;
- int v63 = 0;
- int v64 = 0;
- int v65 = 0;
- int v66 = 0;
- int v67 = 0;
- int v68 = 0;
- int v69 = 0;
- int v70 = 0;
- int v71 = 0;
- int v72 = 0;
- int v73 = 0;
- int v74 = 0;
- int v75 = 0;
- int v76 = 0;
- int v77 = 0;
- int v78 = 0;
- int v79 = 0;
- int v80 = 0;
- int v81 = 0;
- int v82 = 0;
- int v83 = 0;
- int v84 = 0;
- int v85 = 0;
- int v86 = 0;
- int v87 = 0;
- int v88 = 0;
- int v89 = 0;
- int v90 = 0;
- int v91 = 0;
- int v92 = 0;
- int v93 = 0;
- int v94 = 0;
- int v95 = 0;
- int v96 = 0;
- int v97 = 0;
- int v98 = 0;
- int v99 = 0;
- int v100 = 0;
- int v101 = 0;
- int v102 = 0;
- int v103 = 0;
- int v104 = 0;
- int v105 = 0;
- int v106 = 0;
- int v107 = 0;
- int v108 = 0;
- int v109 = 0;
- int v110 = 0;
- int v111 = 0;
- int v112 = 0;
- int v113 = 0;
- int v114 = 0;
- int v115 = 0;
- int v116 = 0;
- int v117 = 0;
- int v118 = 0;
- int v119 = 0;
- int v120 = 0;
- int v121 = 0;
- int v122 = 0;
- int v123 = 0;
- int v124 = 0;
- int v125 = 0;
- int v126 = 0;
- int v127 = 0;
- int v128 = 0;
- int v129 = 0;
- int v130 = 0;
- int v131 = 0;
- int v132 = 0;
- int v133 = 0;
- int v134 = 0;
- int v135 = 0;
- int v136 = 0;
- int v137 = 0;
- int v138 = 0;
- int v139 = 0;
- int v140 = 0;
- int v141 = 0;
- int v142 = 0;
- int v143 = 0;
- int v144 = 0;
- int v145 = 0;
- int v146 = 0;
- int v147 = 0;
- int v148 = 0;
- int v149 = 0;
- int v150 = 0;
- int v151 = 0;
- int v152 = 0;
- int v153 = 0;
- int v154 = 0;
- int v155 = 0;
- int v156 = 0;
- int v157 = 0;
- int v158 = 0;
- int v159 = 0;
- int v160 = 0;
- int v161 = 0;
- int v162 = 0;
- int v163 = 0;
- int v164 = 0;
- int v165 = 0;
- int v166 = 0;
- int v167 = 0;
- int v168 = 0;
- int v169 = 0;
- int v170 = 0;
- int v171 = 0;
- int v172 = 0;
- int v173 = 0;
- int v174 = 0;
- int v175 = 0;
- int v176 = 0;
- int v177 = 0;
- int v178 = 0;
- int v179 = 0;
- int v180 = 0;
- int v181 = 0;
- int v182 = 0;
- int v183 = 0;
- int v184 = 0;
- int v185 = 0;
- int v186 = 0;
- int v187 = 0;
- int v188 = 0;
- int v189 = 0;
- int v190 = 0;
- int v191 = 0;
- int v192 = 0;
- int v193 = 0;
- int v194 = 0;
- int v195 = 0;
- int v196 = 0;
- int v197 = 0;
- int v198 = 0;
- int v199 = 0;
- int v200 = 0;
- int v201 = 0;
- int v202 = 0;
- int v203 = 0;
- int v204 = 0;
- int v205 = 0;
- int v206 = 0;
- int v207 = 0;
- int v208 = 0;
- int v209 = 0;
- int v210 = 0;
- int v211 = 0;
- int v212 = 0;
- int v213 = 0;
- int v214 = 0;
- int v215 = 0;
- int v216 = 0;
- int v217 = 0;
- int v218 = 0;
- int v219 = 0;
- int v220 = 0;
- int v221 = 0;
- int v222 = 0;
- int v223 = 0;
- int v224 = 0;
- int v225 = 0;
- int v226 = 0;
- int v227 = 0;
- int v228 = 0;
- int v229 = 0;
- int v230 = 0;
- int v231 = 0;
- int v232 = 0;
- int v233 = 0;
- int v234 = 0;
- int v235 = 0;
- int v236 = 0;
- int v237 = 0;
- int v238 = 0;
- int v239 = 0;
- int v240 = 0;
- int v241 = 0;
- int v242 = 0;
- int v243 = 0;
- int v244 = 0;
- int v245 = 0;
- int v246 = 0;
- int v247 = 0;
- int v248 = 0;
- int v249 = 0;
- int v250 = 0;
- int v251 = 0;
- int v252 = 0;
- int v253 = 0;
- int v254 = 0;
- foo(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63, v64, v65, v66, v67, v68, v69, v70, v71, v72, v73, v74, v75, v76, v77, v78, v79, v80, v81, v82, v83, v84, v85, v86, v87, v88, v89, v90, v91, v92, v93, v94, v95, v96, v97, v98, v99, v100, v101, v102, v103, v104, v105, v106, v107, v108, v109, v110, v111, v112, v113, v114, v115, v116, v117, v118, v119, v120, v121, v122, v123, v124, v125, v126, v127, v128, v129, v130, v131, v132, v133, v134, v135, v136, v137, v138, v139, v140, v141, v142, v143, v144, v145, v146, v147, v148, v149, v150, v151, v152, v153, v154, v155, v156, v157, v158, v159, v160, v161, v162, v163, v164, v165, v166, v167, v168, v169, v170, v171, v172, v173, v174, v175, v176, v177, v178, v179, v180, v181, v182, v183, v184, v185, v186, v187, v188, v189, v190, v191, v192, v193, v194, v195, v196, v197, v198, v199, v200, v201, v202, v203, v204, v205, v206, v207, v208, v209, v210, v211, v212, v213, v214, v215, v216, v217, v218, v219, v220, v221, v222, v223, v224, v225, v226, v227, v228, v229, v230, v231, v232, v233, v234, v235, v236, v237, v238, v239, v240, v241, v242, v243, v244, v245, v246, v247, v248, v249, v250, v251, v252, v253, v254);
- if ((v254 == 0)) {
- threadgroup_barrier(mem_flags::mem_threadgroup);
- }
-}
-program_source:5:23: error: invalid operands to binary expression ('int *const' and 'int *const')
- int rhs = (((((((p0 + p1) + p2) + p3) + p4) + p5) + p6) + p7);
- ~~ ^ ~~
-program_source:6:26: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p8 + p9) + p10) + p11) + p12) + p13) + p14) + p15));
- ~~ ^ ~~
-program_source:7:27: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p16 + p17) + p18) + p19) + p20) + p21) + p22) + p23));
- ~~~ ^ ~~~
-program_source:8:27: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p24 + p25) + p26) + p27) + p28) + p29) + p30) + p31));
- ~~~ ^ ~~~
-program_source:9:27: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p32 + p33) + p34) + p35) + p36) + p37) + p38) + p39));
- ~~~ ^ ~~~
-program_source:10:27: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p40 + p41) + p42) + p43) + p44) + p45) + p46) + p47));
- ~~~ ^ ~~~
-program_source:11:27: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p48 + p49) + p50) + p51) + p52) + p53) + p54) + p55));
- ~~~ ^ ~~~
-program_source:12:27: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p56 + p57) + p58) + p59) + p60) + p61) + p62) + p63));
- ~~~ ^ ~~~
-program_source:13:27: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p64 + p65) + p66) + p67) + p68) + p69) + p70) + p71));
- ~~~ ^ ~~~
-program_source:14:27: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p72 + p73) + p74) + p75) + p76) + p77) + p78) + p79));
- ~~~ ^ ~~~
-program_source:15:27: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p80 + p81) + p82) + p83) + p84) + p85) + p86) + p87));
- ~~~ ^ ~~~
-program_source:16:27: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p88 + p89) + p90) + p91) + p92) + p93) + p94) + p95));
- ~~~ ^ ~~~
-program_source:17:27: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p96 + p97) + p98) + p99) + p100) + p101) + p102) + p103));
- ~~~ ^ ~~~
-program_source:18:28: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p104 + p105) + p106) + p107) + p108) + p109) + p110) + p111));
- ~~~~ ^ ~~~~
-program_source:19:28: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p112 + p113) + p114) + p115) + p116) + p117) + p118) + p119));
- ~~~~ ^ ~~~~
-program_source:20:28: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p120 + p121) + p122) + p123) + p124) + p125) + p126) + p127));
- ~~~~ ^ ~~~~
-program_source:21:28: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p128 + p129) + p130) + p131) + p132) + p133) + p134) + p135));
- ~~~~ ^ ~~~~
-program_source:22:28: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p136 + p137) + p138) + p139) + p140) + p141) + p142) + p143));
- ~~~~ ^ ~~~~
-program_source:23:28: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p144 + p145) + p146) + p147) + p148) + p149) + p150) + p151));
- ~~~~ ^ ~~~~
-program_source:24:28: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p152 + p153) + p154) + p155) + p156) + p157) + p158) + p159));
- ~~~~ ^ ~~~~
-program_source:25:28: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p160 + p161) + p162) + p163) + p164) + p165) + p166) + p167));
- ~~~~ ^ ~~~~
-program_source:26:28: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p168 + p169) + p170) + p171) + p172) + p173) + p174) + p175));
- ~~~~ ^ ~~~~
-program_source:27:28: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p176 + p177) + p178) + p179) + p180) + p181) + p182) + p183));
- ~~~~ ^ ~~~~
-program_source:28:28: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p184 + p185) + p186) + p187) + p188) + p189) + p190) + p191));
- ~~~~ ^ ~~~~
-program_source:29:28: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p192 + p193) + p194) + p195) + p196) + p197) + p198) + p199));
- ~~~~ ^ ~~~~
-program_source:30:28: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p200 + p201) + p202) + p203) + p204) + p205) + p206) + p207));
- ~~~~ ^ ~~~~
-program_source:31:28: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p208 + p209) + p210) + p211) + p212) + p213) + p214) + p215));
- ~~~~ ^ ~~~~
-program_source:32:28: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p216 + p217) + p218) + p219) + p220) + p221) + p222) + p223));
- ~~~~ ^ ~~~~
-program_source:33:28: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p224 + p225) + p226) + p227) + p228) + p229) + p230) + p231));
- ~~~~ ^ ~~~~
-program_source:34:28: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p232 + p233) + p234) + p235) + p236) + p237) + p238) + p239));
- ~~~~ ^ ~~~~
-program_source:35:28: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + (((((((p240 + p241) + p242) + p243) + p244) + p245) + p246) + p247));
- ~~~~ ^ ~~~~
-program_source:36:27: error: invalid operands to binary expression ('int *const' and 'int *const')
- rhs = (rhs + ((((((p248 + p249) + p250) + p251) + p252) + p253) + p254));
- ~~~~ ^ ~~~~
-program_source:37:6: error: cannot assign to variable 'p1' with const-qualified type 'int *const'
- p1 = rhs;
- ~~ ^
-program_source:4:50: note: variable 'p1' declared const here
-program_source:38:6: error: cannot assign to variable 'p2' with const-qualified type 'int *const'
- p2 = rhs;
- ~~ ^
-program_source:4:72: note: variable 'p2' declared const here
-program_source:39:6: error: cannot assign to variable 'p3' with const-qualified type 'int *const'
- p3 = rhs;
- ~~ ^
-program_source:4:94: note: variable 'p3' declared const here
-program_source:40:6: error: cannot assign to variable 'p4' with const-qualified type 'int *const'
- p4 = rhs;
- ~~ ^
-program_source:4:116: note: variable 'p4' declared const here
-program_source:41:6: error: cannot assign to variable 'p5' with const-qualified type 'int *const'
- p5 = rhs;
- ~~ ^
-program_source:4:138: note: variable 'p5' declared const here
-program_source:42:6: error: cannot assign to variable 'p6' with const-qualified type 'int *const'
- p6 = rhs;
- ~~ ^
-program_source:4:160: note: variable 'p6' declared const here
-program_source:43:6: error: cannot assign to variable 'p7' with const-qualified type 'int *const'
- p7 = rhs;
- ~~ ^
-program_source:4:182: note: variable 'p7' declared const here
-program_source:44:6: error: cannot assign to variable 'p8' with const-qualified type 'int *const'
- p8 = rhs;
- ~~ ^
-program_source:4:204: note: variable 'p8' declared const here
-program_source:45:6: error: cannot assign to variable 'p9' with const-qualified type 'int *const'
- p9 = rhs;
- ~~ ^
-program_source:4:226: note: variable 'p9' declared const here
-program_source:46:7: error: cannot assign to variable 'p10' with const-qualified type 'int *const'
- p10 = rhs;
- ~~~ ^
-program_source:4:248: note: variable 'p10' declared const here
-program_source:47:7: error: cannot assign to variable 'p11' with const-qualified type 'int *const'
- p11 = rhs;
- ~~~ ^
-program_source:4:271: note: variable 'p11' declared const here
-program_source:48:7: error: cannot assign to variable 'p12' with const-qualified type 'int *const'
- p12 = rhs;
- ~~~ ^
-program_source:4:294: note: variable 'p12' declared const here
-program_source:49:7: error: cannot assign to variable 'p13' with const-qualified type 'int *const'
- p13 = rhs;
- ~~~ ^
-program_source:4:317: note: variable 'p13' declared const here
-program_source:50:7: error: cannot assign to variable 'p14' with const-qualified type 'int *const'
- p14 = rhs;
- ~~~ ^
-program_source:4:340: note: variable 'p14' declared const here
-program_source:51:7: error: cannot assign to variable 'p15' with const-qualified type 'int *const'
- p15 = rhs;
- ~~~ ^
-program_source:4:363: note: variable 'p15' declared const here
-program_source:52:7: error: cannot assign to variable 'p16' with const-qualified type 'int *const'
- p16 = rhs;
- ~~~ ^
-program_source:4:386: note: variable 'p16' declared const here
-program_source:53:7: error: cannot assign to variable 'p17' with const-qualified type 'int *const'
- p17 = rhs;
- ~~~ ^
-program_source:4:409: note: variable 'p17' declared const here
-program_source:54:7: error: cannot assign to variable 'p18' with const-qualified type 'int *const'
- p18 = rhs;
- ~~~ ^
-program_source:4:432: note: variable 'p18' declared const here
-program_source:55:7: error: cannot assign to variable 'p19' with const-qualified type 'int *const'
- p19 = rhs;
- ~~~ ^
-program_source:4:455: note: variable 'p19' declared const here
-program_source:56:7: error: cannot assign to variable 'p20' with const-qualified type 'int *const'
- p20 = rhs;
- ~~~ ^
-program_source:4:478: note: variable 'p20' declared const here
-program_source:57:7: error: cannot assign to variable 'p21' with const-qualified type 'int *const'
- p21 = rhs;
- ~~~ ^
-program_source:4:501: note: variable 'p21' declared const here
-program_source:58:7: error: cannot assign to variable 'p22' with const-qualified type 'int *const'
- p22 = rhs;
- ~~~ ^
-program_source:4:524: note: variable 'p22' declared const here
-program_source:59:7: error: cannot assign to variable 'p23' with const-qualified type 'int *const'
- p23 = rhs;
- ~~~ ^
-program_source:4:547: note: variable 'p23' declared const here
-program_source:60:7: error: cannot assign to variable 'p24' with const-qualified type 'int *const'
- p24 = rhs;
- ~~~ ^
-program_source:4:570: note: variable 'p24' declared const here
-program_source:61:7: error: cannot assign to variable 'p25' with const-qualified type 'int *const'
- p25 = rhs;
- ~~~ ^
-program_source:4:593: note: variable 'p25' declared const here
-program_source:62:7: error: cannot assign to variable 'p26' with const-qualified type 'int *const'
- p26 = rhs;
- ~~~ ^
-program_source:4:616: note: variable 'p26' declared const here
-program_source:63:7: error: cannot assign to variable 'p27' with const-qualified type 'int *const'
- p27 = rhs;
- ~~~ ^
-program_source:4:639: note: variable 'p27' declared const here
-program_source:64:7: error: cannot assign to variable 'p28' with const-qualified type 'int *const'
- p28 = rhs;
- ~~~ ^
-program_source:4:662: note: variable 'p28' declared const here
-program_source:65:7: error: cannot assign to variable 'p29' with const-qualified type 'int *const'
- p29 = rhs;
- ~~~ ^
-program_source:4:685: note: variable 'p29' declared const here
-program_source:66:7: error: cannot assign to variable 'p30' with const-qualified type 'int *const'
- p30 = rhs;
- ~~~ ^
-program_source:4:708: note: variable 'p30' declared const here
-program_source:67:7: error: cannot assign to variable 'p31' with const-qualified type 'int *const'
- p31 = rhs;
- ~~~ ^
-program_source:4:731: note: variable 'p31' declared const here
-program_source:68:7: error: cannot assign to variable 'p32' with const-qualified type 'int *const'
- p32 = rhs;
- ~~~ ^
-program_source:4:754: note: variable 'p32' declared const here
-program_source:69:7: error: cannot assign to variable 'p33' with const-qualified type 'int *const'
- p33 = rhs;
- ~~~ ^
-program_source:4:777: note: variable 'p33' declared const here
-program_source:70:7: error: cannot assign to variable 'p34' with const-qualified type 'int *const'
- p34 = rhs;
- ~~~ ^
-program_source:4:800: note: variable 'p34' declared const here
-program_source:71:7: error: cannot assign to variable 'p35' with const-qualified type 'int *const'
- p35 = rhs;
- ~~~ ^
-program_source:4:823: note: variable 'p35' declared const here
-program_source:72:7: error: cannot assign to variable 'p36' with const-qualified type 'int *const'
- p36 = rhs;
- ~~~ ^
-program_source:4:846: note: variable 'p36' declared const here
-program_source:73:7: error: cannot assign to variable 'p37' with const-qualified type 'int *const'
- p37 = rhs;
- ~~~ ^
-program_source:4:869: note: variable 'p37' declared const here
-program_source:74:7: error: cannot assign to variable 'p38' with const-qualified type 'int *const'
- p38 = rhs;
- ~~~ ^
-program_source:4:892: note: variable 'p38' declared const here
-program_source:75:7: error: cannot assign to variable 'p39' with const-qualified type 'int *const'
- p39 = rhs;
- ~~~ ^
-program_source:4:915: note: variable 'p39' declared const here
-program_source:76:7: error: cannot assign to variable 'p40' with const-qualified type 'int *const'
- p40 = rhs;
- ~~~ ^
-program_source:4:938: note: variable 'p40' declared const here
-program_source:77:7: error: cannot assign to variable 'p41' with const-qualified type 'int *const'
- p41 = rhs;
- ~~~ ^
-program_source:4:961: note: variable 'p41' declared const here
-program_source:78:7: error: cannot assign to variable 'p42' with const-qualified type 'int *const'
- p42 = rhs;
- ~~~ ^
-program_source:4:984: note: variable 'p42' declared const here
-program_source:79:7: error: cannot assign to variable 'p43' with const-qualified type 'int *const'
- p43 = rhs;
- ~~~ ^
-program_source:4:1007: note: variable 'p43' declared const here
-program_source:80:7: error: cannot assign to variable 'p44' with const-qualified type 'int *const'
- p44 = rhs;
- ~~~ ^
-program_source:4:1030: note: variable 'p44' declared const here
-program_source:81:7: error: cannot assign to variable 'p45' with const-qualified type 'int *const'
- p45 = rhs;
- ~~~ ^
-program_source:4:1053: note: variable 'p45' declared const here
-program_source:82:7: error: cannot assign to variable 'p46' with const-qualified type 'int *const'
- p46 = rhs;
- ~~~ ^
-program_source:4:1076: note: variable 'p46' declared const here
-program_source:83:7: error: cannot assign to variable 'p47' with const-qualified type 'int *const'
- p47 = rhs;
- ~~~ ^
-program_source:4:1099: note: variable 'p47' declared const here
-program_source:84:7: error: cannot assign to variable 'p48' with const-qualified type 'int *const'
- p48 = rhs;
- ~~~ ^
-program_source:4:1122: note: variable 'p48' declared const here
-program_source:85:7: error: cannot assign to variable 'p49' with const-qualified type 'int *const'
- p49 = rhs;
- ~~~ ^
-program_source:4:1145: note: variable 'p49' declared const here
-program_source:86:7: error: cannot assign to variable 'p50' with const-qualified type 'int *const'
- p50 = rhs;
- ~~~ ^
-program_source:4:1168: note: variable 'p50' declared const here
-program_source:87:7: error: cannot assign to variable 'p51' with const-qualified type 'int *const'
- p51 = rhs;
- ~~~ ^
-program_source:4:1191: note: variable 'p51' declared const here
-program_source:88:7: error: cannot assign to variable 'p52' with const-qualified type 'int *const'
- p52 = rhs;
- ~~~ ^
-program_source:4:1214: note: variable 'p52' declared const here
-program_source:89:7: error: cannot assign to variable 'p53' with const-qualified type 'int *const'
- p53 = rhs;
- ~~~ ^
-program_source:4:1237: note: variable 'p53' declared const here
-program_source:90:7: error: cannot assign to variable 'p54' with const-qualified type 'int *const'
- p54 = rhs;
- ~~~ ^
-program_source:4:1260: note: variable 'p54' declared const here
-program_source:91:7: error: cannot assign to variable 'p55' with const-qualified type 'int *const'
- p55 = rhs;
- ~~~ ^
-program_source:4:1283: note: variable 'p55' declared const here
-program_source:92:7: error: cannot assign to variable 'p56' with const-qualified type 'int *const'
- p56 = rhs;
- ~~~ ^
-program_source:4:1306: note: variable 'p56' declared const here
-program_source:93:7: error: cannot assign to variable 'p57' with const-qualified type 'int *const'
- p57 = rhs;
- ~~~ ^
-program_source:4:1329: note: variable 'p57' declared const here
-program_source:94:7: error: cannot assign to variable 'p58' with const-qualified type 'int *const'
- p58 = rhs;
- ~~~ ^
-program_source:4:1352: note: variable 'p58' declared const here
-program_source:95:7: error: cannot assign to variable 'p59' with const-qualified type 'int *const'
- p59 = rhs;
- ~~~ ^
-program_source:4:1375: note: variable 'p59' declared const here
-program_source:96:7: error: cannot assign to variable 'p60' with const-qualified type 'int *const'
- p60 = rhs;
- ~~~ ^
-program_source:4:1398: note: variable 'p60' declared const here
-program_source:97:7: error: cannot assign to variable 'p61' with const-qualified type 'int *const'
- p61 = rhs;
- ~~~ ^
-program_source:4:1421: note: variable 'p61' declared const here
-program_source:98:7: error: cannot assign to variable 'p62' with const-qualified type 'int *const'
- p62 = rhs;
- ~~~ ^
-program_source:4:1444: note: variable 'p62' declared const here
-program_source:99:7: error: cannot assign to variable 'p63' with const-qualified type 'int *const'
- p63 = rhs;
- ~~~ ^
-program_source:4:1467: note: variable 'p63' declared const here
-program_source:100:7: error: cannot assign to variable 'p64' with const-qualified type 'int *const'
- p64 = rhs;
- ~~~ ^
-program_source:4:1490: note: variable 'p64' declared const here
-program_source:101:7: error: cannot assign to variable 'p65' with const-qualified type 'int *const'
- p65 = rhs;
- ~~~ ^
-program_source:4:1513: note: variable 'p65' declared const here
-program_source:102:7: error: cannot assign to variable 'p66' with const-qualified type 'int *const'
- p66 = rhs;
- ~~~ ^
-program_source:4:1536: note: variable 'p66' declared const here
-program_source:103:7: error: cannot assign to variable 'p67' with const-qualified type 'int *const'
- p67 = rhs;
- ~~~ ^
-program_source:4:1559: note: variable 'p67' declared const here
-program_source:104:7: error: cannot assign to variable 'p68' with const-qualified type 'int *const'
- p68 = rhs;
- ~~~ ^
-program_source:4:1582: note: variable 'p68' declared const here
-program_source:105:7: error: cannot assign to variable 'p69' with const-qualified type 'int *const'
- p69 = rhs;
- ~~~ ^
-program_source:4:1605: note: variable 'p69' declared const here
-program_source:106:7: error: cannot assign to variable 'p70' with const-qualified type 'int *const'
- p70 = rhs;
- ~~~ ^
-program_source:4:1628: note: variable 'p70' declared const here
-program_source:107:7: error: cannot assign to variable 'p71' with const-qualified type 'int *const'
- p71 = rhs;
- ~~~ ^
-program_source:4:1651: note: variable 'p71' declared const here
-program_source:108:7: error: cannot assign to variable 'p72' with const-qualified type 'int *const'
- p72 = rhs;
- ~~~ ^
-program_source:4:1674: note: variable 'p72' declared const here
-program_source:109:7: error: cannot assign to variable 'p73' with const-qualified type 'int *const'
- p73 = rhs;
- ~~~ ^
-program_source:4:1697: note: variable 'p73' declared const here
-program_source:110:7: error: cannot assign to variable 'p74' with const-qualified type 'int *const'
- p74 = rhs;
- ~~~ ^
-program_source:4:1720: note: variable 'p74' declared const here
-program_source:111:7: error: cannot assign to variable 'p75' with const-qualified type 'int *const'
- p75 = rhs;
- ~~~ ^
-program_source:4:1743: note: variable 'p75' declared const here
-program_source:112:7: error: cannot assign to variable 'p76' with const-qualified type 'int *const'
- p76 = rhs;
- ~~~ ^
-program_source:4:1766: note: variable 'p76' declared const here
-program_source:113:7: error: cannot assign to variable 'p77' with const-qualified type 'int *const'
- p77 = rhs;
- ~~~ ^
-program_source:4:1789: note: variable 'p77' declared const here
-program_source:114:7: error: cannot assign to variable 'p78' with const-qualified type 'int *const'
- p78 = rhs;
- ~~~ ^
-program_source:4:1812: note: variable 'p78' declared const here
-program_source:115:7: error: cannot assign to variable 'p79' with const-qualified type 'int *const'
- p79 = rhs;
- ~~~ ^
-program_source:4:1835: note: variable 'p79' declared const here
-program_source:116:7: error: cannot assign to variable 'p80' with const-qualified type 'int *const'
- p80 = rhs;
- ~~~ ^
-program_source:4:1858: note: variable 'p80' declared const here
-program_source:117:7: error: cannot assign to variable 'p81' with const-qualified type 'int *const'
- p81 = rhs;
- ~~~ ^
-program_source:4:1881: note: variable 'p81' declared const here
-program_source:118:7: error: cannot assign to variable 'p82' with const-qualified type 'int *const'
- p82 = rhs;
- ~~~ ^
-program_source:4:1904: note: variable 'p82' declared const here
-program_source:119:7: error: cannot assign to variable 'p83' with const-qualified type 'int *const'
- p83 = rhs;
- ~~~ ^
-program_source:4:1927: note: variable 'p83' declared const here
-program_source:120:7: error: cannot assign to variable 'p84' with const-qualified type 'int *const'
- p84 = rhs;
- ~~~ ^
-program_source:4:1950: note: variable 'p84' declared const here
-program_source:121:7: error: cannot assign to variable 'p85' with const-qualified type 'int *const'
- p85 = rhs;
- ~~~ ^
-program_source:4:1973: note: variable 'p85' declared const here
-program_source:122:7: error: cannot assign to variable 'p86' with const-qualified type 'int *const'
- p86 = rhs;
- ~~~ ^
-program_source:4:1996: note: variable 'p86' declared const here
-program_source:123:7: error: cannot assign to variable 'p87' with const-qualified type 'int *const'
- p87 = rhs;
- ~~~ ^
-program_source:4:2019: note: variable 'p87' declared const here
-program_source:124:7: error: cannot assign to variable 'p88' with const-qualified type 'int *const'
- p88 = rhs;
- ~~~ ^
-program_source:4:2042: note: variable 'p88' declared const here
-program_source:125:7: error: cannot assign to variable 'p89' with const-qualified type 'int *const'
- p89 = rhs;
- ~~~ ^
-program_source:4:2065: note: variable 'p89' declared const here
-program_source:126:7: error: cannot assign to variable 'p90' with const-qualified type 'int *const'
- p90 = rhs;
- ~~~ ^
-program_source:4:2088: note: variable 'p90' declared const here
-program_source:127:7: error: cannot assign to variable 'p91' with const-qualified type 'int *const'
- p91 = rhs;
- ~~~ ^
-program_source:4:2111: note: variable 'p91' declared const here
-program_source:128:7: error: cannot assign to variable 'p92' with const-qualified type 'int *const'
- p92 = rhs;
- ~~~ ^
-program_source:4:2134: note: variable 'p92' declared const here
-program_source:129:7: error: cannot assign to variable 'p93' with const-qualified type 'int *const'
- p93 = rhs;
- ~~~ ^
-program_source:4:2157: note: variable 'p93' declared const here
-program_source:130:7: error: cannot assign to variable 'p94' with const-qualified type 'int *const'
- p94 = rhs;
- ~~~ ^
-program_source:4:2180: note: variable 'p94' declared const here
-program_source:131:7: error: cannot assign to variable 'p95' with const-qualified type 'int *const'
- p95 = rhs;
- ~~~ ^
-program_source:4:2203: note: variable 'p95' declared const here
-program_source:132:7: error: cannot assign to variable 'p96' with const-qualified type 'int *const'
- p96 = rhs;
- ~~~ ^
-program_source:4:2226: note: variable 'p96' declared const here
-program_source:133:7: error: cannot assign to variable 'p97' with const-qualified type 'int *const'
- p97 = rhs;
- ~~~ ^
-program_source:4:2249: note: variable 'p97' declared const here
-program_source:134:7: error: cannot assign to variable 'p98' with const-qualified type 'int *const'
- p98 = rhs;
- ~~~ ^
-program_source:4:2272: note: variable 'p98' declared const here
-program_source:135:7: error: cannot assign to variable 'p99' with const-qualified type 'int *const'
- p99 = rhs;
- ~~~ ^
-program_source:4:2295: note: variable 'p99' declared const here
-program_source:136:8: error: cannot assign to variable 'p100' with const-qualified type 'int *const'
- p100 = rhs;
- ~~~~ ^
-program_source:4:2318: note: variable 'p100' declared const here
-program_source:137:8: error: cannot assign to variable 'p101' with const-qualified type 'int *const'
- p101 = rhs;
- ~~~~ ^
-program_source:4:2342: note: variable 'p101' declared const here
-program_source:138:8: error: cannot assign to variable 'p102' with const-qualified type 'int *const'
- p102 = rhs;
- ~~~~ ^
-program_source:4:2366: note: variable 'p102' declared const here
-program_source:139:8: error: cannot assign to variable 'p103' with const-qualified type 'int *const'
- p103 = rhs;
- ~~~~ ^
-program_source:4:2390: note: variable 'p103' declared const here
-program_source:140:8: error: cannot assign to variable 'p104' with const-qualified type 'int *const'
- p104 = rhs;
- ~~~~ ^
-program_source:4:2414: note: variable 'p104' declared const here
-program_source:141:8: error: cannot assign to variable 'p105' with const-qualified type 'int *const'
- p105 = rhs;
- ~~~~ ^
-program_source:4:2438: note: variable 'p105' declared const here
-program_source:142:8: error: cannot assign to variable 'p106' with const-qualified type 'int *const'
- p106 = rhs;
- ~~~~ ^
-program_source:4:2462: note: variable 'p106' declared const here
-program_source:143:8: error: cannot assign to variable 'p107' with const-qualified type 'int *const'
- p107 = rhs;
- ~~~~ ^
-program_source:4:2486: note: variable 'p107' declared const here
-program_source:144:8: error: cannot assign to variable 'p108' with const-qualified type 'int *const'
- p108 = rhs;
- ~~~~ ^
-program_source:4:2510: note: variable 'p108' declared const here
-program_source:145:8: error: cannot assign to variable 'p109' with const-qualified type 'int *const'
- p109 = rhs;
- ~~~~ ^
-program_source:4:2534: note: variable 'p109' declared const here
-program_source:146:8: error: cannot assign to variable 'p110' with const-qualified type 'int *const'
- p110 = rhs;
- ~~~~ ^
-program_source:4:2558: note: variable 'p110' declared const here
-program_source:147:8: error: cannot assign to variable 'p111' with const-qualified type 'int *const'
- p111 = rhs;
- ~~~~ ^
-program_source:4:2582: note: variable 'p111' declared const here
-program_source:148:8: error: cannot assign to variable 'p112' with const-qualified type 'int *const'
- p112 = rhs;
- ~~~~ ^
-program_source:4:2606: note: variable 'p112' declared const here
-program_source:149:8: error: cannot assign to variable 'p113' with const-qualified type 'int *const'
- p113 = rhs;
- ~~~~ ^
-program_source:4:2630: note: variable 'p113' declared const here
-program_source:150:8: error: cannot assign to variable 'p114' with const-qualified type 'int *const'
- p114 = rhs;
- ~~~~ ^
-program_source:4:2654: note: variable 'p114' declared const here
-program_source:151:8: error: cannot assign to variable 'p115' with const-qualified type 'int *const'
- p115 = rhs;
- ~~~~ ^
-program_source:4:2678: note: variable 'p115' declared const here
-program_source:152:8: error: cannot assign to variable 'p116' with const-qualified type 'int *const'
- p116 = rhs;
- ~~~~ ^
-program_source:4:2702: note: variable 'p116' declared const here
-program_source:153:8: error: cannot assign to variable 'p117' with const-qualified type 'int *const'
- p117 = rhs;
- ~~~~ ^
-program_source:4:2726: note: variable 'p117' declared const here
-program_source:154:8: error: cannot assign to variable 'p118' with const-qualified type 'int *const'
- p118 = rhs;
- ~~~~ ^
-program_source:4:2750: note: variable 'p118' declared const here
-program_source:155:8: error: cannot assign to variable 'p119' with const-qualified type 'int *const'
- p119 = rhs;
- ~~~~ ^
-program_source:4:2774: note: variable 'p119' declared const here
-program_source:156:8: error: cannot assign to variable 'p120' with const-qualified type 'int *const'
- p120 = rhs;
- ~~~~ ^
-program_source:4:2798: note: variable 'p120' declared const here
-program_source:157:8: error: cannot assign to variable 'p121' with const-qualified type 'int *const'
- p121 = rhs;
- ~~~~ ^
-program_source:4:2822: note: variable 'p121' declared const here
-program_source:158:8: error: cannot assign to variable 'p122' with const-qualified type 'int *const'
- p122 = rhs;
- ~~~~ ^
-program_source:4:2846: note: variable 'p122' declared const here
-program_source:159:8: error: cannot assign to variable 'p123' with const-qualified type 'int *const'
- p123 = rhs;
- ~~~~ ^
-program_source:4:2870: note: variable 'p123' declared const here
-program_source:160:8: error: cannot assign to variable 'p124' with const-qualified type 'int *const'
- p124 = rhs;
- ~~~~ ^
-program_source:4:2894: note: variable 'p124' declared const here
-program_source:161:8: error: cannot assign to variable 'p125' with const-qualified type 'int *const'
- p125 = rhs;
- ~~~~ ^
-program_source:4:2918: note: variable 'p125' declared const here
-program_source:162:8: error: cannot assign to variable 'p126' with const-qualified type 'int *const'
- p126 = rhs;
- ~~~~ ^
-program_source:4:2942: note: variable 'p126' declared const here
-program_source:163:8: error: cannot assign to variable 'p127' with const-qualified type 'int *const'
- p127 = rhs;
- ~~~~ ^
-program_source:4:2966: note: variable 'p127' declared const here
-program_source:164:8: error: cannot assign to variable 'p128' with const-qualified type 'int *const'
- p128 = rhs;
- ~~~~ ^
-program_source:4:2990: note: variable 'p128' declared const here
-program_source:165:8: error: cannot assign to variable 'p129' with const-qualified type 'int *const'
- p129 = rhs;
- ~~~~ ^
-program_source:4:3014: note: variable 'p129' declared const here
-program_source:166:8: error: cannot assign to variable 'p130' with const-qualified type 'int *const'
- p130 = rhs;
- ~~~~ ^
-program_source:4:3038: note: variable 'p130' declared const here
-program_source:167:8: error: cannot assign to variable 'p131' with const-qualified type 'int *const'
- p131 = rhs;
- ~~~~ ^
-program_source:4:3062: note: variable 'p131' declared const here
-program_source:168:8: error: cannot assign to variable 'p132' with const-qualified type 'int *const'
- p132 = rhs;
- ~~~~ ^
-program_source:4:3086: note: variable 'p132' declared const here
-program_source:169:8: error: cannot assign to variable 'p133' with const-qualified type 'int *const'
- p133 = rhs;
- ~~~~ ^
-program_source:4:3110: note: variable 'p133' declared const here
-program_source:170:8: error: cannot assign to variable 'p134' with const-qualified type 'int *const'
- p134 = rhs;
- ~~~~ ^
-program_source:4:3134: note: variable 'p134' declared const here
-program_source:171:8: error: cannot assign to variable 'p135' with const-qualified type 'int *const'
- p135 = rhs;
- ~~~~ ^
-program_source:4:3158: note: variable 'p135' declared const here
-program_source:172:8: error: cannot assign to variable 'p136' with const-qualified type 'int *const'
- p136 = rhs;
- ~~~~ ^
-program_source:4:3182: note: variable 'p136' declared const here
-program_source:173:8: error: cannot assign to variable 'p137' with const-qualified type 'int *const'
- p137 = rhs;
- ~~~~ ^
-program_source:4:3206: note: variable 'p137' declared const here
-program_source:174:8: error: cannot assign to variable 'p138' with const-qualified type 'int *const'
- p138 = rhs;
- ~~~~ ^
-program_source:4:3230: note: variable 'p138' declared const here
-program_source:175:8: error: cannot assign to variable 'p139' with const-qualified type 'int *const'
- p139 = rhs;
- ~~~~ ^
-program_source:4:3254: note: variable 'p139' declared const here
-program_source:176:8: error: cannot assign to variable 'p140' with const-qualified type 'int *const'
- p140 = rhs;
- ~~~~ ^
-program_source:4:3278: note: variable 'p140' declared const here
-program_source:177:8: error: cannot assign to variable 'p141' with const-qualified type 'int *const'
- p141 = rhs;
- ~~~~ ^
-program_source:4:3302: note: variable 'p141' declared const here
-program_source:178:8: error: cannot assign to variable 'p142' with const-qualified type 'int *const'
- p142 = rhs;
- ~~~~ ^
-program_source:4:3326: note: variable 'p142' declared const here
-program_source:179:8: error: cannot assign to variable 'p143' with const-qualified type 'int *const'
- p143 = rhs;
- ~~~~ ^
-program_source:4:3350: note: variable 'p143' declared const here
-program_source:180:8: error: cannot assign to variable 'p144' with const-qualified type 'int *const'
- p144 = rhs;
- ~~~~ ^
-program_source:4:3374: note: variable 'p144' declared const here
-program_source:181:8: error: cannot assign to variable 'p145' with const-qualified type 'int *const'
- p145 = rhs;
- ~~~~ ^
-program_source:4:3398: note: variable 'p145' declared const here
-program_source:182:8: error: cannot assign to variable 'p146' with const-qualified type 'int *const'
- p146 = rhs;
- ~~~~ ^
-program_source:4:3422: note: variable 'p146' declared const here
-program_source:183:8: error: cannot assign to variable 'p147' with const-qualified type 'int *const'
- p147 = rhs;
- ~~~~ ^
-program_source:4:3446: note: variable 'p147' declared const here
-program_source:184:8: error: cannot assign to variable 'p148' with const-qualified type 'int *const'
- p148 = rhs;
- ~~~~ ^
-program_source:4:3470: note: variable 'p148' declared const here
-program_source:185:8: error: cannot assign to variable 'p149' with const-qualified type 'int *const'
- p149 = rhs;
- ~~~~ ^
-program_source:4:3494: note: variable 'p149' declared const here
-program_source:186:8: error: cannot assign to variable 'p150' with const-qualified type 'int *const'
- p150 = rhs;
- ~~~~ ^
-program_source:4:3518: note: variable 'p150' declared const here
-program_source:187:8: error: cannot assign to variable 'p151' with const-qualified type 'int *const'
- p151 = rhs;
- ~~~~ ^
-program_source:4:3542: note: variable 'p151' declared const here
-program_source:188:8: error: cannot assign to variable 'p152' with const-qualified type 'int *const'
- p152 = rhs;
- ~~~~ ^
-program_source:4:3566: note: variable 'p152' declared const here
-program_source:189:8: error: cannot assign to variable 'p153' with const-qualified type 'int *const'
- p153 = rhs;
- ~~~~ ^
-program_source:4:3590: note: variable 'p153' declared const here
-program_source:190:8: error: cannot assign to variable 'p154' with const-qualified type 'int *const'
- p154 = rhs;
- ~~~~ ^
-program_source:4:3614: note: variable 'p154' declared const here
-program_source:191:8: error: cannot assign to variable 'p155' with const-qualified type 'int *const'
- p155 = rhs;
- ~~~~ ^
-program_source:4:3638: note: variable 'p155' declared const here
-program_source:192:8: error: cannot assign to variable 'p156' with const-qualified type 'int *const'
- p156 = rhs;
- ~~~~ ^
-program_source:4:3662: note: variable 'p156' declared const here
-program_source:193:8: error: cannot assign to variable 'p157' with const-qualified type 'int *const'
- p157 = rhs;
- ~~~~ ^
-program_source:4:3686: note: variable 'p157' declared const here
-program_source:194:8: error: cannot assign to variable 'p158' with const-qualified type 'int *const'
- p158 = rhs;
- ~~~~ ^
-program_source:4:3710: note: variable 'p158' declared const here
-program_source:195:8: error: cannot assign to variable 'p159' with const-qualified type 'int *const'
- p159 = rhs;
- ~~~~ ^
-program_source:4:3734: note: variable 'p159' declared const here
-program_source:196:8: error: cannot assign to variable 'p160' with const-qualified type 'int *const'
- p160 = rhs;
- ~~~~ ^
-program_source:4:3758: note: variable 'p160' declared const here
-program_source:197:8: error: cannot assign to variable 'p161' with const-qualified type 'int *const'
- p161 = rhs;
- ~~~~ ^
-program_source:4:3782: note: variable 'p161' declared const here
-program_source:198:8: error: cannot assign to variable 'p162' with const-qualified type 'int *const'
- p162 = rhs;
- ~~~~ ^
-program_source:4:3806: note: variable 'p162' declared const here
-program_source:199:8: error: cannot assign to variable 'p163' with const-qualified type 'int *const'
- p163 = rhs;
- ~~~~ ^
-program_source:4:3830: note: variable 'p163' declared const here
-program_source:200:8: error: cannot assign to variable 'p164' with const-qualified type 'int *const'
- p164 = rhs;
- ~~~~ ^
-program_source:4:3854: note: variable 'p164' declared const here
-program_source:201:8: error: cannot assign to variable 'p165' with const-qualified type 'int *const'
- p165 = rhs;
- ~~~~ ^
-program_source:4:3878: note: variable 'p165' declared const here
-program_source:202:8: error: cannot assign to variable 'p166' with const-qualified type 'int *const'
- p166 = rhs;
- ~~~~ ^
-program_source:4:3902: note: variable 'p166' declared const here
-program_source:203:8: error: cannot assign to variable 'p167' with const-qualified type 'int *const'
- p167 = rhs;
- ~~~~ ^
-program_source:4:3926: note: variable 'p167' declared const here
-program_source:204:8: error: cannot assign to variable 'p168' with const-qualified type 'int *const'
- p168 = rhs;
- ~~~~ ^
-program_source:4:3950: note: variable 'p168' declared const here
-program_source:205:8: error: cannot assign to variable 'p169' with const-qualified type 'int *const'
- p169 = rhs;
- ~~~~ ^
-program_source:4:3974: note: variable 'p169' declared const here
-program_source:206:8: error: cannot assign to variable 'p170' with const-qualified type 'int *const'
- p170 = rhs;
- ~~~~ ^
-program_source:4:3998: note: variable 'p170' declared const here
-program_source:207:8: error: cannot assign to variable 'p171' with const-qualified type 'int *const'
- p171 = rhs;
- ~~~~ ^
-program_source:4:4022: note: variable 'p171' declared const here
-program_source:208:8: error: cannot assign to variable 'p172' with const-qualified type 'int *const'
- p172 = rhs;
- ~~~~ ^
-program_source:4:4046: note: variable 'p172' declared const here
-program_source:209:8: error: cannot assign to variable 'p173' with const-qualified type 'int *const'
- p173 = rhs;
- ~~~~ ^
-program_source:4:4070: note: variable 'p173' declared const here
-program_source:210:8: error: cannot assign to variable 'p174' with const-qualified type 'int *const'
- p174 = rhs;
- ~~~~ ^
-program_source:4:4094: note: variable 'p174' declared const here
-program_source:211:8: error: cannot assign to variable 'p175' with const-qualified type 'int *const'
- p175 = rhs;
- ~~~~ ^
-program_source:4:4118: note: variable 'p175' declared const here
-program_source:212:8: error: cannot assign to variable 'p176' with const-qualified type 'int *const'
- p176 = rhs;
- ~~~~ ^
-program_source:4:4142: note: variable 'p176' declared const here
-program_source:213:8: error: cannot assign to variable 'p177' with const-qualified type 'int *const'
- p177 = rhs;
- ~~~~ ^
-program_source:4:4166: note: variable 'p177' declared const here
-program_source:214:8: error: cannot assign to variable 'p178' with const-qualified type 'int *const'
- p178 = rhs;
- ~~~~ ^
-program_source:4:4190: note: variable 'p178' declared const here
-program_source:215:8: error: cannot assign to variable 'p179' with const-qualified type 'int *const'
- p179 = rhs;
- ~~~~ ^
-program_source:4:4214: note: variable 'p179' declared const here
-program_source:216:8: error: cannot assign to variable 'p180' with const-qualified type 'int *const'
- p180 = rhs;
- ~~~~ ^
-program_source:4:4238: note: variable 'p180' declared const here
-program_source:217:8: error: cannot assign to variable 'p181' with const-qualified type 'int *const'
- p181 = rhs;
- ~~~~ ^
-program_source:4:4262: note: variable 'p181' declared const here
-program_source:218:8: error: cannot assign to variable 'p182' with const-qualified type 'int *const'
- p182 = rhs;
- ~~~~ ^
-program_source:4:4286: note: variable 'p182' declared const here
-program_source:219:8: error: cannot assign to variable 'p183' with const-qualified type 'int *const'
- p183 = rhs;
- ~~~~ ^
-program_source:4:4310: note: variable 'p183' declared const here
-program_source:220:8: error: cannot assign to variable 'p184' with const-qualified type 'int *const'
- p184 = rhs;
- ~~~~ ^
-program_source:4:4334: note: variable 'p184' declared const here
-program_source:221:8: error: cannot assign to variable 'p185' with const-qualified type 'int *const'
- p185 = rhs;
- ~~~~ ^
-program_source:4:4358: note: variable 'p185' declared const here
-program_source:222:8: error: cannot assign to variable 'p186' with const-qualified type 'int *const'
- p186 = rhs;
- ~~~~ ^
-program_source:4:4382: note: variable 'p186' declared const here
-program_source:223:8: error: cannot assign to variable 'p187' with const-qualified type 'int *const'
- p187 = rhs;
- ~~~~ ^
-program_source:4:4406: note: variable 'p187' declared const here
-program_source:224:8: error: cannot assign to variable 'p188' with const-qualified type 'int *const'
- p188 = rhs;
- ~~~~ ^
-program_source:4:4430: note: variable 'p188' declared const here
-program_source:225:8: error: cannot assign to variable 'p189' with const-qualified type 'int *const'
- p189 = rhs;
- ~~~~ ^
-program_source:4:4454: note: variable 'p189' declared const here
-program_source:226:8: error: cannot assign to variable 'p190' with const-qualified type 'int *const'
- p190 = rhs;
- ~~~~ ^
-program_source:4:4478: note: variable 'p190' declared const here
-program_source:227:8: error: cannot assign to variable 'p191' with const-qualified type 'int *const'
- p191 = rhs;
- ~~~~ ^
-program_source:4:4502: note: variable 'p191' declared const here
-program_source:228:8: error: cannot assign to variable 'p192' with const-qualified type 'int *const'
- p192 = rhs;
- ~~~~ ^
-program_source:4:4526: note: variable 'p192' declared const here
-program_source:229:8: error: cannot assign to variable 'p193' with const-qualified type 'int *const'
- p193 = rhs;
- ~~~~ ^
-program_source:4:4550: note: variable 'p193' declared const here
-program_source:230:8: error: cannot assign to variable 'p194' with const-qualified type 'int *const'
- p194 = rhs;
- ~~~~ ^
-program_source:4:4574: note: variable 'p194' declared const here
-program_source:231:8: error: cannot assign to variable 'p195' with const-qualified type 'int *const'
- p195 = rhs;
- ~~~~ ^
-program_source:4:4598: note: variable 'p195' declared const here
-program_source:232:8: error: cannot assign to variable 'p196' with const-qualified type 'int *const'
- p196 = rhs;
- ~~~~ ^
-program_source:4:4622: note: variable 'p196' declared const here
-program_source:233:8: error: cannot assign to variable 'p197' with const-qualified type 'int *const'
- p197 = rhs;
- ~~~~ ^
-program_source:4:4646: note: variable 'p197' declared const here
-program_source:234:8: error: cannot assign to variable 'p198' with const-qualified type 'int *const'
- p198 = rhs;
- ~~~~ ^
-program_source:4:4670: note: variable 'p198' declared const here
-program_source:235:8: error: cannot assign to variable 'p199' with const-qualified type 'int *const'
- p199 = rhs;
- ~~~~ ^
-program_source:4:4694: note: variable 'p199' declared const here
-program_source:236:8: error: cannot assign to variable 'p200' with const-qualified type 'int *const'
- p200 = rhs;
- ~~~~ ^
-program_source:4:4718: note: variable 'p200' declared const here
-program_source:237:8: error: cannot assign to variable 'p201' with const-qualified type 'int *const'
- p201 = rhs;
- ~~~~ ^
-program_source:4:4742: note: variable 'p201' declared const here
-program_source:238:8: error: cannot assign to variable 'p202' with const-qualified type 'int *const'
- p202 = rhs;
- ~~~~ ^
-program_source:4:4766: note: variable 'p202' declared const here
-program_source:239:8: error: cannot assign to variable 'p203' with const-qualified type 'int *const'
- p203 = rhs;
- ~~~~ ^
-program_source:4:4790: note: variable 'p203' declared const here
-program_source:240:8: error: cannot assign to variable 'p204' with const-qualified type 'int *const'
- p204 = rhs;
- ~~~~ ^
-program_source:4:4814: note: variable 'p204' declared const here
-program_source:241:8: error: cannot assign to variable 'p205' with const-qualified type 'int *const'
- p205 = rhs;
- ~~~~ ^
-program_source:4:4838: note: variable 'p205' declared const here
-program_source:242:8: error: cannot assign to variable 'p206' with const-qualified type 'int *const'
- p206 = rhs;
- ~~~~ ^
-program_source:4:4862: note: variable 'p206' declared const here
-program_source:243:8: error: cannot assign to variable 'p207' with const-qualified type 'int *const'
- p207 = rhs;
- ~~~~ ^
-program_source:4:4886: note: variable 'p207' declared const here
-program_source:244:8: error: cannot assign to variable 'p208' with const-qualified type 'int *const'
- p208 = rhs;
- ~~~~ ^
-program_source:4:4910: note: variable 'p208' declared const here
-program_source:245:8: error: cannot assign to variable 'p209' with const-qualified type 'int *const'
- p209 = rhs;
- ~~~~ ^
-program_source:4:4934: note: variable 'p209' declared const here
-program_source:246:8: error: cannot assign to variable 'p210' with const-qualified type 'int *const'
- p210 = rhs;
- ~~~~ ^
-program_source:4:4958: note: variable 'p210' declared const here
-program_source:247:8: error: cannot assign to variable 'p211' with const-qualified type 'int *const'
- p211 = rhs;
- ~~~~ ^
-program_source:4:4982: note: variable 'p211' declared const here
-program_source:248:8: error: cannot assign to variable 'p212' with const-qualified type 'int *const'
- p212 = rhs;
- ~~~~ ^
-program_source:4:5006: note: variable 'p212' declared const here
-program_source:249:8: error: cannot assign to variable 'p213' with const-qualified type 'int *const'
- p213 = rhs;
- ~~~~ ^
-program_source:4:5030: note: variable 'p213' declared const here
-program_source:250:8: error: cannot assign to variable 'p214' with const-qualified type 'int *const'
- p214 = rhs;
- ~~~~ ^
-program_source:4:5054: note: variable 'p214' declared const here
-program_source:251:8: error: cannot assign to variable 'p215' with const-qualified type 'int *const'
- p215 = rhs;
- ~~~~ ^
-program_source:4:5078: note: variable 'p215' declared const here
-program_source:252:8: error: cannot assign to variable 'p216' with const-qualified type 'int *const'
- p216 = rhs;
- ~~~~ ^
-program_source:4:5102: note: variable 'p216' declared const here
-program_source:253:8: error: cannot assign to variable 'p217' with const-qualified type 'int *const'
- p217 = rhs;
- ~~~~ ^
-program_source:4:5126: note: variable 'p217' declared const here
-program_source:254:8: error: cannot assign to variable 'p218' with const-qualified type 'int *const'
- p218 = rhs;
- ~~~~ ^
-program_source:4:5150: note: variable 'p218' declared const here
-program_source:255:8: error: cannot assign to variable 'p219' with const-qualified type 'int *const'
- p219 = rhs;
- ~~~~ ^
-program_source:4:5174: note: variable 'p219' declared const here
-program_source:256:8: error: cannot assign to variable 'p220' with const-qualified type 'int *const'
- p220 = rhs;
- ~~~~ ^
-program_source:4:5198: note: variable 'p220' declared const here
-program_source:257:8: error: cannot assign to variable 'p221' with const-qualified type 'int *const'
- p221 = rhs;
- ~~~~ ^
-program_source:4:5222: note: variable 'p221' declared const here
-program_source:258:8: error: cannot assign to variable 'p222' with const-qualified type 'int *const'
- p222 = rhs;
- ~~~~ ^
-program_source:4:5246: note: variable 'p222' declared const here
-program_source:259:8: error: cannot assign to variable 'p223' with const-qualified type 'int *const'
- p223 = rhs;
- ~~~~ ^
-program_source:4:5270: note: variable 'p223' declared const here
-program_source:260:8: error: cannot assign to variable 'p224' with const-qualified type 'int *const'
- p224 = rhs;
- ~~~~ ^
-program_source:4:5294: note: variable 'p224' declared const here
-program_source:261:8: error: cannot assign to variable 'p225' with const-qualified type 'int *const'
- p225 = rhs;
- ~~~~ ^
-program_source:4:5318: note: variable 'p225' declared const here
-program_source:262:8: error: cannot assign to variable 'p226' with const-qualified type 'int *const'
- p226 = rhs;
- ~~~~ ^
-program_source:4:5342: note: variable 'p226' declared const here
-program_source:263:8: error: cannot assign to variable 'p227' with const-qualified type 'int *const'
- p227 = rhs;
- ~~~~ ^
-program_source:4:5366: note: variable 'p227' declared const here
-program_source:264:8: error: cannot assign to variable 'p228' with const-qualified type 'int *const'
- p228 = rhs;
- ~~~~ ^
-program_source:4:5390: note: variable 'p228' declared const here
-program_source:265:8: error: cannot assign to variable 'p229' with const-qualified type 'int *const'
- p229 = rhs;
- ~~~~ ^
-program_source:4:5414: note: variable 'p229' declared const here
-program_source:266:8: error: cannot assign to variable 'p230' with const-qualified type 'int *const'
- p230 = rhs;
- ~~~~ ^
-program_source:4:5438: note: variable 'p230' declared const here
-program_source:267:8: error: cannot assign to variable 'p231' with const-qualified type 'int *const'
- p231 = rhs;
- ~~~~ ^
-program_source:4:5462: note: variable 'p231' declared const here
-program_source:268:8: error: cannot assign to variable 'p232' with const-qualified type 'int *const'
- p232 = rhs;
- ~~~~ ^
-program_source:4:5486: note: variable 'p232' declared const here
-program_source:269:8: error: cannot assign to variable 'p233' with const-qualified type 'int *const'
- p233 = rhs;
- ~~~~ ^
-program_source:4:5510: note: variable 'p233' declared const here
-program_source:270:8: error: cannot assign to variable 'p234' with const-qualified type 'int *const'
- p234 = rhs;
- ~~~~ ^
-program_source:4:5534: note: variable 'p234' declared const here
-program_source:271:8: error: cannot assign to variable 'p235' with const-qualified type 'int *const'
- p235 = rhs;
- ~~~~ ^
-program_source:4:5558: note: variable 'p235' declared const here
-program_source:272:8: error: cannot assign to variable 'p236' with const-qualified type 'int *const'
- p236 = rhs;
- ~~~~ ^
-program_source:4:5582: note: variable 'p236' declared const here
-program_source:273:8: error: cannot assign to variable 'p237' with const-qualified type 'int *const'
- p237 = rhs;
- ~~~~ ^
-program_source:4:5606: note: variable 'p237' declared const here
-program_source:274:8: error: cannot assign to variable 'p238' with const-qualified type 'int *const'
- p238 = rhs;
- ~~~~ ^
-program_source:4:5630: note: variable 'p238' declared const here
-program_source:275:8: error: cannot assign to variable 'p239' with const-qualified type 'int *const'
- p239 = rhs;
- ~~~~ ^
-program_source:4:5654: note: variable 'p239' declared const here
-program_source:276:8: error: cannot assign to variable 'p240' with const-qualified type 'int *const'
- p240 = rhs;
- ~~~~ ^
-program_source:4:5678: note: variable 'p240' declared const here
-program_source:277:8: error: cannot assign to variable 'p241' with const-qualified type 'int *const'
- p241 = rhs;
- ~~~~ ^
-program_source:4:5702: note: variable 'p241' declared const here
-program_source:278:8: error: cannot assign to variable 'p242' with const-qualified type 'int *const'
- p242 = rhs;
- ~~~~ ^
-program_source:4:5726: note: variable 'p242' declared const here
-program_source:279:8: error: cannot assign to variable 'p243' with const-qualified type 'int *const'
- p243 = rhs;
- ~~~~ ^
-program_source:4:5750: note: variable 'p243' declared const here
-program_source:280:8: error: cannot assign to variable 'p244' with const-qualified type 'int *const'
- p244 = rhs;
- ~~~~ ^
-program_source:4:5774: note: variable 'p244' declared const here
-program_source:281:8: error: cannot assign to variable 'p245' with const-qualified type 'int *const'
- p245 = rhs;
- ~~~~ ^
-program_source:4:5798: note: variable 'p245' declared const here
-program_source:282:8: error: cannot assign to variable 'p246' with const-qualified type 'int *const'
- p246 = rhs;
- ~~~~ ^
-program_source:4:5822: note: variable 'p246' declared const here
-program_source:283:8: error: cannot assign to variable 'p247' with const-qualified type 'int *const'
- p247 = rhs;
- ~~~~ ^
-program_source:4:5846: note: variable 'p247' declared const here
-program_source:284:8: error: cannot assign to variable 'p248' with const-qualified type 'int *const'
- p248 = rhs;
- ~~~~ ^
-program_source:4:5870: note: variable 'p248' declared const here
-program_source:285:8: error: cannot assign to variable 'p249' with const-qualified type 'int *const'
- p249 = rhs;
- ~~~~ ^
-program_source:4:5894: note: variable 'p249' declared const here
-program_source:286:8: error: cannot assign to variable 'p250' with const-qualified type 'int *const'
- p250 = rhs;
- ~~~~ ^
-program_source:4:5918: note: variable 'p250' declared const here
-program_source:287:8: error: cannot assign to variable 'p251' with const-qualified type 'int *const'
- p251 = rhs;
- ~~~~ ^
-program_source:4:5942: note: variable 'p251' declared const here
-program_source:288:8: error: cannot assign to variable 'p252' with const-qualified type 'int *const'
- p252 = rhs;
- ~~~~ ^
-program_source:4:5966: note: variable 'p252' declared const here
-program_source:289:8: error: cannot assign to variable 'p253' with const-qualified type 'int *const'
- p253 = rhs;
- ~~~~ ^
-program_source:4:5990: note: variable 'p253' declared const here
-program_source:290:8: error: cannot assign to variable 'p254' with const-qualified type 'int *const'
- p254 = rhs;
- ~~~~ ^
-program_source:4:6014: note: variable 'p254' declared const here
-program_source:548:3: error: no matching function for call to 'foo'
- foo(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63, v64, v65, v66, v67, v68, v69, v70, v71, v72, v73, v74, v75, v76, v77, v78, v79, v80, v81, v82, v83, v84, v85, v86, v87, v88, v89, v90, v91, v92, v93, v94, v95, v96, v97, v98, v99, v100, v101, v102, v103, v104, v105, v106, v107, v108, v109, v110, v111, v112, v113, v114, v115, v116, v117, v118, v119, v120, v121, v122, v123, v124, v125, v126, v127, v128, v129, v130, v131, v132, v133, v134, v135, v136, v137, v138, v139, v140, v141, v142, v143, v144, v145, v146, v147, v148, v149, v150, v151, v152, v153, v154, v155, v156, v157, v158, v159, v160, v161, v162, v163, v164, v165, v166, v167, v168, v169, v170, v171, v172, v173, v174, v175, v176, v177, v178, v179, v180, v181, v182, v183, v184, v185, v186, v187, v188, v189, v190, v191, v192, v193, v194, v195, v196, v197, v198, v199, v200, v201, v202, v203, v204, v205, v206, v207, v208, v209, v210, v211, v212, v213, v214, v215, v216, v217, v218, v219, v220, v221, v222, v223, v224, v225, v226, v227, v228, v229, v230, v231, v232, v233, v234, v235, v236, v237, v238, v239, v240, v241, v242, v243, v244, v245, v246, v247, v248, v249, v250, v251, v252, v253, v254);
- ^~~
-program_source:4:6: note: candidate function not viable: no known conversion from 'int' to 'int *const' for 1st argument; take the address of the argument with &
-program_source:549:13: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
- if ((v254 == 0)) {
- ~~~~~^~~~
-program_source:549:13: note: remove extraneous parentheses around the comparison to silence this warning
- if ((v254 == 0)) {
- ~ ^ ~
-program_source:549:13: note: use '=' to turn this equality comparison into an assignment
- if ((v254 == 0)) {
- ^~
- =
-
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 5efff12..6ba9099 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
@@ -1,22 +1,23 @@
-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: $B1: { # root
- %in:ptr<storage, array<f16, 4>, read> = var @binding_point(0, 0)
- %out:ptr<storage, array<f16, 4>, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const device tint_array<half, 4>* in;
+ 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)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<f16, 4> = load %in
- store %out, %4
- 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/buffer/storage/types/array4_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/array4_f32.wgsl.expected.ir.msl
index 8e51e1b..707a37b 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
@@ -1,22 +1,23 @@
-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: $B1: { # root
- %in:ptr<storage, array<f32, 4>, read> = var @binding_point(0, 0)
- %out:ptr<storage, array<f32, 4>, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const device tint_array<float, 4>* in;
+ 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)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<f32, 4> = load %in
- store %out, %4
- 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/buffer/storage/types/f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/f16.wgsl.expected.ir.msl
index 8a3ce30..7b4b10b 100644
--- a/test/tint/buffer/storage/types/f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/f16.wgsl.expected.ir.msl
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device half* in;
+ device half* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, f16, read> = var @binding_point(0, 0)
- %out:ptr<storage, f16, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device half* in [[buffer(0)]], device half* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:f16 = load %in
- store %out, %4
- 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/buffer/storage/types/f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/f32.wgsl.expected.ir.msl
index c6d9e30..47b2078 100644
--- a/test/tint/buffer/storage/types/f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/f32.wgsl.expected.ir.msl
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device float* in;
+ device float* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, f32, read> = var @binding_point(0, 0)
- %out:ptr<storage, f32, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device float* in [[buffer(0)]], device float* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:f32 = load %in
- store %out, %4
- 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/buffer/storage/types/i32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/i32.wgsl.expected.ir.msl
index a84dbf6..edc0ef0 100644
--- a/test/tint/buffer/storage/types/i32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/i32.wgsl.expected.ir.msl
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device int* in;
+ device int* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, i32, read> = var @binding_point(0, 0)
- %out:ptr<storage, i32, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device int* in [[buffer(0)]], device int* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:i32 = load %in
- store %out, %4
- 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/buffer/storage/types/mat2x2_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.ir.msl
index 189b8ce..824b701 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device half2x2* in;
+ device half2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, mat2x2<f16>, read> = var @binding_point(0, 0)
- %out:ptr<storage, mat2x2<f16>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device half2x2* in [[buffer(0)]], device half2x2* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f16> = load %in
- store %out, %4
- 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/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.msl
index 17acaf1..e0724a7 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device float2x2* in;
+ device float2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, mat2x2<f32>, read> = var @binding_point(0, 0)
- %out:ptr<storage, mat2x2<f32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device float2x2* in [[buffer(0)]], device float2x2* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f32> = load %in
- store %out, %4
- 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/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.msl
index fe91e6c..412ece7 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
@@ -1,33 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device half2x3* in;
+ device half2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, mat2x3<f16>, read> = var @binding_point(0, 0)
- %out:ptr<storage, mat2x3<f16>, read_write> = var @binding_point(0, 1)
+void tint_store_and_preserve_padding(device half2x3* const target, half2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f16> = load %in
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void tint_symbol(const device half2x3* in [[buffer(0)]], device half2x3* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.in));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f16>, read_write>, %value_param:mat2x3<f16>):void {
- $B3: {
- %9:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %10:vec3<f16> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %12:vec3<f16> = access %value_param, 1u
- 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/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.msl
index 4423fbe..456f0fd 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
@@ -1,33 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device float2x3* in;
+ device float2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, mat2x3<f32>, read> = var @binding_point(0, 0)
- %out:ptr<storage, mat2x3<f32>, read_write> = var @binding_point(0, 1)
+void tint_store_and_preserve_padding(device float2x3* const target, float2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f32> = load %in
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void tint_symbol(const device float2x3* in [[buffer(0)]], device float2x3* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.in));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f32>, read_write>, %value_param:mat2x3<f32>):void {
- $B3: {
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %10:vec3<f32> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %12:vec3<f32> = access %value_param, 1u
- 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/buffer/storage/types/mat2x4_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.ir.msl
index 07a73c5..6a84e3e 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device half2x4* in;
+ device half2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, mat2x4<f16>, read> = var @binding_point(0, 0)
- %out:ptr<storage, mat2x4<f16>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device half2x4* in [[buffer(0)]], device half2x4* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f16> = load %in
- store %out, %4
- 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/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.msl
index 6e3cc0f..34f93d0 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device float2x4* in;
+ device float2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, mat2x4<f32>, read> = var @binding_point(0, 0)
- %out:ptr<storage, mat2x4<f32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device float2x4* in [[buffer(0)]], device float2x4* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f32> = load %in
- store %out, %4
- 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/buffer/storage/types/mat3x2_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.ir.msl
index b906b25..19c106b 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device half3x2* in;
+ device half3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, mat3x2<f16>, read> = var @binding_point(0, 0)
- %out:ptr<storage, mat3x2<f16>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device half3x2* in [[buffer(0)]], device half3x2* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f16> = load %in
- store %out, %4
- 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/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.msl
index 8522e4f..85f9043 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device float3x2* in;
+ device float3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, mat3x2<f32>, read> = var @binding_point(0, 0)
- %out:ptr<storage, mat3x2<f32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device float3x2* in [[buffer(0)]], device float3x2* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f32> = load %in
- store %out, %4
- 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/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.msl
index 73c8213..98f4a8f 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
@@ -1,36 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device half3x3* in;
+ device half3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, mat3x3<f16>, read> = var @binding_point(0, 0)
- %out:ptr<storage, mat3x3<f16>, read_write> = var @binding_point(0, 1)
+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];
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f16> = load %in
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void tint_symbol(const device half3x3* in [[buffer(0)]], device half3x3* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.in));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f16>, read_write>, %value_param:mat3x3<f16>):void {
- $B3: {
- %9:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %10:vec3<f16> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %12:vec3<f16> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %14:vec3<f16> = access %value_param, 2u
- 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/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.msl
index ce6f52f..b3e18bc 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
@@ -1,36 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device float3x3* in;
+ device float3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, mat3x3<f32>, read> = var @binding_point(0, 0)
- %out:ptr<storage, mat3x3<f32>, read_write> = var @binding_point(0, 1)
+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];
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f32> = load %in
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void tint_symbol(const device float3x3* in [[buffer(0)]], device float3x3* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.in));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f32>, read_write>, %value_param:mat3x3<f32>):void {
- $B3: {
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %10:vec3<f32> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %12:vec3<f32> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %14:vec3<f32> = access %value_param, 2u
- 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/buffer/storage/types/mat3x4_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.ir.msl
index f030f51..0a096bd 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device half3x4* in;
+ device half3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, mat3x4<f16>, read> = var @binding_point(0, 0)
- %out:ptr<storage, mat3x4<f16>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device half3x4* in [[buffer(0)]], device half3x4* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f16> = load %in
- store %out, %4
- 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/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.msl
index 235bd7a..05d12e3 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device float3x4* in;
+ device float3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, mat3x4<f32>, read> = var @binding_point(0, 0)
- %out:ptr<storage, mat3x4<f32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device float3x4* in [[buffer(0)]], device float3x4* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f32> = load %in
- store %out, %4
- 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/buffer/storage/types/mat4x2_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.ir.msl
index c8bacd4..dbefc25 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device half4x2* in;
+ device half4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, mat4x2<f16>, read> = var @binding_point(0, 0)
- %out:ptr<storage, mat4x2<f16>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device half4x2* in [[buffer(0)]], device half4x2* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f16> = load %in
- store %out, %4
- 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/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.msl
index 9b4d556..b756c9e 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device float4x2* in;
+ device float4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, mat4x2<f32>, read> = var @binding_point(0, 0)
- %out:ptr<storage, mat4x2<f32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device float4x2* in [[buffer(0)]], device float4x2* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f32> = load %in
- store %out, %4
- 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/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.msl
index 2680261..231d79a 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
@@ -1,39 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device half4x3* in;
+ device half4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, mat4x3<f16>, read> = var @binding_point(0, 0)
- %out:ptr<storage, mat4x3<f16>, read_write> = var @binding_point(0, 1)
+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];
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f16> = load %in
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void tint_symbol(const device half4x3* in [[buffer(0)]], device half4x3* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.in));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f16>, read_write>, %value_param:mat4x3<f16>):void {
- $B3: {
- %9:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %10:vec3<f16> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %12:vec3<f16> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %14:vec3<f16> = access %value_param, 2u
- store %13, %14
- %15:ptr<storage, vec3<f16>, read_write> = access %target, 3u
- %16:vec3<f16> = access %value_param, 3u
- store %15, %16
- 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/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.msl
index f360275..b048da1 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
@@ -1,39 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device float4x3* in;
+ device float4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, mat4x3<f32>, read> = var @binding_point(0, 0)
- %out:ptr<storage, mat4x3<f32>, read_write> = var @binding_point(0, 1)
+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];
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f32> = load %in
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void tint_symbol(const device float4x3* in [[buffer(0)]], device float4x3* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.in));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f32>, read_write>, %value_param:mat4x3<f32>):void {
- $B3: {
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %10:vec3<f32> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %12:vec3<f32> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %14:vec3<f32> = access %value_param, 2u
- store %13, %14
- %15:ptr<storage, vec3<f32>, read_write> = access %target, 3u
- %16:vec3<f32> = access %value_param, 3u
- store %15, %16
- 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/buffer/storage/types/mat4x4_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.ir.msl
index b1f7375..c513d85 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device half4x4* in;
+ device half4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, mat4x4<f16>, read> = var @binding_point(0, 0)
- %out:ptr<storage, mat4x4<f16>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device half4x4* in [[buffer(0)]], device half4x4* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f16> = load %in
- store %out, %4
- 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/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.msl
index e5c26b0..c916802 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device float4x4* in;
+ device float4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, mat4x4<f32>, read> = var @binding_point(0, 0)
- %out:ptr<storage, mat4x4<f32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device float4x4* in [[buffer(0)]], device float4x4* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f32> = load %in
- store %out, %4
- 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/buffer/storage/types/runtime_array_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/runtime_array_f16.wgsl.expected.ir.msl
index 8cca224..1e62fb1 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
@@ -19,5 +19,5 @@
kernel void tint_symbol(const device tint_array<half, 1>* in [[buffer(0)]], device tint_array<half, 1>* out [[buffer(1)]]) {
tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
- tint_module_vars.out[0] = tint_module_vars.in[0];
+ (*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 d148d72..854ef60 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
@@ -19,5 +19,5 @@
kernel void tint_symbol(const device tint_array<float, 1>* in [[buffer(0)]], device tint_array<float, 1>* out [[buffer(1)]]) {
tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
- tint_module_vars.out[0] = tint_module_vars.in[0];
+ (*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 b43ae16..c164eb7 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
@@ -1,55 +1,28 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Inner {
+ half scalar_f16;
+ half3 vec3_f16;
+ half2x4 mat2x4_f16;
+};
+struct S {
+ Inner inner;
+};
+struct tint_module_vars_struct {
+ const device S* in;
+ device S* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Inner = struct @align(8) {
- scalar_f16:f16 @offset(0)
- vec3_f16:vec3<f16> @offset(8)
- mat2x4_f16:mat2x4<f16> @offset(16)
+void tint_store_and_preserve_padding(device Inner* const target, Inner value_param) {
+ (*target).scalar_f16 = value_param.scalar_f16;
+ (*target).vec3_f16 = value_param.vec3_f16;
+ (*target).mat2x4_f16 = value_param.mat2x4_f16;
}
-
-S = struct @align(8) {
- inner:Inner @offset(0)
+void tint_store_and_preserve_padding(device S* const target, S value_param) {
+ tint_store_and_preserve_padding((&(*target).inner), value_param.inner);
}
-
-$B1: { # root
- %in:ptr<storage, S, read> = var @binding_point(0, 0)
- %out:ptr<storage, S, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device S* in [[buffer(0)]], device S* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ S const t = (*tint_module_vars.in);
+ tint_store_and_preserve_padding(tint_module_vars.out, t);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:S = load %in
- %t:S = let %4
- %6:void = call %tint_store_and_preserve_padding, %out, %t
- ret
- }
-}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, S, read_write>, %value_param:S):void {
- $B3: {
- %10:ptr<storage, Inner, read_write> = access %target, 0u
- %11:Inner = access %value_param, 0u
- %12:void = call %tint_store_and_preserve_padding_1, %10, %11
- ret
- }
-}
-%tint_store_and_preserve_padding_1 = func(%target_1:ptr<storage, Inner, read_write>, %value_param_1:Inner):void { # %tint_store_and_preserve_padding_1: 'tint_store_and_preserve_padding', %target_1: 'target', %value_param_1: 'value_param'
- $B4: {
- %16:ptr<storage, f16, read_write> = access %target_1, 0u
- %17:f16 = access %value_param_1, 0u
- store %16, %17
- %18:ptr<storage, vec3<f16>, read_write> = access %target_1, 1u
- %19:vec3<f16> = access %value_param_1, 1u
- store %18, %19
- %20:ptr<storage, mat2x4<f16>, read_write> = access %target_1, 2u
- %21:mat2x4<f16> = access %value_param_1, 2u
- store %20, %21
- 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/buffer/storage/types/struct_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.msl
index d07af79..63beebd 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
@@ -1,55 +1,28 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Inner {
+ float scalar_f32;
+ float3 vec3_f32;
+ float2x4 mat2x4_f32;
+};
+struct S {
+ Inner inner;
+};
+struct tint_module_vars_struct {
+ const device S* in;
+ device S* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Inner = struct @align(16) {
- scalar_f32:f32 @offset(0)
- vec3_f32:vec3<f32> @offset(16)
- mat2x4_f32:mat2x4<f32> @offset(32)
+void tint_store_and_preserve_padding(device Inner* const target, Inner value_param) {
+ (*target).scalar_f32 = value_param.scalar_f32;
+ (*target).vec3_f32 = value_param.vec3_f32;
+ (*target).mat2x4_f32 = value_param.mat2x4_f32;
}
-
-S = struct @align(16) {
- inner:Inner @offset(0)
+void tint_store_and_preserve_padding(device S* const target, S value_param) {
+ tint_store_and_preserve_padding((&(*target).inner), value_param.inner);
}
-
-$B1: { # root
- %in:ptr<storage, S, read> = var @binding_point(0, 0)
- %out:ptr<storage, S, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device S* in [[buffer(0)]], device S* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ S const t = (*tint_module_vars.in);
+ tint_store_and_preserve_padding(tint_module_vars.out, t);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:S = load %in
- %t:S = let %4
- %6:void = call %tint_store_and_preserve_padding, %out, %t
- ret
- }
-}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, S, read_write>, %value_param:S):void {
- $B3: {
- %10:ptr<storage, Inner, read_write> = access %target, 0u
- %11:Inner = access %value_param, 0u
- %12:void = call %tint_store_and_preserve_padding_1, %10, %11
- ret
- }
-}
-%tint_store_and_preserve_padding_1 = func(%target_1:ptr<storage, Inner, read_write>, %value_param_1:Inner):void { # %tint_store_and_preserve_padding_1: 'tint_store_and_preserve_padding', %target_1: 'target', %value_param_1: 'value_param'
- $B4: {
- %16:ptr<storage, f32, read_write> = access %target_1, 0u
- %17:f32 = access %value_param_1, 0u
- store %16, %17
- %18:ptr<storage, vec3<f32>, read_write> = access %target_1, 1u
- %19:vec3<f32> = access %value_param_1, 1u
- store %18, %19
- %20:ptr<storage, mat2x4<f32>, read_write> = access %target_1, 2u
- %21:mat2x4<f32> = access %value_param_1, 2u
- store %20, %21
- 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/buffer/storage/types/u32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/u32.wgsl.expected.ir.msl
index 47e58b1..722f79b 100644
--- a/test/tint/buffer/storage/types/u32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/storage/types/u32.wgsl.expected.ir.msl
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device uint* in;
+ device uint* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, u32, read> = var @binding_point(0, 0)
- %out:ptr<storage, u32, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device uint* in [[buffer(0)]], device uint* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:u32 = load %in
- store %out, %4
- 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/buffer/storage/types/vec2_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec2_f16.wgsl.expected.ir.msl
index 7d1f789..7cd3047 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device half2* in;
+ device half2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, vec2<f16>, read> = var @binding_point(0, 0)
- %out:ptr<storage, vec2<f16>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device half2* in [[buffer(0)]], device half2* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec2<f16> = load %in
- store %out, %4
- 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/buffer/storage/types/vec2_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec2_f32.wgsl.expected.ir.msl
index 07039b0..9dc1b65 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device float2* in;
+ device float2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, vec2<f32>, read> = var @binding_point(0, 0)
- %out:ptr<storage, vec2<f32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device float2* in [[buffer(0)]], device float2* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec2<f32> = load %in
- store %out, %4
- 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/buffer/storage/types/vec2_i32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec2_i32.wgsl.expected.ir.msl
index 90f8a42..d9ac05a2 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device int2* in;
+ device int2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, vec2<i32>, read> = var @binding_point(0, 0)
- %out:ptr<storage, vec2<i32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device int2* in [[buffer(0)]], device int2* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec2<i32> = load %in
- store %out, %4
- 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/buffer/storage/types/vec2_u32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec2_u32.wgsl.expected.ir.msl
index 7f8436e..da42370 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device uint2* in;
+ device uint2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, vec2<u32>, read> = var @binding_point(0, 0)
- %out:ptr<storage, vec2<u32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device uint2* in [[buffer(0)]], device uint2* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec2<u32> = load %in
- store %out, %4
- 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/buffer/storage/types/vec3_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec3_f16.wgsl.expected.ir.msl
index d886d54..b701bb1 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device half3* in;
+ device half3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, vec3<f16>, read> = var @binding_point(0, 0)
- %out:ptr<storage, vec3<f16>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device half3* in [[buffer(0)]], device half3* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec3<f16> = load %in
- store %out, %4
- 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/buffer/storage/types/vec3_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec3_f32.wgsl.expected.ir.msl
index 6bf97d3..a4c8d83 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device float3* in;
+ device float3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, vec3<f32>, read> = var @binding_point(0, 0)
- %out:ptr<storage, vec3<f32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device float3* in [[buffer(0)]], device float3* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec3<f32> = load %in
- store %out, %4
- 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/buffer/storage/types/vec3_i32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec3_i32.wgsl.expected.ir.msl
index d6fdc96..ecd09c8 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device int3* in;
+ device int3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, vec3<i32>, read> = var @binding_point(0, 0)
- %out:ptr<storage, vec3<i32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device int3* in [[buffer(0)]], device int3* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec3<i32> = load %in
- store %out, %4
- 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/buffer/storage/types/vec3_u32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec3_u32.wgsl.expected.ir.msl
index 3643214..ed24883 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device uint3* in;
+ device uint3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, vec3<u32>, read> = var @binding_point(0, 0)
- %out:ptr<storage, vec3<u32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device uint3* in [[buffer(0)]], device uint3* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec3<u32> = load %in
- store %out, %4
- 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/buffer/storage/types/vec4_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec4_f16.wgsl.expected.ir.msl
index 0b4e74c..819de0d 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device half4* in;
+ device half4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, vec4<f16>, read> = var @binding_point(0, 0)
- %out:ptr<storage, vec4<f16>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device half4* in [[buffer(0)]], device half4* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec4<f16> = load %in
- store %out, %4
- 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/buffer/storage/types/vec4_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec4_f32.wgsl.expected.ir.msl
index 74fc62e..b5010a2 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device float4* in;
+ device float4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, vec4<f32>, read> = var @binding_point(0, 0)
- %out:ptr<storage, vec4<f32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device float4* in [[buffer(0)]], device float4* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec4<f32> = load %in
- store %out, %4
- 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/buffer/storage/types/vec4_i32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec4_i32.wgsl.expected.ir.msl
index ac7b0e2..ad78b22 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device int4* in;
+ device int4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, vec4<i32>, read> = var @binding_point(0, 0)
- %out:ptr<storage, vec4<i32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device int4* in [[buffer(0)]], device int4* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec4<i32> = load %in
- store %out, %4
- 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/buffer/storage/types/vec4_u32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec4_u32.wgsl.expected.ir.msl
index 52ee996..e2459ca 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
@@ -1,22 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device uint4* in;
+ device uint4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %in:ptr<storage, vec4<u32>, read> = var @binding_point(0, 0)
- %out:ptr<storage, vec4<u32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const device uint4* in [[buffer(0)]], device uint4* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec4<u32> = load %in
- store %out, %4
- 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/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 5c5e7bf..79e7291 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,51 +1,35 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat2x2<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
- %counter:ptr<private, i32, read_write> = var, 0i
-}
+struct tint_module_vars_struct {
+ const constant tint_array<float2x2, 4>* a;
+ device float* s;
+ thread int* counter;
+};
-%i = func():i32 {
- $B2: {
- %5:i32 = load %counter
- %6:i32 = add %5, 1i
- store %counter, %6
- %7:i32 = load %counter
- ret %7
- }
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<mat2x2<f32>, 4>, read> = let %a
- %10:i32 = call %i
- %11:ptr<uniform, mat2x2<f32>, read> = access %p_a, %10
- %p_a_i:ptr<uniform, mat2x2<f32>, read> = let %11
- %13:i32 = call %i
- %14:ptr<uniform, vec2<f32>, read> = access %p_a_i, %13
- %p_a_i_i:ptr<uniform, vec2<f32>, read> = let %14
- %16:array<mat2x2<f32>, 4> = load %p_a
- %l_a:array<mat2x2<f32>, 4> = let %16
- %18:mat2x2<f32> = load %p_a_i
- %l_a_i:mat2x2<f32> = let %18
- %20:vec2<f32> = load %p_a_i_i
- %l_a_i_i:vec2<f32> = let %20
- %22:f32 = load_vector_element %p_a_i_i, 0u
- %23:f32 = access %l_a, 0i, 0i, 0u
- %24:f32 = add %22, %23
- %25:f32 = access %l_a_i, 0i, 0u
- %26:f32 = add %24, %25
- %27:f32 = access %l_a_i_i, 0u
- %28:f32 = add %26, %27
- store %s, %28
- ret
- }
+kernel void f(const constant tint_array<float2x2, 4>* a [[buffer(0)]], device float* s [[buffer(1)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s, .counter=(&counter)};
+ const constant tint_array<float2x2, 4>* const p_a = tint_module_vars.a;
+ const constant float2x2* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant float2* const p_a_i_i = (&(*p_a_i)[i(tint_module_vars)]);
+ tint_array<float2x2, 4> const l_a = (*p_a);
+ float2x2 const l_a_i = (*p_a_i);
+ float2 const l_a_i_i = (*p_a_i_i);
+ (*tint_module_vars.s) = ((((*p_a_i_i)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.msl
index 64ecc68..c5b8b2b 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat2x2<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<float2x2, 4>* a;
+ device float* s;
+};
+
+kernel void f(const constant tint_array<float2x2, 4>* a [[buffer(0)]], device float* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s};
+ const constant tint_array<float2x2, 4>* const p_a = tint_module_vars.a;
+ const constant float2x2* const p_a_2 = (&(*p_a)[2]);
+ const constant float2* const p_a_2_1 = (&(*p_a_2)[1]);
+ tint_array<float2x2, 4> const l_a = (*p_a);
+ float2x2 const l_a_i = (*p_a_2);
+ float2 const l_a_i_i = (*p_a_2_1);
+ (*tint_module_vars.s) = ((((*p_a_2_1)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<mat2x2<f32>, 4>, read> = let %a
- %5:ptr<uniform, mat2x2<f32>, read> = access %p_a, 2i
- %p_a_2:ptr<uniform, mat2x2<f32>, read> = let %5
- %7:ptr<uniform, vec2<f32>, read> = access %p_a_2, 1i
- %p_a_2_1:ptr<uniform, vec2<f32>, read> = let %7
- %9:array<mat2x2<f32>, 4> = load %p_a
- %l_a:array<mat2x2<f32>, 4> = let %9
- %11:mat2x2<f32> = load %p_a_2
- %l_a_i:mat2x2<f32> = let %11
- %13:vec2<f32> = load %p_a_2_1
- %l_a_i_i:vec2<f32> = let %13
- %15:f32 = load_vector_element %p_a_2_1, 0u
- %16:f32 = access %l_a, 0i, 0i, 0u
- %17:f32 = add %15, %16
- %18:f32 = access %l_a_i, 0i, 0u
- %19:f32 = add %17, %18
- %20:f32 = access %l_a_i_i, 0u
- %21:f32 = add %19, %20
- store %s, %21
- 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/buffer/uniform/std140/array/mat2x2_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_fn.wgsl.expected.ir.msl
index 6d05dd4..67e2c70 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_fn.wgsl.expected.ir.msl
@@ -1,64 +1,38 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat2x2<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
-}
+struct tint_module_vars_struct {
+ const constant tint_array<float2x2, 4>* u;
+ device float* s;
+};
-%a = func(%a_1:array<mat2x2<f32>, 4>):f32 { # %a_1: 'a'
- $B2: {
- %5:f32 = access %a_1, 0i, 0i, 0u
- ret %5
- }
+float a(tint_array<float2x2, 4> a) {
+ return a[0][0][0u];
}
-%b = func(%m:mat2x2<f32>):f32 {
- $B3: {
- %8:f32 = access %m, 0i, 0u
- ret %8
- }
+float b(float2x2 m) {
+ return m[0][0u];
}
-%c = func(%v:vec2<f32>):f32 {
- $B4: {
- %11:f32 = access %v, 0u
- ret %11
- }
+float c(float2 v) {
+ return v[0u];
}
-%d = func(%f:f32):f32 {
- $B5: {
- ret %f
- }
+float d(float f) {
+ return f;
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B6: {
- %15:array<mat2x2<f32>, 4> = load %u
- %16:f32 = call %a, %15
- %17:f32 = let %16
- %18:ptr<uniform, mat2x2<f32>, read> = access %u, 1i
- %19:mat2x2<f32> = load %18
- %20:f32 = call %b, %19
- %21:f32 = add %17, %20
- %22:f32 = let %21
- %23:ptr<uniform, vec2<f32>, read> = access %u, 1i, 0i
- %24:vec2<f32> = load %23
- %25:vec2<f32> = swizzle %24, yx
- %26:f32 = call %c, %25
- %27:f32 = add %22, %26
- %28:f32 = let %27
- %29:ptr<uniform, vec2<f32>, read> = access %u, 1i, 0i
- %30:vec2<f32> = load %29
- %31:vec2<f32> = swizzle %30, yx
- %32:f32 = access %31, 0u
- %33:f32 = call %d, %32
- %34:f32 = add %28, %33
- store %s, %34
- ret
- }
+kernel void f(const constant tint_array<float2x2, 4>* u [[buffer(0)]], device float* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float const v_1 = a((*tint_module_vars.u));
+ float const v_2 = (v_1 + b((*tint_module_vars.u)[1]));
+ float const v_3 = (v_2 + c((*tint_module_vars.u)[1][0].yx));
+ (*tint_module_vars.s) = (v_3 + d((*tint_module_vars.u)[1][0].yx[0u]));
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.ir.msl
index abfedb8..8bfe23f 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat2x2<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
- %p:ptr<private, array<mat2x2<f32>, 4>, read_write> = var
+struct tint_module_vars_struct {
+ const constant tint_array<float2x2, 4>* u;
+ device float* s;
+ thread tint_array<float2x2, 4>* p;
+};
+
+kernel void f(const constant tint_array<float2x2, 4>* u [[buffer(0)]], device float* s [[buffer(1)]]) {
+ thread tint_array<float2x2, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[1][0] = (*tint_module_vars.u)[0][1].yx;
+ (*tint_module_vars.p)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
+ (*tint_module_vars.s) = (*tint_module_vars.p)[1][0][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:array<mat2x2<f32>, 4> = load %u
- store %p, %5
- %6:ptr<private, mat2x2<f32>, read_write> = access %p, 1i
- %7:ptr<uniform, mat2x2<f32>, read> = access %u, 2i
- %8:mat2x2<f32> = load %7
- store %6, %8
- %9:ptr<private, vec2<f32>, read_write> = access %p, 1i, 0i
- %10:ptr<uniform, vec2<f32>, read> = access %u, 0i, 1i
- %11:vec2<f32> = load %10
- %12:vec2<f32> = swizzle %11, yx
- store %9, %12
- %13:ptr<private, vec2<f32>, read_write> = access %p, 1i, 0i
- %14:ptr<uniform, vec2<f32>, read> = access %u, 0i, 1i
- %15:f32 = load_vector_element %14, 0u
- store_vector_element %13, 0u, %15
- %16:ptr<private, vec2<f32>, read_write> = access %p, 1i, 0i
- %17:f32 = load_vector_element %16, 0u
- store %s, %17
- 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/buffer/uniform/std140/array/mat2x2_f32/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_storage.wgsl.expected.ir.msl
index 2d3c36d..72effba 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,26 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat2x2<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, array<mat2x2<f32>, 4>, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<float2x2, 4>* u;
+ device tint_array<float2x2, 4>* s;
+};
+
+kernel void f(const constant tint_array<float2x2, 4>* u [[buffer(0)]], device tint_array<float2x2, 4>* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.s)[1][0] = (*tint_module_vars.u)[0][1].yx;
+ (*tint_module_vars.s)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<mat2x2<f32>, 4> = load %u
- store %s, %4
- %5:ptr<storage, mat2x2<f32>, read_write> = access %s, 1i
- %6:ptr<uniform, mat2x2<f32>, read> = access %u, 2i
- %7:mat2x2<f32> = load %6
- store %5, %7
- %8:ptr<storage, vec2<f32>, read_write> = access %s, 1i, 0i
- %9:ptr<uniform, vec2<f32>, read> = access %u, 0i, 1i
- %10:vec2<f32> = load %9
- %11:vec2<f32> = swizzle %10, yx
- store %8, %11
- %12:ptr<storage, vec2<f32>, read_write> = access %s, 1i, 0i
- %13:ptr<uniform, vec2<f32>, read> = access %u, 0i, 1i
- %14:f32 = load_vector_element %13, 0u
- store_vector_element %12, 0u, %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/buffer/uniform/std140/array/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index b28cff4..aa5a4f7 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,51 +1,35 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat2x3<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
- %counter:ptr<private, i32, read_write> = var, 0i
-}
+struct tint_module_vars_struct {
+ const constant tint_array<half2x3, 4>* a;
+ device half* s;
+ thread int* counter;
+};
-%i = func():i32 {
- $B2: {
- %5:i32 = load %counter
- %6:i32 = add %5, 1i
- store %counter, %6
- %7:i32 = load %counter
- ret %7
- }
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<mat2x3<f16>, 4>, read> = let %a
- %10:i32 = call %i
- %11:ptr<uniform, mat2x3<f16>, read> = access %p_a, %10
- %p_a_i:ptr<uniform, mat2x3<f16>, read> = let %11
- %13:i32 = call %i
- %14:ptr<uniform, vec3<f16>, read> = access %p_a_i, %13
- %p_a_i_i:ptr<uniform, vec3<f16>, read> = let %14
- %16:array<mat2x3<f16>, 4> = load %p_a
- %l_a:array<mat2x3<f16>, 4> = let %16
- %18:mat2x3<f16> = load %p_a_i
- %l_a_i:mat2x3<f16> = let %18
- %20:vec3<f16> = load %p_a_i_i
- %l_a_i_i:vec3<f16> = let %20
- %22:f16 = load_vector_element %p_a_i_i, 0u
- %23:f16 = access %l_a, 0i, 0i, 0u
- %24:f16 = add %22, %23
- %25:f16 = access %l_a_i, 0i, 0u
- %26:f16 = add %24, %25
- %27:f16 = access %l_a_i_i, 0u
- %28:f16 = add %26, %27
- store %s, %28
- ret
- }
+kernel void f(const constant tint_array<half2x3, 4>* a [[buffer(0)]], device half* s [[buffer(1)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s, .counter=(&counter)};
+ const constant tint_array<half2x3, 4>* const p_a = tint_module_vars.a;
+ const constant half2x3* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant half3* const p_a_i_i = (&(*p_a_i)[i(tint_module_vars)]);
+ tint_array<half2x3, 4> const l_a = (*p_a);
+ half2x3 const l_a_i = (*p_a_i);
+ half3 const l_a_i_i = (*p_a_i_i);
+ (*tint_module_vars.s) = ((((*p_a_i_i)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.msl
index dee7935..8910f77 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat2x3<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<half2x3, 4>* a;
+ device half* s;
+};
+
+kernel void f(const constant tint_array<half2x3, 4>* a [[buffer(0)]], device half* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s};
+ const constant tint_array<half2x3, 4>* const p_a = tint_module_vars.a;
+ const constant half2x3* const p_a_2 = (&(*p_a)[2]);
+ const constant half3* const p_a_2_1 = (&(*p_a_2)[1]);
+ tint_array<half2x3, 4> const l_a = (*p_a);
+ half2x3 const l_a_i = (*p_a_2);
+ half3 const l_a_i_i = (*p_a_2_1);
+ (*tint_module_vars.s) = ((((*p_a_2_1)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<mat2x3<f16>, 4>, read> = let %a
- %5:ptr<uniform, mat2x3<f16>, read> = access %p_a, 2i
- %p_a_2:ptr<uniform, mat2x3<f16>, read> = let %5
- %7:ptr<uniform, vec3<f16>, read> = access %p_a_2, 1i
- %p_a_2_1:ptr<uniform, vec3<f16>, read> = let %7
- %9:array<mat2x3<f16>, 4> = load %p_a
- %l_a:array<mat2x3<f16>, 4> = let %9
- %11:mat2x3<f16> = load %p_a_2
- %l_a_i:mat2x3<f16> = let %11
- %13:vec3<f16> = load %p_a_2_1
- %l_a_i_i:vec3<f16> = let %13
- %15:f16 = load_vector_element %p_a_2_1, 0u
- %16:f16 = access %l_a, 0i, 0i, 0u
- %17:f16 = add %15, %16
- %18:f16 = access %l_a_i, 0i, 0u
- %19:f16 = add %17, %18
- %20:f16 = access %l_a_i_i, 0u
- %21:f16 = add %19, %20
- store %s, %21
- 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/buffer/uniform/std140/array/mat2x3_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_fn.wgsl.expected.ir.msl
index 2df98cd..a52a437 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_fn.wgsl.expected.ir.msl
@@ -1,64 +1,38 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat2x3<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
-}
+struct tint_module_vars_struct {
+ const constant tint_array<half2x3, 4>* u;
+ device half* s;
+};
-%a = func(%a_1:array<mat2x3<f16>, 4>):f16 { # %a_1: 'a'
- $B2: {
- %5:f16 = access %a_1, 0i, 0i, 0u
- ret %5
- }
+half a(tint_array<half2x3, 4> a) {
+ return a[0][0][0u];
}
-%b = func(%m:mat2x3<f16>):f16 {
- $B3: {
- %8:f16 = access %m, 0i, 0u
- ret %8
- }
+half b(half2x3 m) {
+ return m[0][0u];
}
-%c = func(%v:vec3<f16>):f16 {
- $B4: {
- %11:f16 = access %v, 0u
- ret %11
- }
+half c(half3 v) {
+ return v[0u];
}
-%d = func(%f:f16):f16 {
- $B5: {
- ret %f
- }
+half d(half f) {
+ return f;
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B6: {
- %15:array<mat2x3<f16>, 4> = load %u
- %16:f16 = call %a, %15
- %17:f16 = let %16
- %18:ptr<uniform, mat2x3<f16>, read> = access %u, 1i
- %19:mat2x3<f16> = load %18
- %20:f16 = call %b, %19
- %21:f16 = add %17, %20
- %22:f16 = let %21
- %23:ptr<uniform, vec3<f16>, read> = access %u, 1i, 0i
- %24:vec3<f16> = load %23
- %25:vec3<f16> = swizzle %24, zxy
- %26:f16 = call %c, %25
- %27:f16 = add %22, %26
- %28:f16 = let %27
- %29:ptr<uniform, vec3<f16>, read> = access %u, 1i, 0i
- %30:vec3<f16> = load %29
- %31:vec3<f16> = swizzle %30, zxy
- %32:f16 = access %31, 0u
- %33:f16 = call %d, %32
- %34:f16 = add %28, %33
- store %s, %34
- ret
- }
+kernel void f(const constant tint_array<half2x3, 4>* u [[buffer(0)]], device half* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ half const v_1 = a((*tint_module_vars.u));
+ half const v_2 = (v_1 + b((*tint_module_vars.u)[1]));
+ half const v_3 = (v_2 + c((*tint_module_vars.u)[1][0].zxy));
+ (*tint_module_vars.s) = (v_3 + d((*tint_module_vars.u)[1][0].zxy[0u]));
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_private.wgsl.expected.ir.msl
index e840869..acf14e0 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_private.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat2x3<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
- %p:ptr<private, array<mat2x3<f16>, 4>, read_write> = var
+struct tint_module_vars_struct {
+ const constant tint_array<half2x3, 4>* u;
+ device half* s;
+ thread tint_array<half2x3, 4>* p;
+};
+
+kernel void f(const constant tint_array<half2x3, 4>* u [[buffer(0)]], device half* s [[buffer(1)]]) {
+ thread tint_array<half2x3, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[1][0] = (*tint_module_vars.u)[0][1].zxy;
+ (*tint_module_vars.p)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
+ (*tint_module_vars.s) = (*tint_module_vars.p)[1][0][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:array<mat2x3<f16>, 4> = load %u
- store %p, %5
- %6:ptr<private, mat2x3<f16>, read_write> = access %p, 1i
- %7:ptr<uniform, mat2x3<f16>, read> = access %u, 2i
- %8:mat2x3<f16> = load %7
- store %6, %8
- %9:ptr<private, vec3<f16>, read_write> = access %p, 1i, 0i
- %10:ptr<uniform, vec3<f16>, read> = access %u, 0i, 1i
- %11:vec3<f16> = load %10
- %12:vec3<f16> = swizzle %11, zxy
- store %9, %12
- %13:ptr<private, vec3<f16>, read_write> = access %p, 1i, 0i
- %14:ptr<uniform, vec3<f16>, read> = access %u, 0i, 1i
- %15:f16 = load_vector_element %14, 0u
- store_vector_element %13, 0u, %15
- %16:ptr<private, vec3<f16>, read_write> = access %p, 1i, 0i
- %17:f16 = load_vector_element %16, 0u
- store %s, %17
- 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/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index cdb2914..5b3331d 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,51 +1,35 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat2x3<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
- %counter:ptr<private, i32, read_write> = var, 0i
-}
+struct tint_module_vars_struct {
+ const constant tint_array<float2x3, 4>* a;
+ device float* s;
+ thread int* counter;
+};
-%i = func():i32 {
- $B2: {
- %5:i32 = load %counter
- %6:i32 = add %5, 1i
- store %counter, %6
- %7:i32 = load %counter
- ret %7
- }
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<mat2x3<f32>, 4>, read> = let %a
- %10:i32 = call %i
- %11:ptr<uniform, mat2x3<f32>, read> = access %p_a, %10
- %p_a_i:ptr<uniform, mat2x3<f32>, read> = let %11
- %13:i32 = call %i
- %14:ptr<uniform, vec3<f32>, read> = access %p_a_i, %13
- %p_a_i_i:ptr<uniform, vec3<f32>, read> = let %14
- %16:array<mat2x3<f32>, 4> = load %p_a
- %l_a:array<mat2x3<f32>, 4> = let %16
- %18:mat2x3<f32> = load %p_a_i
- %l_a_i:mat2x3<f32> = let %18
- %20:vec3<f32> = load %p_a_i_i
- %l_a_i_i:vec3<f32> = let %20
- %22:f32 = load_vector_element %p_a_i_i, 0u
- %23:f32 = access %l_a, 0i, 0i, 0u
- %24:f32 = add %22, %23
- %25:f32 = access %l_a_i, 0i, 0u
- %26:f32 = add %24, %25
- %27:f32 = access %l_a_i_i, 0u
- %28:f32 = add %26, %27
- store %s, %28
- ret
- }
+kernel void f(const constant tint_array<float2x3, 4>* a [[buffer(0)]], device float* s [[buffer(1)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s, .counter=(&counter)};
+ const constant tint_array<float2x3, 4>* const p_a = tint_module_vars.a;
+ const constant float2x3* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant float3* const p_a_i_i = (&(*p_a_i)[i(tint_module_vars)]);
+ tint_array<float2x3, 4> const l_a = (*p_a);
+ float2x3 const l_a_i = (*p_a_i);
+ float3 const l_a_i_i = (*p_a_i_i);
+ (*tint_module_vars.s) = ((((*p_a_i_i)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.msl
index 46fb5fb..9dbb093 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat2x3<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<float2x3, 4>* a;
+ device float* s;
+};
+
+kernel void f(const constant tint_array<float2x3, 4>* a [[buffer(0)]], device float* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s};
+ const constant tint_array<float2x3, 4>* const p_a = tint_module_vars.a;
+ const constant float2x3* const p_a_2 = (&(*p_a)[2]);
+ const constant float3* const p_a_2_1 = (&(*p_a_2)[1]);
+ tint_array<float2x3, 4> const l_a = (*p_a);
+ float2x3 const l_a_i = (*p_a_2);
+ float3 const l_a_i_i = (*p_a_2_1);
+ (*tint_module_vars.s) = ((((*p_a_2_1)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<mat2x3<f32>, 4>, read> = let %a
- %5:ptr<uniform, mat2x3<f32>, read> = access %p_a, 2i
- %p_a_2:ptr<uniform, mat2x3<f32>, read> = let %5
- %7:ptr<uniform, vec3<f32>, read> = access %p_a_2, 1i
- %p_a_2_1:ptr<uniform, vec3<f32>, read> = let %7
- %9:array<mat2x3<f32>, 4> = load %p_a
- %l_a:array<mat2x3<f32>, 4> = let %9
- %11:mat2x3<f32> = load %p_a_2
- %l_a_i:mat2x3<f32> = let %11
- %13:vec3<f32> = load %p_a_2_1
- %l_a_i_i:vec3<f32> = let %13
- %15:f32 = load_vector_element %p_a_2_1, 0u
- %16:f32 = access %l_a, 0i, 0i, 0u
- %17:f32 = add %15, %16
- %18:f32 = access %l_a_i, 0i, 0u
- %19:f32 = add %17, %18
- %20:f32 = access %l_a_i_i, 0u
- %21:f32 = add %19, %20
- store %s, %21
- 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/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.ir.msl
index beb17bf..8348081 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.ir.msl
@@ -1,64 +1,38 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat2x3<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
-}
+struct tint_module_vars_struct {
+ const constant tint_array<float2x3, 4>* u;
+ device float* s;
+};
-%a = func(%a_1:array<mat2x3<f32>, 4>):f32 { # %a_1: 'a'
- $B2: {
- %5:f32 = access %a_1, 0i, 0i, 0u
- ret %5
- }
+float a(tint_array<float2x3, 4> a) {
+ return a[0][0][0u];
}
-%b = func(%m:mat2x3<f32>):f32 {
- $B3: {
- %8:f32 = access %m, 0i, 0u
- ret %8
- }
+float b(float2x3 m) {
+ return m[0][0u];
}
-%c = func(%v:vec3<f32>):f32 {
- $B4: {
- %11:f32 = access %v, 0u
- ret %11
- }
+float c(float3 v) {
+ return v[0u];
}
-%d = func(%f:f32):f32 {
- $B5: {
- ret %f
- }
+float d(float f) {
+ return f;
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B6: {
- %15:array<mat2x3<f32>, 4> = load %u
- %16:f32 = call %a, %15
- %17:f32 = let %16
- %18:ptr<uniform, mat2x3<f32>, read> = access %u, 1i
- %19:mat2x3<f32> = load %18
- %20:f32 = call %b, %19
- %21:f32 = add %17, %20
- %22:f32 = let %21
- %23:ptr<uniform, vec3<f32>, read> = access %u, 1i, 0i
- %24:vec3<f32> = load %23
- %25:vec3<f32> = swizzle %24, zxy
- %26:f32 = call %c, %25
- %27:f32 = add %22, %26
- %28:f32 = let %27
- %29:ptr<uniform, vec3<f32>, read> = access %u, 1i, 0i
- %30:vec3<f32> = load %29
- %31:vec3<f32> = swizzle %30, zxy
- %32:f32 = access %31, 0u
- %33:f32 = call %d, %32
- %34:f32 = add %28, %33
- store %s, %34
- ret
- }
+kernel void f(const constant tint_array<float2x3, 4>* u [[buffer(0)]], device float* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float const v_1 = a((*tint_module_vars.u));
+ float const v_2 = (v_1 + b((*tint_module_vars.u)[1]));
+ float const v_3 = (v_2 + c((*tint_module_vars.u)[1][0].zxy));
+ (*tint_module_vars.s) = (v_3 + d((*tint_module_vars.u)[1][0].zxy[0u]));
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.ir.msl
index 654f700..8b4a1a1 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat2x3<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
- %p:ptr<private, array<mat2x3<f32>, 4>, read_write> = var
+struct tint_module_vars_struct {
+ const constant tint_array<float2x3, 4>* u;
+ device float* s;
+ thread tint_array<float2x3, 4>* p;
+};
+
+kernel void f(const constant tint_array<float2x3, 4>* u [[buffer(0)]], device float* s [[buffer(1)]]) {
+ thread tint_array<float2x3, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[1][0] = (*tint_module_vars.u)[0][1].zxy;
+ (*tint_module_vars.p)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
+ (*tint_module_vars.s) = (*tint_module_vars.p)[1][0][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:array<mat2x3<f32>, 4> = load %u
- store %p, %5
- %6:ptr<private, mat2x3<f32>, read_write> = access %p, 1i
- %7:ptr<uniform, mat2x3<f32>, read> = access %u, 2i
- %8:mat2x3<f32> = load %7
- store %6, %8
- %9:ptr<private, vec3<f32>, read_write> = access %p, 1i, 0i
- %10:ptr<uniform, vec3<f32>, read> = access %u, 0i, 1i
- %11:vec3<f32> = load %10
- %12:vec3<f32> = swizzle %11, zxy
- store %9, %12
- %13:ptr<private, vec3<f32>, read_write> = access %p, 1i, 0i
- %14:ptr<uniform, vec3<f32>, read> = access %u, 0i, 1i
- %15:f32 = load_vector_element %14, 0u
- store_vector_element %13, 0u, %15
- %16:ptr<private, vec3<f32>, read_write> = access %p, 1i, 0i
- %17:f32 = load_vector_element %16, 0u
- store %s, %17
- 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/buffer/uniform/std140/array/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 9442868..d7eb131 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,51 +1,35 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat2x4<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
- %counter:ptr<private, i32, read_write> = var, 0i
-}
+struct tint_module_vars_struct {
+ const constant tint_array<half2x4, 4>* a;
+ device half* s;
+ thread int* counter;
+};
-%i = func():i32 {
- $B2: {
- %5:i32 = load %counter
- %6:i32 = add %5, 1i
- store %counter, %6
- %7:i32 = load %counter
- ret %7
- }
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<mat2x4<f16>, 4>, read> = let %a
- %10:i32 = call %i
- %11:ptr<uniform, mat2x4<f16>, read> = access %p_a, %10
- %p_a_i:ptr<uniform, mat2x4<f16>, read> = let %11
- %13:i32 = call %i
- %14:ptr<uniform, vec4<f16>, read> = access %p_a_i, %13
- %p_a_i_i:ptr<uniform, vec4<f16>, read> = let %14
- %16:array<mat2x4<f16>, 4> = load %p_a
- %l_a:array<mat2x4<f16>, 4> = let %16
- %18:mat2x4<f16> = load %p_a_i
- %l_a_i:mat2x4<f16> = let %18
- %20:vec4<f16> = load %p_a_i_i
- %l_a_i_i:vec4<f16> = let %20
- %22:f16 = load_vector_element %p_a_i_i, 0u
- %23:f16 = access %l_a, 0i, 0i, 0u
- %24:f16 = add %22, %23
- %25:f16 = access %l_a_i, 0i, 0u
- %26:f16 = add %24, %25
- %27:f16 = access %l_a_i_i, 0u
- %28:f16 = add %26, %27
- store %s, %28
- ret
- }
+kernel void f(const constant tint_array<half2x4, 4>* a [[buffer(0)]], device half* s [[buffer(1)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s, .counter=(&counter)};
+ const constant tint_array<half2x4, 4>* const p_a = tint_module_vars.a;
+ const constant half2x4* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant half4* const p_a_i_i = (&(*p_a_i)[i(tint_module_vars)]);
+ tint_array<half2x4, 4> const l_a = (*p_a);
+ half2x4 const l_a_i = (*p_a_i);
+ half4 const l_a_i_i = (*p_a_i_i);
+ (*tint_module_vars.s) = ((((*p_a_i_i)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.msl
index b350cbf..605e189 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat2x4<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<half2x4, 4>* a;
+ device half* s;
+};
+
+kernel void f(const constant tint_array<half2x4, 4>* a [[buffer(0)]], device half* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s};
+ const constant tint_array<half2x4, 4>* const p_a = tint_module_vars.a;
+ const constant half2x4* const p_a_2 = (&(*p_a)[2]);
+ const constant half4* const p_a_2_1 = (&(*p_a_2)[1]);
+ tint_array<half2x4, 4> const l_a = (*p_a);
+ half2x4 const l_a_i = (*p_a_2);
+ half4 const l_a_i_i = (*p_a_2_1);
+ (*tint_module_vars.s) = ((((*p_a_2_1)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<mat2x4<f16>, 4>, read> = let %a
- %5:ptr<uniform, mat2x4<f16>, read> = access %p_a, 2i
- %p_a_2:ptr<uniform, mat2x4<f16>, read> = let %5
- %7:ptr<uniform, vec4<f16>, read> = access %p_a_2, 1i
- %p_a_2_1:ptr<uniform, vec4<f16>, read> = let %7
- %9:array<mat2x4<f16>, 4> = load %p_a
- %l_a:array<mat2x4<f16>, 4> = let %9
- %11:mat2x4<f16> = load %p_a_2
- %l_a_i:mat2x4<f16> = let %11
- %13:vec4<f16> = load %p_a_2_1
- %l_a_i_i:vec4<f16> = let %13
- %15:f16 = load_vector_element %p_a_2_1, 0u
- %16:f16 = access %l_a, 0i, 0i, 0u
- %17:f16 = add %15, %16
- %18:f16 = access %l_a_i, 0i, 0u
- %19:f16 = add %17, %18
- %20:f16 = access %l_a_i_i, 0u
- %21:f16 = add %19, %20
- store %s, %21
- 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/buffer/uniform/std140/array/mat2x4_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_fn.wgsl.expected.ir.msl
index 50ecceb..226eeed 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_fn.wgsl.expected.ir.msl
@@ -1,64 +1,38 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat2x4<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
-}
+struct tint_module_vars_struct {
+ const constant tint_array<half2x4, 4>* u;
+ device half* s;
+};
-%a = func(%a_1:array<mat2x4<f16>, 4>):f16 { # %a_1: 'a'
- $B2: {
- %5:f16 = access %a_1, 0i, 0i, 0u
- ret %5
- }
+half a(tint_array<half2x4, 4> a) {
+ return a[0][0][0u];
}
-%b = func(%m:mat2x4<f16>):f16 {
- $B3: {
- %8:f16 = access %m, 0i, 0u
- ret %8
- }
+half b(half2x4 m) {
+ return m[0][0u];
}
-%c = func(%v:vec4<f16>):f16 {
- $B4: {
- %11:f16 = access %v, 0u
- ret %11
- }
+half c(half4 v) {
+ return v[0u];
}
-%d = func(%f:f16):f16 {
- $B5: {
- ret %f
- }
+half d(half f) {
+ return f;
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B6: {
- %15:array<mat2x4<f16>, 4> = load %u
- %16:f16 = call %a, %15
- %17:f16 = let %16
- %18:ptr<uniform, mat2x4<f16>, read> = access %u, 1i
- %19:mat2x4<f16> = load %18
- %20:f16 = call %b, %19
- %21:f16 = add %17, %20
- %22:f16 = let %21
- %23:ptr<uniform, vec4<f16>, read> = access %u, 1i, 0i
- %24:vec4<f16> = load %23
- %25:vec4<f16> = swizzle %24, ywxz
- %26:f16 = call %c, %25
- %27:f16 = add %22, %26
- %28:f16 = let %27
- %29:ptr<uniform, vec4<f16>, read> = access %u, 1i, 0i
- %30:vec4<f16> = load %29
- %31:vec4<f16> = swizzle %30, ywxz
- %32:f16 = access %31, 0u
- %33:f16 = call %d, %32
- %34:f16 = add %28, %33
- store %s, %34
- ret
- }
+kernel void f(const constant tint_array<half2x4, 4>* u [[buffer(0)]], device half* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ half const v_1 = a((*tint_module_vars.u));
+ half const v_2 = (v_1 + b((*tint_module_vars.u)[1]));
+ half const v_3 = (v_2 + c((*tint_module_vars.u)[1][0].ywxz));
+ (*tint_module_vars.s) = (v_3 + d((*tint_module_vars.u)[1][0].ywxz[0u]));
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_private.wgsl.expected.ir.msl
index e1328d1..e4d093e 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_private.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat2x4<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
- %p:ptr<private, array<mat2x4<f16>, 4>, read_write> = var
+struct tint_module_vars_struct {
+ const constant tint_array<half2x4, 4>* u;
+ device half* s;
+ thread tint_array<half2x4, 4>* p;
+};
+
+kernel void f(const constant tint_array<half2x4, 4>* u [[buffer(0)]], device half* s [[buffer(1)]]) {
+ thread tint_array<half2x4, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[1][0] = (*tint_module_vars.u)[0][1].ywxz;
+ (*tint_module_vars.p)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
+ (*tint_module_vars.s) = (*tint_module_vars.p)[1][0][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:array<mat2x4<f16>, 4> = load %u
- store %p, %5
- %6:ptr<private, mat2x4<f16>, read_write> = access %p, 1i
- %7:ptr<uniform, mat2x4<f16>, read> = access %u, 2i
- %8:mat2x4<f16> = load %7
- store %6, %8
- %9:ptr<private, vec4<f16>, read_write> = access %p, 1i, 0i
- %10:ptr<uniform, vec4<f16>, read> = access %u, 0i, 1i
- %11:vec4<f16> = load %10
- %12:vec4<f16> = swizzle %11, ywxz
- store %9, %12
- %13:ptr<private, vec4<f16>, read_write> = access %p, 1i, 0i
- %14:ptr<uniform, vec4<f16>, read> = access %u, 0i, 1i
- %15:f16 = load_vector_element %14, 0u
- store_vector_element %13, 0u, %15
- %16:ptr<private, vec4<f16>, read_write> = access %p, 1i, 0i
- %17:f16 = load_vector_element %16, 0u
- store %s, %17
- 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/buffer/uniform/std140/array/mat2x4_f16/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_storage.wgsl.expected.ir.msl
index c2e1e27..9be526c 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,26 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat2x4<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, array<mat2x4<f16>, 4>, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<half2x4, 4>* u;
+ device tint_array<half2x4, 4>* s;
+};
+
+kernel void f(const constant tint_array<half2x4, 4>* u [[buffer(0)]], device tint_array<half2x4, 4>* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.s)[1][0] = (*tint_module_vars.u)[0][1].ywxz;
+ (*tint_module_vars.s)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<mat2x4<f16>, 4> = load %u
- store %s, %4
- %5:ptr<storage, mat2x4<f16>, read_write> = access %s, 1i
- %6:ptr<uniform, mat2x4<f16>, read> = access %u, 2i
- %7:mat2x4<f16> = load %6
- store %5, %7
- %8:ptr<storage, vec4<f16>, read_write> = access %s, 1i, 0i
- %9:ptr<uniform, vec4<f16>, read> = access %u, 0i, 1i
- %10:vec4<f16> = load %9
- %11:vec4<f16> = swizzle %10, ywxz
- store %8, %11
- %12:ptr<storage, vec4<f16>, read_write> = access %s, 1i, 0i
- %13:ptr<uniform, vec4<f16>, read> = access %u, 0i, 1i
- %14:f16 = load_vector_element %13, 0u
- store_vector_element %12, 0u, %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/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 554498d..7fce1c5 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,51 +1,35 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat2x4<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
- %counter:ptr<private, i32, read_write> = var, 0i
-}
+struct tint_module_vars_struct {
+ const constant tint_array<float2x4, 4>* a;
+ device float* s;
+ thread int* counter;
+};
-%i = func():i32 {
- $B2: {
- %5:i32 = load %counter
- %6:i32 = add %5, 1i
- store %counter, %6
- %7:i32 = load %counter
- ret %7
- }
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<mat2x4<f32>, 4>, read> = let %a
- %10:i32 = call %i
- %11:ptr<uniform, mat2x4<f32>, read> = access %p_a, %10
- %p_a_i:ptr<uniform, mat2x4<f32>, read> = let %11
- %13:i32 = call %i
- %14:ptr<uniform, vec4<f32>, read> = access %p_a_i, %13
- %p_a_i_i:ptr<uniform, vec4<f32>, read> = let %14
- %16:array<mat2x4<f32>, 4> = load %p_a
- %l_a:array<mat2x4<f32>, 4> = let %16
- %18:mat2x4<f32> = load %p_a_i
- %l_a_i:mat2x4<f32> = let %18
- %20:vec4<f32> = load %p_a_i_i
- %l_a_i_i:vec4<f32> = let %20
- %22:f32 = load_vector_element %p_a_i_i, 0u
- %23:f32 = access %l_a, 0i, 0i, 0u
- %24:f32 = add %22, %23
- %25:f32 = access %l_a_i, 0i, 0u
- %26:f32 = add %24, %25
- %27:f32 = access %l_a_i_i, 0u
- %28:f32 = add %26, %27
- store %s, %28
- ret
- }
+kernel void f(const constant tint_array<float2x4, 4>* a [[buffer(0)]], device float* s [[buffer(1)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s, .counter=(&counter)};
+ const constant tint_array<float2x4, 4>* const p_a = tint_module_vars.a;
+ const constant float2x4* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant float4* const p_a_i_i = (&(*p_a_i)[i(tint_module_vars)]);
+ tint_array<float2x4, 4> const l_a = (*p_a);
+ float2x4 const l_a_i = (*p_a_i);
+ float4 const l_a_i_i = (*p_a_i_i);
+ (*tint_module_vars.s) = ((((*p_a_i_i)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.msl
index a23ad8f..3b6e56a 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat2x4<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<float2x4, 4>* a;
+ device float* s;
+};
+
+kernel void f(const constant tint_array<float2x4, 4>* a [[buffer(0)]], device float* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s};
+ const constant tint_array<float2x4, 4>* const p_a = tint_module_vars.a;
+ const constant float2x4* const p_a_2 = (&(*p_a)[2]);
+ const constant float4* const p_a_2_1 = (&(*p_a_2)[1]);
+ tint_array<float2x4, 4> const l_a = (*p_a);
+ float2x4 const l_a_i = (*p_a_2);
+ float4 const l_a_i_i = (*p_a_2_1);
+ (*tint_module_vars.s) = ((((*p_a_2_1)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<mat2x4<f32>, 4>, read> = let %a
- %5:ptr<uniform, mat2x4<f32>, read> = access %p_a, 2i
- %p_a_2:ptr<uniform, mat2x4<f32>, read> = let %5
- %7:ptr<uniform, vec4<f32>, read> = access %p_a_2, 1i
- %p_a_2_1:ptr<uniform, vec4<f32>, read> = let %7
- %9:array<mat2x4<f32>, 4> = load %p_a
- %l_a:array<mat2x4<f32>, 4> = let %9
- %11:mat2x4<f32> = load %p_a_2
- %l_a_i:mat2x4<f32> = let %11
- %13:vec4<f32> = load %p_a_2_1
- %l_a_i_i:vec4<f32> = let %13
- %15:f32 = load_vector_element %p_a_2_1, 0u
- %16:f32 = access %l_a, 0i, 0i, 0u
- %17:f32 = add %15, %16
- %18:f32 = access %l_a_i, 0i, 0u
- %19:f32 = add %17, %18
- %20:f32 = access %l_a_i_i, 0u
- %21:f32 = add %19, %20
- store %s, %21
- 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/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.ir.msl
index 520f113..a904ad7 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.ir.msl
@@ -1,64 +1,38 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat2x4<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
-}
+struct tint_module_vars_struct {
+ const constant tint_array<float2x4, 4>* u;
+ device float* s;
+};
-%a = func(%a_1:array<mat2x4<f32>, 4>):f32 { # %a_1: 'a'
- $B2: {
- %5:f32 = access %a_1, 0i, 0i, 0u
- ret %5
- }
+float a(tint_array<float2x4, 4> a) {
+ return a[0][0][0u];
}
-%b = func(%m:mat2x4<f32>):f32 {
- $B3: {
- %8:f32 = access %m, 0i, 0u
- ret %8
- }
+float b(float2x4 m) {
+ return m[0][0u];
}
-%c = func(%v:vec4<f32>):f32 {
- $B4: {
- %11:f32 = access %v, 0u
- ret %11
- }
+float c(float4 v) {
+ return v[0u];
}
-%d = func(%f:f32):f32 {
- $B5: {
- ret %f
- }
+float d(float f) {
+ return f;
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B6: {
- %15:array<mat2x4<f32>, 4> = load %u
- %16:f32 = call %a, %15
- %17:f32 = let %16
- %18:ptr<uniform, mat2x4<f32>, read> = access %u, 1i
- %19:mat2x4<f32> = load %18
- %20:f32 = call %b, %19
- %21:f32 = add %17, %20
- %22:f32 = let %21
- %23:ptr<uniform, vec4<f32>, read> = access %u, 1i, 0i
- %24:vec4<f32> = load %23
- %25:vec4<f32> = swizzle %24, ywxz
- %26:f32 = call %c, %25
- %27:f32 = add %22, %26
- %28:f32 = let %27
- %29:ptr<uniform, vec4<f32>, read> = access %u, 1i, 0i
- %30:vec4<f32> = load %29
- %31:vec4<f32> = swizzle %30, ywxz
- %32:f32 = access %31, 0u
- %33:f32 = call %d, %32
- %34:f32 = add %28, %33
- store %s, %34
- ret
- }
+kernel void f(const constant tint_array<float2x4, 4>* u [[buffer(0)]], device float* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float const v_1 = a((*tint_module_vars.u));
+ float const v_2 = (v_1 + b((*tint_module_vars.u)[1]));
+ float const v_3 = (v_2 + c((*tint_module_vars.u)[1][0].ywxz));
+ (*tint_module_vars.s) = (v_3 + d((*tint_module_vars.u)[1][0].ywxz[0u]));
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.ir.msl
index 333936e..ee51d8f 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat2x4<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
- %p:ptr<private, array<mat2x4<f32>, 4>, read_write> = var
+struct tint_module_vars_struct {
+ const constant tint_array<float2x4, 4>* u;
+ device float* s;
+ thread tint_array<float2x4, 4>* p;
+};
+
+kernel void f(const constant tint_array<float2x4, 4>* u [[buffer(0)]], device float* s [[buffer(1)]]) {
+ thread tint_array<float2x4, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[1][0] = (*tint_module_vars.u)[0][1].ywxz;
+ (*tint_module_vars.p)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
+ (*tint_module_vars.s) = (*tint_module_vars.p)[1][0][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:array<mat2x4<f32>, 4> = load %u
- store %p, %5
- %6:ptr<private, mat2x4<f32>, read_write> = access %p, 1i
- %7:ptr<uniform, mat2x4<f32>, read> = access %u, 2i
- %8:mat2x4<f32> = load %7
- store %6, %8
- %9:ptr<private, vec4<f32>, read_write> = access %p, 1i, 0i
- %10:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1i
- %11:vec4<f32> = load %10
- %12:vec4<f32> = swizzle %11, ywxz
- store %9, %12
- %13:ptr<private, vec4<f32>, read_write> = access %p, 1i, 0i
- %14:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1i
- %15:f32 = load_vector_element %14, 0u
- store_vector_element %13, 0u, %15
- %16:ptr<private, vec4<f32>, read_write> = access %p, 1i, 0i
- %17:f32 = load_vector_element %16, 0u
- store %s, %17
- 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/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.ir.msl
index 8ed1610..2f1ed75 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,26 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat2x4<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, array<mat2x4<f32>, 4>, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<float2x4, 4>* u;
+ device tint_array<float2x4, 4>* s;
+};
+
+kernel void f(const constant tint_array<float2x4, 4>* u [[buffer(0)]], device tint_array<float2x4, 4>* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.s)[1][0] = (*tint_module_vars.u)[0][1].ywxz;
+ (*tint_module_vars.s)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<mat2x4<f32>, 4> = load %u
- store %s, %4
- %5:ptr<storage, mat2x4<f32>, read_write> = access %s, 1i
- %6:ptr<uniform, mat2x4<f32>, read> = access %u, 2i
- %7:mat2x4<f32> = load %6
- store %5, %7
- %8:ptr<storage, vec4<f32>, read_write> = access %s, 1i, 0i
- %9:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1i
- %10:vec4<f32> = load %9
- %11:vec4<f32> = swizzle %10, ywxz
- store %8, %11
- %12:ptr<storage, vec4<f32>, read_write> = access %s, 1i, 0i
- %13:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1i
- %14:f32 = load_vector_element %13, 0u
- store_vector_element %12, 0u, %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/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index f2c7e12..69f3b35 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,51 +1,35 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat3x3<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
- %counter:ptr<private, i32, read_write> = var, 0i
-}
+struct tint_module_vars_struct {
+ const constant tint_array<float3x3, 4>* a;
+ device float* s;
+ thread int* counter;
+};
-%i = func():i32 {
- $B2: {
- %5:i32 = load %counter
- %6:i32 = add %5, 1i
- store %counter, %6
- %7:i32 = load %counter
- ret %7
- }
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<mat3x3<f32>, 4>, read> = let %a
- %10:i32 = call %i
- %11:ptr<uniform, mat3x3<f32>, read> = access %p_a, %10
- %p_a_i:ptr<uniform, mat3x3<f32>, read> = let %11
- %13:i32 = call %i
- %14:ptr<uniform, vec3<f32>, read> = access %p_a_i, %13
- %p_a_i_i:ptr<uniform, vec3<f32>, read> = let %14
- %16:array<mat3x3<f32>, 4> = load %p_a
- %l_a:array<mat3x3<f32>, 4> = let %16
- %18:mat3x3<f32> = load %p_a_i
- %l_a_i:mat3x3<f32> = let %18
- %20:vec3<f32> = load %p_a_i_i
- %l_a_i_i:vec3<f32> = let %20
- %22:f32 = load_vector_element %p_a_i_i, 0u
- %23:f32 = access %l_a, 0i, 0i, 0u
- %24:f32 = add %22, %23
- %25:f32 = access %l_a_i, 0i, 0u
- %26:f32 = add %24, %25
- %27:f32 = access %l_a_i_i, 0u
- %28:f32 = add %26, %27
- store %s, %28
- ret
- }
+kernel void f(const constant tint_array<float3x3, 4>* a [[buffer(0)]], device float* s [[buffer(1)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s, .counter=(&counter)};
+ const constant tint_array<float3x3, 4>* const p_a = tint_module_vars.a;
+ const constant float3x3* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant float3* const p_a_i_i = (&(*p_a_i)[i(tint_module_vars)]);
+ tint_array<float3x3, 4> const l_a = (*p_a);
+ float3x3 const l_a_i = (*p_a_i);
+ float3 const l_a_i_i = (*p_a_i_i);
+ (*tint_module_vars.s) = ((((*p_a_i_i)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.msl
index 4c5cab1..adace3c 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat3x3<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<float3x3, 4>* a;
+ device float* s;
+};
+
+kernel void f(const constant tint_array<float3x3, 4>* a [[buffer(0)]], device float* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s};
+ const constant tint_array<float3x3, 4>* const p_a = tint_module_vars.a;
+ const constant float3x3* const p_a_2 = (&(*p_a)[2]);
+ const constant float3* const p_a_2_1 = (&(*p_a_2)[1]);
+ tint_array<float3x3, 4> const l_a = (*p_a);
+ float3x3 const l_a_i = (*p_a_2);
+ float3 const l_a_i_i = (*p_a_2_1);
+ (*tint_module_vars.s) = ((((*p_a_2_1)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<mat3x3<f32>, 4>, read> = let %a
- %5:ptr<uniform, mat3x3<f32>, read> = access %p_a, 2i
- %p_a_2:ptr<uniform, mat3x3<f32>, read> = let %5
- %7:ptr<uniform, vec3<f32>, read> = access %p_a_2, 1i
- %p_a_2_1:ptr<uniform, vec3<f32>, read> = let %7
- %9:array<mat3x3<f32>, 4> = load %p_a
- %l_a:array<mat3x3<f32>, 4> = let %9
- %11:mat3x3<f32> = load %p_a_2
- %l_a_i:mat3x3<f32> = let %11
- %13:vec3<f32> = load %p_a_2_1
- %l_a_i_i:vec3<f32> = let %13
- %15:f32 = load_vector_element %p_a_2_1, 0u
- %16:f32 = access %l_a, 0i, 0i, 0u
- %17:f32 = add %15, %16
- %18:f32 = access %l_a_i, 0i, 0u
- %19:f32 = add %17, %18
- %20:f32 = access %l_a_i_i, 0u
- %21:f32 = add %19, %20
- store %s, %21
- 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/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.ir.msl
index 0edee96..059c91c 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.ir.msl
@@ -1,64 +1,38 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat3x3<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
-}
+struct tint_module_vars_struct {
+ const constant tint_array<float3x3, 4>* u;
+ device float* s;
+};
-%a = func(%a_1:array<mat3x3<f32>, 4>):f32 { # %a_1: 'a'
- $B2: {
- %5:f32 = access %a_1, 0i, 0i, 0u
- ret %5
- }
+float a(tint_array<float3x3, 4> a) {
+ return a[0][0][0u];
}
-%b = func(%m:mat3x3<f32>):f32 {
- $B3: {
- %8:f32 = access %m, 0i, 0u
- ret %8
- }
+float b(float3x3 m) {
+ return m[0][0u];
}
-%c = func(%v:vec3<f32>):f32 {
- $B4: {
- %11:f32 = access %v, 0u
- ret %11
- }
+float c(float3 v) {
+ return v[0u];
}
-%d = func(%f:f32):f32 {
- $B5: {
- ret %f
- }
+float d(float f) {
+ return f;
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B6: {
- %15:array<mat3x3<f32>, 4> = load %u
- %16:f32 = call %a, %15
- %17:f32 = let %16
- %18:ptr<uniform, mat3x3<f32>, read> = access %u, 1i
- %19:mat3x3<f32> = load %18
- %20:f32 = call %b, %19
- %21:f32 = add %17, %20
- %22:f32 = let %21
- %23:ptr<uniform, vec3<f32>, read> = access %u, 1i, 0i
- %24:vec3<f32> = load %23
- %25:vec3<f32> = swizzle %24, zxy
- %26:f32 = call %c, %25
- %27:f32 = add %22, %26
- %28:f32 = let %27
- %29:ptr<uniform, vec3<f32>, read> = access %u, 1i, 0i
- %30:vec3<f32> = load %29
- %31:vec3<f32> = swizzle %30, zxy
- %32:f32 = access %31, 0u
- %33:f32 = call %d, %32
- %34:f32 = add %28, %33
- store %s, %34
- ret
- }
+kernel void f(const constant tint_array<float3x3, 4>* u [[buffer(0)]], device float* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float const v_1 = a((*tint_module_vars.u));
+ float const v_2 = (v_1 + b((*tint_module_vars.u)[1]));
+ float const v_3 = (v_2 + c((*tint_module_vars.u)[1][0].zxy));
+ (*tint_module_vars.s) = (v_3 + d((*tint_module_vars.u)[1][0].zxy[0u]));
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.ir.msl
index 4091530..f4dc4b4 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat3x3<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
- %p:ptr<private, array<mat3x3<f32>, 4>, read_write> = var
+struct tint_module_vars_struct {
+ const constant tint_array<float3x3, 4>* u;
+ device float* s;
+ thread tint_array<float3x3, 4>* p;
+};
+
+kernel void f(const constant tint_array<float3x3, 4>* u [[buffer(0)]], device float* s [[buffer(1)]]) {
+ thread tint_array<float3x3, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[1][0] = (*tint_module_vars.u)[0][1].zxy;
+ (*tint_module_vars.p)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
+ (*tint_module_vars.s) = (*tint_module_vars.p)[1][0][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:array<mat3x3<f32>, 4> = load %u
- store %p, %5
- %6:ptr<private, mat3x3<f32>, read_write> = access %p, 1i
- %7:ptr<uniform, mat3x3<f32>, read> = access %u, 2i
- %8:mat3x3<f32> = load %7
- store %6, %8
- %9:ptr<private, vec3<f32>, read_write> = access %p, 1i, 0i
- %10:ptr<uniform, vec3<f32>, read> = access %u, 0i, 1i
- %11:vec3<f32> = load %10
- %12:vec3<f32> = swizzle %11, zxy
- store %9, %12
- %13:ptr<private, vec3<f32>, read_write> = access %p, 1i, 0i
- %14:ptr<uniform, vec3<f32>, read> = access %u, 0i, 1i
- %15:f32 = load_vector_element %14, 0u
- store_vector_element %13, 0u, %15
- %16:ptr<private, vec3<f32>, read_write> = access %p, 1i, 0i
- %17:f32 = load_vector_element %16, 0u
- store %s, %17
- 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/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 6ca088d..a211c1f 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,51 +1,35 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat3x4<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
- %counter:ptr<private, i32, read_write> = var, 0i
-}
+struct tint_module_vars_struct {
+ const constant tint_array<float3x4, 4>* a;
+ device float* s;
+ thread int* counter;
+};
-%i = func():i32 {
- $B2: {
- %5:i32 = load %counter
- %6:i32 = add %5, 1i
- store %counter, %6
- %7:i32 = load %counter
- ret %7
- }
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<mat3x4<f32>, 4>, read> = let %a
- %10:i32 = call %i
- %11:ptr<uniform, mat3x4<f32>, read> = access %p_a, %10
- %p_a_i:ptr<uniform, mat3x4<f32>, read> = let %11
- %13:i32 = call %i
- %14:ptr<uniform, vec4<f32>, read> = access %p_a_i, %13
- %p_a_i_i:ptr<uniform, vec4<f32>, read> = let %14
- %16:array<mat3x4<f32>, 4> = load %p_a
- %l_a:array<mat3x4<f32>, 4> = let %16
- %18:mat3x4<f32> = load %p_a_i
- %l_a_i:mat3x4<f32> = let %18
- %20:vec4<f32> = load %p_a_i_i
- %l_a_i_i:vec4<f32> = let %20
- %22:f32 = load_vector_element %p_a_i_i, 0u
- %23:f32 = access %l_a, 0i, 0i, 0u
- %24:f32 = add %22, %23
- %25:f32 = access %l_a_i, 0i, 0u
- %26:f32 = add %24, %25
- %27:f32 = access %l_a_i_i, 0u
- %28:f32 = add %26, %27
- store %s, %28
- ret
- }
+kernel void f(const constant tint_array<float3x4, 4>* a [[buffer(0)]], device float* s [[buffer(1)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s, .counter=(&counter)};
+ const constant tint_array<float3x4, 4>* const p_a = tint_module_vars.a;
+ const constant float3x4* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant float4* const p_a_i_i = (&(*p_a_i)[i(tint_module_vars)]);
+ tint_array<float3x4, 4> const l_a = (*p_a);
+ float3x4 const l_a_i = (*p_a_i);
+ float4 const l_a_i_i = (*p_a_i_i);
+ (*tint_module_vars.s) = ((((*p_a_i_i)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.msl
index 6446800..f6dba61 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat3x4<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<float3x4, 4>* a;
+ device float* s;
+};
+
+kernel void f(const constant tint_array<float3x4, 4>* a [[buffer(0)]], device float* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s};
+ const constant tint_array<float3x4, 4>* const p_a = tint_module_vars.a;
+ const constant float3x4* const p_a_2 = (&(*p_a)[2]);
+ const constant float4* const p_a_2_1 = (&(*p_a_2)[1]);
+ tint_array<float3x4, 4> const l_a = (*p_a);
+ float3x4 const l_a_i = (*p_a_2);
+ float4 const l_a_i_i = (*p_a_2_1);
+ (*tint_module_vars.s) = ((((*p_a_2_1)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<mat3x4<f32>, 4>, read> = let %a
- %5:ptr<uniform, mat3x4<f32>, read> = access %p_a, 2i
- %p_a_2:ptr<uniform, mat3x4<f32>, read> = let %5
- %7:ptr<uniform, vec4<f32>, read> = access %p_a_2, 1i
- %p_a_2_1:ptr<uniform, vec4<f32>, read> = let %7
- %9:array<mat3x4<f32>, 4> = load %p_a
- %l_a:array<mat3x4<f32>, 4> = let %9
- %11:mat3x4<f32> = load %p_a_2
- %l_a_i:mat3x4<f32> = let %11
- %13:vec4<f32> = load %p_a_2_1
- %l_a_i_i:vec4<f32> = let %13
- %15:f32 = load_vector_element %p_a_2_1, 0u
- %16:f32 = access %l_a, 0i, 0i, 0u
- %17:f32 = add %15, %16
- %18:f32 = access %l_a_i, 0i, 0u
- %19:f32 = add %17, %18
- %20:f32 = access %l_a_i_i, 0u
- %21:f32 = add %19, %20
- store %s, %21
- 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/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.ir.msl
index 90adb9e..3d5f5fa 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.ir.msl
@@ -1,64 +1,38 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat3x4<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
-}
+struct tint_module_vars_struct {
+ const constant tint_array<float3x4, 4>* u;
+ device float* s;
+};
-%a = func(%a_1:array<mat3x4<f32>, 4>):f32 { # %a_1: 'a'
- $B2: {
- %5:f32 = access %a_1, 0i, 0i, 0u
- ret %5
- }
+float a(tint_array<float3x4, 4> a) {
+ return a[0][0][0u];
}
-%b = func(%m:mat3x4<f32>):f32 {
- $B3: {
- %8:f32 = access %m, 0i, 0u
- ret %8
- }
+float b(float3x4 m) {
+ return m[0][0u];
}
-%c = func(%v:vec4<f32>):f32 {
- $B4: {
- %11:f32 = access %v, 0u
- ret %11
- }
+float c(float4 v) {
+ return v[0u];
}
-%d = func(%f:f32):f32 {
- $B5: {
- ret %f
- }
+float d(float f) {
+ return f;
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B6: {
- %15:array<mat3x4<f32>, 4> = load %u
- %16:f32 = call %a, %15
- %17:f32 = let %16
- %18:ptr<uniform, mat3x4<f32>, read> = access %u, 1i
- %19:mat3x4<f32> = load %18
- %20:f32 = call %b, %19
- %21:f32 = add %17, %20
- %22:f32 = let %21
- %23:ptr<uniform, vec4<f32>, read> = access %u, 1i, 0i
- %24:vec4<f32> = load %23
- %25:vec4<f32> = swizzle %24, ywxz
- %26:f32 = call %c, %25
- %27:f32 = add %22, %26
- %28:f32 = let %27
- %29:ptr<uniform, vec4<f32>, read> = access %u, 1i, 0i
- %30:vec4<f32> = load %29
- %31:vec4<f32> = swizzle %30, ywxz
- %32:f32 = access %31, 0u
- %33:f32 = call %d, %32
- %34:f32 = add %28, %33
- store %s, %34
- ret
- }
+kernel void f(const constant tint_array<float3x4, 4>* u [[buffer(0)]], device float* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float const v_1 = a((*tint_module_vars.u));
+ float const v_2 = (v_1 + b((*tint_module_vars.u)[1]));
+ float const v_3 = (v_2 + c((*tint_module_vars.u)[1][0].ywxz));
+ (*tint_module_vars.s) = (v_3 + d((*tint_module_vars.u)[1][0].ywxz[0u]));
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.ir.msl
index 99f53ef..eb86d59 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat3x4<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
- %p:ptr<private, array<mat3x4<f32>, 4>, read_write> = var
+struct tint_module_vars_struct {
+ const constant tint_array<float3x4, 4>* u;
+ device float* s;
+ thread tint_array<float3x4, 4>* p;
+};
+
+kernel void f(const constant tint_array<float3x4, 4>* u [[buffer(0)]], device float* s [[buffer(1)]]) {
+ thread tint_array<float3x4, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[1][0] = (*tint_module_vars.u)[0][1].ywxz;
+ (*tint_module_vars.p)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
+ (*tint_module_vars.s) = (*tint_module_vars.p)[1][0][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:array<mat3x4<f32>, 4> = load %u
- store %p, %5
- %6:ptr<private, mat3x4<f32>, read_write> = access %p, 1i
- %7:ptr<uniform, mat3x4<f32>, read> = access %u, 2i
- %8:mat3x4<f32> = load %7
- store %6, %8
- %9:ptr<private, vec4<f32>, read_write> = access %p, 1i, 0i
- %10:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1i
- %11:vec4<f32> = load %10
- %12:vec4<f32> = swizzle %11, ywxz
- store %9, %12
- %13:ptr<private, vec4<f32>, read_write> = access %p, 1i, 0i
- %14:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1i
- %15:f32 = load_vector_element %14, 0u
- store_vector_element %13, 0u, %15
- %16:ptr<private, vec4<f32>, read_write> = access %p, 1i, 0i
- %17:f32 = load_vector_element %16, 0u
- store %s, %17
- 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/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.ir.msl
index ce3ff04..8e92b5b 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,26 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat3x4<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, array<mat3x4<f32>, 4>, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<float3x4, 4>* u;
+ device tint_array<float3x4, 4>* s;
+};
+
+kernel void f(const constant tint_array<float3x4, 4>* u [[buffer(0)]], device tint_array<float3x4, 4>* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.s)[1][0] = (*tint_module_vars.u)[0][1].ywxz;
+ (*tint_module_vars.s)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<mat3x4<f32>, 4> = load %u
- store %s, %4
- %5:ptr<storage, mat3x4<f32>, read_write> = access %s, 1i
- %6:ptr<uniform, mat3x4<f32>, read> = access %u, 2i
- %7:mat3x4<f32> = load %6
- store %5, %7
- %8:ptr<storage, vec4<f32>, read_write> = access %s, 1i, 0i
- %9:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1i
- %10:vec4<f32> = load %9
- %11:vec4<f32> = swizzle %10, ywxz
- store %8, %11
- %12:ptr<storage, vec4<f32>, read_write> = access %s, 1i, 0i
- %13:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1i
- %14:f32 = load_vector_element %13, 0u
- store_vector_element %12, 0u, %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/buffer/uniform/std140/array/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 3eb259d..c4eb513 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,51 +1,35 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat4x2<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
- %counter:ptr<private, i32, read_write> = var, 0i
-}
+struct tint_module_vars_struct {
+ const constant tint_array<half4x2, 4>* a;
+ device half* s;
+ thread int* counter;
+};
-%i = func():i32 {
- $B2: {
- %5:i32 = load %counter
- %6:i32 = add %5, 1i
- store %counter, %6
- %7:i32 = load %counter
- ret %7
- }
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<mat4x2<f16>, 4>, read> = let %a
- %10:i32 = call %i
- %11:ptr<uniform, mat4x2<f16>, read> = access %p_a, %10
- %p_a_i:ptr<uniform, mat4x2<f16>, read> = let %11
- %13:i32 = call %i
- %14:ptr<uniform, vec2<f16>, read> = access %p_a_i, %13
- %p_a_i_i:ptr<uniform, vec2<f16>, read> = let %14
- %16:array<mat4x2<f16>, 4> = load %p_a
- %l_a:array<mat4x2<f16>, 4> = let %16
- %18:mat4x2<f16> = load %p_a_i
- %l_a_i:mat4x2<f16> = let %18
- %20:vec2<f16> = load %p_a_i_i
- %l_a_i_i:vec2<f16> = let %20
- %22:f16 = load_vector_element %p_a_i_i, 0u
- %23:f16 = access %l_a, 0i, 0i, 0u
- %24:f16 = add %22, %23
- %25:f16 = access %l_a_i, 0i, 0u
- %26:f16 = add %24, %25
- %27:f16 = access %l_a_i_i, 0u
- %28:f16 = add %26, %27
- store %s, %28
- ret
- }
+kernel void f(const constant tint_array<half4x2, 4>* a [[buffer(0)]], device half* s [[buffer(1)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s, .counter=(&counter)};
+ const constant tint_array<half4x2, 4>* const p_a = tint_module_vars.a;
+ const constant half4x2* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant half2* const p_a_i_i = (&(*p_a_i)[i(tint_module_vars)]);
+ tint_array<half4x2, 4> const l_a = (*p_a);
+ half4x2 const l_a_i = (*p_a_i);
+ half2 const l_a_i_i = (*p_a_i_i);
+ (*tint_module_vars.s) = ((((*p_a_i_i)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.msl
index 54b02cd..37afaef 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat4x2<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<half4x2, 4>* a;
+ device half* s;
+};
+
+kernel void f(const constant tint_array<half4x2, 4>* a [[buffer(0)]], device half* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s};
+ const constant tint_array<half4x2, 4>* const p_a = tint_module_vars.a;
+ const constant half4x2* const p_a_2 = (&(*p_a)[2]);
+ const constant half2* const p_a_2_1 = (&(*p_a_2)[1]);
+ tint_array<half4x2, 4> const l_a = (*p_a);
+ half4x2 const l_a_i = (*p_a_2);
+ half2 const l_a_i_i = (*p_a_2_1);
+ (*tint_module_vars.s) = ((((*p_a_2_1)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<mat4x2<f16>, 4>, read> = let %a
- %5:ptr<uniform, mat4x2<f16>, read> = access %p_a, 2i
- %p_a_2:ptr<uniform, mat4x2<f16>, read> = let %5
- %7:ptr<uniform, vec2<f16>, read> = access %p_a_2, 1i
- %p_a_2_1:ptr<uniform, vec2<f16>, read> = let %7
- %9:array<mat4x2<f16>, 4> = load %p_a
- %l_a:array<mat4x2<f16>, 4> = let %9
- %11:mat4x2<f16> = load %p_a_2
- %l_a_i:mat4x2<f16> = let %11
- %13:vec2<f16> = load %p_a_2_1
- %l_a_i_i:vec2<f16> = let %13
- %15:f16 = load_vector_element %p_a_2_1, 0u
- %16:f16 = access %l_a, 0i, 0i, 0u
- %17:f16 = add %15, %16
- %18:f16 = access %l_a_i, 0i, 0u
- %19:f16 = add %17, %18
- %20:f16 = access %l_a_i_i, 0u
- %21:f16 = add %19, %20
- store %s, %21
- 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/buffer/uniform/std140/array/mat4x2_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_fn.wgsl.expected.ir.msl
index 1fbe38c..4ca3bac4 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_fn.wgsl.expected.ir.msl
@@ -1,64 +1,38 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat4x2<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
-}
+struct tint_module_vars_struct {
+ const constant tint_array<half4x2, 4>* u;
+ device half* s;
+};
-%a = func(%a_1:array<mat4x2<f16>, 4>):f16 { # %a_1: 'a'
- $B2: {
- %5:f16 = access %a_1, 0i, 0i, 0u
- ret %5
- }
+half a(tint_array<half4x2, 4> a) {
+ return a[0][0][0u];
}
-%b = func(%m:mat4x2<f16>):f16 {
- $B3: {
- %8:f16 = access %m, 0i, 0u
- ret %8
- }
+half b(half4x2 m) {
+ return m[0][0u];
}
-%c = func(%v:vec2<f16>):f16 {
- $B4: {
- %11:f16 = access %v, 0u
- ret %11
- }
+half c(half2 v) {
+ return v[0u];
}
-%d = func(%f:f16):f16 {
- $B5: {
- ret %f
- }
+half d(half f) {
+ return f;
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B6: {
- %15:array<mat4x2<f16>, 4> = load %u
- %16:f16 = call %a, %15
- %17:f16 = let %16
- %18:ptr<uniform, mat4x2<f16>, read> = access %u, 1i
- %19:mat4x2<f16> = load %18
- %20:f16 = call %b, %19
- %21:f16 = add %17, %20
- %22:f16 = let %21
- %23:ptr<uniform, vec2<f16>, read> = access %u, 1i, 0i
- %24:vec2<f16> = load %23
- %25:vec2<f16> = swizzle %24, yx
- %26:f16 = call %c, %25
- %27:f16 = add %22, %26
- %28:f16 = let %27
- %29:ptr<uniform, vec2<f16>, read> = access %u, 1i, 0i
- %30:vec2<f16> = load %29
- %31:vec2<f16> = swizzle %30, yx
- %32:f16 = access %31, 0u
- %33:f16 = call %d, %32
- %34:f16 = add %28, %33
- store %s, %34
- ret
- }
+kernel void f(const constant tint_array<half4x2, 4>* u [[buffer(0)]], device half* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ half const v_1 = a((*tint_module_vars.u));
+ half const v_2 = (v_1 + b((*tint_module_vars.u)[1]));
+ half const v_3 = (v_2 + c((*tint_module_vars.u)[1][0].yx));
+ (*tint_module_vars.s) = (v_3 + d((*tint_module_vars.u)[1][0].yx[0u]));
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_private.wgsl.expected.ir.msl
index 1fc8634..b39d311 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_private.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat4x2<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
- %p:ptr<private, array<mat4x2<f16>, 4>, read_write> = var
+struct tint_module_vars_struct {
+ const constant tint_array<half4x2, 4>* u;
+ device half* s;
+ thread tint_array<half4x2, 4>* p;
+};
+
+kernel void f(const constant tint_array<half4x2, 4>* u [[buffer(0)]], device half* s [[buffer(1)]]) {
+ thread tint_array<half4x2, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[1][0] = (*tint_module_vars.u)[0][1].yx;
+ (*tint_module_vars.p)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
+ (*tint_module_vars.s) = (*tint_module_vars.p)[1][0][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:array<mat4x2<f16>, 4> = load %u
- store %p, %5
- %6:ptr<private, mat4x2<f16>, read_write> = access %p, 1i
- %7:ptr<uniform, mat4x2<f16>, read> = access %u, 2i
- %8:mat4x2<f16> = load %7
- store %6, %8
- %9:ptr<private, vec2<f16>, read_write> = access %p, 1i, 0i
- %10:ptr<uniform, vec2<f16>, read> = access %u, 0i, 1i
- %11:vec2<f16> = load %10
- %12:vec2<f16> = swizzle %11, yx
- store %9, %12
- %13:ptr<private, vec2<f16>, read_write> = access %p, 1i, 0i
- %14:ptr<uniform, vec2<f16>, read> = access %u, 0i, 1i
- %15:f16 = load_vector_element %14, 0u
- store_vector_element %13, 0u, %15
- %16:ptr<private, vec2<f16>, read_write> = access %p, 1i, 0i
- %17:f16 = load_vector_element %16, 0u
- store %s, %17
- 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/buffer/uniform/std140/array/mat4x2_f16/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_storage.wgsl.expected.ir.msl
index d286f86..93389e9 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,26 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat4x2<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, array<mat4x2<f16>, 4>, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<half4x2, 4>* u;
+ device tint_array<half4x2, 4>* s;
+};
+
+kernel void f(const constant tint_array<half4x2, 4>* u [[buffer(0)]], device tint_array<half4x2, 4>* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.s)[1][0] = (*tint_module_vars.u)[0][1].yx;
+ (*tint_module_vars.s)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<mat4x2<f16>, 4> = load %u
- store %s, %4
- %5:ptr<storage, mat4x2<f16>, read_write> = access %s, 1i
- %6:ptr<uniform, mat4x2<f16>, read> = access %u, 2i
- %7:mat4x2<f16> = load %6
- store %5, %7
- %8:ptr<storage, vec2<f16>, read_write> = access %s, 1i, 0i
- %9:ptr<uniform, vec2<f16>, read> = access %u, 0i, 1i
- %10:vec2<f16> = load %9
- %11:vec2<f16> = swizzle %10, yx
- store %8, %11
- %12:ptr<storage, vec2<f16>, read_write> = access %s, 1i, 0i
- %13:ptr<uniform, vec2<f16>, read> = access %u, 0i, 1i
- %14:f16 = load_vector_element %13, 0u
- store_vector_element %12, 0u, %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/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index ece1057..1f67ba9 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,51 +1,35 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat4x2<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
- %counter:ptr<private, i32, read_write> = var, 0i
-}
+struct tint_module_vars_struct {
+ const constant tint_array<float4x2, 4>* a;
+ device float* s;
+ thread int* counter;
+};
-%i = func():i32 {
- $B2: {
- %5:i32 = load %counter
- %6:i32 = add %5, 1i
- store %counter, %6
- %7:i32 = load %counter
- ret %7
- }
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<mat4x2<f32>, 4>, read> = let %a
- %10:i32 = call %i
- %11:ptr<uniform, mat4x2<f32>, read> = access %p_a, %10
- %p_a_i:ptr<uniform, mat4x2<f32>, read> = let %11
- %13:i32 = call %i
- %14:ptr<uniform, vec2<f32>, read> = access %p_a_i, %13
- %p_a_i_i:ptr<uniform, vec2<f32>, read> = let %14
- %16:array<mat4x2<f32>, 4> = load %p_a
- %l_a:array<mat4x2<f32>, 4> = let %16
- %18:mat4x2<f32> = load %p_a_i
- %l_a_i:mat4x2<f32> = let %18
- %20:vec2<f32> = load %p_a_i_i
- %l_a_i_i:vec2<f32> = let %20
- %22:f32 = load_vector_element %p_a_i_i, 0u
- %23:f32 = access %l_a, 0i, 0i, 0u
- %24:f32 = add %22, %23
- %25:f32 = access %l_a_i, 0i, 0u
- %26:f32 = add %24, %25
- %27:f32 = access %l_a_i_i, 0u
- %28:f32 = add %26, %27
- store %s, %28
- ret
- }
+kernel void f(const constant tint_array<float4x2, 4>* a [[buffer(0)]], device float* s [[buffer(1)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s, .counter=(&counter)};
+ const constant tint_array<float4x2, 4>* const p_a = tint_module_vars.a;
+ const constant float4x2* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant float2* const p_a_i_i = (&(*p_a_i)[i(tint_module_vars)]);
+ tint_array<float4x2, 4> const l_a = (*p_a);
+ float4x2 const l_a_i = (*p_a_i);
+ float2 const l_a_i_i = (*p_a_i_i);
+ (*tint_module_vars.s) = ((((*p_a_i_i)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.msl
index 616bce7..b3b6cc7 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat4x2<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<float4x2, 4>* a;
+ device float* s;
+};
+
+kernel void f(const constant tint_array<float4x2, 4>* a [[buffer(0)]], device float* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s};
+ const constant tint_array<float4x2, 4>* const p_a = tint_module_vars.a;
+ const constant float4x2* const p_a_2 = (&(*p_a)[2]);
+ const constant float2* const p_a_2_1 = (&(*p_a_2)[1]);
+ tint_array<float4x2, 4> const l_a = (*p_a);
+ float4x2 const l_a_i = (*p_a_2);
+ float2 const l_a_i_i = (*p_a_2_1);
+ (*tint_module_vars.s) = ((((*p_a_2_1)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<mat4x2<f32>, 4>, read> = let %a
- %5:ptr<uniform, mat4x2<f32>, read> = access %p_a, 2i
- %p_a_2:ptr<uniform, mat4x2<f32>, read> = let %5
- %7:ptr<uniform, vec2<f32>, read> = access %p_a_2, 1i
- %p_a_2_1:ptr<uniform, vec2<f32>, read> = let %7
- %9:array<mat4x2<f32>, 4> = load %p_a
- %l_a:array<mat4x2<f32>, 4> = let %9
- %11:mat4x2<f32> = load %p_a_2
- %l_a_i:mat4x2<f32> = let %11
- %13:vec2<f32> = load %p_a_2_1
- %l_a_i_i:vec2<f32> = let %13
- %15:f32 = load_vector_element %p_a_2_1, 0u
- %16:f32 = access %l_a, 0i, 0i, 0u
- %17:f32 = add %15, %16
- %18:f32 = access %l_a_i, 0i, 0u
- %19:f32 = add %17, %18
- %20:f32 = access %l_a_i_i, 0u
- %21:f32 = add %19, %20
- store %s, %21
- 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/buffer/uniform/std140/array/mat4x2_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_fn.wgsl.expected.ir.msl
index 3e80621..88a5591 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_fn.wgsl.expected.ir.msl
@@ -1,64 +1,38 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat4x2<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
-}
+struct tint_module_vars_struct {
+ const constant tint_array<float4x2, 4>* u;
+ device float* s;
+};
-%a = func(%a_1:array<mat4x2<f32>, 4>):f32 { # %a_1: 'a'
- $B2: {
- %5:f32 = access %a_1, 0i, 0i, 0u
- ret %5
- }
+float a(tint_array<float4x2, 4> a) {
+ return a[0][0][0u];
}
-%b = func(%m:mat4x2<f32>):f32 {
- $B3: {
- %8:f32 = access %m, 0i, 0u
- ret %8
- }
+float b(float4x2 m) {
+ return m[0][0u];
}
-%c = func(%v:vec2<f32>):f32 {
- $B4: {
- %11:f32 = access %v, 0u
- ret %11
- }
+float c(float2 v) {
+ return v[0u];
}
-%d = func(%f:f32):f32 {
- $B5: {
- ret %f
- }
+float d(float f) {
+ return f;
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B6: {
- %15:array<mat4x2<f32>, 4> = load %u
- %16:f32 = call %a, %15
- %17:f32 = let %16
- %18:ptr<uniform, mat4x2<f32>, read> = access %u, 1i
- %19:mat4x2<f32> = load %18
- %20:f32 = call %b, %19
- %21:f32 = add %17, %20
- %22:f32 = let %21
- %23:ptr<uniform, vec2<f32>, read> = access %u, 1i, 0i
- %24:vec2<f32> = load %23
- %25:vec2<f32> = swizzle %24, yx
- %26:f32 = call %c, %25
- %27:f32 = add %22, %26
- %28:f32 = let %27
- %29:ptr<uniform, vec2<f32>, read> = access %u, 1i, 0i
- %30:vec2<f32> = load %29
- %31:vec2<f32> = swizzle %30, yx
- %32:f32 = access %31, 0u
- %33:f32 = call %d, %32
- %34:f32 = add %28, %33
- store %s, %34
- ret
- }
+kernel void f(const constant tint_array<float4x2, 4>* u [[buffer(0)]], device float* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float const v_1 = a((*tint_module_vars.u));
+ float const v_2 = (v_1 + b((*tint_module_vars.u)[1]));
+ float const v_3 = (v_2 + c((*tint_module_vars.u)[1][0].yx));
+ (*tint_module_vars.s) = (v_3 + d((*tint_module_vars.u)[1][0].yx[0u]));
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.ir.msl
index 180d603..9da2dfb 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat4x2<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
- %p:ptr<private, array<mat4x2<f32>, 4>, read_write> = var
+struct tint_module_vars_struct {
+ const constant tint_array<float4x2, 4>* u;
+ device float* s;
+ thread tint_array<float4x2, 4>* p;
+};
+
+kernel void f(const constant tint_array<float4x2, 4>* u [[buffer(0)]], device float* s [[buffer(1)]]) {
+ thread tint_array<float4x2, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[1][0] = (*tint_module_vars.u)[0][1].yx;
+ (*tint_module_vars.p)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
+ (*tint_module_vars.s) = (*tint_module_vars.p)[1][0][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:array<mat4x2<f32>, 4> = load %u
- store %p, %5
- %6:ptr<private, mat4x2<f32>, read_write> = access %p, 1i
- %7:ptr<uniform, mat4x2<f32>, read> = access %u, 2i
- %8:mat4x2<f32> = load %7
- store %6, %8
- %9:ptr<private, vec2<f32>, read_write> = access %p, 1i, 0i
- %10:ptr<uniform, vec2<f32>, read> = access %u, 0i, 1i
- %11:vec2<f32> = load %10
- %12:vec2<f32> = swizzle %11, yx
- store %9, %12
- %13:ptr<private, vec2<f32>, read_write> = access %p, 1i, 0i
- %14:ptr<uniform, vec2<f32>, read> = access %u, 0i, 1i
- %15:f32 = load_vector_element %14, 0u
- store_vector_element %13, 0u, %15
- %16:ptr<private, vec2<f32>, read_write> = access %p, 1i, 0i
- %17:f32 = load_vector_element %16, 0u
- store %s, %17
- 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/buffer/uniform/std140/array/mat4x2_f32/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_storage.wgsl.expected.ir.msl
index 79aeaaa..917712a 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,26 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat4x2<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, array<mat4x2<f32>, 4>, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<float4x2, 4>* u;
+ device tint_array<float4x2, 4>* s;
+};
+
+kernel void f(const constant tint_array<float4x2, 4>* u [[buffer(0)]], device tint_array<float4x2, 4>* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.s)[1][0] = (*tint_module_vars.u)[0][1].yx;
+ (*tint_module_vars.s)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<mat4x2<f32>, 4> = load %u
- store %s, %4
- %5:ptr<storage, mat4x2<f32>, read_write> = access %s, 1i
- %6:ptr<uniform, mat4x2<f32>, read> = access %u, 2i
- %7:mat4x2<f32> = load %6
- store %5, %7
- %8:ptr<storage, vec2<f32>, read_write> = access %s, 1i, 0i
- %9:ptr<uniform, vec2<f32>, read> = access %u, 0i, 1i
- %10:vec2<f32> = load %9
- %11:vec2<f32> = swizzle %10, yx
- store %8, %11
- %12:ptr<storage, vec2<f32>, read_write> = access %s, 1i, 0i
- %13:ptr<uniform, vec2<f32>, read> = access %u, 0i, 1i
- %14:f32 = load_vector_element %13, 0u
- store_vector_element %12, 0u, %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/buffer/uniform/std140/array/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index e41f63c..6856843 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,51 +1,35 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat4x3<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
- %counter:ptr<private, i32, read_write> = var, 0i
-}
+struct tint_module_vars_struct {
+ const constant tint_array<half4x3, 4>* a;
+ device half* s;
+ thread int* counter;
+};
-%i = func():i32 {
- $B2: {
- %5:i32 = load %counter
- %6:i32 = add %5, 1i
- store %counter, %6
- %7:i32 = load %counter
- ret %7
- }
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<mat4x3<f16>, 4>, read> = let %a
- %10:i32 = call %i
- %11:ptr<uniform, mat4x3<f16>, read> = access %p_a, %10
- %p_a_i:ptr<uniform, mat4x3<f16>, read> = let %11
- %13:i32 = call %i
- %14:ptr<uniform, vec3<f16>, read> = access %p_a_i, %13
- %p_a_i_i:ptr<uniform, vec3<f16>, read> = let %14
- %16:array<mat4x3<f16>, 4> = load %p_a
- %l_a:array<mat4x3<f16>, 4> = let %16
- %18:mat4x3<f16> = load %p_a_i
- %l_a_i:mat4x3<f16> = let %18
- %20:vec3<f16> = load %p_a_i_i
- %l_a_i_i:vec3<f16> = let %20
- %22:f16 = load_vector_element %p_a_i_i, 0u
- %23:f16 = access %l_a, 0i, 0i, 0u
- %24:f16 = add %22, %23
- %25:f16 = access %l_a_i, 0i, 0u
- %26:f16 = add %24, %25
- %27:f16 = access %l_a_i_i, 0u
- %28:f16 = add %26, %27
- store %s, %28
- ret
- }
+kernel void f(const constant tint_array<half4x3, 4>* a [[buffer(0)]], device half* s [[buffer(1)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s, .counter=(&counter)};
+ const constant tint_array<half4x3, 4>* const p_a = tint_module_vars.a;
+ const constant half4x3* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant half3* const p_a_i_i = (&(*p_a_i)[i(tint_module_vars)]);
+ tint_array<half4x3, 4> const l_a = (*p_a);
+ half4x3 const l_a_i = (*p_a_i);
+ half3 const l_a_i_i = (*p_a_i_i);
+ (*tint_module_vars.s) = ((((*p_a_i_i)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.msl
index 775594a..c5316d9 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat4x3<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<half4x3, 4>* a;
+ device half* s;
+};
+
+kernel void f(const constant tint_array<half4x3, 4>* a [[buffer(0)]], device half* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s};
+ const constant tint_array<half4x3, 4>* const p_a = tint_module_vars.a;
+ const constant half4x3* const p_a_2 = (&(*p_a)[2]);
+ const constant half3* const p_a_2_1 = (&(*p_a_2)[1]);
+ tint_array<half4x3, 4> const l_a = (*p_a);
+ half4x3 const l_a_i = (*p_a_2);
+ half3 const l_a_i_i = (*p_a_2_1);
+ (*tint_module_vars.s) = ((((*p_a_2_1)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<mat4x3<f16>, 4>, read> = let %a
- %5:ptr<uniform, mat4x3<f16>, read> = access %p_a, 2i
- %p_a_2:ptr<uniform, mat4x3<f16>, read> = let %5
- %7:ptr<uniform, vec3<f16>, read> = access %p_a_2, 1i
- %p_a_2_1:ptr<uniform, vec3<f16>, read> = let %7
- %9:array<mat4x3<f16>, 4> = load %p_a
- %l_a:array<mat4x3<f16>, 4> = let %9
- %11:mat4x3<f16> = load %p_a_2
- %l_a_i:mat4x3<f16> = let %11
- %13:vec3<f16> = load %p_a_2_1
- %l_a_i_i:vec3<f16> = let %13
- %15:f16 = load_vector_element %p_a_2_1, 0u
- %16:f16 = access %l_a, 0i, 0i, 0u
- %17:f16 = add %15, %16
- %18:f16 = access %l_a_i, 0i, 0u
- %19:f16 = add %17, %18
- %20:f16 = access %l_a_i_i, 0u
- %21:f16 = add %19, %20
- store %s, %21
- 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/buffer/uniform/std140/array/mat4x3_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_fn.wgsl.expected.ir.msl
index 808d172..195f28a 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_fn.wgsl.expected.ir.msl
@@ -1,64 +1,38 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat4x3<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
-}
+struct tint_module_vars_struct {
+ const constant tint_array<half4x3, 4>* u;
+ device half* s;
+};
-%a = func(%a_1:array<mat4x3<f16>, 4>):f16 { # %a_1: 'a'
- $B2: {
- %5:f16 = access %a_1, 0i, 0i, 0u
- ret %5
- }
+half a(tint_array<half4x3, 4> a) {
+ return a[0][0][0u];
}
-%b = func(%m:mat4x3<f16>):f16 {
- $B3: {
- %8:f16 = access %m, 0i, 0u
- ret %8
- }
+half b(half4x3 m) {
+ return m[0][0u];
}
-%c = func(%v:vec3<f16>):f16 {
- $B4: {
- %11:f16 = access %v, 0u
- ret %11
- }
+half c(half3 v) {
+ return v[0u];
}
-%d = func(%f:f16):f16 {
- $B5: {
- ret %f
- }
+half d(half f) {
+ return f;
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B6: {
- %15:array<mat4x3<f16>, 4> = load %u
- %16:f16 = call %a, %15
- %17:f16 = let %16
- %18:ptr<uniform, mat4x3<f16>, read> = access %u, 1i
- %19:mat4x3<f16> = load %18
- %20:f16 = call %b, %19
- %21:f16 = add %17, %20
- %22:f16 = let %21
- %23:ptr<uniform, vec3<f16>, read> = access %u, 1i, 0i
- %24:vec3<f16> = load %23
- %25:vec3<f16> = swizzle %24, zxy
- %26:f16 = call %c, %25
- %27:f16 = add %22, %26
- %28:f16 = let %27
- %29:ptr<uniform, vec3<f16>, read> = access %u, 1i, 0i
- %30:vec3<f16> = load %29
- %31:vec3<f16> = swizzle %30, zxy
- %32:f16 = access %31, 0u
- %33:f16 = call %d, %32
- %34:f16 = add %28, %33
- store %s, %34
- ret
- }
+kernel void f(const constant tint_array<half4x3, 4>* u [[buffer(0)]], device half* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ half const v_1 = a((*tint_module_vars.u));
+ half const v_2 = (v_1 + b((*tint_module_vars.u)[1]));
+ half const v_3 = (v_2 + c((*tint_module_vars.u)[1][0].zxy));
+ (*tint_module_vars.s) = (v_3 + d((*tint_module_vars.u)[1][0].zxy[0u]));
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_private.wgsl.expected.ir.msl
index bfcb672..6f079fe 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_private.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat4x3<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
- %p:ptr<private, array<mat4x3<f16>, 4>, read_write> = var
+struct tint_module_vars_struct {
+ const constant tint_array<half4x3, 4>* u;
+ device half* s;
+ thread tint_array<half4x3, 4>* p;
+};
+
+kernel void f(const constant tint_array<half4x3, 4>* u [[buffer(0)]], device half* s [[buffer(1)]]) {
+ thread tint_array<half4x3, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[1][0] = (*tint_module_vars.u)[0][1].zxy;
+ (*tint_module_vars.p)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
+ (*tint_module_vars.s) = (*tint_module_vars.p)[1][0][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:array<mat4x3<f16>, 4> = load %u
- store %p, %5
- %6:ptr<private, mat4x3<f16>, read_write> = access %p, 1i
- %7:ptr<uniform, mat4x3<f16>, read> = access %u, 2i
- %8:mat4x3<f16> = load %7
- store %6, %8
- %9:ptr<private, vec3<f16>, read_write> = access %p, 1i, 0i
- %10:ptr<uniform, vec3<f16>, read> = access %u, 0i, 1i
- %11:vec3<f16> = load %10
- %12:vec3<f16> = swizzle %11, zxy
- store %9, %12
- %13:ptr<private, vec3<f16>, read_write> = access %p, 1i, 0i
- %14:ptr<uniform, vec3<f16>, read> = access %u, 0i, 1i
- %15:f16 = load_vector_element %14, 0u
- store_vector_element %13, 0u, %15
- %16:ptr<private, vec3<f16>, read_write> = access %p, 1i, 0i
- %17:f16 = load_vector_element %16, 0u
- store %s, %17
- 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/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index dd508be..59ab336 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,51 +1,35 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat4x3<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
- %counter:ptr<private, i32, read_write> = var, 0i
-}
+struct tint_module_vars_struct {
+ const constant tint_array<float4x3, 4>* a;
+ device float* s;
+ thread int* counter;
+};
-%i = func():i32 {
- $B2: {
- %5:i32 = load %counter
- %6:i32 = add %5, 1i
- store %counter, %6
- %7:i32 = load %counter
- ret %7
- }
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<mat4x3<f32>, 4>, read> = let %a
- %10:i32 = call %i
- %11:ptr<uniform, mat4x3<f32>, read> = access %p_a, %10
- %p_a_i:ptr<uniform, mat4x3<f32>, read> = let %11
- %13:i32 = call %i
- %14:ptr<uniform, vec3<f32>, read> = access %p_a_i, %13
- %p_a_i_i:ptr<uniform, vec3<f32>, read> = let %14
- %16:array<mat4x3<f32>, 4> = load %p_a
- %l_a:array<mat4x3<f32>, 4> = let %16
- %18:mat4x3<f32> = load %p_a_i
- %l_a_i:mat4x3<f32> = let %18
- %20:vec3<f32> = load %p_a_i_i
- %l_a_i_i:vec3<f32> = let %20
- %22:f32 = load_vector_element %p_a_i_i, 0u
- %23:f32 = access %l_a, 0i, 0i, 0u
- %24:f32 = add %22, %23
- %25:f32 = access %l_a_i, 0i, 0u
- %26:f32 = add %24, %25
- %27:f32 = access %l_a_i_i, 0u
- %28:f32 = add %26, %27
- store %s, %28
- ret
- }
+kernel void f(const constant tint_array<float4x3, 4>* a [[buffer(0)]], device float* s [[buffer(1)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s, .counter=(&counter)};
+ const constant tint_array<float4x3, 4>* const p_a = tint_module_vars.a;
+ const constant float4x3* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant float3* const p_a_i_i = (&(*p_a_i)[i(tint_module_vars)]);
+ tint_array<float4x3, 4> const l_a = (*p_a);
+ float4x3 const l_a_i = (*p_a_i);
+ float3 const l_a_i_i = (*p_a_i_i);
+ (*tint_module_vars.s) = ((((*p_a_i_i)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.msl
index 3bb2007..e0a1c24 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat4x3<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<float4x3, 4>* a;
+ device float* s;
+};
+
+kernel void f(const constant tint_array<float4x3, 4>* a [[buffer(0)]], device float* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s};
+ const constant tint_array<float4x3, 4>* const p_a = tint_module_vars.a;
+ const constant float4x3* const p_a_2 = (&(*p_a)[2]);
+ const constant float3* const p_a_2_1 = (&(*p_a_2)[1]);
+ tint_array<float4x3, 4> const l_a = (*p_a);
+ float4x3 const l_a_i = (*p_a_2);
+ float3 const l_a_i_i = (*p_a_2_1);
+ (*tint_module_vars.s) = ((((*p_a_2_1)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<mat4x3<f32>, 4>, read> = let %a
- %5:ptr<uniform, mat4x3<f32>, read> = access %p_a, 2i
- %p_a_2:ptr<uniform, mat4x3<f32>, read> = let %5
- %7:ptr<uniform, vec3<f32>, read> = access %p_a_2, 1i
- %p_a_2_1:ptr<uniform, vec3<f32>, read> = let %7
- %9:array<mat4x3<f32>, 4> = load %p_a
- %l_a:array<mat4x3<f32>, 4> = let %9
- %11:mat4x3<f32> = load %p_a_2
- %l_a_i:mat4x3<f32> = let %11
- %13:vec3<f32> = load %p_a_2_1
- %l_a_i_i:vec3<f32> = let %13
- %15:f32 = load_vector_element %p_a_2_1, 0u
- %16:f32 = access %l_a, 0i, 0i, 0u
- %17:f32 = add %15, %16
- %18:f32 = access %l_a_i, 0i, 0u
- %19:f32 = add %17, %18
- %20:f32 = access %l_a_i_i, 0u
- %21:f32 = add %19, %20
- store %s, %21
- 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/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.ir.msl
index 1d68a3c..7f13ac2f 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.ir.msl
@@ -1,64 +1,38 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat4x3<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
-}
+struct tint_module_vars_struct {
+ const constant tint_array<float4x3, 4>* u;
+ device float* s;
+};
-%a = func(%a_1:array<mat4x3<f32>, 4>):f32 { # %a_1: 'a'
- $B2: {
- %5:f32 = access %a_1, 0i, 0i, 0u
- ret %5
- }
+float a(tint_array<float4x3, 4> a) {
+ return a[0][0][0u];
}
-%b = func(%m:mat4x3<f32>):f32 {
- $B3: {
- %8:f32 = access %m, 0i, 0u
- ret %8
- }
+float b(float4x3 m) {
+ return m[0][0u];
}
-%c = func(%v:vec3<f32>):f32 {
- $B4: {
- %11:f32 = access %v, 0u
- ret %11
- }
+float c(float3 v) {
+ return v[0u];
}
-%d = func(%f:f32):f32 {
- $B5: {
- ret %f
- }
+float d(float f) {
+ return f;
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B6: {
- %15:array<mat4x3<f32>, 4> = load %u
- %16:f32 = call %a, %15
- %17:f32 = let %16
- %18:ptr<uniform, mat4x3<f32>, read> = access %u, 1i
- %19:mat4x3<f32> = load %18
- %20:f32 = call %b, %19
- %21:f32 = add %17, %20
- %22:f32 = let %21
- %23:ptr<uniform, vec3<f32>, read> = access %u, 1i, 0i
- %24:vec3<f32> = load %23
- %25:vec3<f32> = swizzle %24, zxy
- %26:f32 = call %c, %25
- %27:f32 = add %22, %26
- %28:f32 = let %27
- %29:ptr<uniform, vec3<f32>, read> = access %u, 1i, 0i
- %30:vec3<f32> = load %29
- %31:vec3<f32> = swizzle %30, zxy
- %32:f32 = access %31, 0u
- %33:f32 = call %d, %32
- %34:f32 = add %28, %33
- store %s, %34
- ret
- }
+kernel void f(const constant tint_array<float4x3, 4>* u [[buffer(0)]], device float* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float const v_1 = a((*tint_module_vars.u));
+ float const v_2 = (v_1 + b((*tint_module_vars.u)[1]));
+ float const v_3 = (v_2 + c((*tint_module_vars.u)[1][0].zxy));
+ (*tint_module_vars.s) = (v_3 + d((*tint_module_vars.u)[1][0].zxy[0u]));
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.ir.msl
index 1fda10a..847112b 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat4x3<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
- %p:ptr<private, array<mat4x3<f32>, 4>, read_write> = var
+struct tint_module_vars_struct {
+ const constant tint_array<float4x3, 4>* u;
+ device float* s;
+ thread tint_array<float4x3, 4>* p;
+};
+
+kernel void f(const constant tint_array<float4x3, 4>* u [[buffer(0)]], device float* s [[buffer(1)]]) {
+ thread tint_array<float4x3, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[1][0] = (*tint_module_vars.u)[0][1].zxy;
+ (*tint_module_vars.p)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
+ (*tint_module_vars.s) = (*tint_module_vars.p)[1][0][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:array<mat4x3<f32>, 4> = load %u
- store %p, %5
- %6:ptr<private, mat4x3<f32>, read_write> = access %p, 1i
- %7:ptr<uniform, mat4x3<f32>, read> = access %u, 2i
- %8:mat4x3<f32> = load %7
- store %6, %8
- %9:ptr<private, vec3<f32>, read_write> = access %p, 1i, 0i
- %10:ptr<uniform, vec3<f32>, read> = access %u, 0i, 1i
- %11:vec3<f32> = load %10
- %12:vec3<f32> = swizzle %11, zxy
- store %9, %12
- %13:ptr<private, vec3<f32>, read_write> = access %p, 1i, 0i
- %14:ptr<uniform, vec3<f32>, read> = access %u, 0i, 1i
- %15:f32 = load_vector_element %14, 0u
- store_vector_element %13, 0u, %15
- %16:ptr<private, vec3<f32>, read_write> = access %p, 1i, 0i
- %17:f32 = load_vector_element %16, 0u
- store %s, %17
- 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/buffer/uniform/std140/array/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 863554e..5fe3f57 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,51 +1,35 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat4x4<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
- %counter:ptr<private, i32, read_write> = var, 0i
-}
+struct tint_module_vars_struct {
+ const constant tint_array<half4x4, 4>* a;
+ device half* s;
+ thread int* counter;
+};
-%i = func():i32 {
- $B2: {
- %5:i32 = load %counter
- %6:i32 = add %5, 1i
- store %counter, %6
- %7:i32 = load %counter
- ret %7
- }
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<mat4x4<f16>, 4>, read> = let %a
- %10:i32 = call %i
- %11:ptr<uniform, mat4x4<f16>, read> = access %p_a, %10
- %p_a_i:ptr<uniform, mat4x4<f16>, read> = let %11
- %13:i32 = call %i
- %14:ptr<uniform, vec4<f16>, read> = access %p_a_i, %13
- %p_a_i_i:ptr<uniform, vec4<f16>, read> = let %14
- %16:array<mat4x4<f16>, 4> = load %p_a
- %l_a:array<mat4x4<f16>, 4> = let %16
- %18:mat4x4<f16> = load %p_a_i
- %l_a_i:mat4x4<f16> = let %18
- %20:vec4<f16> = load %p_a_i_i
- %l_a_i_i:vec4<f16> = let %20
- %22:f16 = load_vector_element %p_a_i_i, 0u
- %23:f16 = access %l_a, 0i, 0i, 0u
- %24:f16 = add %22, %23
- %25:f16 = access %l_a_i, 0i, 0u
- %26:f16 = add %24, %25
- %27:f16 = access %l_a_i_i, 0u
- %28:f16 = add %26, %27
- store %s, %28
- ret
- }
+kernel void f(const constant tint_array<half4x4, 4>* a [[buffer(0)]], device half* s [[buffer(1)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s, .counter=(&counter)};
+ const constant tint_array<half4x4, 4>* const p_a = tint_module_vars.a;
+ const constant half4x4* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant half4* const p_a_i_i = (&(*p_a_i)[i(tint_module_vars)]);
+ tint_array<half4x4, 4> const l_a = (*p_a);
+ half4x4 const l_a_i = (*p_a_i);
+ half4 const l_a_i_i = (*p_a_i_i);
+ (*tint_module_vars.s) = ((((*p_a_i_i)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.msl
index 19984e1..9ddf2fd 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat4x4<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<half4x4, 4>* a;
+ device half* s;
+};
+
+kernel void f(const constant tint_array<half4x4, 4>* a [[buffer(0)]], device half* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s};
+ const constant tint_array<half4x4, 4>* const p_a = tint_module_vars.a;
+ const constant half4x4* const p_a_2 = (&(*p_a)[2]);
+ const constant half4* const p_a_2_1 = (&(*p_a_2)[1]);
+ tint_array<half4x4, 4> const l_a = (*p_a);
+ half4x4 const l_a_i = (*p_a_2);
+ half4 const l_a_i_i = (*p_a_2_1);
+ (*tint_module_vars.s) = ((((*p_a_2_1)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<mat4x4<f16>, 4>, read> = let %a
- %5:ptr<uniform, mat4x4<f16>, read> = access %p_a, 2i
- %p_a_2:ptr<uniform, mat4x4<f16>, read> = let %5
- %7:ptr<uniform, vec4<f16>, read> = access %p_a_2, 1i
- %p_a_2_1:ptr<uniform, vec4<f16>, read> = let %7
- %9:array<mat4x4<f16>, 4> = load %p_a
- %l_a:array<mat4x4<f16>, 4> = let %9
- %11:mat4x4<f16> = load %p_a_2
- %l_a_i:mat4x4<f16> = let %11
- %13:vec4<f16> = load %p_a_2_1
- %l_a_i_i:vec4<f16> = let %13
- %15:f16 = load_vector_element %p_a_2_1, 0u
- %16:f16 = access %l_a, 0i, 0i, 0u
- %17:f16 = add %15, %16
- %18:f16 = access %l_a_i, 0i, 0u
- %19:f16 = add %17, %18
- %20:f16 = access %l_a_i_i, 0u
- %21:f16 = add %19, %20
- store %s, %21
- 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/buffer/uniform/std140/array/mat4x4_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_fn.wgsl.expected.ir.msl
index bb5be48..fc71381 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_fn.wgsl.expected.ir.msl
@@ -1,64 +1,38 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat4x4<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
-}
+struct tint_module_vars_struct {
+ const constant tint_array<half4x4, 4>* u;
+ device half* s;
+};
-%a = func(%a_1:array<mat4x4<f16>, 4>):f16 { # %a_1: 'a'
- $B2: {
- %5:f16 = access %a_1, 0i, 0i, 0u
- ret %5
- }
+half a(tint_array<half4x4, 4> a) {
+ return a[0][0][0u];
}
-%b = func(%m:mat4x4<f16>):f16 {
- $B3: {
- %8:f16 = access %m, 0i, 0u
- ret %8
- }
+half b(half4x4 m) {
+ return m[0][0u];
}
-%c = func(%v:vec4<f16>):f16 {
- $B4: {
- %11:f16 = access %v, 0u
- ret %11
- }
+half c(half4 v) {
+ return v[0u];
}
-%d = func(%f:f16):f16 {
- $B5: {
- ret %f
- }
+half d(half f) {
+ return f;
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B6: {
- %15:array<mat4x4<f16>, 4> = load %u
- %16:f16 = call %a, %15
- %17:f16 = let %16
- %18:ptr<uniform, mat4x4<f16>, read> = access %u, 1i
- %19:mat4x4<f16> = load %18
- %20:f16 = call %b, %19
- %21:f16 = add %17, %20
- %22:f16 = let %21
- %23:ptr<uniform, vec4<f16>, read> = access %u, 1i, 0i
- %24:vec4<f16> = load %23
- %25:vec4<f16> = swizzle %24, ywxz
- %26:f16 = call %c, %25
- %27:f16 = add %22, %26
- %28:f16 = let %27
- %29:ptr<uniform, vec4<f16>, read> = access %u, 1i, 0i
- %30:vec4<f16> = load %29
- %31:vec4<f16> = swizzle %30, ywxz
- %32:f16 = access %31, 0u
- %33:f16 = call %d, %32
- %34:f16 = add %28, %33
- store %s, %34
- ret
- }
+kernel void f(const constant tint_array<half4x4, 4>* u [[buffer(0)]], device half* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ half const v_1 = a((*tint_module_vars.u));
+ half const v_2 = (v_1 + b((*tint_module_vars.u)[1]));
+ half const v_3 = (v_2 + c((*tint_module_vars.u)[1][0].ywxz));
+ (*tint_module_vars.s) = (v_3 + d((*tint_module_vars.u)[1][0].ywxz[0u]));
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_private.wgsl.expected.ir.msl
index 7673f73..59f6a82 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_private.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat4x4<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
- %p:ptr<private, array<mat4x4<f16>, 4>, read_write> = var
+struct tint_module_vars_struct {
+ const constant tint_array<half4x4, 4>* u;
+ device half* s;
+ thread tint_array<half4x4, 4>* p;
+};
+
+kernel void f(const constant tint_array<half4x4, 4>* u [[buffer(0)]], device half* s [[buffer(1)]]) {
+ thread tint_array<half4x4, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[1][0] = (*tint_module_vars.u)[0][1].ywxz;
+ (*tint_module_vars.p)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
+ (*tint_module_vars.s) = (*tint_module_vars.p)[1][0][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:array<mat4x4<f16>, 4> = load %u
- store %p, %5
- %6:ptr<private, mat4x4<f16>, read_write> = access %p, 1i
- %7:ptr<uniform, mat4x4<f16>, read> = access %u, 2i
- %8:mat4x4<f16> = load %7
- store %6, %8
- %9:ptr<private, vec4<f16>, read_write> = access %p, 1i, 0i
- %10:ptr<uniform, vec4<f16>, read> = access %u, 0i, 1i
- %11:vec4<f16> = load %10
- %12:vec4<f16> = swizzle %11, ywxz
- store %9, %12
- %13:ptr<private, vec4<f16>, read_write> = access %p, 1i, 0i
- %14:ptr<uniform, vec4<f16>, read> = access %u, 0i, 1i
- %15:f16 = load_vector_element %14, 0u
- store_vector_element %13, 0u, %15
- %16:ptr<private, vec4<f16>, read_write> = access %p, 1i, 0i
- %17:f16 = load_vector_element %16, 0u
- store %s, %17
- 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/buffer/uniform/std140/array/mat4x4_f16/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_storage.wgsl.expected.ir.msl
index 7b01bcc..61051b4 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,26 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat4x4<f16>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, array<mat4x4<f16>, 4>, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<half4x4, 4>* u;
+ device tint_array<half4x4, 4>* s;
+};
+
+kernel void f(const constant tint_array<half4x4, 4>* u [[buffer(0)]], device tint_array<half4x4, 4>* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.s)[1][0] = (*tint_module_vars.u)[0][1].ywxz;
+ (*tint_module_vars.s)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<mat4x4<f16>, 4> = load %u
- store %s, %4
- %5:ptr<storage, mat4x4<f16>, read_write> = access %s, 1i
- %6:ptr<uniform, mat4x4<f16>, read> = access %u, 2i
- %7:mat4x4<f16> = load %6
- store %5, %7
- %8:ptr<storage, vec4<f16>, read_write> = access %s, 1i, 0i
- %9:ptr<uniform, vec4<f16>, read> = access %u, 0i, 1i
- %10:vec4<f16> = load %9
- %11:vec4<f16> = swizzle %10, ywxz
- store %8, %11
- %12:ptr<storage, vec4<f16>, read_write> = access %s, 1i, 0i
- %13:ptr<uniform, vec4<f16>, read> = access %u, 0i, 1i
- %14:f16 = load_vector_element %13, 0u
- store_vector_element %12, 0u, %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/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 336fdbe..f507fba 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,51 +1,35 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat4x4<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
- %counter:ptr<private, i32, read_write> = var, 0i
-}
+struct tint_module_vars_struct {
+ const constant tint_array<float4x4, 4>* a;
+ device float* s;
+ thread int* counter;
+};
-%i = func():i32 {
- $B2: {
- %5:i32 = load %counter
- %6:i32 = add %5, 1i
- store %counter, %6
- %7:i32 = load %counter
- ret %7
- }
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<mat4x4<f32>, 4>, read> = let %a
- %10:i32 = call %i
- %11:ptr<uniform, mat4x4<f32>, read> = access %p_a, %10
- %p_a_i:ptr<uniform, mat4x4<f32>, read> = let %11
- %13:i32 = call %i
- %14:ptr<uniform, vec4<f32>, read> = access %p_a_i, %13
- %p_a_i_i:ptr<uniform, vec4<f32>, read> = let %14
- %16:array<mat4x4<f32>, 4> = load %p_a
- %l_a:array<mat4x4<f32>, 4> = let %16
- %18:mat4x4<f32> = load %p_a_i
- %l_a_i:mat4x4<f32> = let %18
- %20:vec4<f32> = load %p_a_i_i
- %l_a_i_i:vec4<f32> = let %20
- %22:f32 = load_vector_element %p_a_i_i, 0u
- %23:f32 = access %l_a, 0i, 0i, 0u
- %24:f32 = add %22, %23
- %25:f32 = access %l_a_i, 0i, 0u
- %26:f32 = add %24, %25
- %27:f32 = access %l_a_i_i, 0u
- %28:f32 = add %26, %27
- store %s, %28
- ret
- }
+kernel void f(const constant tint_array<float4x4, 4>* a [[buffer(0)]], device float* s [[buffer(1)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s, .counter=(&counter)};
+ const constant tint_array<float4x4, 4>* const p_a = tint_module_vars.a;
+ const constant float4x4* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant float4* const p_a_i_i = (&(*p_a_i)[i(tint_module_vars)]);
+ tint_array<float4x4, 4> const l_a = (*p_a);
+ float4x4 const l_a_i = (*p_a_i);
+ float4 const l_a_i_i = (*p_a_i_i);
+ (*tint_module_vars.s) = ((((*p_a_i_i)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.msl
index 3a2d273..c1e9f20 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %a:ptr<uniform, array<mat4x4<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<float4x4, 4>* a;
+ device float* s;
+};
+
+kernel void f(const constant tint_array<float4x4, 4>* a [[buffer(0)]], device float* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a, .s=s};
+ const constant tint_array<float4x4, 4>* const p_a = tint_module_vars.a;
+ const constant float4x4* const p_a_2 = (&(*p_a)[2]);
+ const constant float4* const p_a_2_1 = (&(*p_a_2)[1]);
+ tint_array<float4x4, 4> const l_a = (*p_a);
+ float4x4 const l_a_i = (*p_a_2);
+ float4 const l_a_i_i = (*p_a_2_1);
+ (*tint_module_vars.s) = ((((*p_a_2_1)[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<mat4x4<f32>, 4>, read> = let %a
- %5:ptr<uniform, mat4x4<f32>, read> = access %p_a, 2i
- %p_a_2:ptr<uniform, mat4x4<f32>, read> = let %5
- %7:ptr<uniform, vec4<f32>, read> = access %p_a_2, 1i
- %p_a_2_1:ptr<uniform, vec4<f32>, read> = let %7
- %9:array<mat4x4<f32>, 4> = load %p_a
- %l_a:array<mat4x4<f32>, 4> = let %9
- %11:mat4x4<f32> = load %p_a_2
- %l_a_i:mat4x4<f32> = let %11
- %13:vec4<f32> = load %p_a_2_1
- %l_a_i_i:vec4<f32> = let %13
- %15:f32 = load_vector_element %p_a_2_1, 0u
- %16:f32 = access %l_a, 0i, 0i, 0u
- %17:f32 = add %15, %16
- %18:f32 = access %l_a_i, 0i, 0u
- %19:f32 = add %17, %18
- %20:f32 = access %l_a_i_i, 0u
- %21:f32 = add %19, %20
- store %s, %21
- 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/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.ir.msl
index a8f60db..6ca01b6 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.ir.msl
@@ -1,64 +1,38 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat4x4<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
-}
+struct tint_module_vars_struct {
+ const constant tint_array<float4x4, 4>* u;
+ device float* s;
+};
-%a = func(%a_1:array<mat4x4<f32>, 4>):f32 { # %a_1: 'a'
- $B2: {
- %5:f32 = access %a_1, 0i, 0i, 0u
- ret %5
- }
+float a(tint_array<float4x4, 4> a) {
+ return a[0][0][0u];
}
-%b = func(%m:mat4x4<f32>):f32 {
- $B3: {
- %8:f32 = access %m, 0i, 0u
- ret %8
- }
+float b(float4x4 m) {
+ return m[0][0u];
}
-%c = func(%v:vec4<f32>):f32 {
- $B4: {
- %11:f32 = access %v, 0u
- ret %11
- }
+float c(float4 v) {
+ return v[0u];
}
-%d = func(%f:f32):f32 {
- $B5: {
- ret %f
- }
+float d(float f) {
+ return f;
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B6: {
- %15:array<mat4x4<f32>, 4> = load %u
- %16:f32 = call %a, %15
- %17:f32 = let %16
- %18:ptr<uniform, mat4x4<f32>, read> = access %u, 1i
- %19:mat4x4<f32> = load %18
- %20:f32 = call %b, %19
- %21:f32 = add %17, %20
- %22:f32 = let %21
- %23:ptr<uniform, vec4<f32>, read> = access %u, 1i, 0i
- %24:vec4<f32> = load %23
- %25:vec4<f32> = swizzle %24, ywxz
- %26:f32 = call %c, %25
- %27:f32 = add %22, %26
- %28:f32 = let %27
- %29:ptr<uniform, vec4<f32>, read> = access %u, 1i, 0i
- %30:vec4<f32> = load %29
- %31:vec4<f32> = swizzle %30, ywxz
- %32:f32 = access %31, 0u
- %33:f32 = call %d, %32
- %34:f32 = add %28, %33
- store %s, %34
- ret
- }
+kernel void f(const constant tint_array<float4x4, 4>* u [[buffer(0)]], device float* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float const v_1 = a((*tint_module_vars.u));
+ float const v_2 = (v_1 + b((*tint_module_vars.u)[1]));
+ float const v_3 = (v_2 + c((*tint_module_vars.u)[1][0].ywxz));
+ (*tint_module_vars.s) = (v_3 + d((*tint_module_vars.u)[1][0].ywxz[0u]));
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.ir.msl
index 9a95827..47e38ef 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.ir.msl
@@ -1,39 +1,29 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat4x4<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
- %p:ptr<private, array<mat4x4<f32>, 4>, read_write> = var
+struct tint_module_vars_struct {
+ const constant tint_array<float4x4, 4>* u;
+ device float* s;
+ thread tint_array<float4x4, 4>* p;
+};
+
+kernel void f(const constant tint_array<float4x4, 4>* u [[buffer(0)]], device float* s [[buffer(1)]]) {
+ thread tint_array<float4x4, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[1][0] = (*tint_module_vars.u)[0][1].ywxz;
+ (*tint_module_vars.p)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
+ (*tint_module_vars.s) = (*tint_module_vars.p)[1][0][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:array<mat4x4<f32>, 4> = load %u
- store %p, %5
- %6:ptr<private, mat4x4<f32>, read_write> = access %p, 1i
- %7:ptr<uniform, mat4x4<f32>, read> = access %u, 2i
- %8:mat4x4<f32> = load %7
- store %6, %8
- %9:ptr<private, vec4<f32>, read_write> = access %p, 1i, 0i
- %10:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1i
- %11:vec4<f32> = load %10
- %12:vec4<f32> = swizzle %11, ywxz
- store %9, %12
- %13:ptr<private, vec4<f32>, read_write> = access %p, 1i, 0i
- %14:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1i
- %15:f32 = load_vector_element %14, 0u
- store_vector_element %13, 0u, %15
- %16:ptr<private, vec4<f32>, read_write> = access %p, 1i, 0i
- %17:f32 = load_vector_element %16, 0u
- store %s, %17
- 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/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.ir.msl
index 0aefcc3..4b3a5f6 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,26 @@
-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: $B1: { # root
- %u:ptr<uniform, array<mat4x4<f32>, 4>, read> = var @binding_point(0, 0)
- %s:ptr<storage, array<mat4x4<f32>, 4>, read_write> = var @binding_point(0, 1)
+struct tint_module_vars_struct {
+ const constant tint_array<float4x4, 4>* u;
+ device tint_array<float4x4, 4>* s;
+};
+
+kernel void f(const constant tint_array<float4x4, 4>* u [[buffer(0)]], device tint_array<float4x4, 4>* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.s)[1][0] = (*tint_module_vars.u)[0][1].ywxz;
+ (*tint_module_vars.s)[1][0][0u] = (*tint_module_vars.u)[0][1][0u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<mat4x4<f32>, 4> = load %u
- store %s, %4
- %5:ptr<storage, mat4x4<f32>, read_write> = access %s, 1i
- %6:ptr<uniform, mat4x4<f32>, read> = access %u, 2i
- %7:mat4x4<f32> = load %6
- store %5, %7
- %8:ptr<storage, vec4<f32>, read_write> = access %s, 1i, 0i
- %9:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1i
- %10:vec4<f32> = load %9
- %11:vec4<f32> = swizzle %10, ywxz
- store %8, %11
- %12:ptr<storage, vec4<f32>, read_write> = access %s, 1i, 0i
- %13:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1i
- %14:f32 = load_vector_element %13, 0u
- store_vector_element %12, 0u, %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/buffer/uniform/std140/struct/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index eb2f4f7..ad04662 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,66 +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: Inner = struct @align(4) {
- m:mat2x2<f16> @offset(0)
-}
+struct Inner {
+ half2x2 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+ thread int* counter;
+};
-Outer = struct @align(4) {
- a:array<Inner, 4> @offset(0)
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .counter=(&counter)};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant tint_array<Inner, 4>* const p_a_i_a = (&(*p_a_i).a);
+ const constant Inner* const p_a_i_a_i = (&(*p_a_i_a)[i(tint_module_vars)]);
+ const constant half2x2* const p_a_i_a_i_m = (&(*p_a_i_a_i).m);
+ const constant half2* const p_a_i_a_i_m_i = (&(*p_a_i_a_i_m)[i(tint_module_vars)]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_i = (*p_a_i);
+ tint_array<Inner, 4> const l_a_i_a = (*p_a_i_a);
+ Inner const l_a_i_a_i = (*p_a_i_a_i);
+ half2x2 const l_a_i_a_i_m = (*p_a_i_a_i_m);
+ half2 const l_a_i_a_i_m_i = (*p_a_i_a_i_m_i);
+ half const l_a_i_a_i_m_i_i = (*p_a_i_a_i_m_i)[i(tint_module_vars)];
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %9:i32 = call %i
- %10:ptr<uniform, Outer, read> = access %p_a, %9
- %p_a_i:ptr<uniform, Outer, read> = let %10
- %12:ptr<uniform, array<Inner, 4>, read> = access %p_a_i, 0u
- %p_a_i_a:ptr<uniform, array<Inner, 4>, read> = let %12
- %14:i32 = call %i
- %15:ptr<uniform, Inner, read> = access %p_a_i_a, %14
- %p_a_i_a_i:ptr<uniform, Inner, read> = let %15
- %17:ptr<uniform, mat2x2<f16>, read> = access %p_a_i_a_i, 0u
- %p_a_i_a_i_m:ptr<uniform, mat2x2<f16>, read> = let %17
- %19:i32 = call %i
- %20:ptr<uniform, vec2<f16>, read> = access %p_a_i_a_i_m, %19
- %p_a_i_a_i_m_i:ptr<uniform, vec2<f16>, read> = let %20
- %22:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %22
- %24:Outer = load %p_a_i
- %l_a_i:Outer = let %24
- %26:array<Inner, 4> = load %p_a_i_a
- %l_a_i_a:array<Inner, 4> = let %26
- %28:Inner = load %p_a_i_a_i
- %l_a_i_a_i:Inner = let %28
- %30:mat2x2<f16> = load %p_a_i_a_i_m
- %l_a_i_a_i_m:mat2x2<f16> = let %30
- %32:vec2<f16> = load %p_a_i_a_i_m_i
- %l_a_i_a_i_m_i:vec2<f16> = let %32
- %34:i32 = call %i
- %35:f16 = load_vector_element %p_a_i_a_i_m_i, %34
- %l_a_i_a_i_m_i_i:f16 = let %35
- 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/buffer/uniform/std140/struct/mat2x2_f16/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/static_index_via_ptr.wgsl.expected.ir.msl
index 6eb4d45..1970fa5 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,52 +1,40 @@
-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: Inner = struct @align(4) {
- m:mat2x2<f16> @offset(0)
+struct Inner {
+ half2x2 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+};
+
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_3 = (&(*p_a)[3]);
+ const constant tint_array<Inner, 4>* const p_a_3_a = (&(*p_a_3).a);
+ const constant Inner* const p_a_3_a_2 = (&(*p_a_3_a)[2]);
+ const constant half2x2* const p_a_3_a_2_m = (&(*p_a_3_a_2).m);
+ const constant half2* const p_a_3_a_2_m_1 = (&(*p_a_3_a_2_m)[1]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_3 = (*p_a_3);
+ tint_array<Inner, 4> const l_a_3_a = (*p_a_3_a);
+ Inner const l_a_3_a_2 = (*p_a_3_a_2);
+ half2x2 const l_a_3_a_2_m = (*p_a_3_a_2_m);
+ half2 const l_a_3_a_2_m_1 = (*p_a_3_a_2_m_1);
+ half const l_a_3_a_2_m_1_0 = (*p_a_3_a_2_m_1)[0];
}
-
-Outer = struct @align(4) {
- a:array<Inner, 4> @offset(0)
-}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %4:ptr<uniform, Outer, read> = access %p_a, 3i
- %p_a_3:ptr<uniform, Outer, read> = let %4
- %6:ptr<uniform, array<Inner, 4>, read> = access %p_a_3, 0u
- %p_a_3_a:ptr<uniform, array<Inner, 4>, read> = let %6
- %8:ptr<uniform, Inner, read> = access %p_a_3_a, 2i
- %p_a_3_a_2:ptr<uniform, Inner, read> = let %8
- %10:ptr<uniform, mat2x2<f16>, read> = access %p_a_3_a_2, 0u
- %p_a_3_a_2_m:ptr<uniform, mat2x2<f16>, read> = let %10
- %12:ptr<uniform, vec2<f16>, read> = access %p_a_3_a_2_m, 1i
- %p_a_3_a_2_m_1:ptr<uniform, vec2<f16>, read> = let %12
- %14:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %14
- %16:Outer = load %p_a_3
- %l_a_3:Outer = let %16
- %18:array<Inner, 4> = load %p_a_3_a
- %l_a_3_a:array<Inner, 4> = let %18
- %20:Inner = load %p_a_3_a_2
- %l_a_3_a_2:Inner = let %20
- %22:mat2x2<f16> = load %p_a_3_a_2_m
- %l_a_3_a_2_m:mat2x2<f16> = let %22
- %24:vec2<f16> = load %p_a_3_a_2_m_1
- %l_a_3_a_2_m_1:vec2<f16> = let %24
- %26:f16 = load_vector_element %p_a_3_a_2_m_1, 0i
- %l_a_3_a_2_m_1_0:f16 = let %26
- 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/buffer/uniform/std140/struct/mat2x2_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_fn.wgsl.expected.ir.msl
index 936106d..0c6f2ef 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_fn.wgsl.expected.ir.msl
@@ -1,67 +1,41 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat2x2<f16> @offset(4)
- after:i32 @offset(64)
-}
+struct S {
+ int before;
+ half2x2 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+};
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
+void a(tint_array<S, 4> a) {
}
-
-%a = func(%a_1:array<S, 4>):void { # %a_1: 'a'
- $B2: {
- ret
- }
+void b(S s) {
}
-%b = func(%s:S):void {
- $B3: {
- ret
- }
+void c(half2x2 m) {
}
-%c = func(%m:mat2x2<f16>):void {
- $B4: {
- ret
- }
+void d(half2 v) {
}
-%d = func(%v:vec2<f16>):void {
- $B5: {
- ret
- }
+void e(half f) {
}
-%e = func(%f:f16):void {
- $B6: {
- ret
- }
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[2]);
+ c((*tint_module_vars.u)[2].m);
+ d((*tint_module_vars.u)[0].m[1].yx);
+ e((*tint_module_vars.u)[0].m[1].yx[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B7: {
- %13:array<S, 4> = load %u
- %14:void = call %a, %13
- %15:ptr<uniform, S, read> = access %u, 2i
- %16:S = load %15
- %17:void = call %b, %16
- %18:ptr<uniform, mat2x2<f16>, read> = access %u, 2i, 1u
- %19:mat2x2<f16> = load %18
- %20:void = call %c, %19
- %21:ptr<uniform, vec2<f16>, read> = access %u, 0i, 1u, 1i
- %22:vec2<f16> = load %21
- %23:vec2<f16> = swizzle %22, yx
- %24:void = call %d, %23
- %25:ptr<uniform, vec2<f16>, read> = access %u, 0i, 1u, 1i
- %26:vec2<f16> = load %25
- %27:vec2<f16> = swizzle %26, yx
- %28:f16 = access %27, 0u
- %29:void = call %e, %28
- 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/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.ir.msl
index d4123cf..420cc47 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.ir.msl
@@ -1,41 +1,32 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat2x2<f16> @offset(4)
- after:i32 @offset(64)
+struct S {
+ int before;
+ half2x2 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+ thread tint_array<S, 4>* p;
+};
+
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ thread tint_array<S, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[3].m = (*tint_module_vars.u)[2].m;
+ (*tint_module_vars.p)[1].m[0] = (*tint_module_vars.u)[0].m[1].yx;
}
-
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
- %p:ptr<private, array<S, 4>, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<S, 4> = load %u
- store %p, %4
- %5:ptr<private, S, read_write> = access %p, 1i
- %6:ptr<uniform, S, read> = access %u, 2i
- %7:S = load %6
- store %5, %7
- %8:ptr<private, mat2x2<f16>, read_write> = access %p, 3i, 1u
- %9:ptr<uniform, mat2x2<f16>, read> = access %u, 2i, 1u
- %10:mat2x2<f16> = load %9
- store %8, %10
- %11:ptr<private, vec2<f16>, read_write> = access %p, 1i, 1u, 0i
- %12:ptr<uniform, vec2<f16>, read> = access %u, 0i, 1u, 1i
- %13:vec2<f16> = load %12
- %14:vec2<f16> = swizzle %13, yx
- store %11, %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/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 4132c7f..fad5c3b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,66 +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: Inner = struct @align(8) {
- m:mat2x2<f32> @offset(0)
-}
+struct Inner {
+ float2x2 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+ thread int* counter;
+};
-Outer = struct @align(8) {
- a:array<Inner, 4> @offset(0)
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .counter=(&counter)};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant tint_array<Inner, 4>* const p_a_i_a = (&(*p_a_i).a);
+ const constant Inner* const p_a_i_a_i = (&(*p_a_i_a)[i(tint_module_vars)]);
+ const constant float2x2* const p_a_i_a_i_m = (&(*p_a_i_a_i).m);
+ const constant float2* const p_a_i_a_i_m_i = (&(*p_a_i_a_i_m)[i(tint_module_vars)]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_i = (*p_a_i);
+ tint_array<Inner, 4> const l_a_i_a = (*p_a_i_a);
+ Inner const l_a_i_a_i = (*p_a_i_a_i);
+ float2x2 const l_a_i_a_i_m = (*p_a_i_a_i_m);
+ float2 const l_a_i_a_i_m_i = (*p_a_i_a_i_m_i);
+ float const l_a_i_a_i_m_i_i = (*p_a_i_a_i_m_i)[i(tint_module_vars)];
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %9:i32 = call %i
- %10:ptr<uniform, Outer, read> = access %p_a, %9
- %p_a_i:ptr<uniform, Outer, read> = let %10
- %12:ptr<uniform, array<Inner, 4>, read> = access %p_a_i, 0u
- %p_a_i_a:ptr<uniform, array<Inner, 4>, read> = let %12
- %14:i32 = call %i
- %15:ptr<uniform, Inner, read> = access %p_a_i_a, %14
- %p_a_i_a_i:ptr<uniform, Inner, read> = let %15
- %17:ptr<uniform, mat2x2<f32>, read> = access %p_a_i_a_i, 0u
- %p_a_i_a_i_m:ptr<uniform, mat2x2<f32>, read> = let %17
- %19:i32 = call %i
- %20:ptr<uniform, vec2<f32>, read> = access %p_a_i_a_i_m, %19
- %p_a_i_a_i_m_i:ptr<uniform, vec2<f32>, read> = let %20
- %22:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %22
- %24:Outer = load %p_a_i
- %l_a_i:Outer = let %24
- %26:array<Inner, 4> = load %p_a_i_a
- %l_a_i_a:array<Inner, 4> = let %26
- %28:Inner = load %p_a_i_a_i
- %l_a_i_a_i:Inner = let %28
- %30:mat2x2<f32> = load %p_a_i_a_i_m
- %l_a_i_a_i_m:mat2x2<f32> = let %30
- %32:vec2<f32> = load %p_a_i_a_i_m_i
- %l_a_i_a_i_m_i:vec2<f32> = let %32
- %34:i32 = call %i
- %35:f32 = load_vector_element %p_a_i_a_i_m_i, %34
- %l_a_i_a_i_m_i_i:f32 = let %35
- 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/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.msl
index 43df577..1c3c2c3 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,52 +1,40 @@
-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: Inner = struct @align(8) {
- m:mat2x2<f32> @offset(0)
+struct Inner {
+ float2x2 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+};
+
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_3 = (&(*p_a)[3]);
+ const constant tint_array<Inner, 4>* const p_a_3_a = (&(*p_a_3).a);
+ const constant Inner* const p_a_3_a_2 = (&(*p_a_3_a)[2]);
+ const constant float2x2* const p_a_3_a_2_m = (&(*p_a_3_a_2).m);
+ const constant float2* const p_a_3_a_2_m_1 = (&(*p_a_3_a_2_m)[1]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_3 = (*p_a_3);
+ tint_array<Inner, 4> const l_a_3_a = (*p_a_3_a);
+ Inner const l_a_3_a_2 = (*p_a_3_a_2);
+ float2x2 const l_a_3_a_2_m = (*p_a_3_a_2_m);
+ float2 const l_a_3_a_2_m_1 = (*p_a_3_a_2_m_1);
+ float const l_a_3_a_2_m_1_0 = (*p_a_3_a_2_m_1)[0];
}
-
-Outer = struct @align(8) {
- a:array<Inner, 4> @offset(0)
-}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %4:ptr<uniform, Outer, read> = access %p_a, 3i
- %p_a_3:ptr<uniform, Outer, read> = let %4
- %6:ptr<uniform, array<Inner, 4>, read> = access %p_a_3, 0u
- %p_a_3_a:ptr<uniform, array<Inner, 4>, read> = let %6
- %8:ptr<uniform, Inner, read> = access %p_a_3_a, 2i
- %p_a_3_a_2:ptr<uniform, Inner, read> = let %8
- %10:ptr<uniform, mat2x2<f32>, read> = access %p_a_3_a_2, 0u
- %p_a_3_a_2_m:ptr<uniform, mat2x2<f32>, read> = let %10
- %12:ptr<uniform, vec2<f32>, read> = access %p_a_3_a_2_m, 1i
- %p_a_3_a_2_m_1:ptr<uniform, vec2<f32>, read> = let %12
- %14:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %14
- %16:Outer = load %p_a_3
- %l_a_3:Outer = let %16
- %18:array<Inner, 4> = load %p_a_3_a
- %l_a_3_a:array<Inner, 4> = let %18
- %20:Inner = load %p_a_3_a_2
- %l_a_3_a_2:Inner = let %20
- %22:mat2x2<f32> = load %p_a_3_a_2_m
- %l_a_3_a_2_m:mat2x2<f32> = let %22
- %24:vec2<f32> = load %p_a_3_a_2_m_1
- %l_a_3_a_2_m_1:vec2<f32> = let %24
- %26:f32 = load_vector_element %p_a_3_a_2_m_1, 0i
- %l_a_3_a_2_m_1_0:f32 = let %26
- 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/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.ir.msl
index 2bec96d..7d22fe3 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.ir.msl
@@ -1,67 +1,41 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat2x2<f32> @offset(8)
- after:i32 @offset(64)
-}
+struct S {
+ int before;
+ float2x2 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+};
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
+void a(tint_array<S, 4> a) {
}
-
-%a = func(%a_1:array<S, 4>):void { # %a_1: 'a'
- $B2: {
- ret
- }
+void b(S s) {
}
-%b = func(%s:S):void {
- $B3: {
- ret
- }
+void c(float2x2 m) {
}
-%c = func(%m:mat2x2<f32>):void {
- $B4: {
- ret
- }
+void d(float2 v) {
}
-%d = func(%v:vec2<f32>):void {
- $B5: {
- ret
- }
+void e(float f) {
}
-%e = func(%f:f32):void {
- $B6: {
- ret
- }
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[2]);
+ c((*tint_module_vars.u)[2].m);
+ d((*tint_module_vars.u)[0].m[1].yx);
+ e((*tint_module_vars.u)[0].m[1].yx[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B7: {
- %13:array<S, 4> = load %u
- %14:void = call %a, %13
- %15:ptr<uniform, S, read> = access %u, 2i
- %16:S = load %15
- %17:void = call %b, %16
- %18:ptr<uniform, mat2x2<f32>, read> = access %u, 2i, 1u
- %19:mat2x2<f32> = load %18
- %20:void = call %c, %19
- %21:ptr<uniform, vec2<f32>, read> = access %u, 0i, 1u, 1i
- %22:vec2<f32> = load %21
- %23:vec2<f32> = swizzle %22, yx
- %24:void = call %d, %23
- %25:ptr<uniform, vec2<f32>, read> = access %u, 0i, 1u, 1i
- %26:vec2<f32> = load %25
- %27:vec2<f32> = swizzle %26, yx
- %28:f32 = access %27, 0u
- %29:void = call %e, %28
- 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/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.ir.msl
index 5ee7049..28c0c90 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.ir.msl
@@ -1,41 +1,32 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat2x2<f32> @offset(8)
- after:i32 @offset(64)
+struct S {
+ int before;
+ float2x2 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+ thread tint_array<S, 4>* p;
+};
+
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ thread tint_array<S, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[3].m = (*tint_module_vars.u)[2].m;
+ (*tint_module_vars.p)[1].m[0] = (*tint_module_vars.u)[0].m[1].yx;
}
-
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
- %p:ptr<private, array<S, 4>, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<S, 4> = load %u
- store %p, %4
- %5:ptr<private, S, read_write> = access %p, 1i
- %6:ptr<uniform, S, read> = access %u, 2i
- %7:S = load %6
- store %5, %7
- %8:ptr<private, mat2x2<f32>, read_write> = access %p, 3i, 1u
- %9:ptr<uniform, mat2x2<f32>, read> = access %u, 2i, 1u
- %10:mat2x2<f32> = load %9
- store %8, %10
- %11:ptr<private, vec2<f32>, read_write> = access %p, 1i, 1u, 0i
- %12:ptr<uniform, vec2<f32>, read> = access %u, 0i, 1u, 1i
- %13:vec2<f32> = load %12
- %14:vec2<f32> = swizzle %13, yx
- store %11, %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/buffer/uniform/std140/struct/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 985fb84..454aa71 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,66 +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: Inner = struct @align(8) {
- m:mat2x3<f16> @offset(0)
-}
+struct Inner {
+ half2x3 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+ thread int* counter;
+};
-Outer = struct @align(8) {
- a:array<Inner, 4> @offset(0)
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .counter=(&counter)};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant tint_array<Inner, 4>* const p_a_i_a = (&(*p_a_i).a);
+ const constant Inner* const p_a_i_a_i = (&(*p_a_i_a)[i(tint_module_vars)]);
+ const constant half2x3* const p_a_i_a_i_m = (&(*p_a_i_a_i).m);
+ const constant half3* const p_a_i_a_i_m_i = (&(*p_a_i_a_i_m)[i(tint_module_vars)]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_i = (*p_a_i);
+ tint_array<Inner, 4> const l_a_i_a = (*p_a_i_a);
+ Inner const l_a_i_a_i = (*p_a_i_a_i);
+ half2x3 const l_a_i_a_i_m = (*p_a_i_a_i_m);
+ half3 const l_a_i_a_i_m_i = (*p_a_i_a_i_m_i);
+ half const l_a_i_a_i_m_i_i = (*p_a_i_a_i_m_i)[i(tint_module_vars)];
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %9:i32 = call %i
- %10:ptr<uniform, Outer, read> = access %p_a, %9
- %p_a_i:ptr<uniform, Outer, read> = let %10
- %12:ptr<uniform, array<Inner, 4>, read> = access %p_a_i, 0u
- %p_a_i_a:ptr<uniform, array<Inner, 4>, read> = let %12
- %14:i32 = call %i
- %15:ptr<uniform, Inner, read> = access %p_a_i_a, %14
- %p_a_i_a_i:ptr<uniform, Inner, read> = let %15
- %17:ptr<uniform, mat2x3<f16>, read> = access %p_a_i_a_i, 0u
- %p_a_i_a_i_m:ptr<uniform, mat2x3<f16>, read> = let %17
- %19:i32 = call %i
- %20:ptr<uniform, vec3<f16>, read> = access %p_a_i_a_i_m, %19
- %p_a_i_a_i_m_i:ptr<uniform, vec3<f16>, read> = let %20
- %22:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %22
- %24:Outer = load %p_a_i
- %l_a_i:Outer = let %24
- %26:array<Inner, 4> = load %p_a_i_a
- %l_a_i_a:array<Inner, 4> = let %26
- %28:Inner = load %p_a_i_a_i
- %l_a_i_a_i:Inner = let %28
- %30:mat2x3<f16> = load %p_a_i_a_i_m
- %l_a_i_a_i_m:mat2x3<f16> = let %30
- %32:vec3<f16> = load %p_a_i_a_i_m_i
- %l_a_i_a_i_m_i:vec3<f16> = let %32
- %34:i32 = call %i
- %35:f16 = load_vector_element %p_a_i_a_i_m_i, %34
- %l_a_i_a_i_m_i_i:f16 = let %35
- 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/buffer/uniform/std140/struct/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.msl
index c9c7e11..8d4e8cb 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,52 +1,40 @@
-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: Inner = struct @align(8) {
- m:mat2x3<f16> @offset(0)
+struct Inner {
+ half2x3 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+};
+
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_3 = (&(*p_a)[3]);
+ const constant tint_array<Inner, 4>* const p_a_3_a = (&(*p_a_3).a);
+ const constant Inner* const p_a_3_a_2 = (&(*p_a_3_a)[2]);
+ const constant half2x3* const p_a_3_a_2_m = (&(*p_a_3_a_2).m);
+ const constant half3* const p_a_3_a_2_m_1 = (&(*p_a_3_a_2_m)[1]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_3 = (*p_a_3);
+ tint_array<Inner, 4> const l_a_3_a = (*p_a_3_a);
+ Inner const l_a_3_a_2 = (*p_a_3_a_2);
+ half2x3 const l_a_3_a_2_m = (*p_a_3_a_2_m);
+ half3 const l_a_3_a_2_m_1 = (*p_a_3_a_2_m_1);
+ half const l_a_3_a_2_m_1_0 = (*p_a_3_a_2_m_1)[0];
}
-
-Outer = struct @align(8) {
- a:array<Inner, 4> @offset(0)
-}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %4:ptr<uniform, Outer, read> = access %p_a, 3i
- %p_a_3:ptr<uniform, Outer, read> = let %4
- %6:ptr<uniform, array<Inner, 4>, read> = access %p_a_3, 0u
- %p_a_3_a:ptr<uniform, array<Inner, 4>, read> = let %6
- %8:ptr<uniform, Inner, read> = access %p_a_3_a, 2i
- %p_a_3_a_2:ptr<uniform, Inner, read> = let %8
- %10:ptr<uniform, mat2x3<f16>, read> = access %p_a_3_a_2, 0u
- %p_a_3_a_2_m:ptr<uniform, mat2x3<f16>, read> = let %10
- %12:ptr<uniform, vec3<f16>, read> = access %p_a_3_a_2_m, 1i
- %p_a_3_a_2_m_1:ptr<uniform, vec3<f16>, read> = let %12
- %14:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %14
- %16:Outer = load %p_a_3
- %l_a_3:Outer = let %16
- %18:array<Inner, 4> = load %p_a_3_a
- %l_a_3_a:array<Inner, 4> = let %18
- %20:Inner = load %p_a_3_a_2
- %l_a_3_a_2:Inner = let %20
- %22:mat2x3<f16> = load %p_a_3_a_2_m
- %l_a_3_a_2_m:mat2x3<f16> = let %22
- %24:vec3<f16> = load %p_a_3_a_2_m_1
- %l_a_3_a_2_m_1:vec3<f16> = let %24
- %26:f16 = load_vector_element %p_a_3_a_2_m_1, 0i
- %l_a_3_a_2_m_1_0:f16 = let %26
- 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/buffer/uniform/std140/struct/mat2x3_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_fn.wgsl.expected.ir.msl
index cf38c54..3fbff88 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_fn.wgsl.expected.ir.msl
@@ -1,67 +1,41 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat2x3<f16> @offset(8)
- after:i32 @offset(64)
-}
+struct S {
+ int before;
+ half2x3 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+};
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
+void a(tint_array<S, 4> a) {
}
-
-%a = func(%a_1:array<S, 4>):void { # %a_1: 'a'
- $B2: {
- ret
- }
+void b(S s) {
}
-%b = func(%s:S):void {
- $B3: {
- ret
- }
+void c(half2x3 m) {
}
-%c = func(%m:mat2x3<f16>):void {
- $B4: {
- ret
- }
+void d(half3 v) {
}
-%d = func(%v:vec3<f16>):void {
- $B5: {
- ret
- }
+void e(half f) {
}
-%e = func(%f:f16):void {
- $B6: {
- ret
- }
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[2]);
+ c((*tint_module_vars.u)[2].m);
+ d((*tint_module_vars.u)[0].m[1].zxy);
+ e((*tint_module_vars.u)[0].m[1].zxy[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B7: {
- %13:array<S, 4> = load %u
- %14:void = call %a, %13
- %15:ptr<uniform, S, read> = access %u, 2i
- %16:S = load %15
- %17:void = call %b, %16
- %18:ptr<uniform, mat2x3<f16>, read> = access %u, 2i, 1u
- %19:mat2x3<f16> = load %18
- %20:void = call %c, %19
- %21:ptr<uniform, vec3<f16>, read> = access %u, 0i, 1u, 1i
- %22:vec3<f16> = load %21
- %23:vec3<f16> = swizzle %22, zxy
- %24:void = call %d, %23
- %25:ptr<uniform, vec3<f16>, read> = access %u, 0i, 1u, 1i
- %26:vec3<f16> = load %25
- %27:vec3<f16> = swizzle %26, zxy
- %28:f16 = access %27, 0u
- %29:void = call %e, %28
- 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/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.ir.msl
index 435e18b..85a6ad2 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.ir.msl
@@ -1,41 +1,32 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat2x3<f16> @offset(8)
- after:i32 @offset(64)
+struct S {
+ int before;
+ half2x3 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+ thread tint_array<S, 4>* p;
+};
+
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ thread tint_array<S, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[3].m = (*tint_module_vars.u)[2].m;
+ (*tint_module_vars.p)[1].m[0] = (*tint_module_vars.u)[0].m[1].zxy;
}
-
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
- %p:ptr<private, array<S, 4>, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<S, 4> = load %u
- store %p, %4
- %5:ptr<private, S, read_write> = access %p, 1i
- %6:ptr<uniform, S, read> = access %u, 2i
- %7:S = load %6
- store %5, %7
- %8:ptr<private, mat2x3<f16>, read_write> = access %p, 3i, 1u
- %9:ptr<uniform, mat2x3<f16>, read> = access %u, 2i, 1u
- %10:mat2x3<f16> = load %9
- store %8, %10
- %11:ptr<private, vec3<f16>, read_write> = access %p, 1i, 1u, 0i
- %12:ptr<uniform, vec3<f16>, read> = access %u, 0i, 1u, 1i
- %13:vec3<f16> = load %12
- %14:vec3<f16> = swizzle %13, zxy
- store %11, %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/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index ab28715..d93f367 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,66 +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: Inner = struct @align(16) {
- m:mat2x3<f32> @offset(0)
-}
+struct Inner {
+ float2x3 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+ thread int* counter;
+};
-Outer = struct @align(16) {
- a:array<Inner, 4> @offset(0)
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .counter=(&counter)};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant tint_array<Inner, 4>* const p_a_i_a = (&(*p_a_i).a);
+ const constant Inner* const p_a_i_a_i = (&(*p_a_i_a)[i(tint_module_vars)]);
+ const constant float2x3* const p_a_i_a_i_m = (&(*p_a_i_a_i).m);
+ const constant float3* const p_a_i_a_i_m_i = (&(*p_a_i_a_i_m)[i(tint_module_vars)]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_i = (*p_a_i);
+ tint_array<Inner, 4> const l_a_i_a = (*p_a_i_a);
+ Inner const l_a_i_a_i = (*p_a_i_a_i);
+ float2x3 const l_a_i_a_i_m = (*p_a_i_a_i_m);
+ float3 const l_a_i_a_i_m_i = (*p_a_i_a_i_m_i);
+ float const l_a_i_a_i_m_i_i = (*p_a_i_a_i_m_i)[i(tint_module_vars)];
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %9:i32 = call %i
- %10:ptr<uniform, Outer, read> = access %p_a, %9
- %p_a_i:ptr<uniform, Outer, read> = let %10
- %12:ptr<uniform, array<Inner, 4>, read> = access %p_a_i, 0u
- %p_a_i_a:ptr<uniform, array<Inner, 4>, read> = let %12
- %14:i32 = call %i
- %15:ptr<uniform, Inner, read> = access %p_a_i_a, %14
- %p_a_i_a_i:ptr<uniform, Inner, read> = let %15
- %17:ptr<uniform, mat2x3<f32>, read> = access %p_a_i_a_i, 0u
- %p_a_i_a_i_m:ptr<uniform, mat2x3<f32>, read> = let %17
- %19:i32 = call %i
- %20:ptr<uniform, vec3<f32>, read> = access %p_a_i_a_i_m, %19
- %p_a_i_a_i_m_i:ptr<uniform, vec3<f32>, read> = let %20
- %22:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %22
- %24:Outer = load %p_a_i
- %l_a_i:Outer = let %24
- %26:array<Inner, 4> = load %p_a_i_a
- %l_a_i_a:array<Inner, 4> = let %26
- %28:Inner = load %p_a_i_a_i
- %l_a_i_a_i:Inner = let %28
- %30:mat2x3<f32> = load %p_a_i_a_i_m
- %l_a_i_a_i_m:mat2x3<f32> = let %30
- %32:vec3<f32> = load %p_a_i_a_i_m_i
- %l_a_i_a_i_m_i:vec3<f32> = let %32
- %34:i32 = call %i
- %35:f32 = load_vector_element %p_a_i_a_i_m_i, %34
- %l_a_i_a_i_m_i_i:f32 = let %35
- 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/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.msl
index 3847627..498987e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,52 +1,40 @@
-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: Inner = struct @align(16) {
- m:mat2x3<f32> @offset(0)
+struct Inner {
+ float2x3 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+};
+
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_3 = (&(*p_a)[3]);
+ const constant tint_array<Inner, 4>* const p_a_3_a = (&(*p_a_3).a);
+ const constant Inner* const p_a_3_a_2 = (&(*p_a_3_a)[2]);
+ const constant float2x3* const p_a_3_a_2_m = (&(*p_a_3_a_2).m);
+ const constant float3* const p_a_3_a_2_m_1 = (&(*p_a_3_a_2_m)[1]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_3 = (*p_a_3);
+ tint_array<Inner, 4> const l_a_3_a = (*p_a_3_a);
+ Inner const l_a_3_a_2 = (*p_a_3_a_2);
+ float2x3 const l_a_3_a_2_m = (*p_a_3_a_2_m);
+ float3 const l_a_3_a_2_m_1 = (*p_a_3_a_2_m_1);
+ float const l_a_3_a_2_m_1_0 = (*p_a_3_a_2_m_1)[0];
}
-
-Outer = struct @align(16) {
- a:array<Inner, 4> @offset(0)
-}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %4:ptr<uniform, Outer, read> = access %p_a, 3i
- %p_a_3:ptr<uniform, Outer, read> = let %4
- %6:ptr<uniform, array<Inner, 4>, read> = access %p_a_3, 0u
- %p_a_3_a:ptr<uniform, array<Inner, 4>, read> = let %6
- %8:ptr<uniform, Inner, read> = access %p_a_3_a, 2i
- %p_a_3_a_2:ptr<uniform, Inner, read> = let %8
- %10:ptr<uniform, mat2x3<f32>, read> = access %p_a_3_a_2, 0u
- %p_a_3_a_2_m:ptr<uniform, mat2x3<f32>, read> = let %10
- %12:ptr<uniform, vec3<f32>, read> = access %p_a_3_a_2_m, 1i
- %p_a_3_a_2_m_1:ptr<uniform, vec3<f32>, read> = let %12
- %14:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %14
- %16:Outer = load %p_a_3
- %l_a_3:Outer = let %16
- %18:array<Inner, 4> = load %p_a_3_a
- %l_a_3_a:array<Inner, 4> = let %18
- %20:Inner = load %p_a_3_a_2
- %l_a_3_a_2:Inner = let %20
- %22:mat2x3<f32> = load %p_a_3_a_2_m
- %l_a_3_a_2_m:mat2x3<f32> = let %22
- %24:vec3<f32> = load %p_a_3_a_2_m_1
- %l_a_3_a_2_m_1:vec3<f32> = let %24
- %26:f32 = load_vector_element %p_a_3_a_2_m_1, 0i
- %l_a_3_a_2_m_1_0:f32 = let %26
- 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/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.ir.msl
index b9101bb..3c77ce1 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.ir.msl
@@ -1,67 +1,41 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat2x3<f32> @offset(16)
- after:i32 @offset(64)
-}
+struct S {
+ int before;
+ float2x3 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+};
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
+void a(tint_array<S, 4> a) {
}
-
-%a = func(%a_1:array<S, 4>):void { # %a_1: 'a'
- $B2: {
- ret
- }
+void b(S s) {
}
-%b = func(%s:S):void {
- $B3: {
- ret
- }
+void c(float2x3 m) {
}
-%c = func(%m:mat2x3<f32>):void {
- $B4: {
- ret
- }
+void d(float3 v) {
}
-%d = func(%v:vec3<f32>):void {
- $B5: {
- ret
- }
+void e(float f) {
}
-%e = func(%f:f32):void {
- $B6: {
- ret
- }
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[2]);
+ c((*tint_module_vars.u)[2].m);
+ d((*tint_module_vars.u)[0].m[1].zxy);
+ e((*tint_module_vars.u)[0].m[1].zxy[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B7: {
- %13:array<S, 4> = load %u
- %14:void = call %a, %13
- %15:ptr<uniform, S, read> = access %u, 2i
- %16:S = load %15
- %17:void = call %b, %16
- %18:ptr<uniform, mat2x3<f32>, read> = access %u, 2i, 1u
- %19:mat2x3<f32> = load %18
- %20:void = call %c, %19
- %21:ptr<uniform, vec3<f32>, read> = access %u, 0i, 1u, 1i
- %22:vec3<f32> = load %21
- %23:vec3<f32> = swizzle %22, zxy
- %24:void = call %d, %23
- %25:ptr<uniform, vec3<f32>, read> = access %u, 0i, 1u, 1i
- %26:vec3<f32> = load %25
- %27:vec3<f32> = swizzle %26, zxy
- %28:f32 = access %27, 0u
- %29:void = call %e, %28
- 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/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.ir.msl
index 76cf221..fad6151 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.ir.msl
@@ -1,41 +1,32 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat2x3<f32> @offset(16)
- after:i32 @offset(64)
+struct S {
+ int before;
+ float2x3 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+ thread tint_array<S, 4>* p;
+};
+
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ thread tint_array<S, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[3].m = (*tint_module_vars.u)[2].m;
+ (*tint_module_vars.p)[1].m[0] = (*tint_module_vars.u)[0].m[1].zxy;
}
-
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
- %p:ptr<private, array<S, 4>, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<S, 4> = load %u
- store %p, %4
- %5:ptr<private, S, read_write> = access %p, 1i
- %6:ptr<uniform, S, read> = access %u, 2i
- %7:S = load %6
- store %5, %7
- %8:ptr<private, mat2x3<f32>, read_write> = access %p, 3i, 1u
- %9:ptr<uniform, mat2x3<f32>, read> = access %u, 2i, 1u
- %10:mat2x3<f32> = load %9
- store %8, %10
- %11:ptr<private, vec3<f32>, read_write> = access %p, 1i, 1u, 0i
- %12:ptr<uniform, vec3<f32>, read> = access %u, 0i, 1u, 1i
- %13:vec3<f32> = load %12
- %14:vec3<f32> = swizzle %13, zxy
- store %11, %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/buffer/uniform/std140/struct/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index d758a15..bc93062 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,66 +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: Inner = struct @align(8) {
- m:mat2x4<f16> @offset(0)
-}
+struct Inner {
+ half2x4 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+ thread int* counter;
+};
-Outer = struct @align(8) {
- a:array<Inner, 4> @offset(0)
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .counter=(&counter)};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant tint_array<Inner, 4>* const p_a_i_a = (&(*p_a_i).a);
+ const constant Inner* const p_a_i_a_i = (&(*p_a_i_a)[i(tint_module_vars)]);
+ const constant half2x4* const p_a_i_a_i_m = (&(*p_a_i_a_i).m);
+ const constant half4* const p_a_i_a_i_m_i = (&(*p_a_i_a_i_m)[i(tint_module_vars)]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_i = (*p_a_i);
+ tint_array<Inner, 4> const l_a_i_a = (*p_a_i_a);
+ Inner const l_a_i_a_i = (*p_a_i_a_i);
+ half2x4 const l_a_i_a_i_m = (*p_a_i_a_i_m);
+ half4 const l_a_i_a_i_m_i = (*p_a_i_a_i_m_i);
+ half const l_a_i_a_i_m_i_i = (*p_a_i_a_i_m_i)[i(tint_module_vars)];
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %9:i32 = call %i
- %10:ptr<uniform, Outer, read> = access %p_a, %9
- %p_a_i:ptr<uniform, Outer, read> = let %10
- %12:ptr<uniform, array<Inner, 4>, read> = access %p_a_i, 0u
- %p_a_i_a:ptr<uniform, array<Inner, 4>, read> = let %12
- %14:i32 = call %i
- %15:ptr<uniform, Inner, read> = access %p_a_i_a, %14
- %p_a_i_a_i:ptr<uniform, Inner, read> = let %15
- %17:ptr<uniform, mat2x4<f16>, read> = access %p_a_i_a_i, 0u
- %p_a_i_a_i_m:ptr<uniform, mat2x4<f16>, read> = let %17
- %19:i32 = call %i
- %20:ptr<uniform, vec4<f16>, read> = access %p_a_i_a_i_m, %19
- %p_a_i_a_i_m_i:ptr<uniform, vec4<f16>, read> = let %20
- %22:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %22
- %24:Outer = load %p_a_i
- %l_a_i:Outer = let %24
- %26:array<Inner, 4> = load %p_a_i_a
- %l_a_i_a:array<Inner, 4> = let %26
- %28:Inner = load %p_a_i_a_i
- %l_a_i_a_i:Inner = let %28
- %30:mat2x4<f16> = load %p_a_i_a_i_m
- %l_a_i_a_i_m:mat2x4<f16> = let %30
- %32:vec4<f16> = load %p_a_i_a_i_m_i
- %l_a_i_a_i_m_i:vec4<f16> = let %32
- %34:i32 = call %i
- %35:f16 = load_vector_element %p_a_i_a_i_m_i, %34
- %l_a_i_a_i_m_i_i:f16 = let %35
- 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/buffer/uniform/std140/struct/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.msl
index 77ca2ed..c41dbb3 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,52 +1,40 @@
-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: Inner = struct @align(8) {
- m:mat2x4<f16> @offset(0)
+struct Inner {
+ half2x4 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+};
+
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_3 = (&(*p_a)[3]);
+ const constant tint_array<Inner, 4>* const p_a_3_a = (&(*p_a_3).a);
+ const constant Inner* const p_a_3_a_2 = (&(*p_a_3_a)[2]);
+ const constant half2x4* const p_a_3_a_2_m = (&(*p_a_3_a_2).m);
+ const constant half4* const p_a_3_a_2_m_1 = (&(*p_a_3_a_2_m)[1]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_3 = (*p_a_3);
+ tint_array<Inner, 4> const l_a_3_a = (*p_a_3_a);
+ Inner const l_a_3_a_2 = (*p_a_3_a_2);
+ half2x4 const l_a_3_a_2_m = (*p_a_3_a_2_m);
+ half4 const l_a_3_a_2_m_1 = (*p_a_3_a_2_m_1);
+ half const l_a_3_a_2_m_1_0 = (*p_a_3_a_2_m_1)[0];
}
-
-Outer = struct @align(8) {
- a:array<Inner, 4> @offset(0)
-}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %4:ptr<uniform, Outer, read> = access %p_a, 3i
- %p_a_3:ptr<uniform, Outer, read> = let %4
- %6:ptr<uniform, array<Inner, 4>, read> = access %p_a_3, 0u
- %p_a_3_a:ptr<uniform, array<Inner, 4>, read> = let %6
- %8:ptr<uniform, Inner, read> = access %p_a_3_a, 2i
- %p_a_3_a_2:ptr<uniform, Inner, read> = let %8
- %10:ptr<uniform, mat2x4<f16>, read> = access %p_a_3_a_2, 0u
- %p_a_3_a_2_m:ptr<uniform, mat2x4<f16>, read> = let %10
- %12:ptr<uniform, vec4<f16>, read> = access %p_a_3_a_2_m, 1i
- %p_a_3_a_2_m_1:ptr<uniform, vec4<f16>, read> = let %12
- %14:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %14
- %16:Outer = load %p_a_3
- %l_a_3:Outer = let %16
- %18:array<Inner, 4> = load %p_a_3_a
- %l_a_3_a:array<Inner, 4> = let %18
- %20:Inner = load %p_a_3_a_2
- %l_a_3_a_2:Inner = let %20
- %22:mat2x4<f16> = load %p_a_3_a_2_m
- %l_a_3_a_2_m:mat2x4<f16> = let %22
- %24:vec4<f16> = load %p_a_3_a_2_m_1
- %l_a_3_a_2_m_1:vec4<f16> = let %24
- %26:f16 = load_vector_element %p_a_3_a_2_m_1, 0i
- %l_a_3_a_2_m_1_0:f16 = let %26
- 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/buffer/uniform/std140/struct/mat2x4_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_fn.wgsl.expected.ir.msl
index f665915..d72a5a4 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_fn.wgsl.expected.ir.msl
@@ -1,67 +1,41 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat2x4<f16> @offset(8)
- after:i32 @offset(64)
-}
+struct S {
+ int before;
+ half2x4 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+};
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
+void a(tint_array<S, 4> a) {
}
-
-%a = func(%a_1:array<S, 4>):void { # %a_1: 'a'
- $B2: {
- ret
- }
+void b(S s) {
}
-%b = func(%s:S):void {
- $B3: {
- ret
- }
+void c(half2x4 m) {
}
-%c = func(%m:mat2x4<f16>):void {
- $B4: {
- ret
- }
+void d(half4 v) {
}
-%d = func(%v:vec4<f16>):void {
- $B5: {
- ret
- }
+void e(half f) {
}
-%e = func(%f:f16):void {
- $B6: {
- ret
- }
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[2]);
+ c((*tint_module_vars.u)[2].m);
+ d((*tint_module_vars.u)[0].m[1].ywxz);
+ e((*tint_module_vars.u)[0].m[1].ywxz[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B7: {
- %13:array<S, 4> = load %u
- %14:void = call %a, %13
- %15:ptr<uniform, S, read> = access %u, 2i
- %16:S = load %15
- %17:void = call %b, %16
- %18:ptr<uniform, mat2x4<f16>, read> = access %u, 2i, 1u
- %19:mat2x4<f16> = load %18
- %20:void = call %c, %19
- %21:ptr<uniform, vec4<f16>, read> = access %u, 0i, 1u, 1i
- %22:vec4<f16> = load %21
- %23:vec4<f16> = swizzle %22, ywxz
- %24:void = call %d, %23
- %25:ptr<uniform, vec4<f16>, read> = access %u, 0i, 1u, 1i
- %26:vec4<f16> = load %25
- %27:vec4<f16> = swizzle %26, ywxz
- %28:f16 = access %27, 0u
- %29:void = call %e, %28
- 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/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.ir.msl
index 721519e..fc9a177 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.ir.msl
@@ -1,41 +1,32 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat2x4<f16> @offset(8)
- after:i32 @offset(64)
+struct S {
+ int before;
+ half2x4 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+ thread tint_array<S, 4>* p;
+};
+
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ thread tint_array<S, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[3].m = (*tint_module_vars.u)[2].m;
+ (*tint_module_vars.p)[1].m[0] = (*tint_module_vars.u)[0].m[1].ywxz;
}
-
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
- %p:ptr<private, array<S, 4>, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<S, 4> = load %u
- store %p, %4
- %5:ptr<private, S, read_write> = access %p, 1i
- %6:ptr<uniform, S, read> = access %u, 2i
- %7:S = load %6
- store %5, %7
- %8:ptr<private, mat2x4<f16>, read_write> = access %p, 3i, 1u
- %9:ptr<uniform, mat2x4<f16>, read> = access %u, 2i, 1u
- %10:mat2x4<f16> = load %9
- store %8, %10
- %11:ptr<private, vec4<f16>, read_write> = access %p, 1i, 1u, 0i
- %12:ptr<uniform, vec4<f16>, read> = access %u, 0i, 1u, 1i
- %13:vec4<f16> = load %12
- %14:vec4<f16> = swizzle %13, ywxz
- store %11, %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/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index f342797..5680b16 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,66 +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: Inner = struct @align(16) {
- m:mat2x4<f32> @offset(0)
-}
+struct Inner {
+ float2x4 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+ thread int* counter;
+};
-Outer = struct @align(16) {
- a:array<Inner, 4> @offset(0)
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .counter=(&counter)};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant tint_array<Inner, 4>* const p_a_i_a = (&(*p_a_i).a);
+ const constant Inner* const p_a_i_a_i = (&(*p_a_i_a)[i(tint_module_vars)]);
+ const constant float2x4* const p_a_i_a_i_m = (&(*p_a_i_a_i).m);
+ const constant float4* const p_a_i_a_i_m_i = (&(*p_a_i_a_i_m)[i(tint_module_vars)]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_i = (*p_a_i);
+ tint_array<Inner, 4> const l_a_i_a = (*p_a_i_a);
+ Inner const l_a_i_a_i = (*p_a_i_a_i);
+ float2x4 const l_a_i_a_i_m = (*p_a_i_a_i_m);
+ float4 const l_a_i_a_i_m_i = (*p_a_i_a_i_m_i);
+ float const l_a_i_a_i_m_i_i = (*p_a_i_a_i_m_i)[i(tint_module_vars)];
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %9:i32 = call %i
- %10:ptr<uniform, Outer, read> = access %p_a, %9
- %p_a_i:ptr<uniform, Outer, read> = let %10
- %12:ptr<uniform, array<Inner, 4>, read> = access %p_a_i, 0u
- %p_a_i_a:ptr<uniform, array<Inner, 4>, read> = let %12
- %14:i32 = call %i
- %15:ptr<uniform, Inner, read> = access %p_a_i_a, %14
- %p_a_i_a_i:ptr<uniform, Inner, read> = let %15
- %17:ptr<uniform, mat2x4<f32>, read> = access %p_a_i_a_i, 0u
- %p_a_i_a_i_m:ptr<uniform, mat2x4<f32>, read> = let %17
- %19:i32 = call %i
- %20:ptr<uniform, vec4<f32>, read> = access %p_a_i_a_i_m, %19
- %p_a_i_a_i_m_i:ptr<uniform, vec4<f32>, read> = let %20
- %22:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %22
- %24:Outer = load %p_a_i
- %l_a_i:Outer = let %24
- %26:array<Inner, 4> = load %p_a_i_a
- %l_a_i_a:array<Inner, 4> = let %26
- %28:Inner = load %p_a_i_a_i
- %l_a_i_a_i:Inner = let %28
- %30:mat2x4<f32> = load %p_a_i_a_i_m
- %l_a_i_a_i_m:mat2x4<f32> = let %30
- %32:vec4<f32> = load %p_a_i_a_i_m_i
- %l_a_i_a_i_m_i:vec4<f32> = let %32
- %34:i32 = call %i
- %35:f32 = load_vector_element %p_a_i_a_i_m_i, %34
- %l_a_i_a_i_m_i_i:f32 = let %35
- 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/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.msl
index 834d9f1..662374c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,52 +1,40 @@
-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: Inner = struct @align(16) {
- m:mat2x4<f32> @offset(0)
+struct Inner {
+ float2x4 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+};
+
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_3 = (&(*p_a)[3]);
+ const constant tint_array<Inner, 4>* const p_a_3_a = (&(*p_a_3).a);
+ const constant Inner* const p_a_3_a_2 = (&(*p_a_3_a)[2]);
+ const constant float2x4* const p_a_3_a_2_m = (&(*p_a_3_a_2).m);
+ const constant float4* const p_a_3_a_2_m_1 = (&(*p_a_3_a_2_m)[1]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_3 = (*p_a_3);
+ tint_array<Inner, 4> const l_a_3_a = (*p_a_3_a);
+ Inner const l_a_3_a_2 = (*p_a_3_a_2);
+ float2x4 const l_a_3_a_2_m = (*p_a_3_a_2_m);
+ float4 const l_a_3_a_2_m_1 = (*p_a_3_a_2_m_1);
+ float const l_a_3_a_2_m_1_0 = (*p_a_3_a_2_m_1)[0];
}
-
-Outer = struct @align(16) {
- a:array<Inner, 4> @offset(0)
-}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %4:ptr<uniform, Outer, read> = access %p_a, 3i
- %p_a_3:ptr<uniform, Outer, read> = let %4
- %6:ptr<uniform, array<Inner, 4>, read> = access %p_a_3, 0u
- %p_a_3_a:ptr<uniform, array<Inner, 4>, read> = let %6
- %8:ptr<uniform, Inner, read> = access %p_a_3_a, 2i
- %p_a_3_a_2:ptr<uniform, Inner, read> = let %8
- %10:ptr<uniform, mat2x4<f32>, read> = access %p_a_3_a_2, 0u
- %p_a_3_a_2_m:ptr<uniform, mat2x4<f32>, read> = let %10
- %12:ptr<uniform, vec4<f32>, read> = access %p_a_3_a_2_m, 1i
- %p_a_3_a_2_m_1:ptr<uniform, vec4<f32>, read> = let %12
- %14:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %14
- %16:Outer = load %p_a_3
- %l_a_3:Outer = let %16
- %18:array<Inner, 4> = load %p_a_3_a
- %l_a_3_a:array<Inner, 4> = let %18
- %20:Inner = load %p_a_3_a_2
- %l_a_3_a_2:Inner = let %20
- %22:mat2x4<f32> = load %p_a_3_a_2_m
- %l_a_3_a_2_m:mat2x4<f32> = let %22
- %24:vec4<f32> = load %p_a_3_a_2_m_1
- %l_a_3_a_2_m_1:vec4<f32> = let %24
- %26:f32 = load_vector_element %p_a_3_a_2_m_1, 0i
- %l_a_3_a_2_m_1_0:f32 = let %26
- 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/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.ir.msl
index 62e00c5..8294d15 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.ir.msl
@@ -1,67 +1,41 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat2x4<f32> @offset(16)
- after:i32 @offset(64)
-}
+struct S {
+ int before;
+ float2x4 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+};
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
+void a(tint_array<S, 4> a) {
}
-
-%a = func(%a_1:array<S, 4>):void { # %a_1: 'a'
- $B2: {
- ret
- }
+void b(S s) {
}
-%b = func(%s:S):void {
- $B3: {
- ret
- }
+void c(float2x4 m) {
}
-%c = func(%m:mat2x4<f32>):void {
- $B4: {
- ret
- }
+void d(float4 v) {
}
-%d = func(%v:vec4<f32>):void {
- $B5: {
- ret
- }
+void e(float f) {
}
-%e = func(%f:f32):void {
- $B6: {
- ret
- }
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[2]);
+ c((*tint_module_vars.u)[2].m);
+ d((*tint_module_vars.u)[0].m[1].ywxz);
+ e((*tint_module_vars.u)[0].m[1].ywxz[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B7: {
- %13:array<S, 4> = load %u
- %14:void = call %a, %13
- %15:ptr<uniform, S, read> = access %u, 2i
- %16:S = load %15
- %17:void = call %b, %16
- %18:ptr<uniform, mat2x4<f32>, read> = access %u, 2i, 1u
- %19:mat2x4<f32> = load %18
- %20:void = call %c, %19
- %21:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1u, 1i
- %22:vec4<f32> = load %21
- %23:vec4<f32> = swizzle %22, ywxz
- %24:void = call %d, %23
- %25:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1u, 1i
- %26:vec4<f32> = load %25
- %27:vec4<f32> = swizzle %26, ywxz
- %28:f32 = access %27, 0u
- %29:void = call %e, %28
- 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/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.ir.msl
index b590bca..4243cf8 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.ir.msl
@@ -1,41 +1,32 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat2x4<f32> @offset(16)
- after:i32 @offset(64)
+struct S {
+ int before;
+ float2x4 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+ thread tint_array<S, 4>* p;
+};
+
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ thread tint_array<S, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[3].m = (*tint_module_vars.u)[2].m;
+ (*tint_module_vars.p)[1].m[0] = (*tint_module_vars.u)[0].m[1].ywxz;
}
-
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
- %p:ptr<private, array<S, 4>, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<S, 4> = load %u
- store %p, %4
- %5:ptr<private, S, read_write> = access %p, 1i
- %6:ptr<uniform, S, read> = access %u, 2i
- %7:S = load %6
- store %5, %7
- %8:ptr<private, mat2x4<f32>, read_write> = access %p, 3i, 1u
- %9:ptr<uniform, mat2x4<f32>, read> = access %u, 2i, 1u
- %10:mat2x4<f32> = load %9
- store %8, %10
- %11:ptr<private, vec4<f32>, read_write> = access %p, 1i, 1u, 0i
- %12:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1u, 1i
- %13:vec4<f32> = load %12
- %14:vec4<f32> = swizzle %13, ywxz
- store %11, %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/buffer/uniform/std140/struct/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 9cd196e..5c64921 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,66 +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: Inner = struct @align(4) {
- m:mat3x2<f16> @offset(0)
-}
+struct Inner {
+ half3x2 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+ thread int* counter;
+};
-Outer = struct @align(4) {
- a:array<Inner, 4> @offset(0)
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .counter=(&counter)};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant tint_array<Inner, 4>* const p_a_i_a = (&(*p_a_i).a);
+ const constant Inner* const p_a_i_a_i = (&(*p_a_i_a)[i(tint_module_vars)]);
+ const constant half3x2* const p_a_i_a_i_m = (&(*p_a_i_a_i).m);
+ const constant half2* const p_a_i_a_i_m_i = (&(*p_a_i_a_i_m)[i(tint_module_vars)]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_i = (*p_a_i);
+ tint_array<Inner, 4> const l_a_i_a = (*p_a_i_a);
+ Inner const l_a_i_a_i = (*p_a_i_a_i);
+ half3x2 const l_a_i_a_i_m = (*p_a_i_a_i_m);
+ half2 const l_a_i_a_i_m_i = (*p_a_i_a_i_m_i);
+ half const l_a_i_a_i_m_i_i = (*p_a_i_a_i_m_i)[i(tint_module_vars)];
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %9:i32 = call %i
- %10:ptr<uniform, Outer, read> = access %p_a, %9
- %p_a_i:ptr<uniform, Outer, read> = let %10
- %12:ptr<uniform, array<Inner, 4>, read> = access %p_a_i, 0u
- %p_a_i_a:ptr<uniform, array<Inner, 4>, read> = let %12
- %14:i32 = call %i
- %15:ptr<uniform, Inner, read> = access %p_a_i_a, %14
- %p_a_i_a_i:ptr<uniform, Inner, read> = let %15
- %17:ptr<uniform, mat3x2<f16>, read> = access %p_a_i_a_i, 0u
- %p_a_i_a_i_m:ptr<uniform, mat3x2<f16>, read> = let %17
- %19:i32 = call %i
- %20:ptr<uniform, vec2<f16>, read> = access %p_a_i_a_i_m, %19
- %p_a_i_a_i_m_i:ptr<uniform, vec2<f16>, read> = let %20
- %22:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %22
- %24:Outer = load %p_a_i
- %l_a_i:Outer = let %24
- %26:array<Inner, 4> = load %p_a_i_a
- %l_a_i_a:array<Inner, 4> = let %26
- %28:Inner = load %p_a_i_a_i
- %l_a_i_a_i:Inner = let %28
- %30:mat3x2<f16> = load %p_a_i_a_i_m
- %l_a_i_a_i_m:mat3x2<f16> = let %30
- %32:vec2<f16> = load %p_a_i_a_i_m_i
- %l_a_i_a_i_m_i:vec2<f16> = let %32
- %34:i32 = call %i
- %35:f16 = load_vector_element %p_a_i_a_i_m_i, %34
- %l_a_i_a_i_m_i_i:f16 = let %35
- 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/buffer/uniform/std140/struct/mat3x2_f16/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/static_index_via_ptr.wgsl.expected.ir.msl
index 0f186d0..54240b6 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,52 +1,40 @@
-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: Inner = struct @align(4) {
- m:mat3x2<f16> @offset(0)
+struct Inner {
+ half3x2 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+};
+
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_3 = (&(*p_a)[3]);
+ const constant tint_array<Inner, 4>* const p_a_3_a = (&(*p_a_3).a);
+ const constant Inner* const p_a_3_a_2 = (&(*p_a_3_a)[2]);
+ const constant half3x2* const p_a_3_a_2_m = (&(*p_a_3_a_2).m);
+ const constant half2* const p_a_3_a_2_m_1 = (&(*p_a_3_a_2_m)[1]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_3 = (*p_a_3);
+ tint_array<Inner, 4> const l_a_3_a = (*p_a_3_a);
+ Inner const l_a_3_a_2 = (*p_a_3_a_2);
+ half3x2 const l_a_3_a_2_m = (*p_a_3_a_2_m);
+ half2 const l_a_3_a_2_m_1 = (*p_a_3_a_2_m_1);
+ half const l_a_3_a_2_m_1_0 = (*p_a_3_a_2_m_1)[0];
}
-
-Outer = struct @align(4) {
- a:array<Inner, 4> @offset(0)
-}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %4:ptr<uniform, Outer, read> = access %p_a, 3i
- %p_a_3:ptr<uniform, Outer, read> = let %4
- %6:ptr<uniform, array<Inner, 4>, read> = access %p_a_3, 0u
- %p_a_3_a:ptr<uniform, array<Inner, 4>, read> = let %6
- %8:ptr<uniform, Inner, read> = access %p_a_3_a, 2i
- %p_a_3_a_2:ptr<uniform, Inner, read> = let %8
- %10:ptr<uniform, mat3x2<f16>, read> = access %p_a_3_a_2, 0u
- %p_a_3_a_2_m:ptr<uniform, mat3x2<f16>, read> = let %10
- %12:ptr<uniform, vec2<f16>, read> = access %p_a_3_a_2_m, 1i
- %p_a_3_a_2_m_1:ptr<uniform, vec2<f16>, read> = let %12
- %14:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %14
- %16:Outer = load %p_a_3
- %l_a_3:Outer = let %16
- %18:array<Inner, 4> = load %p_a_3_a
- %l_a_3_a:array<Inner, 4> = let %18
- %20:Inner = load %p_a_3_a_2
- %l_a_3_a_2:Inner = let %20
- %22:mat3x2<f16> = load %p_a_3_a_2_m
- %l_a_3_a_2_m:mat3x2<f16> = let %22
- %24:vec2<f16> = load %p_a_3_a_2_m_1
- %l_a_3_a_2_m_1:vec2<f16> = let %24
- %26:f16 = load_vector_element %p_a_3_a_2_m_1, 0i
- %l_a_3_a_2_m_1_0:f16 = let %26
- 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/buffer/uniform/std140/struct/mat3x2_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_fn.wgsl.expected.ir.msl
index 71375f6..bf04a55 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_fn.wgsl.expected.ir.msl
@@ -1,67 +1,41 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat3x2<f16> @offset(4)
- after:i32 @offset(64)
-}
+struct S {
+ int before;
+ half3x2 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+};
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
+void a(tint_array<S, 4> a) {
}
-
-%a = func(%a_1:array<S, 4>):void { # %a_1: 'a'
- $B2: {
- ret
- }
+void b(S s) {
}
-%b = func(%s:S):void {
- $B3: {
- ret
- }
+void c(half3x2 m) {
}
-%c = func(%m:mat3x2<f16>):void {
- $B4: {
- ret
- }
+void d(half2 v) {
}
-%d = func(%v:vec2<f16>):void {
- $B5: {
- ret
- }
+void e(half f) {
}
-%e = func(%f:f16):void {
- $B6: {
- ret
- }
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[2]);
+ c((*tint_module_vars.u)[2].m);
+ d((*tint_module_vars.u)[0].m[1].yx);
+ e((*tint_module_vars.u)[0].m[1].yx[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B7: {
- %13:array<S, 4> = load %u
- %14:void = call %a, %13
- %15:ptr<uniform, S, read> = access %u, 2i
- %16:S = load %15
- %17:void = call %b, %16
- %18:ptr<uniform, mat3x2<f16>, read> = access %u, 2i, 1u
- %19:mat3x2<f16> = load %18
- %20:void = call %c, %19
- %21:ptr<uniform, vec2<f16>, read> = access %u, 0i, 1u, 1i
- %22:vec2<f16> = load %21
- %23:vec2<f16> = swizzle %22, yx
- %24:void = call %d, %23
- %25:ptr<uniform, vec2<f16>, read> = access %u, 0i, 1u, 1i
- %26:vec2<f16> = load %25
- %27:vec2<f16> = swizzle %26, yx
- %28:f16 = access %27, 0u
- %29:void = call %e, %28
- 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/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.ir.msl
index 5f79e31..1232423 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.ir.msl
@@ -1,41 +1,32 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat3x2<f16> @offset(4)
- after:i32 @offset(64)
+struct S {
+ int before;
+ half3x2 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+ thread tint_array<S, 4>* p;
+};
+
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ thread tint_array<S, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[3].m = (*tint_module_vars.u)[2].m;
+ (*tint_module_vars.p)[1].m[0] = (*tint_module_vars.u)[0].m[1].yx;
}
-
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
- %p:ptr<private, array<S, 4>, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<S, 4> = load %u
- store %p, %4
- %5:ptr<private, S, read_write> = access %p, 1i
- %6:ptr<uniform, S, read> = access %u, 2i
- %7:S = load %6
- store %5, %7
- %8:ptr<private, mat3x2<f16>, read_write> = access %p, 3i, 1u
- %9:ptr<uniform, mat3x2<f16>, read> = access %u, 2i, 1u
- %10:mat3x2<f16> = load %9
- store %8, %10
- %11:ptr<private, vec2<f16>, read_write> = access %p, 1i, 1u, 0i
- %12:ptr<uniform, vec2<f16>, read> = access %u, 0i, 1u, 1i
- %13:vec2<f16> = load %12
- %14:vec2<f16> = swizzle %13, yx
- store %11, %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/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index d191fe4..dfe6fbf 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,66 +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: Inner = struct @align(8) {
- m:mat3x2<f32> @offset(0)
-}
+struct Inner {
+ float3x2 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+ thread int* counter;
+};
-Outer = struct @align(8) {
- a:array<Inner, 4> @offset(0)
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .counter=(&counter)};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant tint_array<Inner, 4>* const p_a_i_a = (&(*p_a_i).a);
+ const constant Inner* const p_a_i_a_i = (&(*p_a_i_a)[i(tint_module_vars)]);
+ const constant float3x2* const p_a_i_a_i_m = (&(*p_a_i_a_i).m);
+ const constant float2* const p_a_i_a_i_m_i = (&(*p_a_i_a_i_m)[i(tint_module_vars)]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_i = (*p_a_i);
+ tint_array<Inner, 4> const l_a_i_a = (*p_a_i_a);
+ Inner const l_a_i_a_i = (*p_a_i_a_i);
+ float3x2 const l_a_i_a_i_m = (*p_a_i_a_i_m);
+ float2 const l_a_i_a_i_m_i = (*p_a_i_a_i_m_i);
+ float const l_a_i_a_i_m_i_i = (*p_a_i_a_i_m_i)[i(tint_module_vars)];
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %9:i32 = call %i
- %10:ptr<uniform, Outer, read> = access %p_a, %9
- %p_a_i:ptr<uniform, Outer, read> = let %10
- %12:ptr<uniform, array<Inner, 4>, read> = access %p_a_i, 0u
- %p_a_i_a:ptr<uniform, array<Inner, 4>, read> = let %12
- %14:i32 = call %i
- %15:ptr<uniform, Inner, read> = access %p_a_i_a, %14
- %p_a_i_a_i:ptr<uniform, Inner, read> = let %15
- %17:ptr<uniform, mat3x2<f32>, read> = access %p_a_i_a_i, 0u
- %p_a_i_a_i_m:ptr<uniform, mat3x2<f32>, read> = let %17
- %19:i32 = call %i
- %20:ptr<uniform, vec2<f32>, read> = access %p_a_i_a_i_m, %19
- %p_a_i_a_i_m_i:ptr<uniform, vec2<f32>, read> = let %20
- %22:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %22
- %24:Outer = load %p_a_i
- %l_a_i:Outer = let %24
- %26:array<Inner, 4> = load %p_a_i_a
- %l_a_i_a:array<Inner, 4> = let %26
- %28:Inner = load %p_a_i_a_i
- %l_a_i_a_i:Inner = let %28
- %30:mat3x2<f32> = load %p_a_i_a_i_m
- %l_a_i_a_i_m:mat3x2<f32> = let %30
- %32:vec2<f32> = load %p_a_i_a_i_m_i
- %l_a_i_a_i_m_i:vec2<f32> = let %32
- %34:i32 = call %i
- %35:f32 = load_vector_element %p_a_i_a_i_m_i, %34
- %l_a_i_a_i_m_i_i:f32 = let %35
- 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/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.ir.msl
index 1c32e7f..2ede16c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,52 +1,40 @@
-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: Inner = struct @align(8) {
- m:mat3x2<f32> @offset(0)
+struct Inner {
+ float3x2 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+};
+
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_3 = (&(*p_a)[3]);
+ const constant tint_array<Inner, 4>* const p_a_3_a = (&(*p_a_3).a);
+ const constant Inner* const p_a_3_a_2 = (&(*p_a_3_a)[2]);
+ const constant float3x2* const p_a_3_a_2_m = (&(*p_a_3_a_2).m);
+ const constant float2* const p_a_3_a_2_m_1 = (&(*p_a_3_a_2_m)[1]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_3 = (*p_a_3);
+ tint_array<Inner, 4> const l_a_3_a = (*p_a_3_a);
+ Inner const l_a_3_a_2 = (*p_a_3_a_2);
+ float3x2 const l_a_3_a_2_m = (*p_a_3_a_2_m);
+ float2 const l_a_3_a_2_m_1 = (*p_a_3_a_2_m_1);
+ float const l_a_3_a_2_m_1_0 = (*p_a_3_a_2_m_1)[0];
}
-
-Outer = struct @align(8) {
- a:array<Inner, 4> @offset(0)
-}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %4:ptr<uniform, Outer, read> = access %p_a, 3i
- %p_a_3:ptr<uniform, Outer, read> = let %4
- %6:ptr<uniform, array<Inner, 4>, read> = access %p_a_3, 0u
- %p_a_3_a:ptr<uniform, array<Inner, 4>, read> = let %6
- %8:ptr<uniform, Inner, read> = access %p_a_3_a, 2i
- %p_a_3_a_2:ptr<uniform, Inner, read> = let %8
- %10:ptr<uniform, mat3x2<f32>, read> = access %p_a_3_a_2, 0u
- %p_a_3_a_2_m:ptr<uniform, mat3x2<f32>, read> = let %10
- %12:ptr<uniform, vec2<f32>, read> = access %p_a_3_a_2_m, 1i
- %p_a_3_a_2_m_1:ptr<uniform, vec2<f32>, read> = let %12
- %14:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %14
- %16:Outer = load %p_a_3
- %l_a_3:Outer = let %16
- %18:array<Inner, 4> = load %p_a_3_a
- %l_a_3_a:array<Inner, 4> = let %18
- %20:Inner = load %p_a_3_a_2
- %l_a_3_a_2:Inner = let %20
- %22:mat3x2<f32> = load %p_a_3_a_2_m
- %l_a_3_a_2_m:mat3x2<f32> = let %22
- %24:vec2<f32> = load %p_a_3_a_2_m_1
- %l_a_3_a_2_m_1:vec2<f32> = let %24
- %26:f32 = load_vector_element %p_a_3_a_2_m_1, 0i
- %l_a_3_a_2_m_1_0:f32 = let %26
- 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/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.ir.msl
index b797056..d7d9f54 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.ir.msl
@@ -1,67 +1,41 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat3x2<f32> @offset(8)
- after:i32 @offset(64)
-}
+struct S {
+ int before;
+ float3x2 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+};
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
+void a(tint_array<S, 4> a) {
}
-
-%a = func(%a_1:array<S, 4>):void { # %a_1: 'a'
- $B2: {
- ret
- }
+void b(S s) {
}
-%b = func(%s:S):void {
- $B3: {
- ret
- }
+void c(float3x2 m) {
}
-%c = func(%m:mat3x2<f32>):void {
- $B4: {
- ret
- }
+void d(float2 v) {
}
-%d = func(%v:vec2<f32>):void {
- $B5: {
- ret
- }
+void e(float f) {
}
-%e = func(%f:f32):void {
- $B6: {
- ret
- }
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[2]);
+ c((*tint_module_vars.u)[2].m);
+ d((*tint_module_vars.u)[0].m[1].yx);
+ e((*tint_module_vars.u)[0].m[1].yx[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B7: {
- %13:array<S, 4> = load %u
- %14:void = call %a, %13
- %15:ptr<uniform, S, read> = access %u, 2i
- %16:S = load %15
- %17:void = call %b, %16
- %18:ptr<uniform, mat3x2<f32>, read> = access %u, 2i, 1u
- %19:mat3x2<f32> = load %18
- %20:void = call %c, %19
- %21:ptr<uniform, vec2<f32>, read> = access %u, 0i, 1u, 1i
- %22:vec2<f32> = load %21
- %23:vec2<f32> = swizzle %22, yx
- %24:void = call %d, %23
- %25:ptr<uniform, vec2<f32>, read> = access %u, 0i, 1u, 1i
- %26:vec2<f32> = load %25
- %27:vec2<f32> = swizzle %26, yx
- %28:f32 = access %27, 0u
- %29:void = call %e, %28
- 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/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.ir.msl
index 273997c..6d86e13 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.ir.msl
@@ -1,41 +1,32 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat3x2<f32> @offset(8)
- after:i32 @offset(64)
+struct S {
+ int before;
+ float3x2 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+ thread tint_array<S, 4>* p;
+};
+
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ thread tint_array<S, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[3].m = (*tint_module_vars.u)[2].m;
+ (*tint_module_vars.p)[1].m[0] = (*tint_module_vars.u)[0].m[1].yx;
}
-
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
- %p:ptr<private, array<S, 4>, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<S, 4> = load %u
- store %p, %4
- %5:ptr<private, S, read_write> = access %p, 1i
- %6:ptr<uniform, S, read> = access %u, 2i
- %7:S = load %6
- store %5, %7
- %8:ptr<private, mat3x2<f32>, read_write> = access %p, 3i, 1u
- %9:ptr<uniform, mat3x2<f32>, read> = access %u, 2i, 1u
- %10:mat3x2<f32> = load %9
- store %8, %10
- %11:ptr<private, vec2<f32>, read_write> = access %p, 1i, 1u, 0i
- %12:ptr<uniform, vec2<f32>, read> = access %u, 0i, 1u, 1i
- %13:vec2<f32> = load %12
- %14:vec2<f32> = swizzle %13, yx
- store %11, %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/buffer/uniform/std140/struct/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index b18f3d8..b2ac467 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,66 +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: Inner = struct @align(8) {
- m:mat3x3<f16> @offset(0)
-}
+struct Inner {
+ half3x3 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+ thread int* counter;
+};
-Outer = struct @align(8) {
- a:array<Inner, 4> @offset(0)
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .counter=(&counter)};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant tint_array<Inner, 4>* const p_a_i_a = (&(*p_a_i).a);
+ const constant Inner* const p_a_i_a_i = (&(*p_a_i_a)[i(tint_module_vars)]);
+ const constant half3x3* const p_a_i_a_i_m = (&(*p_a_i_a_i).m);
+ const constant half3* const p_a_i_a_i_m_i = (&(*p_a_i_a_i_m)[i(tint_module_vars)]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_i = (*p_a_i);
+ tint_array<Inner, 4> const l_a_i_a = (*p_a_i_a);
+ Inner const l_a_i_a_i = (*p_a_i_a_i);
+ half3x3 const l_a_i_a_i_m = (*p_a_i_a_i_m);
+ half3 const l_a_i_a_i_m_i = (*p_a_i_a_i_m_i);
+ half const l_a_i_a_i_m_i_i = (*p_a_i_a_i_m_i)[i(tint_module_vars)];
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %9:i32 = call %i
- %10:ptr<uniform, Outer, read> = access %p_a, %9
- %p_a_i:ptr<uniform, Outer, read> = let %10
- %12:ptr<uniform, array<Inner, 4>, read> = access %p_a_i, 0u
- %p_a_i_a:ptr<uniform, array<Inner, 4>, read> = let %12
- %14:i32 = call %i
- %15:ptr<uniform, Inner, read> = access %p_a_i_a, %14
- %p_a_i_a_i:ptr<uniform, Inner, read> = let %15
- %17:ptr<uniform, mat3x3<f16>, read> = access %p_a_i_a_i, 0u
- %p_a_i_a_i_m:ptr<uniform, mat3x3<f16>, read> = let %17
- %19:i32 = call %i
- %20:ptr<uniform, vec3<f16>, read> = access %p_a_i_a_i_m, %19
- %p_a_i_a_i_m_i:ptr<uniform, vec3<f16>, read> = let %20
- %22:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %22
- %24:Outer = load %p_a_i
- %l_a_i:Outer = let %24
- %26:array<Inner, 4> = load %p_a_i_a
- %l_a_i_a:array<Inner, 4> = let %26
- %28:Inner = load %p_a_i_a_i
- %l_a_i_a_i:Inner = let %28
- %30:mat3x3<f16> = load %p_a_i_a_i_m
- %l_a_i_a_i_m:mat3x3<f16> = let %30
- %32:vec3<f16> = load %p_a_i_a_i_m_i
- %l_a_i_a_i_m_i:vec3<f16> = let %32
- %34:i32 = call %i
- %35:f16 = load_vector_element %p_a_i_a_i_m_i, %34
- %l_a_i_a_i_m_i_i:f16 = let %35
- 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/buffer/uniform/std140/struct/mat3x3_f16/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/static_index_via_ptr.wgsl.expected.ir.msl
index 99e3831..20dd259 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,52 +1,40 @@
-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: Inner = struct @align(8) {
- m:mat3x3<f16> @offset(0)
+struct Inner {
+ half3x3 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+};
+
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_3 = (&(*p_a)[3]);
+ const constant tint_array<Inner, 4>* const p_a_3_a = (&(*p_a_3).a);
+ const constant Inner* const p_a_3_a_2 = (&(*p_a_3_a)[2]);
+ const constant half3x3* const p_a_3_a_2_m = (&(*p_a_3_a_2).m);
+ const constant half3* const p_a_3_a_2_m_1 = (&(*p_a_3_a_2_m)[1]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_3 = (*p_a_3);
+ tint_array<Inner, 4> const l_a_3_a = (*p_a_3_a);
+ Inner const l_a_3_a_2 = (*p_a_3_a_2);
+ half3x3 const l_a_3_a_2_m = (*p_a_3_a_2_m);
+ half3 const l_a_3_a_2_m_1 = (*p_a_3_a_2_m_1);
+ half const l_a_3_a_2_m_1_0 = (*p_a_3_a_2_m_1)[0];
}
-
-Outer = struct @align(8) {
- a:array<Inner, 4> @offset(0)
-}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %4:ptr<uniform, Outer, read> = access %p_a, 3i
- %p_a_3:ptr<uniform, Outer, read> = let %4
- %6:ptr<uniform, array<Inner, 4>, read> = access %p_a_3, 0u
- %p_a_3_a:ptr<uniform, array<Inner, 4>, read> = let %6
- %8:ptr<uniform, Inner, read> = access %p_a_3_a, 2i
- %p_a_3_a_2:ptr<uniform, Inner, read> = let %8
- %10:ptr<uniform, mat3x3<f16>, read> = access %p_a_3_a_2, 0u
- %p_a_3_a_2_m:ptr<uniform, mat3x3<f16>, read> = let %10
- %12:ptr<uniform, vec3<f16>, read> = access %p_a_3_a_2_m, 1i
- %p_a_3_a_2_m_1:ptr<uniform, vec3<f16>, read> = let %12
- %14:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %14
- %16:Outer = load %p_a_3
- %l_a_3:Outer = let %16
- %18:array<Inner, 4> = load %p_a_3_a
- %l_a_3_a:array<Inner, 4> = let %18
- %20:Inner = load %p_a_3_a_2
- %l_a_3_a_2:Inner = let %20
- %22:mat3x3<f16> = load %p_a_3_a_2_m
- %l_a_3_a_2_m:mat3x3<f16> = let %22
- %24:vec3<f16> = load %p_a_3_a_2_m_1
- %l_a_3_a_2_m_1:vec3<f16> = let %24
- %26:f16 = load_vector_element %p_a_3_a_2_m_1, 0i
- %l_a_3_a_2_m_1_0:f16 = let %26
- 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/buffer/uniform/std140/struct/mat3x3_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_fn.wgsl.expected.ir.msl
index 1551dce..5a5fbe9 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_fn.wgsl.expected.ir.msl
@@ -1,67 +1,41 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat3x3<f16> @offset(8)
- after:i32 @offset(64)
-}
+struct S {
+ int before;
+ half3x3 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+};
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
+void a(tint_array<S, 4> a) {
}
-
-%a = func(%a_1:array<S, 4>):void { # %a_1: 'a'
- $B2: {
- ret
- }
+void b(S s) {
}
-%b = func(%s:S):void {
- $B3: {
- ret
- }
+void c(half3x3 m) {
}
-%c = func(%m:mat3x3<f16>):void {
- $B4: {
- ret
- }
+void d(half3 v) {
}
-%d = func(%v:vec3<f16>):void {
- $B5: {
- ret
- }
+void e(half f) {
}
-%e = func(%f:f16):void {
- $B6: {
- ret
- }
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[2]);
+ c((*tint_module_vars.u)[2].m);
+ d((*tint_module_vars.u)[0].m[1].zxy);
+ e((*tint_module_vars.u)[0].m[1].zxy[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B7: {
- %13:array<S, 4> = load %u
- %14:void = call %a, %13
- %15:ptr<uniform, S, read> = access %u, 2i
- %16:S = load %15
- %17:void = call %b, %16
- %18:ptr<uniform, mat3x3<f16>, read> = access %u, 2i, 1u
- %19:mat3x3<f16> = load %18
- %20:void = call %c, %19
- %21:ptr<uniform, vec3<f16>, read> = access %u, 0i, 1u, 1i
- %22:vec3<f16> = load %21
- %23:vec3<f16> = swizzle %22, zxy
- %24:void = call %d, %23
- %25:ptr<uniform, vec3<f16>, read> = access %u, 0i, 1u, 1i
- %26:vec3<f16> = load %25
- %27:vec3<f16> = swizzle %26, zxy
- %28:f16 = access %27, 0u
- %29:void = call %e, %28
- 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/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.ir.msl
index 1542ca6..6dd2e33 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.ir.msl
@@ -1,41 +1,32 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat3x3<f16> @offset(8)
- after:i32 @offset(64)
+struct S {
+ int before;
+ half3x3 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+ thread tint_array<S, 4>* p;
+};
+
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ thread tint_array<S, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[3].m = (*tint_module_vars.u)[2].m;
+ (*tint_module_vars.p)[1].m[0] = (*tint_module_vars.u)[0].m[1].zxy;
}
-
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
- %p:ptr<private, array<S, 4>, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<S, 4> = load %u
- store %p, %4
- %5:ptr<private, S, read_write> = access %p, 1i
- %6:ptr<uniform, S, read> = access %u, 2i
- %7:S = load %6
- store %5, %7
- %8:ptr<private, mat3x3<f16>, read_write> = access %p, 3i, 1u
- %9:ptr<uniform, mat3x3<f16>, read> = access %u, 2i, 1u
- %10:mat3x3<f16> = load %9
- store %8, %10
- %11:ptr<private, vec3<f16>, read_write> = access %p, 1i, 1u, 0i
- %12:ptr<uniform, vec3<f16>, read> = access %u, 0i, 1u, 1i
- %13:vec3<f16> = load %12
- %14:vec3<f16> = swizzle %13, zxy
- store %11, %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/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 7beeeda..7205444 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,66 +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: Inner = struct @align(16) {
- m:mat3x3<f32> @offset(0)
-}
+struct Inner {
+ float3x3 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+ thread int* counter;
+};
-Outer = struct @align(16) {
- a:array<Inner, 4> @offset(0)
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .counter=(&counter)};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant tint_array<Inner, 4>* const p_a_i_a = (&(*p_a_i).a);
+ const constant Inner* const p_a_i_a_i = (&(*p_a_i_a)[i(tint_module_vars)]);
+ const constant float3x3* const p_a_i_a_i_m = (&(*p_a_i_a_i).m);
+ const constant float3* const p_a_i_a_i_m_i = (&(*p_a_i_a_i_m)[i(tint_module_vars)]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_i = (*p_a_i);
+ tint_array<Inner, 4> const l_a_i_a = (*p_a_i_a);
+ Inner const l_a_i_a_i = (*p_a_i_a_i);
+ float3x3 const l_a_i_a_i_m = (*p_a_i_a_i_m);
+ float3 const l_a_i_a_i_m_i = (*p_a_i_a_i_m_i);
+ float const l_a_i_a_i_m_i_i = (*p_a_i_a_i_m_i)[i(tint_module_vars)];
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %9:i32 = call %i
- %10:ptr<uniform, Outer, read> = access %p_a, %9
- %p_a_i:ptr<uniform, Outer, read> = let %10
- %12:ptr<uniform, array<Inner, 4>, read> = access %p_a_i, 0u
- %p_a_i_a:ptr<uniform, array<Inner, 4>, read> = let %12
- %14:i32 = call %i
- %15:ptr<uniform, Inner, read> = access %p_a_i_a, %14
- %p_a_i_a_i:ptr<uniform, Inner, read> = let %15
- %17:ptr<uniform, mat3x3<f32>, read> = access %p_a_i_a_i, 0u
- %p_a_i_a_i_m:ptr<uniform, mat3x3<f32>, read> = let %17
- %19:i32 = call %i
- %20:ptr<uniform, vec3<f32>, read> = access %p_a_i_a_i_m, %19
- %p_a_i_a_i_m_i:ptr<uniform, vec3<f32>, read> = let %20
- %22:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %22
- %24:Outer = load %p_a_i
- %l_a_i:Outer = let %24
- %26:array<Inner, 4> = load %p_a_i_a
- %l_a_i_a:array<Inner, 4> = let %26
- %28:Inner = load %p_a_i_a_i
- %l_a_i_a_i:Inner = let %28
- %30:mat3x3<f32> = load %p_a_i_a_i_m
- %l_a_i_a_i_m:mat3x3<f32> = let %30
- %32:vec3<f32> = load %p_a_i_a_i_m_i
- %l_a_i_a_i_m_i:vec3<f32> = let %32
- %34:i32 = call %i
- %35:f32 = load_vector_element %p_a_i_a_i_m_i, %34
- %l_a_i_a_i_m_i_i:f32 = let %35
- 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/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.msl
index 2e211af..8cc89bc 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,52 +1,40 @@
-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: Inner = struct @align(16) {
- m:mat3x3<f32> @offset(0)
+struct Inner {
+ float3x3 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+};
+
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_3 = (&(*p_a)[3]);
+ const constant tint_array<Inner, 4>* const p_a_3_a = (&(*p_a_3).a);
+ const constant Inner* const p_a_3_a_2 = (&(*p_a_3_a)[2]);
+ const constant float3x3* const p_a_3_a_2_m = (&(*p_a_3_a_2).m);
+ const constant float3* const p_a_3_a_2_m_1 = (&(*p_a_3_a_2_m)[1]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_3 = (*p_a_3);
+ tint_array<Inner, 4> const l_a_3_a = (*p_a_3_a);
+ Inner const l_a_3_a_2 = (*p_a_3_a_2);
+ float3x3 const l_a_3_a_2_m = (*p_a_3_a_2_m);
+ float3 const l_a_3_a_2_m_1 = (*p_a_3_a_2_m_1);
+ float const l_a_3_a_2_m_1_0 = (*p_a_3_a_2_m_1)[0];
}
-
-Outer = struct @align(16) {
- a:array<Inner, 4> @offset(0)
-}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %4:ptr<uniform, Outer, read> = access %p_a, 3i
- %p_a_3:ptr<uniform, Outer, read> = let %4
- %6:ptr<uniform, array<Inner, 4>, read> = access %p_a_3, 0u
- %p_a_3_a:ptr<uniform, array<Inner, 4>, read> = let %6
- %8:ptr<uniform, Inner, read> = access %p_a_3_a, 2i
- %p_a_3_a_2:ptr<uniform, Inner, read> = let %8
- %10:ptr<uniform, mat3x3<f32>, read> = access %p_a_3_a_2, 0u
- %p_a_3_a_2_m:ptr<uniform, mat3x3<f32>, read> = let %10
- %12:ptr<uniform, vec3<f32>, read> = access %p_a_3_a_2_m, 1i
- %p_a_3_a_2_m_1:ptr<uniform, vec3<f32>, read> = let %12
- %14:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %14
- %16:Outer = load %p_a_3
- %l_a_3:Outer = let %16
- %18:array<Inner, 4> = load %p_a_3_a
- %l_a_3_a:array<Inner, 4> = let %18
- %20:Inner = load %p_a_3_a_2
- %l_a_3_a_2:Inner = let %20
- %22:mat3x3<f32> = load %p_a_3_a_2_m
- %l_a_3_a_2_m:mat3x3<f32> = let %22
- %24:vec3<f32> = load %p_a_3_a_2_m_1
- %l_a_3_a_2_m_1:vec3<f32> = let %24
- %26:f32 = load_vector_element %p_a_3_a_2_m_1, 0i
- %l_a_3_a_2_m_1_0:f32 = let %26
- 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/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.ir.msl
index 3775e04..8dae9f3 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.ir.msl
@@ -1,67 +1,41 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat3x3<f32> @offset(16)
- after:i32 @offset(64)
-}
+struct S {
+ int before;
+ float3x3 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+};
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
+void a(tint_array<S, 4> a) {
}
-
-%a = func(%a_1:array<S, 4>):void { # %a_1: 'a'
- $B2: {
- ret
- }
+void b(S s) {
}
-%b = func(%s:S):void {
- $B3: {
- ret
- }
+void c(float3x3 m) {
}
-%c = func(%m:mat3x3<f32>):void {
- $B4: {
- ret
- }
+void d(float3 v) {
}
-%d = func(%v:vec3<f32>):void {
- $B5: {
- ret
- }
+void e(float f) {
}
-%e = func(%f:f32):void {
- $B6: {
- ret
- }
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[2]);
+ c((*tint_module_vars.u)[2].m);
+ d((*tint_module_vars.u)[0].m[1].zxy);
+ e((*tint_module_vars.u)[0].m[1].zxy[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B7: {
- %13:array<S, 4> = load %u
- %14:void = call %a, %13
- %15:ptr<uniform, S, read> = access %u, 2i
- %16:S = load %15
- %17:void = call %b, %16
- %18:ptr<uniform, mat3x3<f32>, read> = access %u, 2i, 1u
- %19:mat3x3<f32> = load %18
- %20:void = call %c, %19
- %21:ptr<uniform, vec3<f32>, read> = access %u, 0i, 1u, 1i
- %22:vec3<f32> = load %21
- %23:vec3<f32> = swizzle %22, zxy
- %24:void = call %d, %23
- %25:ptr<uniform, vec3<f32>, read> = access %u, 0i, 1u, 1i
- %26:vec3<f32> = load %25
- %27:vec3<f32> = swizzle %26, zxy
- %28:f32 = access %27, 0u
- %29:void = call %e, %28
- 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/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.ir.msl
index eb254e6..4f87d7f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.ir.msl
@@ -1,41 +1,32 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat3x3<f32> @offset(16)
- after:i32 @offset(64)
+struct S {
+ int before;
+ float3x3 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+ thread tint_array<S, 4>* p;
+};
+
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ thread tint_array<S, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[3].m = (*tint_module_vars.u)[2].m;
+ (*tint_module_vars.p)[1].m[0] = (*tint_module_vars.u)[0].m[1].zxy;
}
-
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
- %p:ptr<private, array<S, 4>, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<S, 4> = load %u
- store %p, %4
- %5:ptr<private, S, read_write> = access %p, 1i
- %6:ptr<uniform, S, read> = access %u, 2i
- %7:S = load %6
- store %5, %7
- %8:ptr<private, mat3x3<f32>, read_write> = access %p, 3i, 1u
- %9:ptr<uniform, mat3x3<f32>, read> = access %u, 2i, 1u
- %10:mat3x3<f32> = load %9
- store %8, %10
- %11:ptr<private, vec3<f32>, read_write> = access %p, 1i, 1u, 0i
- %12:ptr<uniform, vec3<f32>, read> = access %u, 0i, 1u, 1i
- %13:vec3<f32> = load %12
- %14:vec3<f32> = swizzle %13, zxy
- store %11, %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/buffer/uniform/std140/struct/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 5da7b05..3cc7689 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,66 +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: Inner = struct @align(8) {
- m:mat3x4<f16> @offset(0)
-}
+struct Inner {
+ half3x4 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+ thread int* counter;
+};
-Outer = struct @align(8) {
- a:array<Inner, 4> @offset(0)
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .counter=(&counter)};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant tint_array<Inner, 4>* const p_a_i_a = (&(*p_a_i).a);
+ const constant Inner* const p_a_i_a_i = (&(*p_a_i_a)[i(tint_module_vars)]);
+ const constant half3x4* const p_a_i_a_i_m = (&(*p_a_i_a_i).m);
+ const constant half4* const p_a_i_a_i_m_i = (&(*p_a_i_a_i_m)[i(tint_module_vars)]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_i = (*p_a_i);
+ tint_array<Inner, 4> const l_a_i_a = (*p_a_i_a);
+ Inner const l_a_i_a_i = (*p_a_i_a_i);
+ half3x4 const l_a_i_a_i_m = (*p_a_i_a_i_m);
+ half4 const l_a_i_a_i_m_i = (*p_a_i_a_i_m_i);
+ half const l_a_i_a_i_m_i_i = (*p_a_i_a_i_m_i)[i(tint_module_vars)];
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %9:i32 = call %i
- %10:ptr<uniform, Outer, read> = access %p_a, %9
- %p_a_i:ptr<uniform, Outer, read> = let %10
- %12:ptr<uniform, array<Inner, 4>, read> = access %p_a_i, 0u
- %p_a_i_a:ptr<uniform, array<Inner, 4>, read> = let %12
- %14:i32 = call %i
- %15:ptr<uniform, Inner, read> = access %p_a_i_a, %14
- %p_a_i_a_i:ptr<uniform, Inner, read> = let %15
- %17:ptr<uniform, mat3x4<f16>, read> = access %p_a_i_a_i, 0u
- %p_a_i_a_i_m:ptr<uniform, mat3x4<f16>, read> = let %17
- %19:i32 = call %i
- %20:ptr<uniform, vec4<f16>, read> = access %p_a_i_a_i_m, %19
- %p_a_i_a_i_m_i:ptr<uniform, vec4<f16>, read> = let %20
- %22:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %22
- %24:Outer = load %p_a_i
- %l_a_i:Outer = let %24
- %26:array<Inner, 4> = load %p_a_i_a
- %l_a_i_a:array<Inner, 4> = let %26
- %28:Inner = load %p_a_i_a_i
- %l_a_i_a_i:Inner = let %28
- %30:mat3x4<f16> = load %p_a_i_a_i_m
- %l_a_i_a_i_m:mat3x4<f16> = let %30
- %32:vec4<f16> = load %p_a_i_a_i_m_i
- %l_a_i_a_i_m_i:vec4<f16> = let %32
- %34:i32 = call %i
- %35:f16 = load_vector_element %p_a_i_a_i_m_i, %34
- %l_a_i_a_i_m_i_i:f16 = let %35
- 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/buffer/uniform/std140/struct/mat3x4_f16/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/static_index_via_ptr.wgsl.expected.ir.msl
index d80aecf..e621906 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,52 +1,40 @@
-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: Inner = struct @align(8) {
- m:mat3x4<f16> @offset(0)
+struct Inner {
+ half3x4 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+};
+
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_3 = (&(*p_a)[3]);
+ const constant tint_array<Inner, 4>* const p_a_3_a = (&(*p_a_3).a);
+ const constant Inner* const p_a_3_a_2 = (&(*p_a_3_a)[2]);
+ const constant half3x4* const p_a_3_a_2_m = (&(*p_a_3_a_2).m);
+ const constant half4* const p_a_3_a_2_m_1 = (&(*p_a_3_a_2_m)[1]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_3 = (*p_a_3);
+ tint_array<Inner, 4> const l_a_3_a = (*p_a_3_a);
+ Inner const l_a_3_a_2 = (*p_a_3_a_2);
+ half3x4 const l_a_3_a_2_m = (*p_a_3_a_2_m);
+ half4 const l_a_3_a_2_m_1 = (*p_a_3_a_2_m_1);
+ half const l_a_3_a_2_m_1_0 = (*p_a_3_a_2_m_1)[0];
}
-
-Outer = struct @align(8) {
- a:array<Inner, 4> @offset(0)
-}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %4:ptr<uniform, Outer, read> = access %p_a, 3i
- %p_a_3:ptr<uniform, Outer, read> = let %4
- %6:ptr<uniform, array<Inner, 4>, read> = access %p_a_3, 0u
- %p_a_3_a:ptr<uniform, array<Inner, 4>, read> = let %6
- %8:ptr<uniform, Inner, read> = access %p_a_3_a, 2i
- %p_a_3_a_2:ptr<uniform, Inner, read> = let %8
- %10:ptr<uniform, mat3x4<f16>, read> = access %p_a_3_a_2, 0u
- %p_a_3_a_2_m:ptr<uniform, mat3x4<f16>, read> = let %10
- %12:ptr<uniform, vec4<f16>, read> = access %p_a_3_a_2_m, 1i
- %p_a_3_a_2_m_1:ptr<uniform, vec4<f16>, read> = let %12
- %14:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %14
- %16:Outer = load %p_a_3
- %l_a_3:Outer = let %16
- %18:array<Inner, 4> = load %p_a_3_a
- %l_a_3_a:array<Inner, 4> = let %18
- %20:Inner = load %p_a_3_a_2
- %l_a_3_a_2:Inner = let %20
- %22:mat3x4<f16> = load %p_a_3_a_2_m
- %l_a_3_a_2_m:mat3x4<f16> = let %22
- %24:vec4<f16> = load %p_a_3_a_2_m_1
- %l_a_3_a_2_m_1:vec4<f16> = let %24
- %26:f16 = load_vector_element %p_a_3_a_2_m_1, 0i
- %l_a_3_a_2_m_1_0:f16 = let %26
- 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/buffer/uniform/std140/struct/mat3x4_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_fn.wgsl.expected.ir.msl
index de62933..b3c0a10c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_fn.wgsl.expected.ir.msl
@@ -1,67 +1,41 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat3x4<f16> @offset(8)
- after:i32 @offset(64)
-}
+struct S {
+ int before;
+ half3x4 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+};
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
+void a(tint_array<S, 4> a) {
}
-
-%a = func(%a_1:array<S, 4>):void { # %a_1: 'a'
- $B2: {
- ret
- }
+void b(S s) {
}
-%b = func(%s:S):void {
- $B3: {
- ret
- }
+void c(half3x4 m) {
}
-%c = func(%m:mat3x4<f16>):void {
- $B4: {
- ret
- }
+void d(half4 v) {
}
-%d = func(%v:vec4<f16>):void {
- $B5: {
- ret
- }
+void e(half f) {
}
-%e = func(%f:f16):void {
- $B6: {
- ret
- }
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[2]);
+ c((*tint_module_vars.u)[2].m);
+ d((*tint_module_vars.u)[0].m[1].ywxz);
+ e((*tint_module_vars.u)[0].m[1].ywxz[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B7: {
- %13:array<S, 4> = load %u
- %14:void = call %a, %13
- %15:ptr<uniform, S, read> = access %u, 2i
- %16:S = load %15
- %17:void = call %b, %16
- %18:ptr<uniform, mat3x4<f16>, read> = access %u, 2i, 1u
- %19:mat3x4<f16> = load %18
- %20:void = call %c, %19
- %21:ptr<uniform, vec4<f16>, read> = access %u, 0i, 1u, 1i
- %22:vec4<f16> = load %21
- %23:vec4<f16> = swizzle %22, ywxz
- %24:void = call %d, %23
- %25:ptr<uniform, vec4<f16>, read> = access %u, 0i, 1u, 1i
- %26:vec4<f16> = load %25
- %27:vec4<f16> = swizzle %26, ywxz
- %28:f16 = access %27, 0u
- %29:void = call %e, %28
- 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/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.ir.msl
index a61c787..a52db6b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.ir.msl
@@ -1,41 +1,32 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat3x4<f16> @offset(8)
- after:i32 @offset(64)
+struct S {
+ int before;
+ half3x4 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+ thread tint_array<S, 4>* p;
+};
+
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ thread tint_array<S, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[3].m = (*tint_module_vars.u)[2].m;
+ (*tint_module_vars.p)[1].m[0] = (*tint_module_vars.u)[0].m[1].ywxz;
}
-
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
- %p:ptr<private, array<S, 4>, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<S, 4> = load %u
- store %p, %4
- %5:ptr<private, S, read_write> = access %p, 1i
- %6:ptr<uniform, S, read> = access %u, 2i
- %7:S = load %6
- store %5, %7
- %8:ptr<private, mat3x4<f16>, read_write> = access %p, 3i, 1u
- %9:ptr<uniform, mat3x4<f16>, read> = access %u, 2i, 1u
- %10:mat3x4<f16> = load %9
- store %8, %10
- %11:ptr<private, vec4<f16>, read_write> = access %p, 1i, 1u, 0i
- %12:ptr<uniform, vec4<f16>, read> = access %u, 0i, 1u, 1i
- %13:vec4<f16> = load %12
- %14:vec4<f16> = swizzle %13, ywxz
- store %11, %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/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 7374cb3..eb95e46 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,66 +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: Inner = struct @align(16) {
- m:mat3x4<f32> @offset(0)
-}
+struct Inner {
+ float3x4 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+ thread int* counter;
+};
-Outer = struct @align(16) {
- a:array<Inner, 4> @offset(0)
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .counter=(&counter)};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant tint_array<Inner, 4>* const p_a_i_a = (&(*p_a_i).a);
+ const constant Inner* const p_a_i_a_i = (&(*p_a_i_a)[i(tint_module_vars)]);
+ const constant float3x4* const p_a_i_a_i_m = (&(*p_a_i_a_i).m);
+ const constant float4* const p_a_i_a_i_m_i = (&(*p_a_i_a_i_m)[i(tint_module_vars)]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_i = (*p_a_i);
+ tint_array<Inner, 4> const l_a_i_a = (*p_a_i_a);
+ Inner const l_a_i_a_i = (*p_a_i_a_i);
+ float3x4 const l_a_i_a_i_m = (*p_a_i_a_i_m);
+ float4 const l_a_i_a_i_m_i = (*p_a_i_a_i_m_i);
+ float const l_a_i_a_i_m_i_i = (*p_a_i_a_i_m_i)[i(tint_module_vars)];
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %9:i32 = call %i
- %10:ptr<uniform, Outer, read> = access %p_a, %9
- %p_a_i:ptr<uniform, Outer, read> = let %10
- %12:ptr<uniform, array<Inner, 4>, read> = access %p_a_i, 0u
- %p_a_i_a:ptr<uniform, array<Inner, 4>, read> = let %12
- %14:i32 = call %i
- %15:ptr<uniform, Inner, read> = access %p_a_i_a, %14
- %p_a_i_a_i:ptr<uniform, Inner, read> = let %15
- %17:ptr<uniform, mat3x4<f32>, read> = access %p_a_i_a_i, 0u
- %p_a_i_a_i_m:ptr<uniform, mat3x4<f32>, read> = let %17
- %19:i32 = call %i
- %20:ptr<uniform, vec4<f32>, read> = access %p_a_i_a_i_m, %19
- %p_a_i_a_i_m_i:ptr<uniform, vec4<f32>, read> = let %20
- %22:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %22
- %24:Outer = load %p_a_i
- %l_a_i:Outer = let %24
- %26:array<Inner, 4> = load %p_a_i_a
- %l_a_i_a:array<Inner, 4> = let %26
- %28:Inner = load %p_a_i_a_i
- %l_a_i_a_i:Inner = let %28
- %30:mat3x4<f32> = load %p_a_i_a_i_m
- %l_a_i_a_i_m:mat3x4<f32> = let %30
- %32:vec4<f32> = load %p_a_i_a_i_m_i
- %l_a_i_a_i_m_i:vec4<f32> = let %32
- %34:i32 = call %i
- %35:f32 = load_vector_element %p_a_i_a_i_m_i, %34
- %l_a_i_a_i_m_i_i:f32 = let %35
- 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/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.msl
index a6aa20b..6abe3b0 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,52 +1,40 @@
-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: Inner = struct @align(16) {
- m:mat3x4<f32> @offset(0)
+struct Inner {
+ float3x4 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+};
+
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_3 = (&(*p_a)[3]);
+ const constant tint_array<Inner, 4>* const p_a_3_a = (&(*p_a_3).a);
+ const constant Inner* const p_a_3_a_2 = (&(*p_a_3_a)[2]);
+ const constant float3x4* const p_a_3_a_2_m = (&(*p_a_3_a_2).m);
+ const constant float4* const p_a_3_a_2_m_1 = (&(*p_a_3_a_2_m)[1]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_3 = (*p_a_3);
+ tint_array<Inner, 4> const l_a_3_a = (*p_a_3_a);
+ Inner const l_a_3_a_2 = (*p_a_3_a_2);
+ float3x4 const l_a_3_a_2_m = (*p_a_3_a_2_m);
+ float4 const l_a_3_a_2_m_1 = (*p_a_3_a_2_m_1);
+ float const l_a_3_a_2_m_1_0 = (*p_a_3_a_2_m_1)[0];
}
-
-Outer = struct @align(16) {
- a:array<Inner, 4> @offset(0)
-}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %4:ptr<uniform, Outer, read> = access %p_a, 3i
- %p_a_3:ptr<uniform, Outer, read> = let %4
- %6:ptr<uniform, array<Inner, 4>, read> = access %p_a_3, 0u
- %p_a_3_a:ptr<uniform, array<Inner, 4>, read> = let %6
- %8:ptr<uniform, Inner, read> = access %p_a_3_a, 2i
- %p_a_3_a_2:ptr<uniform, Inner, read> = let %8
- %10:ptr<uniform, mat3x4<f32>, read> = access %p_a_3_a_2, 0u
- %p_a_3_a_2_m:ptr<uniform, mat3x4<f32>, read> = let %10
- %12:ptr<uniform, vec4<f32>, read> = access %p_a_3_a_2_m, 1i
- %p_a_3_a_2_m_1:ptr<uniform, vec4<f32>, read> = let %12
- %14:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %14
- %16:Outer = load %p_a_3
- %l_a_3:Outer = let %16
- %18:array<Inner, 4> = load %p_a_3_a
- %l_a_3_a:array<Inner, 4> = let %18
- %20:Inner = load %p_a_3_a_2
- %l_a_3_a_2:Inner = let %20
- %22:mat3x4<f32> = load %p_a_3_a_2_m
- %l_a_3_a_2_m:mat3x4<f32> = let %22
- %24:vec4<f32> = load %p_a_3_a_2_m_1
- %l_a_3_a_2_m_1:vec4<f32> = let %24
- %26:f32 = load_vector_element %p_a_3_a_2_m_1, 0i
- %l_a_3_a_2_m_1_0:f32 = let %26
- 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/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.ir.msl
index 9fc86f4..375b6b7 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.ir.msl
@@ -1,67 +1,41 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat3x4<f32> @offset(16)
- after:i32 @offset(64)
-}
+struct S {
+ int before;
+ float3x4 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+};
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
+void a(tint_array<S, 4> a) {
}
-
-%a = func(%a_1:array<S, 4>):void { # %a_1: 'a'
- $B2: {
- ret
- }
+void b(S s) {
}
-%b = func(%s:S):void {
- $B3: {
- ret
- }
+void c(float3x4 m) {
}
-%c = func(%m:mat3x4<f32>):void {
- $B4: {
- ret
- }
+void d(float4 v) {
}
-%d = func(%v:vec4<f32>):void {
- $B5: {
- ret
- }
+void e(float f) {
}
-%e = func(%f:f32):void {
- $B6: {
- ret
- }
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[2]);
+ c((*tint_module_vars.u)[2].m);
+ d((*tint_module_vars.u)[0].m[1].ywxz);
+ e((*tint_module_vars.u)[0].m[1].ywxz[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B7: {
- %13:array<S, 4> = load %u
- %14:void = call %a, %13
- %15:ptr<uniform, S, read> = access %u, 2i
- %16:S = load %15
- %17:void = call %b, %16
- %18:ptr<uniform, mat3x4<f32>, read> = access %u, 2i, 1u
- %19:mat3x4<f32> = load %18
- %20:void = call %c, %19
- %21:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1u, 1i
- %22:vec4<f32> = load %21
- %23:vec4<f32> = swizzle %22, ywxz
- %24:void = call %d, %23
- %25:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1u, 1i
- %26:vec4<f32> = load %25
- %27:vec4<f32> = swizzle %26, ywxz
- %28:f32 = access %27, 0u
- %29:void = call %e, %28
- 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/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.ir.msl
index 66213c0..c5d5e59 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.ir.msl
@@ -1,41 +1,32 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat3x4<f32> @offset(16)
- after:i32 @offset(64)
+struct S {
+ int before;
+ float3x4 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+ thread tint_array<S, 4>* p;
+};
+
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ thread tint_array<S, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[3].m = (*tint_module_vars.u)[2].m;
+ (*tint_module_vars.p)[1].m[0] = (*tint_module_vars.u)[0].m[1].ywxz;
}
-
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
- %p:ptr<private, array<S, 4>, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<S, 4> = load %u
- store %p, %4
- %5:ptr<private, S, read_write> = access %p, 1i
- %6:ptr<uniform, S, read> = access %u, 2i
- %7:S = load %6
- store %5, %7
- %8:ptr<private, mat3x4<f32>, read_write> = access %p, 3i, 1u
- %9:ptr<uniform, mat3x4<f32>, read> = access %u, 2i, 1u
- %10:mat3x4<f32> = load %9
- store %8, %10
- %11:ptr<private, vec4<f32>, read_write> = access %p, 1i, 1u, 0i
- %12:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1u, 1i
- %13:vec4<f32> = load %12
- %14:vec4<f32> = swizzle %13, ywxz
- store %11, %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/buffer/uniform/std140/struct/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index f7e6bdc..af99486 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,66 +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: Inner = struct @align(4) {
- m:mat4x2<f16> @offset(0)
-}
+struct Inner {
+ half4x2 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+ thread int* counter;
+};
-Outer = struct @align(4) {
- a:array<Inner, 4> @offset(0)
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .counter=(&counter)};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant tint_array<Inner, 4>* const p_a_i_a = (&(*p_a_i).a);
+ const constant Inner* const p_a_i_a_i = (&(*p_a_i_a)[i(tint_module_vars)]);
+ const constant half4x2* const p_a_i_a_i_m = (&(*p_a_i_a_i).m);
+ const constant half2* const p_a_i_a_i_m_i = (&(*p_a_i_a_i_m)[i(tint_module_vars)]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_i = (*p_a_i);
+ tint_array<Inner, 4> const l_a_i_a = (*p_a_i_a);
+ Inner const l_a_i_a_i = (*p_a_i_a_i);
+ half4x2 const l_a_i_a_i_m = (*p_a_i_a_i_m);
+ half2 const l_a_i_a_i_m_i = (*p_a_i_a_i_m_i);
+ half const l_a_i_a_i_m_i_i = (*p_a_i_a_i_m_i)[i(tint_module_vars)];
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %9:i32 = call %i
- %10:ptr<uniform, Outer, read> = access %p_a, %9
- %p_a_i:ptr<uniform, Outer, read> = let %10
- %12:ptr<uniform, array<Inner, 4>, read> = access %p_a_i, 0u
- %p_a_i_a:ptr<uniform, array<Inner, 4>, read> = let %12
- %14:i32 = call %i
- %15:ptr<uniform, Inner, read> = access %p_a_i_a, %14
- %p_a_i_a_i:ptr<uniform, Inner, read> = let %15
- %17:ptr<uniform, mat4x2<f16>, read> = access %p_a_i_a_i, 0u
- %p_a_i_a_i_m:ptr<uniform, mat4x2<f16>, read> = let %17
- %19:i32 = call %i
- %20:ptr<uniform, vec2<f16>, read> = access %p_a_i_a_i_m, %19
- %p_a_i_a_i_m_i:ptr<uniform, vec2<f16>, read> = let %20
- %22:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %22
- %24:Outer = load %p_a_i
- %l_a_i:Outer = let %24
- %26:array<Inner, 4> = load %p_a_i_a
- %l_a_i_a:array<Inner, 4> = let %26
- %28:Inner = load %p_a_i_a_i
- %l_a_i_a_i:Inner = let %28
- %30:mat4x2<f16> = load %p_a_i_a_i_m
- %l_a_i_a_i_m:mat4x2<f16> = let %30
- %32:vec2<f16> = load %p_a_i_a_i_m_i
- %l_a_i_a_i_m_i:vec2<f16> = let %32
- %34:i32 = call %i
- %35:f16 = load_vector_element %p_a_i_a_i_m_i, %34
- %l_a_i_a_i_m_i_i:f16 = let %35
- 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/buffer/uniform/std140/struct/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.msl
index 5f0caca..fee4e98 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,52 +1,40 @@
-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: Inner = struct @align(4) {
- m:mat4x2<f16> @offset(0)
+struct Inner {
+ half4x2 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+};
+
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_3 = (&(*p_a)[3]);
+ const constant tint_array<Inner, 4>* const p_a_3_a = (&(*p_a_3).a);
+ const constant Inner* const p_a_3_a_2 = (&(*p_a_3_a)[2]);
+ const constant half4x2* const p_a_3_a_2_m = (&(*p_a_3_a_2).m);
+ const constant half2* const p_a_3_a_2_m_1 = (&(*p_a_3_a_2_m)[1]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_3 = (*p_a_3);
+ tint_array<Inner, 4> const l_a_3_a = (*p_a_3_a);
+ Inner const l_a_3_a_2 = (*p_a_3_a_2);
+ half4x2 const l_a_3_a_2_m = (*p_a_3_a_2_m);
+ half2 const l_a_3_a_2_m_1 = (*p_a_3_a_2_m_1);
+ half const l_a_3_a_2_m_1_0 = (*p_a_3_a_2_m_1)[0];
}
-
-Outer = struct @align(4) {
- a:array<Inner, 4> @offset(0)
-}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %4:ptr<uniform, Outer, read> = access %p_a, 3i
- %p_a_3:ptr<uniform, Outer, read> = let %4
- %6:ptr<uniform, array<Inner, 4>, read> = access %p_a_3, 0u
- %p_a_3_a:ptr<uniform, array<Inner, 4>, read> = let %6
- %8:ptr<uniform, Inner, read> = access %p_a_3_a, 2i
- %p_a_3_a_2:ptr<uniform, Inner, read> = let %8
- %10:ptr<uniform, mat4x2<f16>, read> = access %p_a_3_a_2, 0u
- %p_a_3_a_2_m:ptr<uniform, mat4x2<f16>, read> = let %10
- %12:ptr<uniform, vec2<f16>, read> = access %p_a_3_a_2_m, 1i
- %p_a_3_a_2_m_1:ptr<uniform, vec2<f16>, read> = let %12
- %14:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %14
- %16:Outer = load %p_a_3
- %l_a_3:Outer = let %16
- %18:array<Inner, 4> = load %p_a_3_a
- %l_a_3_a:array<Inner, 4> = let %18
- %20:Inner = load %p_a_3_a_2
- %l_a_3_a_2:Inner = let %20
- %22:mat4x2<f16> = load %p_a_3_a_2_m
- %l_a_3_a_2_m:mat4x2<f16> = let %22
- %24:vec2<f16> = load %p_a_3_a_2_m_1
- %l_a_3_a_2_m_1:vec2<f16> = let %24
- %26:f16 = load_vector_element %p_a_3_a_2_m_1, 0i
- %l_a_3_a_2_m_1_0:f16 = let %26
- 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/buffer/uniform/std140/struct/mat4x2_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_fn.wgsl.expected.ir.msl
index 2e0da2b..fec6911 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_fn.wgsl.expected.ir.msl
@@ -1,67 +1,41 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat4x2<f16> @offset(4)
- after:i32 @offset(64)
-}
+struct S {
+ int before;
+ half4x2 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+};
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
+void a(tint_array<S, 4> a) {
}
-
-%a = func(%a_1:array<S, 4>):void { # %a_1: 'a'
- $B2: {
- ret
- }
+void b(S s) {
}
-%b = func(%s:S):void {
- $B3: {
- ret
- }
+void c(half4x2 m) {
}
-%c = func(%m:mat4x2<f16>):void {
- $B4: {
- ret
- }
+void d(half2 v) {
}
-%d = func(%v:vec2<f16>):void {
- $B5: {
- ret
- }
+void e(half f) {
}
-%e = func(%f:f16):void {
- $B6: {
- ret
- }
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[2]);
+ c((*tint_module_vars.u)[2].m);
+ d((*tint_module_vars.u)[0].m[1].yx);
+ e((*tint_module_vars.u)[0].m[1].yx[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B7: {
- %13:array<S, 4> = load %u
- %14:void = call %a, %13
- %15:ptr<uniform, S, read> = access %u, 2i
- %16:S = load %15
- %17:void = call %b, %16
- %18:ptr<uniform, mat4x2<f16>, read> = access %u, 2i, 1u
- %19:mat4x2<f16> = load %18
- %20:void = call %c, %19
- %21:ptr<uniform, vec2<f16>, read> = access %u, 0i, 1u, 1i
- %22:vec2<f16> = load %21
- %23:vec2<f16> = swizzle %22, yx
- %24:void = call %d, %23
- %25:ptr<uniform, vec2<f16>, read> = access %u, 0i, 1u, 1i
- %26:vec2<f16> = load %25
- %27:vec2<f16> = swizzle %26, yx
- %28:f16 = access %27, 0u
- %29:void = call %e, %28
- 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/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.ir.msl
index 4904ec9..3f7ad3d 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.ir.msl
@@ -1,41 +1,32 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat4x2<f16> @offset(4)
- after:i32 @offset(64)
+struct S {
+ int before;
+ half4x2 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+ thread tint_array<S, 4>* p;
+};
+
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ thread tint_array<S, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[3].m = (*tint_module_vars.u)[2].m;
+ (*tint_module_vars.p)[1].m[0] = (*tint_module_vars.u)[0].m[1].yx;
}
-
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
- %p:ptr<private, array<S, 4>, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<S, 4> = load %u
- store %p, %4
- %5:ptr<private, S, read_write> = access %p, 1i
- %6:ptr<uniform, S, read> = access %u, 2i
- %7:S = load %6
- store %5, %7
- %8:ptr<private, mat4x2<f16>, read_write> = access %p, 3i, 1u
- %9:ptr<uniform, mat4x2<f16>, read> = access %u, 2i, 1u
- %10:mat4x2<f16> = load %9
- store %8, %10
- %11:ptr<private, vec2<f16>, read_write> = access %p, 1i, 1u, 0i
- %12:ptr<uniform, vec2<f16>, read> = access %u, 0i, 1u, 1i
- %13:vec2<f16> = load %12
- %14:vec2<f16> = swizzle %13, yx
- store %11, %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/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 71450f5..8c058e1 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,66 +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: Inner = struct @align(8) {
- m:mat4x2<f32> @offset(0)
-}
+struct Inner {
+ float4x2 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+ thread int* counter;
+};
-Outer = struct @align(8) {
- a:array<Inner, 4> @offset(0)
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .counter=(&counter)};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant tint_array<Inner, 4>* const p_a_i_a = (&(*p_a_i).a);
+ const constant Inner* const p_a_i_a_i = (&(*p_a_i_a)[i(tint_module_vars)]);
+ const constant float4x2* const p_a_i_a_i_m = (&(*p_a_i_a_i).m);
+ const constant float2* const p_a_i_a_i_m_i = (&(*p_a_i_a_i_m)[i(tint_module_vars)]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_i = (*p_a_i);
+ tint_array<Inner, 4> const l_a_i_a = (*p_a_i_a);
+ Inner const l_a_i_a_i = (*p_a_i_a_i);
+ float4x2 const l_a_i_a_i_m = (*p_a_i_a_i_m);
+ float2 const l_a_i_a_i_m_i = (*p_a_i_a_i_m_i);
+ float const l_a_i_a_i_m_i_i = (*p_a_i_a_i_m_i)[i(tint_module_vars)];
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %9:i32 = call %i
- %10:ptr<uniform, Outer, read> = access %p_a, %9
- %p_a_i:ptr<uniform, Outer, read> = let %10
- %12:ptr<uniform, array<Inner, 4>, read> = access %p_a_i, 0u
- %p_a_i_a:ptr<uniform, array<Inner, 4>, read> = let %12
- %14:i32 = call %i
- %15:ptr<uniform, Inner, read> = access %p_a_i_a, %14
- %p_a_i_a_i:ptr<uniform, Inner, read> = let %15
- %17:ptr<uniform, mat4x2<f32>, read> = access %p_a_i_a_i, 0u
- %p_a_i_a_i_m:ptr<uniform, mat4x2<f32>, read> = let %17
- %19:i32 = call %i
- %20:ptr<uniform, vec2<f32>, read> = access %p_a_i_a_i_m, %19
- %p_a_i_a_i_m_i:ptr<uniform, vec2<f32>, read> = let %20
- %22:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %22
- %24:Outer = load %p_a_i
- %l_a_i:Outer = let %24
- %26:array<Inner, 4> = load %p_a_i_a
- %l_a_i_a:array<Inner, 4> = let %26
- %28:Inner = load %p_a_i_a_i
- %l_a_i_a_i:Inner = let %28
- %30:mat4x2<f32> = load %p_a_i_a_i_m
- %l_a_i_a_i_m:mat4x2<f32> = let %30
- %32:vec2<f32> = load %p_a_i_a_i_m_i
- %l_a_i_a_i_m_i:vec2<f32> = let %32
- %34:i32 = call %i
- %35:f32 = load_vector_element %p_a_i_a_i_m_i, %34
- %l_a_i_a_i_m_i_i:f32 = let %35
- 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/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.msl
index 0795a77..d21986e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,52 +1,40 @@
-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: Inner = struct @align(8) {
- m:mat4x2<f32> @offset(0)
+struct Inner {
+ float4x2 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+};
+
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_3 = (&(*p_a)[3]);
+ const constant tint_array<Inner, 4>* const p_a_3_a = (&(*p_a_3).a);
+ const constant Inner* const p_a_3_a_2 = (&(*p_a_3_a)[2]);
+ const constant float4x2* const p_a_3_a_2_m = (&(*p_a_3_a_2).m);
+ const constant float2* const p_a_3_a_2_m_1 = (&(*p_a_3_a_2_m)[1]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_3 = (*p_a_3);
+ tint_array<Inner, 4> const l_a_3_a = (*p_a_3_a);
+ Inner const l_a_3_a_2 = (*p_a_3_a_2);
+ float4x2 const l_a_3_a_2_m = (*p_a_3_a_2_m);
+ float2 const l_a_3_a_2_m_1 = (*p_a_3_a_2_m_1);
+ float const l_a_3_a_2_m_1_0 = (*p_a_3_a_2_m_1)[0];
}
-
-Outer = struct @align(8) {
- a:array<Inner, 4> @offset(0)
-}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %4:ptr<uniform, Outer, read> = access %p_a, 3i
- %p_a_3:ptr<uniform, Outer, read> = let %4
- %6:ptr<uniform, array<Inner, 4>, read> = access %p_a_3, 0u
- %p_a_3_a:ptr<uniform, array<Inner, 4>, read> = let %6
- %8:ptr<uniform, Inner, read> = access %p_a_3_a, 2i
- %p_a_3_a_2:ptr<uniform, Inner, read> = let %8
- %10:ptr<uniform, mat4x2<f32>, read> = access %p_a_3_a_2, 0u
- %p_a_3_a_2_m:ptr<uniform, mat4x2<f32>, read> = let %10
- %12:ptr<uniform, vec2<f32>, read> = access %p_a_3_a_2_m, 1i
- %p_a_3_a_2_m_1:ptr<uniform, vec2<f32>, read> = let %12
- %14:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %14
- %16:Outer = load %p_a_3
- %l_a_3:Outer = let %16
- %18:array<Inner, 4> = load %p_a_3_a
- %l_a_3_a:array<Inner, 4> = let %18
- %20:Inner = load %p_a_3_a_2
- %l_a_3_a_2:Inner = let %20
- %22:mat4x2<f32> = load %p_a_3_a_2_m
- %l_a_3_a_2_m:mat4x2<f32> = let %22
- %24:vec2<f32> = load %p_a_3_a_2_m_1
- %l_a_3_a_2_m_1:vec2<f32> = let %24
- %26:f32 = load_vector_element %p_a_3_a_2_m_1, 0i
- %l_a_3_a_2_m_1_0:f32 = let %26
- 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/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.ir.msl
index 1a3bfa4..c4d8718 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.ir.msl
@@ -1,67 +1,41 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat4x2<f32> @offset(8)
- after:i32 @offset(64)
-}
+struct S {
+ int before;
+ float4x2 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+};
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
+void a(tint_array<S, 4> a) {
}
-
-%a = func(%a_1:array<S, 4>):void { # %a_1: 'a'
- $B2: {
- ret
- }
+void b(S s) {
}
-%b = func(%s:S):void {
- $B3: {
- ret
- }
+void c(float4x2 m) {
}
-%c = func(%m:mat4x2<f32>):void {
- $B4: {
- ret
- }
+void d(float2 v) {
}
-%d = func(%v:vec2<f32>):void {
- $B5: {
- ret
- }
+void e(float f) {
}
-%e = func(%f:f32):void {
- $B6: {
- ret
- }
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[2]);
+ c((*tint_module_vars.u)[2].m);
+ d((*tint_module_vars.u)[0].m[1].yx);
+ e((*tint_module_vars.u)[0].m[1].yx[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B7: {
- %13:array<S, 4> = load %u
- %14:void = call %a, %13
- %15:ptr<uniform, S, read> = access %u, 2i
- %16:S = load %15
- %17:void = call %b, %16
- %18:ptr<uniform, mat4x2<f32>, read> = access %u, 2i, 1u
- %19:mat4x2<f32> = load %18
- %20:void = call %c, %19
- %21:ptr<uniform, vec2<f32>, read> = access %u, 0i, 1u, 1i
- %22:vec2<f32> = load %21
- %23:vec2<f32> = swizzle %22, yx
- %24:void = call %d, %23
- %25:ptr<uniform, vec2<f32>, read> = access %u, 0i, 1u, 1i
- %26:vec2<f32> = load %25
- %27:vec2<f32> = swizzle %26, yx
- %28:f32 = access %27, 0u
- %29:void = call %e, %28
- 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/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.ir.msl
index cc446b3..636832a 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.ir.msl
@@ -1,41 +1,32 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat4x2<f32> @offset(8)
- after:i32 @offset(64)
+struct S {
+ int before;
+ float4x2 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+ thread tint_array<S, 4>* p;
+};
+
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ thread tint_array<S, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[3].m = (*tint_module_vars.u)[2].m;
+ (*tint_module_vars.p)[1].m[0] = (*tint_module_vars.u)[0].m[1].yx;
}
-
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
- %p:ptr<private, array<S, 4>, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<S, 4> = load %u
- store %p, %4
- %5:ptr<private, S, read_write> = access %p, 1i
- %6:ptr<uniform, S, read> = access %u, 2i
- %7:S = load %6
- store %5, %7
- %8:ptr<private, mat4x2<f32>, read_write> = access %p, 3i, 1u
- %9:ptr<uniform, mat4x2<f32>, read> = access %u, 2i, 1u
- %10:mat4x2<f32> = load %9
- store %8, %10
- %11:ptr<private, vec2<f32>, read_write> = access %p, 1i, 1u, 0i
- %12:ptr<uniform, vec2<f32>, read> = access %u, 0i, 1u, 1i
- %13:vec2<f32> = load %12
- %14:vec2<f32> = swizzle %13, yx
- store %11, %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/buffer/uniform/std140/struct/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index d9f9408..ea597bc 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,66 +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: Inner = struct @align(8) {
- m:mat4x3<f16> @offset(0)
-}
+struct Inner {
+ half4x3 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+ thread int* counter;
+};
-Outer = struct @align(8) {
- a:array<Inner, 4> @offset(0)
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .counter=(&counter)};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant tint_array<Inner, 4>* const p_a_i_a = (&(*p_a_i).a);
+ const constant Inner* const p_a_i_a_i = (&(*p_a_i_a)[i(tint_module_vars)]);
+ const constant half4x3* const p_a_i_a_i_m = (&(*p_a_i_a_i).m);
+ const constant half3* const p_a_i_a_i_m_i = (&(*p_a_i_a_i_m)[i(tint_module_vars)]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_i = (*p_a_i);
+ tint_array<Inner, 4> const l_a_i_a = (*p_a_i_a);
+ Inner const l_a_i_a_i = (*p_a_i_a_i);
+ half4x3 const l_a_i_a_i_m = (*p_a_i_a_i_m);
+ half3 const l_a_i_a_i_m_i = (*p_a_i_a_i_m_i);
+ half const l_a_i_a_i_m_i_i = (*p_a_i_a_i_m_i)[i(tint_module_vars)];
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %9:i32 = call %i
- %10:ptr<uniform, Outer, read> = access %p_a, %9
- %p_a_i:ptr<uniform, Outer, read> = let %10
- %12:ptr<uniform, array<Inner, 4>, read> = access %p_a_i, 0u
- %p_a_i_a:ptr<uniform, array<Inner, 4>, read> = let %12
- %14:i32 = call %i
- %15:ptr<uniform, Inner, read> = access %p_a_i_a, %14
- %p_a_i_a_i:ptr<uniform, Inner, read> = let %15
- %17:ptr<uniform, mat4x3<f16>, read> = access %p_a_i_a_i, 0u
- %p_a_i_a_i_m:ptr<uniform, mat4x3<f16>, read> = let %17
- %19:i32 = call %i
- %20:ptr<uniform, vec3<f16>, read> = access %p_a_i_a_i_m, %19
- %p_a_i_a_i_m_i:ptr<uniform, vec3<f16>, read> = let %20
- %22:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %22
- %24:Outer = load %p_a_i
- %l_a_i:Outer = let %24
- %26:array<Inner, 4> = load %p_a_i_a
- %l_a_i_a:array<Inner, 4> = let %26
- %28:Inner = load %p_a_i_a_i
- %l_a_i_a_i:Inner = let %28
- %30:mat4x3<f16> = load %p_a_i_a_i_m
- %l_a_i_a_i_m:mat4x3<f16> = let %30
- %32:vec3<f16> = load %p_a_i_a_i_m_i
- %l_a_i_a_i_m_i:vec3<f16> = let %32
- %34:i32 = call %i
- %35:f16 = load_vector_element %p_a_i_a_i_m_i, %34
- %l_a_i_a_i_m_i_i:f16 = let %35
- 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/buffer/uniform/std140/struct/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.msl
index 016a529..887ffc5 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,52 +1,40 @@
-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: Inner = struct @align(8) {
- m:mat4x3<f16> @offset(0)
+struct Inner {
+ half4x3 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+};
+
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_3 = (&(*p_a)[3]);
+ const constant tint_array<Inner, 4>* const p_a_3_a = (&(*p_a_3).a);
+ const constant Inner* const p_a_3_a_2 = (&(*p_a_3_a)[2]);
+ const constant half4x3* const p_a_3_a_2_m = (&(*p_a_3_a_2).m);
+ const constant half3* const p_a_3_a_2_m_1 = (&(*p_a_3_a_2_m)[1]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_3 = (*p_a_3);
+ tint_array<Inner, 4> const l_a_3_a = (*p_a_3_a);
+ Inner const l_a_3_a_2 = (*p_a_3_a_2);
+ half4x3 const l_a_3_a_2_m = (*p_a_3_a_2_m);
+ half3 const l_a_3_a_2_m_1 = (*p_a_3_a_2_m_1);
+ half const l_a_3_a_2_m_1_0 = (*p_a_3_a_2_m_1)[0];
}
-
-Outer = struct @align(8) {
- a:array<Inner, 4> @offset(0)
-}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %4:ptr<uniform, Outer, read> = access %p_a, 3i
- %p_a_3:ptr<uniform, Outer, read> = let %4
- %6:ptr<uniform, array<Inner, 4>, read> = access %p_a_3, 0u
- %p_a_3_a:ptr<uniform, array<Inner, 4>, read> = let %6
- %8:ptr<uniform, Inner, read> = access %p_a_3_a, 2i
- %p_a_3_a_2:ptr<uniform, Inner, read> = let %8
- %10:ptr<uniform, mat4x3<f16>, read> = access %p_a_3_a_2, 0u
- %p_a_3_a_2_m:ptr<uniform, mat4x3<f16>, read> = let %10
- %12:ptr<uniform, vec3<f16>, read> = access %p_a_3_a_2_m, 1i
- %p_a_3_a_2_m_1:ptr<uniform, vec3<f16>, read> = let %12
- %14:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %14
- %16:Outer = load %p_a_3
- %l_a_3:Outer = let %16
- %18:array<Inner, 4> = load %p_a_3_a
- %l_a_3_a:array<Inner, 4> = let %18
- %20:Inner = load %p_a_3_a_2
- %l_a_3_a_2:Inner = let %20
- %22:mat4x3<f16> = load %p_a_3_a_2_m
- %l_a_3_a_2_m:mat4x3<f16> = let %22
- %24:vec3<f16> = load %p_a_3_a_2_m_1
- %l_a_3_a_2_m_1:vec3<f16> = let %24
- %26:f16 = load_vector_element %p_a_3_a_2_m_1, 0i
- %l_a_3_a_2_m_1_0:f16 = let %26
- 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/buffer/uniform/std140/struct/mat4x3_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_fn.wgsl.expected.ir.msl
index fe69066..0f0d3f9 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_fn.wgsl.expected.ir.msl
@@ -1,67 +1,41 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat4x3<f16> @offset(8)
- after:i32 @offset(64)
-}
+struct S {
+ int before;
+ half4x3 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+};
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
+void a(tint_array<S, 4> a) {
}
-
-%a = func(%a_1:array<S, 4>):void { # %a_1: 'a'
- $B2: {
- ret
- }
+void b(S s) {
}
-%b = func(%s:S):void {
- $B3: {
- ret
- }
+void c(half4x3 m) {
}
-%c = func(%m:mat4x3<f16>):void {
- $B4: {
- ret
- }
+void d(half3 v) {
}
-%d = func(%v:vec3<f16>):void {
- $B5: {
- ret
- }
+void e(half f) {
}
-%e = func(%f:f16):void {
- $B6: {
- ret
- }
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[2]);
+ c((*tint_module_vars.u)[2].m);
+ d((*tint_module_vars.u)[0].m[1].zxy);
+ e((*tint_module_vars.u)[0].m[1].zxy[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B7: {
- %13:array<S, 4> = load %u
- %14:void = call %a, %13
- %15:ptr<uniform, S, read> = access %u, 2i
- %16:S = load %15
- %17:void = call %b, %16
- %18:ptr<uniform, mat4x3<f16>, read> = access %u, 2i, 1u
- %19:mat4x3<f16> = load %18
- %20:void = call %c, %19
- %21:ptr<uniform, vec3<f16>, read> = access %u, 0i, 1u, 1i
- %22:vec3<f16> = load %21
- %23:vec3<f16> = swizzle %22, zxy
- %24:void = call %d, %23
- %25:ptr<uniform, vec3<f16>, read> = access %u, 0i, 1u, 1i
- %26:vec3<f16> = load %25
- %27:vec3<f16> = swizzle %26, zxy
- %28:f16 = access %27, 0u
- %29:void = call %e, %28
- 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/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.ir.msl
index c6791799..47e0ffc 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.ir.msl
@@ -1,41 +1,32 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat4x3<f16> @offset(8)
- after:i32 @offset(64)
+struct S {
+ int before;
+ half4x3 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+ thread tint_array<S, 4>* p;
+};
+
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ thread tint_array<S, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[3].m = (*tint_module_vars.u)[2].m;
+ (*tint_module_vars.p)[1].m[0] = (*tint_module_vars.u)[0].m[1].zxy;
}
-
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
- %p:ptr<private, array<S, 4>, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<S, 4> = load %u
- store %p, %4
- %5:ptr<private, S, read_write> = access %p, 1i
- %6:ptr<uniform, S, read> = access %u, 2i
- %7:S = load %6
- store %5, %7
- %8:ptr<private, mat4x3<f16>, read_write> = access %p, 3i, 1u
- %9:ptr<uniform, mat4x3<f16>, read> = access %u, 2i, 1u
- %10:mat4x3<f16> = load %9
- store %8, %10
- %11:ptr<private, vec3<f16>, read_write> = access %p, 1i, 1u, 0i
- %12:ptr<uniform, vec3<f16>, read> = access %u, 0i, 1u, 1i
- %13:vec3<f16> = load %12
- %14:vec3<f16> = swizzle %13, zxy
- store %11, %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/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 2ecbdef..a13af1b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,66 +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: Inner = struct @align(16) {
- m:mat4x3<f32> @offset(0)
-}
+struct Inner {
+ float4x3 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+ thread int* counter;
+};
-Outer = struct @align(16) {
- a:array<Inner, 4> @offset(0)
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .counter=(&counter)};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant tint_array<Inner, 4>* const p_a_i_a = (&(*p_a_i).a);
+ const constant Inner* const p_a_i_a_i = (&(*p_a_i_a)[i(tint_module_vars)]);
+ const constant float4x3* const p_a_i_a_i_m = (&(*p_a_i_a_i).m);
+ const constant float3* const p_a_i_a_i_m_i = (&(*p_a_i_a_i_m)[i(tint_module_vars)]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_i = (*p_a_i);
+ tint_array<Inner, 4> const l_a_i_a = (*p_a_i_a);
+ Inner const l_a_i_a_i = (*p_a_i_a_i);
+ float4x3 const l_a_i_a_i_m = (*p_a_i_a_i_m);
+ float3 const l_a_i_a_i_m_i = (*p_a_i_a_i_m_i);
+ float const l_a_i_a_i_m_i_i = (*p_a_i_a_i_m_i)[i(tint_module_vars)];
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %9:i32 = call %i
- %10:ptr<uniform, Outer, read> = access %p_a, %9
- %p_a_i:ptr<uniform, Outer, read> = let %10
- %12:ptr<uniform, array<Inner, 4>, read> = access %p_a_i, 0u
- %p_a_i_a:ptr<uniform, array<Inner, 4>, read> = let %12
- %14:i32 = call %i
- %15:ptr<uniform, Inner, read> = access %p_a_i_a, %14
- %p_a_i_a_i:ptr<uniform, Inner, read> = let %15
- %17:ptr<uniform, mat4x3<f32>, read> = access %p_a_i_a_i, 0u
- %p_a_i_a_i_m:ptr<uniform, mat4x3<f32>, read> = let %17
- %19:i32 = call %i
- %20:ptr<uniform, vec3<f32>, read> = access %p_a_i_a_i_m, %19
- %p_a_i_a_i_m_i:ptr<uniform, vec3<f32>, read> = let %20
- %22:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %22
- %24:Outer = load %p_a_i
- %l_a_i:Outer = let %24
- %26:array<Inner, 4> = load %p_a_i_a
- %l_a_i_a:array<Inner, 4> = let %26
- %28:Inner = load %p_a_i_a_i
- %l_a_i_a_i:Inner = let %28
- %30:mat4x3<f32> = load %p_a_i_a_i_m
- %l_a_i_a_i_m:mat4x3<f32> = let %30
- %32:vec3<f32> = load %p_a_i_a_i_m_i
- %l_a_i_a_i_m_i:vec3<f32> = let %32
- %34:i32 = call %i
- %35:f32 = load_vector_element %p_a_i_a_i_m_i, %34
- %l_a_i_a_i_m_i_i:f32 = let %35
- 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/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.msl
index 4276831..b1a2bec 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,52 +1,40 @@
-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: Inner = struct @align(16) {
- m:mat4x3<f32> @offset(0)
+struct Inner {
+ float4x3 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+};
+
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_3 = (&(*p_a)[3]);
+ const constant tint_array<Inner, 4>* const p_a_3_a = (&(*p_a_3).a);
+ const constant Inner* const p_a_3_a_2 = (&(*p_a_3_a)[2]);
+ const constant float4x3* const p_a_3_a_2_m = (&(*p_a_3_a_2).m);
+ const constant float3* const p_a_3_a_2_m_1 = (&(*p_a_3_a_2_m)[1]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_3 = (*p_a_3);
+ tint_array<Inner, 4> const l_a_3_a = (*p_a_3_a);
+ Inner const l_a_3_a_2 = (*p_a_3_a_2);
+ float4x3 const l_a_3_a_2_m = (*p_a_3_a_2_m);
+ float3 const l_a_3_a_2_m_1 = (*p_a_3_a_2_m_1);
+ float const l_a_3_a_2_m_1_0 = (*p_a_3_a_2_m_1)[0];
}
-
-Outer = struct @align(16) {
- a:array<Inner, 4> @offset(0)
-}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %4:ptr<uniform, Outer, read> = access %p_a, 3i
- %p_a_3:ptr<uniform, Outer, read> = let %4
- %6:ptr<uniform, array<Inner, 4>, read> = access %p_a_3, 0u
- %p_a_3_a:ptr<uniform, array<Inner, 4>, read> = let %6
- %8:ptr<uniform, Inner, read> = access %p_a_3_a, 2i
- %p_a_3_a_2:ptr<uniform, Inner, read> = let %8
- %10:ptr<uniform, mat4x3<f32>, read> = access %p_a_3_a_2, 0u
- %p_a_3_a_2_m:ptr<uniform, mat4x3<f32>, read> = let %10
- %12:ptr<uniform, vec3<f32>, read> = access %p_a_3_a_2_m, 1i
- %p_a_3_a_2_m_1:ptr<uniform, vec3<f32>, read> = let %12
- %14:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %14
- %16:Outer = load %p_a_3
- %l_a_3:Outer = let %16
- %18:array<Inner, 4> = load %p_a_3_a
- %l_a_3_a:array<Inner, 4> = let %18
- %20:Inner = load %p_a_3_a_2
- %l_a_3_a_2:Inner = let %20
- %22:mat4x3<f32> = load %p_a_3_a_2_m
- %l_a_3_a_2_m:mat4x3<f32> = let %22
- %24:vec3<f32> = load %p_a_3_a_2_m_1
- %l_a_3_a_2_m_1:vec3<f32> = let %24
- %26:f32 = load_vector_element %p_a_3_a_2_m_1, 0i
- %l_a_3_a_2_m_1_0:f32 = let %26
- 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/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.ir.msl
index eca171c..0f8f2fa 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.ir.msl
@@ -1,67 +1,41 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat4x3<f32> @offset(16)
- after:i32 @offset(128)
-}
+struct S {
+ int before;
+ float4x3 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+};
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
+void a(tint_array<S, 4> a) {
}
-
-%a = func(%a_1:array<S, 4>):void { # %a_1: 'a'
- $B2: {
- ret
- }
+void b(S s) {
}
-%b = func(%s:S):void {
- $B3: {
- ret
- }
+void c(float4x3 m) {
}
-%c = func(%m:mat4x3<f32>):void {
- $B4: {
- ret
- }
+void d(float3 v) {
}
-%d = func(%v:vec3<f32>):void {
- $B5: {
- ret
- }
+void e(float f) {
}
-%e = func(%f:f32):void {
- $B6: {
- ret
- }
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[2]);
+ c((*tint_module_vars.u)[2].m);
+ d((*tint_module_vars.u)[0].m[1].zxy);
+ e((*tint_module_vars.u)[0].m[1].zxy[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B7: {
- %13:array<S, 4> = load %u
- %14:void = call %a, %13
- %15:ptr<uniform, S, read> = access %u, 2i
- %16:S = load %15
- %17:void = call %b, %16
- %18:ptr<uniform, mat4x3<f32>, read> = access %u, 2i, 1u
- %19:mat4x3<f32> = load %18
- %20:void = call %c, %19
- %21:ptr<uniform, vec3<f32>, read> = access %u, 0i, 1u, 1i
- %22:vec3<f32> = load %21
- %23:vec3<f32> = swizzle %22, zxy
- %24:void = call %d, %23
- %25:ptr<uniform, vec3<f32>, read> = access %u, 0i, 1u, 1i
- %26:vec3<f32> = load %25
- %27:vec3<f32> = swizzle %26, zxy
- %28:f32 = access %27, 0u
- %29:void = call %e, %28
- 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/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.ir.msl
index ab68b96..705fe4f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.ir.msl
@@ -1,41 +1,32 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat4x3<f32> @offset(16)
- after:i32 @offset(128)
+struct S {
+ int before;
+ float4x3 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+ thread tint_array<S, 4>* p;
+};
+
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ thread tint_array<S, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[3].m = (*tint_module_vars.u)[2].m;
+ (*tint_module_vars.p)[1].m[0] = (*tint_module_vars.u)[0].m[1].zxy;
}
-
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
- %p:ptr<private, array<S, 4>, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<S, 4> = load %u
- store %p, %4
- %5:ptr<private, S, read_write> = access %p, 1i
- %6:ptr<uniform, S, read> = access %u, 2i
- %7:S = load %6
- store %5, %7
- %8:ptr<private, mat4x3<f32>, read_write> = access %p, 3i, 1u
- %9:ptr<uniform, mat4x3<f32>, read> = access %u, 2i, 1u
- %10:mat4x3<f32> = load %9
- store %8, %10
- %11:ptr<private, vec3<f32>, read_write> = access %p, 1i, 1u, 0i
- %12:ptr<uniform, vec3<f32>, read> = access %u, 0i, 1u, 1i
- %13:vec3<f32> = load %12
- %14:vec3<f32> = swizzle %13, zxy
- store %11, %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/buffer/uniform/std140/struct/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 44fe5af..c1da52f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,66 +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: Inner = struct @align(8) {
- m:mat4x4<f16> @offset(0)
-}
+struct Inner {
+ half4x4 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+ thread int* counter;
+};
-Outer = struct @align(8) {
- a:array<Inner, 4> @offset(0)
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .counter=(&counter)};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant tint_array<Inner, 4>* const p_a_i_a = (&(*p_a_i).a);
+ const constant Inner* const p_a_i_a_i = (&(*p_a_i_a)[i(tint_module_vars)]);
+ const constant half4x4* const p_a_i_a_i_m = (&(*p_a_i_a_i).m);
+ const constant half4* const p_a_i_a_i_m_i = (&(*p_a_i_a_i_m)[i(tint_module_vars)]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_i = (*p_a_i);
+ tint_array<Inner, 4> const l_a_i_a = (*p_a_i_a);
+ Inner const l_a_i_a_i = (*p_a_i_a_i);
+ half4x4 const l_a_i_a_i_m = (*p_a_i_a_i_m);
+ half4 const l_a_i_a_i_m_i = (*p_a_i_a_i_m_i);
+ half const l_a_i_a_i_m_i_i = (*p_a_i_a_i_m_i)[i(tint_module_vars)];
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %9:i32 = call %i
- %10:ptr<uniform, Outer, read> = access %p_a, %9
- %p_a_i:ptr<uniform, Outer, read> = let %10
- %12:ptr<uniform, array<Inner, 4>, read> = access %p_a_i, 0u
- %p_a_i_a:ptr<uniform, array<Inner, 4>, read> = let %12
- %14:i32 = call %i
- %15:ptr<uniform, Inner, read> = access %p_a_i_a, %14
- %p_a_i_a_i:ptr<uniform, Inner, read> = let %15
- %17:ptr<uniform, mat4x4<f16>, read> = access %p_a_i_a_i, 0u
- %p_a_i_a_i_m:ptr<uniform, mat4x4<f16>, read> = let %17
- %19:i32 = call %i
- %20:ptr<uniform, vec4<f16>, read> = access %p_a_i_a_i_m, %19
- %p_a_i_a_i_m_i:ptr<uniform, vec4<f16>, read> = let %20
- %22:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %22
- %24:Outer = load %p_a_i
- %l_a_i:Outer = let %24
- %26:array<Inner, 4> = load %p_a_i_a
- %l_a_i_a:array<Inner, 4> = let %26
- %28:Inner = load %p_a_i_a_i
- %l_a_i_a_i:Inner = let %28
- %30:mat4x4<f16> = load %p_a_i_a_i_m
- %l_a_i_a_i_m:mat4x4<f16> = let %30
- %32:vec4<f16> = load %p_a_i_a_i_m_i
- %l_a_i_a_i_m_i:vec4<f16> = let %32
- %34:i32 = call %i
- %35:f16 = load_vector_element %p_a_i_a_i_m_i, %34
- %l_a_i_a_i_m_i_i:f16 = let %35
- 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/buffer/uniform/std140/struct/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.msl
index bde73d9..b6998d2 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,52 +1,40 @@
-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: Inner = struct @align(8) {
- m:mat4x4<f16> @offset(0)
+struct Inner {
+ half4x4 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+};
+
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_3 = (&(*p_a)[3]);
+ const constant tint_array<Inner, 4>* const p_a_3_a = (&(*p_a_3).a);
+ const constant Inner* const p_a_3_a_2 = (&(*p_a_3_a)[2]);
+ const constant half4x4* const p_a_3_a_2_m = (&(*p_a_3_a_2).m);
+ const constant half4* const p_a_3_a_2_m_1 = (&(*p_a_3_a_2_m)[1]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_3 = (*p_a_3);
+ tint_array<Inner, 4> const l_a_3_a = (*p_a_3_a);
+ Inner const l_a_3_a_2 = (*p_a_3_a_2);
+ half4x4 const l_a_3_a_2_m = (*p_a_3_a_2_m);
+ half4 const l_a_3_a_2_m_1 = (*p_a_3_a_2_m_1);
+ half const l_a_3_a_2_m_1_0 = (*p_a_3_a_2_m_1)[0];
}
-
-Outer = struct @align(8) {
- a:array<Inner, 4> @offset(0)
-}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %4:ptr<uniform, Outer, read> = access %p_a, 3i
- %p_a_3:ptr<uniform, Outer, read> = let %4
- %6:ptr<uniform, array<Inner, 4>, read> = access %p_a_3, 0u
- %p_a_3_a:ptr<uniform, array<Inner, 4>, read> = let %6
- %8:ptr<uniform, Inner, read> = access %p_a_3_a, 2i
- %p_a_3_a_2:ptr<uniform, Inner, read> = let %8
- %10:ptr<uniform, mat4x4<f16>, read> = access %p_a_3_a_2, 0u
- %p_a_3_a_2_m:ptr<uniform, mat4x4<f16>, read> = let %10
- %12:ptr<uniform, vec4<f16>, read> = access %p_a_3_a_2_m, 1i
- %p_a_3_a_2_m_1:ptr<uniform, vec4<f16>, read> = let %12
- %14:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %14
- %16:Outer = load %p_a_3
- %l_a_3:Outer = let %16
- %18:array<Inner, 4> = load %p_a_3_a
- %l_a_3_a:array<Inner, 4> = let %18
- %20:Inner = load %p_a_3_a_2
- %l_a_3_a_2:Inner = let %20
- %22:mat4x4<f16> = load %p_a_3_a_2_m
- %l_a_3_a_2_m:mat4x4<f16> = let %22
- %24:vec4<f16> = load %p_a_3_a_2_m_1
- %l_a_3_a_2_m_1:vec4<f16> = let %24
- %26:f16 = load_vector_element %p_a_3_a_2_m_1, 0i
- %l_a_3_a_2_m_1_0:f16 = let %26
- 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/buffer/uniform/std140/struct/mat4x4_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_fn.wgsl.expected.ir.msl
index 6b8aa2c..1cb00c3 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_fn.wgsl.expected.ir.msl
@@ -1,67 +1,41 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat4x4<f16> @offset(8)
- after:i32 @offset(64)
-}
+struct S {
+ int before;
+ half4x4 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+};
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
+void a(tint_array<S, 4> a) {
}
-
-%a = func(%a_1:array<S, 4>):void { # %a_1: 'a'
- $B2: {
- ret
- }
+void b(S s) {
}
-%b = func(%s:S):void {
- $B3: {
- ret
- }
+void c(half4x4 m) {
}
-%c = func(%m:mat4x4<f16>):void {
- $B4: {
- ret
- }
+void d(half4 v) {
}
-%d = func(%v:vec4<f16>):void {
- $B5: {
- ret
- }
+void e(half f) {
}
-%e = func(%f:f16):void {
- $B6: {
- ret
- }
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[2]);
+ c((*tint_module_vars.u)[2].m);
+ d((*tint_module_vars.u)[0].m[1].ywxz);
+ e((*tint_module_vars.u)[0].m[1].ywxz[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B7: {
- %13:array<S, 4> = load %u
- %14:void = call %a, %13
- %15:ptr<uniform, S, read> = access %u, 2i
- %16:S = load %15
- %17:void = call %b, %16
- %18:ptr<uniform, mat4x4<f16>, read> = access %u, 2i, 1u
- %19:mat4x4<f16> = load %18
- %20:void = call %c, %19
- %21:ptr<uniform, vec4<f16>, read> = access %u, 0i, 1u, 1i
- %22:vec4<f16> = load %21
- %23:vec4<f16> = swizzle %22, ywxz
- %24:void = call %d, %23
- %25:ptr<uniform, vec4<f16>, read> = access %u, 0i, 1u, 1i
- %26:vec4<f16> = load %25
- %27:vec4<f16> = swizzle %26, ywxz
- %28:f16 = access %27, 0u
- %29:void = call %e, %28
- 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/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.ir.msl
index 6db31f9..ef9038e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.ir.msl
@@ -1,41 +1,32 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat4x4<f16> @offset(8)
- after:i32 @offset(64)
+struct S {
+ int before;
+ half4x4 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+ thread tint_array<S, 4>* p;
+};
+
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ thread tint_array<S, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[3].m = (*tint_module_vars.u)[2].m;
+ (*tint_module_vars.p)[1].m[0] = (*tint_module_vars.u)[0].m[1].ywxz;
}
-
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
- %p:ptr<private, array<S, 4>, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<S, 4> = load %u
- store %p, %4
- %5:ptr<private, S, read_write> = access %p, 1i
- %6:ptr<uniform, S, read> = access %u, 2i
- %7:S = load %6
- store %5, %7
- %8:ptr<private, mat4x4<f16>, read_write> = access %p, 3i, 1u
- %9:ptr<uniform, mat4x4<f16>, read> = access %u, 2i, 1u
- %10:mat4x4<f16> = load %9
- store %8, %10
- %11:ptr<private, vec4<f16>, read_write> = access %p, 1i, 1u, 0i
- %12:ptr<uniform, vec4<f16>, read> = access %u, 0i, 1u, 1i
- %13:vec4<f16> = load %12
- %14:vec4<f16> = swizzle %13, ywxz
- store %11, %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/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 9ed2603..ef7eb1f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,66 +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: Inner = struct @align(16) {
- m:mat4x4<f32> @offset(0)
-}
+struct Inner {
+ float4x4 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+ thread int* counter;
+};
-Outer = struct @align(16) {
- a:array<Inner, 4> @offset(0)
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.a=a, .counter=(&counter)};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_i = (&(*p_a)[i(tint_module_vars)]);
+ const constant tint_array<Inner, 4>* const p_a_i_a = (&(*p_a_i).a);
+ const constant Inner* const p_a_i_a_i = (&(*p_a_i_a)[i(tint_module_vars)]);
+ const constant float4x4* const p_a_i_a_i_m = (&(*p_a_i_a_i).m);
+ const constant float4* const p_a_i_a_i_m_i = (&(*p_a_i_a_i_m)[i(tint_module_vars)]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_i = (*p_a_i);
+ tint_array<Inner, 4> const l_a_i_a = (*p_a_i_a);
+ Inner const l_a_i_a_i = (*p_a_i_a_i);
+ float4x4 const l_a_i_a_i_m = (*p_a_i_a_i_m);
+ float4 const l_a_i_a_i_m_i = (*p_a_i_a_i_m_i);
+ float const l_a_i_a_i_m_i_i = (*p_a_i_a_i_m_i)[i(tint_module_vars)];
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %9:i32 = call %i
- %10:ptr<uniform, Outer, read> = access %p_a, %9
- %p_a_i:ptr<uniform, Outer, read> = let %10
- %12:ptr<uniform, array<Inner, 4>, read> = access %p_a_i, 0u
- %p_a_i_a:ptr<uniform, array<Inner, 4>, read> = let %12
- %14:i32 = call %i
- %15:ptr<uniform, Inner, read> = access %p_a_i_a, %14
- %p_a_i_a_i:ptr<uniform, Inner, read> = let %15
- %17:ptr<uniform, mat4x4<f32>, read> = access %p_a_i_a_i, 0u
- %p_a_i_a_i_m:ptr<uniform, mat4x4<f32>, read> = let %17
- %19:i32 = call %i
- %20:ptr<uniform, vec4<f32>, read> = access %p_a_i_a_i_m, %19
- %p_a_i_a_i_m_i:ptr<uniform, vec4<f32>, read> = let %20
- %22:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %22
- %24:Outer = load %p_a_i
- %l_a_i:Outer = let %24
- %26:array<Inner, 4> = load %p_a_i_a
- %l_a_i_a:array<Inner, 4> = let %26
- %28:Inner = load %p_a_i_a_i
- %l_a_i_a_i:Inner = let %28
- %30:mat4x4<f32> = load %p_a_i_a_i_m
- %l_a_i_a_i_m:mat4x4<f32> = let %30
- %32:vec4<f32> = load %p_a_i_a_i_m_i
- %l_a_i_a_i_m_i:vec4<f32> = let %32
- %34:i32 = call %i
- %35:f32 = load_vector_element %p_a_i_a_i_m_i, %34
- %l_a_i_a_i_m_i_i:f32 = let %35
- 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/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.msl
index 4addd07..29ee601 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.msl
@@ -1,52 +1,40 @@
-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: Inner = struct @align(16) {
- m:mat4x4<f32> @offset(0)
+struct Inner {
+ float4x4 m;
+};
+struct Outer {
+ tint_array<Inner, 4> a;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<Outer, 4>* a;
+};
+
+kernel void f(const constant tint_array<Outer, 4>* a [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.a=a};
+ const constant tint_array<Outer, 4>* const p_a = tint_module_vars.a;
+ const constant Outer* const p_a_3 = (&(*p_a)[3]);
+ const constant tint_array<Inner, 4>* const p_a_3_a = (&(*p_a_3).a);
+ const constant Inner* const p_a_3_a_2 = (&(*p_a_3_a)[2]);
+ const constant float4x4* const p_a_3_a_2_m = (&(*p_a_3_a_2).m);
+ const constant float4* const p_a_3_a_2_m_1 = (&(*p_a_3_a_2_m)[1]);
+ tint_array<Outer, 4> const l_a = (*p_a);
+ Outer const l_a_3 = (*p_a_3);
+ tint_array<Inner, 4> const l_a_3_a = (*p_a_3_a);
+ Inner const l_a_3_a_2 = (*p_a_3_a_2);
+ float4x4 const l_a_3_a_2_m = (*p_a_3_a_2_m);
+ float4 const l_a_3_a_2_m_1 = (*p_a_3_a_2_m_1);
+ float const l_a_3_a_2_m_1_0 = (*p_a_3_a_2_m_1)[0];
}
-
-Outer = struct @align(16) {
- a:array<Inner, 4> @offset(0)
-}
-
-$B1: { # root
- %a:ptr<uniform, array<Outer, 4>, read> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %p_a:ptr<uniform, array<Outer, 4>, read> = let %a
- %4:ptr<uniform, Outer, read> = access %p_a, 3i
- %p_a_3:ptr<uniform, Outer, read> = let %4
- %6:ptr<uniform, array<Inner, 4>, read> = access %p_a_3, 0u
- %p_a_3_a:ptr<uniform, array<Inner, 4>, read> = let %6
- %8:ptr<uniform, Inner, read> = access %p_a_3_a, 2i
- %p_a_3_a_2:ptr<uniform, Inner, read> = let %8
- %10:ptr<uniform, mat4x4<f32>, read> = access %p_a_3_a_2, 0u
- %p_a_3_a_2_m:ptr<uniform, mat4x4<f32>, read> = let %10
- %12:ptr<uniform, vec4<f32>, read> = access %p_a_3_a_2_m, 1i
- %p_a_3_a_2_m_1:ptr<uniform, vec4<f32>, read> = let %12
- %14:array<Outer, 4> = load %p_a
- %l_a:array<Outer, 4> = let %14
- %16:Outer = load %p_a_3
- %l_a_3:Outer = let %16
- %18:array<Inner, 4> = load %p_a_3_a
- %l_a_3_a:array<Inner, 4> = let %18
- %20:Inner = load %p_a_3_a_2
- %l_a_3_a_2:Inner = let %20
- %22:mat4x4<f32> = load %p_a_3_a_2_m
- %l_a_3_a_2_m:mat4x4<f32> = let %22
- %24:vec4<f32> = load %p_a_3_a_2_m_1
- %l_a_3_a_2_m_1:vec4<f32> = let %24
- %26:f32 = load_vector_element %p_a_3_a_2_m_1, 0i
- %l_a_3_a_2_m_1_0:f32 = let %26
- 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/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.ir.msl
index 9034489..9e538e9 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.ir.msl
@@ -1,67 +1,41 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat4x4<f32> @offset(16)
- after:i32 @offset(128)
-}
+struct S {
+ int before;
+ float4x4 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+};
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
+void a(tint_array<S, 4> a) {
}
-
-%a = func(%a_1:array<S, 4>):void { # %a_1: 'a'
- $B2: {
- ret
- }
+void b(S s) {
}
-%b = func(%s:S):void {
- $B3: {
- ret
- }
+void c(float4x4 m) {
}
-%c = func(%m:mat4x4<f32>):void {
- $B4: {
- ret
- }
+void d(float4 v) {
}
-%d = func(%v:vec4<f32>):void {
- $B5: {
- ret
- }
+void e(float f) {
}
-%e = func(%f:f32):void {
- $B6: {
- ret
- }
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[2]);
+ c((*tint_module_vars.u)[2].m);
+ d((*tint_module_vars.u)[0].m[1].ywxz);
+ e((*tint_module_vars.u)[0].m[1].ywxz[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B7: {
- %13:array<S, 4> = load %u
- %14:void = call %a, %13
- %15:ptr<uniform, S, read> = access %u, 2i
- %16:S = load %15
- %17:void = call %b, %16
- %18:ptr<uniform, mat4x4<f32>, read> = access %u, 2i, 1u
- %19:mat4x4<f32> = load %18
- %20:void = call %c, %19
- %21:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1u, 1i
- %22:vec4<f32> = load %21
- %23:vec4<f32> = swizzle %22, ywxz
- %24:void = call %d, %23
- %25:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1u, 1i
- %26:vec4<f32> = load %25
- %27:vec4<f32> = swizzle %26, ywxz
- %28:f32 = access %27, 0u
- %29:void = call %e, %28
- 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/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.ir.msl
index ead75ea..b5f5b49 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.ir.msl
@@ -1,41 +1,32 @@
-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: S = struct @align(64) {
- before:i32 @offset(0)
- m:mat4x4<f32> @offset(16)
- after:i32 @offset(128)
+struct S {
+ int before;
+ float4x4 m;
+ int after;
+};
+struct tint_module_vars_struct {
+ const constant tint_array<S, 4>* u;
+ thread tint_array<S, 4>* p;
+};
+
+kernel void f(const constant tint_array<S, 4>* u [[buffer(0)]]) {
+ thread tint_array<S, 4> p = {};
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[2];
+ (*tint_module_vars.p)[3].m = (*tint_module_vars.u)[2].m;
+ (*tint_module_vars.p)[1].m[0] = (*tint_module_vars.u)[0].m[1].ywxz;
}
-
-$B1: { # root
- %u:ptr<uniform, array<S, 4>, read> = var @binding_point(0, 0)
- %p:ptr<private, array<S, 4>, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:array<S, 4> = load %u
- store %p, %4
- %5:ptr<private, S, read_write> = access %p, 1i
- %6:ptr<uniform, S, read> = access %u, 2i
- %7:S = load %6
- store %5, %7
- %8:ptr<private, mat4x4<f32>, read_write> = access %p, 3i, 1u
- %9:ptr<uniform, mat4x4<f32>, read> = access %u, 2i, 1u
- %10:mat4x4<f32> = load %9
- store %8, %10
- %11:ptr<private, vec4<f32>, read_write> = access %p, 1i, 1u, 0i
- %12:ptr<uniform, vec4<f32>, read> = access %u, 0i, 1u, 1i
- %13:vec4<f32> = load %12
- %14:vec4<f32> = swizzle %13, ywxz
- store %11, %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/buffer/uniform/std140/unnested/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index a176b1c..aa9167c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,37 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half2x2* m;
+ thread int* counter;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<uniform, mat2x2<f16>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
+kernel void f(const constant half2x2* m [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.m=m, .counter=(&counter)};
+ const constant half2x2* const p_m = tint_module_vars.m;
+ const constant half2* const p_m_i = (&(*p_m)[i(tint_module_vars)]);
+ half2x2 const l_m = (*p_m);
+ half2 const l_m_i = (*p_m_i);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_m:ptr<uniform, mat2x2<f16>, read> = let %m
- %9:i32 = call %i
- %10:ptr<uniform, vec2<f16>, read> = access %p_m, %9
- %p_m_i:ptr<uniform, vec2<f16>, read> = let %10
- %12:mat2x2<f16> = load %p_m
- %l_m:mat2x2<f16> = let %12
- %14:vec2<f16> = load %p_m_i
- %l_m_i:vec2<f16> = let %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/buffer/uniform/std140/unnested/mat2x2_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_fn.wgsl.expected.ir.msl
index a228f13..b752d0b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_fn.wgsl.expected.ir.msl
@@ -1,51 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half2x2* u;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x2<f16>, read> = var @binding_point(0, 0)
+void a(half2x2 m) {
}
-
-%a = func(%m:mat2x2<f16>):void {
- $B2: {
- ret
- }
+void b(half2 v) {
}
-%b = func(%v:vec2<f16>):void {
- $B3: {
- ret
- }
+void c(half f) {
}
-%c = func(%f:f16):void {
- $B4: {
- ret
- }
+kernel void f(const constant half2x2* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[1]);
+ b((*tint_module_vars.u)[1].yx);
+ c((*tint_module_vars.u)[1][0u]);
+ c((*tint_module_vars.u)[1].yx[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B5: {
- %9:mat2x2<f16> = load %u
- %10:void = call %a, %9
- %11:ptr<uniform, vec2<f16>, read> = access %u, 1i
- %12:vec2<f16> = load %11
- %13:void = call %b, %12
- %14:ptr<uniform, vec2<f16>, read> = access %u, 1i
- %15:vec2<f16> = load %14
- %16:vec2<f16> = swizzle %15, yx
- %17:void = call %b, %16
- %18:ptr<uniform, vec2<f16>, read> = access %u, 1i
- %19:f16 = load_vector_element %18, 0u
- %20:void = call %c, %19
- %21:ptr<uniform, vec2<f16>, read> = access %u, 1i
- %22:vec2<f16> = load %21
- %23:vec2<f16> = swizzle %22, yx
- %24:f16 = access %23, 0u
- %25:void = call %c, %24
- 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/buffer/uniform/std140/unnested/mat2x2_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_private.wgsl.expected.ir.msl
index e0a91b8..aa953cf 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_private.wgsl.expected.ir.msl
@@ -1,35 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half2x2* u;
+ thread half2x2* p;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x2<f16>, read> = var @binding_point(0, 0)
- %p:ptr<private, mat2x2<f16>, read_write> = var
+kernel void f(const constant half2x2* u [[buffer(0)]]) {
+ thread half2x2 p = half2x2(0.0h);
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0].yx;
+ (*tint_module_vars.p)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f16> = load %u
- store %p, %4
- %5:ptr<private, vec2<f16>, read_write> = access %p, 1i
- %6:ptr<uniform, vec2<f16>, read> = access %u, 0i
- %7:vec2<f16> = load %6
- store %5, %7
- %8:ptr<private, vec2<f16>, read_write> = access %p, 1i
- %9:ptr<uniform, vec2<f16>, read> = access %u, 0i
- %10:vec2<f16> = load %9
- %11:vec2<f16> = swizzle %10, yx
- store %8, %11
- %12:ptr<private, vec2<f16>, read_write> = access %p, 0i
- %13:ptr<uniform, vec2<f16>, read> = access %u, 1i
- %14:f16 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat2x2_f16/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_storage.wgsl.expected.ir.msl
index 1ccbd29..6d5f8e9 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half2x2* u;
+ device half2x2* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x2<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat2x2<f16>, read_write> = var @binding_point(0, 1)
+kernel void f(const constant half2x2* u [[buffer(0)]], device half2x2* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0].yx;
+ (*tint_module_vars.s)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f16> = load %u
- store %s, %4
- %5:ptr<storage, vec2<f16>, read_write> = access %s, 1i
- %6:ptr<uniform, vec2<f16>, read> = access %u, 0i
- %7:vec2<f16> = load %6
- store %5, %7
- %8:ptr<storage, vec2<f16>, read_write> = access %s, 1i
- %9:ptr<uniform, vec2<f16>, read> = access %u, 0i
- %10:vec2<f16> = load %9
- %11:vec2<f16> = swizzle %10, yx
- store %8, %11
- %12:ptr<storage, vec2<f16>, read_write> = access %s, 0i
- %13:ptr<uniform, vec2<f16>, read> = access %u, 1i
- %14:f16 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 3f757e5..66efc9f 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,37 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float2x2* m;
+ thread int* counter;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<uniform, mat2x2<f32>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
+kernel void f(const constant float2x2* m [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.m=m, .counter=(&counter)};
+ const constant float2x2* const p_m = tint_module_vars.m;
+ const constant float2* const p_m_i = (&(*p_m)[i(tint_module_vars)]);
+ float2x2 const l_m = (*p_m);
+ float2 const l_m_i = (*p_m_i);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_m:ptr<uniform, mat2x2<f32>, read> = let %m
- %9:i32 = call %i
- %10:ptr<uniform, vec2<f32>, read> = access %p_m, %9
- %p_m_i:ptr<uniform, vec2<f32>, read> = let %10
- %12:mat2x2<f32> = load %p_m
- %l_m:mat2x2<f32> = let %12
- %14:vec2<f32> = load %p_m_i
- %l_m_i:vec2<f32> = let %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/buffer/uniform/std140/unnested/mat2x2_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_fn.wgsl.expected.ir.msl
index 4f8ada1..1308d6d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_fn.wgsl.expected.ir.msl
@@ -1,51 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float2x2* u;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x2<f32>, read> = var @binding_point(0, 0)
+void a(float2x2 m) {
}
-
-%a = func(%m:mat2x2<f32>):void {
- $B2: {
- ret
- }
+void b(float2 v) {
}
-%b = func(%v:vec2<f32>):void {
- $B3: {
- ret
- }
+void c(float f) {
}
-%c = func(%f:f32):void {
- $B4: {
- ret
- }
+kernel void f(const constant float2x2* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[1]);
+ b((*tint_module_vars.u)[1].yx);
+ c((*tint_module_vars.u)[1][0u]);
+ c((*tint_module_vars.u)[1].yx[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B5: {
- %9:mat2x2<f32> = load %u
- %10:void = call %a, %9
- %11:ptr<uniform, vec2<f32>, read> = access %u, 1i
- %12:vec2<f32> = load %11
- %13:void = call %b, %12
- %14:ptr<uniform, vec2<f32>, read> = access %u, 1i
- %15:vec2<f32> = load %14
- %16:vec2<f32> = swizzle %15, yx
- %17:void = call %b, %16
- %18:ptr<uniform, vec2<f32>, read> = access %u, 1i
- %19:f32 = load_vector_element %18, 0u
- %20:void = call %c, %19
- %21:ptr<uniform, vec2<f32>, read> = access %u, 1i
- %22:vec2<f32> = load %21
- %23:vec2<f32> = swizzle %22, yx
- %24:f32 = access %23, 0u
- %25:void = call %c, %24
- 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/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.ir.msl
index 11abb4e..679d0e6 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.ir.msl
@@ -1,35 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float2x2* u;
+ thread float2x2* p;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x2<f32>, read> = var @binding_point(0, 0)
- %p:ptr<private, mat2x2<f32>, read_write> = var
+kernel void f(const constant float2x2* u [[buffer(0)]]) {
+ thread float2x2 p = float2x2(0.0f);
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0].yx;
+ (*tint_module_vars.p)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f32> = load %u
- store %p, %4
- %5:ptr<private, vec2<f32>, read_write> = access %p, 1i
- %6:ptr<uniform, vec2<f32>, read> = access %u, 0i
- %7:vec2<f32> = load %6
- store %5, %7
- %8:ptr<private, vec2<f32>, read_write> = access %p, 1i
- %9:ptr<uniform, vec2<f32>, read> = access %u, 0i
- %10:vec2<f32> = load %9
- %11:vec2<f32> = swizzle %10, yx
- store %8, %11
- %12:ptr<private, vec2<f32>, read_write> = access %p, 0i
- %13:ptr<uniform, vec2<f32>, read> = access %u, 1i
- %14:f32 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat2x2_f32/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_storage.wgsl.expected.ir.msl
index 30bc543..43e7c97 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float2x2* u;
+ device float2x2* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x2<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat2x2<f32>, read_write> = var @binding_point(0, 1)
+kernel void f(const constant float2x2* u [[buffer(0)]], device float2x2* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0].yx;
+ (*tint_module_vars.s)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f32> = load %u
- store %s, %4
- %5:ptr<storage, vec2<f32>, read_write> = access %s, 1i
- %6:ptr<uniform, vec2<f32>, read> = access %u, 0i
- %7:vec2<f32> = load %6
- store %5, %7
- %8:ptr<storage, vec2<f32>, read_write> = access %s, 1i
- %9:ptr<uniform, vec2<f32>, read> = access %u, 0i
- %10:vec2<f32> = load %9
- %11:vec2<f32> = swizzle %10, yx
- store %8, %11
- %12:ptr<storage, vec2<f32>, read_write> = access %s, 0i
- %13:ptr<uniform, vec2<f32>, read> = access %u, 1i
- %14:f32 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index b8b2652..417e155 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,37 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half2x3* m;
+ thread int* counter;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<uniform, mat2x3<f16>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
+kernel void f(const constant half2x3* m [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.m=m, .counter=(&counter)};
+ const constant half2x3* const p_m = tint_module_vars.m;
+ const constant half3* const p_m_i = (&(*p_m)[i(tint_module_vars)]);
+ half2x3 const l_m = (*p_m);
+ half3 const l_m_i = (*p_m_i);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_m:ptr<uniform, mat2x3<f16>, read> = let %m
- %9:i32 = call %i
- %10:ptr<uniform, vec3<f16>, read> = access %p_m, %9
- %p_m_i:ptr<uniform, vec3<f16>, read> = let %10
- %12:mat2x3<f16> = load %p_m
- %l_m:mat2x3<f16> = let %12
- %14:vec3<f16> = load %p_m_i
- %l_m_i:vec3<f16> = let %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/buffer/uniform/std140/unnested/mat2x3_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_fn.wgsl.expected.ir.msl
index 2ca0e5a..7bccb4a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_fn.wgsl.expected.ir.msl
@@ -1,51 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half2x3* u;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x3<f16>, read> = var @binding_point(0, 0)
+void a(half2x3 m) {
}
-
-%a = func(%m:mat2x3<f16>):void {
- $B2: {
- ret
- }
+void b(half3 v) {
}
-%b = func(%v:vec3<f16>):void {
- $B3: {
- ret
- }
+void c(half f) {
}
-%c = func(%f:f16):void {
- $B4: {
- ret
- }
+kernel void f(const constant half2x3* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[1]);
+ b((*tint_module_vars.u)[1].zxy);
+ c((*tint_module_vars.u)[1][0u]);
+ c((*tint_module_vars.u)[1].zxy[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B5: {
- %9:mat2x3<f16> = load %u
- %10:void = call %a, %9
- %11:ptr<uniform, vec3<f16>, read> = access %u, 1i
- %12:vec3<f16> = load %11
- %13:void = call %b, %12
- %14:ptr<uniform, vec3<f16>, read> = access %u, 1i
- %15:vec3<f16> = load %14
- %16:vec3<f16> = swizzle %15, zxy
- %17:void = call %b, %16
- %18:ptr<uniform, vec3<f16>, read> = access %u, 1i
- %19:f16 = load_vector_element %18, 0u
- %20:void = call %c, %19
- %21:ptr<uniform, vec3<f16>, read> = access %u, 1i
- %22:vec3<f16> = load %21
- %23:vec3<f16> = swizzle %22, zxy
- %24:f16 = access %23, 0u
- %25:void = call %c, %24
- 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/buffer/uniform/std140/unnested/mat2x3_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_private.wgsl.expected.ir.msl
index 7c3e9bb..37eb19c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_private.wgsl.expected.ir.msl
@@ -1,35 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half2x3* u;
+ thread half2x3* p;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x3<f16>, read> = var @binding_point(0, 0)
- %p:ptr<private, mat2x3<f16>, read_write> = var
+kernel void f(const constant half2x3* u [[buffer(0)]]) {
+ thread half2x3 p = half2x3(0.0h);
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0].zxy;
+ (*tint_module_vars.p)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f16> = load %u
- store %p, %4
- %5:ptr<private, vec3<f16>, read_write> = access %p, 1i
- %6:ptr<uniform, vec3<f16>, read> = access %u, 0i
- %7:vec3<f16> = load %6
- store %5, %7
- %8:ptr<private, vec3<f16>, read_write> = access %p, 1i
- %9:ptr<uniform, vec3<f16>, read> = access %u, 0i
- %10:vec3<f16> = load %9
- %11:vec3<f16> = swizzle %10, zxy
- store %8, %11
- %12:ptr<private, vec3<f16>, read_write> = access %p, 0i
- %13:ptr<uniform, vec3<f16>, read> = access %u, 1i
- %14:f16 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat2x3_f16/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_storage.wgsl.expected.ir.msl
index 05e28bd..b57de7b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_storage.wgsl.expected.ir.msl
@@ -1,46 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half2x3* u;
+ device half2x3* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x3<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat2x3<f16>, read_write> = var @binding_point(0, 1)
+void tint_store_and_preserve_padding(device half2x3* const target, half2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f16> = load %u
- %5:void = call %tint_store_and_preserve_padding, %s, %4
- %7:ptr<storage, vec3<f16>, read_write> = access %s, 1i
- %8:ptr<uniform, vec3<f16>, read> = access %u, 0i
- %9:vec3<f16> = load %8
- store %7, %9
- %10:ptr<storage, vec3<f16>, read_write> = access %s, 1i
- %11:ptr<uniform, vec3<f16>, read> = access %u, 0i
- %12:vec3<f16> = load %11
- %13:vec3<f16> = swizzle %12, zxy
- store %10, %13
- %14:ptr<storage, vec3<f16>, read_write> = access %s, 0i
- %15:ptr<uniform, vec3<f16>, read> = access %u, 1i
- %16:f16 = load_vector_element %15, 0i
- store_vector_element %14, 1i, %16
- ret
- }
+kernel void f(const constant half2x3* u [[buffer(0)]], device half2x3* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ tint_store_and_preserve_padding(tint_module_vars.s, (*tint_module_vars.u));
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0].zxy;
+ (*tint_module_vars.s)[0][1] = (*tint_module_vars.u)[1][0];
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f16>, read_write>, %value_param:mat2x3<f16>):void {
- $B3: {
- %19:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %20:vec3<f16> = access %value_param, 0u
- store %19, %20
- %21:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %22:vec3<f16> = access %value_param, 1u
- store %21, %22
- 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/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index b132429..af9f52c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,37 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float2x3* m;
+ thread int* counter;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<uniform, mat2x3<f32>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
+kernel void f(const constant float2x3* m [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.m=m, .counter=(&counter)};
+ const constant float2x3* const p_m = tint_module_vars.m;
+ const constant float3* const p_m_i = (&(*p_m)[i(tint_module_vars)]);
+ float2x3 const l_m = (*p_m);
+ float3 const l_m_i = (*p_m_i);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_m:ptr<uniform, mat2x3<f32>, read> = let %m
- %9:i32 = call %i
- %10:ptr<uniform, vec3<f32>, read> = access %p_m, %9
- %p_m_i:ptr<uniform, vec3<f32>, read> = let %10
- %12:mat2x3<f32> = load %p_m
- %l_m:mat2x3<f32> = let %12
- %14:vec3<f32> = load %p_m_i
- %l_m_i:vec3<f32> = let %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/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.ir.msl
index c596a51..477f30b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.ir.msl
@@ -1,51 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float2x3* u;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x3<f32>, read> = var @binding_point(0, 0)
+void a(float2x3 m) {
}
-
-%a = func(%m:mat2x3<f32>):void {
- $B2: {
- ret
- }
+void b(float3 v) {
}
-%b = func(%v:vec3<f32>):void {
- $B3: {
- ret
- }
+void c(float f) {
}
-%c = func(%f:f32):void {
- $B4: {
- ret
- }
+kernel void f(const constant float2x3* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[1]);
+ b((*tint_module_vars.u)[1].zxy);
+ c((*tint_module_vars.u)[1][0u]);
+ c((*tint_module_vars.u)[1].zxy[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B5: {
- %9:mat2x3<f32> = load %u
- %10:void = call %a, %9
- %11:ptr<uniform, vec3<f32>, read> = access %u, 1i
- %12:vec3<f32> = load %11
- %13:void = call %b, %12
- %14:ptr<uniform, vec3<f32>, read> = access %u, 1i
- %15:vec3<f32> = load %14
- %16:vec3<f32> = swizzle %15, zxy
- %17:void = call %b, %16
- %18:ptr<uniform, vec3<f32>, read> = access %u, 1i
- %19:f32 = load_vector_element %18, 0u
- %20:void = call %c, %19
- %21:ptr<uniform, vec3<f32>, read> = access %u, 1i
- %22:vec3<f32> = load %21
- %23:vec3<f32> = swizzle %22, zxy
- %24:f32 = access %23, 0u
- %25:void = call %c, %24
- 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/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.ir.msl
index 0fa40e0..ad75be5 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.ir.msl
@@ -1,35 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float2x3* u;
+ thread float2x3* p;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x3<f32>, read> = var @binding_point(0, 0)
- %p:ptr<private, mat2x3<f32>, read_write> = var
+kernel void f(const constant float2x3* u [[buffer(0)]]) {
+ thread float2x3 p = float2x3(0.0f);
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0].zxy;
+ (*tint_module_vars.p)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f32> = load %u
- store %p, %4
- %5:ptr<private, vec3<f32>, read_write> = access %p, 1i
- %6:ptr<uniform, vec3<f32>, read> = access %u, 0i
- %7:vec3<f32> = load %6
- store %5, %7
- %8:ptr<private, vec3<f32>, read_write> = access %p, 1i
- %9:ptr<uniform, vec3<f32>, read> = access %u, 0i
- %10:vec3<f32> = load %9
- %11:vec3<f32> = swizzle %10, zxy
- store %8, %11
- %12:ptr<private, vec3<f32>, read_write> = access %p, 0i
- %13:ptr<uniform, vec3<f32>, read> = access %u, 1i
- %14:f32 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.msl
index 3f43331..e6a439e 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.msl
@@ -1,46 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float2x3* u;
+ device float2x3* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x3<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat2x3<f32>, read_write> = var @binding_point(0, 1)
+void tint_store_and_preserve_padding(device float2x3* const target, float2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f32> = load %u
- %5:void = call %tint_store_and_preserve_padding, %s, %4
- %7:ptr<storage, vec3<f32>, read_write> = access %s, 1i
- %8:ptr<uniform, vec3<f32>, read> = access %u, 0i
- %9:vec3<f32> = load %8
- store %7, %9
- %10:ptr<storage, vec3<f32>, read_write> = access %s, 1i
- %11:ptr<uniform, vec3<f32>, read> = access %u, 0i
- %12:vec3<f32> = load %11
- %13:vec3<f32> = swizzle %12, zxy
- store %10, %13
- %14:ptr<storage, vec3<f32>, read_write> = access %s, 0i
- %15:ptr<uniform, vec3<f32>, read> = access %u, 1i
- %16:f32 = load_vector_element %15, 0i
- store_vector_element %14, 1i, %16
- ret
- }
+kernel void f(const constant float2x3* u [[buffer(0)]], device float2x3* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ tint_store_and_preserve_padding(tint_module_vars.s, (*tint_module_vars.u));
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0].zxy;
+ (*tint_module_vars.s)[0][1] = (*tint_module_vars.u)[1][0];
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f32>, read_write>, %value_param:mat2x3<f32>):void {
- $B3: {
- %19:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %20:vec3<f32> = access %value_param, 0u
- store %19, %20
- %21:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %22:vec3<f32> = access %value_param, 1u
- store %21, %22
- 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/buffer/uniform/std140/unnested/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 6d5e6ec..b357225 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,37 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half2x4* m;
+ thread int* counter;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<uniform, mat2x4<f16>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
+kernel void f(const constant half2x4* m [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.m=m, .counter=(&counter)};
+ const constant half2x4* const p_m = tint_module_vars.m;
+ const constant half4* const p_m_i = (&(*p_m)[i(tint_module_vars)]);
+ half2x4 const l_m = (*p_m);
+ half4 const l_m_i = (*p_m_i);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_m:ptr<uniform, mat2x4<f16>, read> = let %m
- %9:i32 = call %i
- %10:ptr<uniform, vec4<f16>, read> = access %p_m, %9
- %p_m_i:ptr<uniform, vec4<f16>, read> = let %10
- %12:mat2x4<f16> = load %p_m
- %l_m:mat2x4<f16> = let %12
- %14:vec4<f16> = load %p_m_i
- %l_m_i:vec4<f16> = let %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/buffer/uniform/std140/unnested/mat2x4_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_fn.wgsl.expected.ir.msl
index 1223365..5ebe57f 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_fn.wgsl.expected.ir.msl
@@ -1,51 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half2x4* u;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x4<f16>, read> = var @binding_point(0, 0)
+void a(half2x4 m) {
}
-
-%a = func(%m:mat2x4<f16>):void {
- $B2: {
- ret
- }
+void b(half4 v) {
}
-%b = func(%v:vec4<f16>):void {
- $B3: {
- ret
- }
+void c(half f) {
}
-%c = func(%f:f16):void {
- $B4: {
- ret
- }
+kernel void f(const constant half2x4* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[1]);
+ b((*tint_module_vars.u)[1].ywxz);
+ c((*tint_module_vars.u)[1][0u]);
+ c((*tint_module_vars.u)[1].ywxz[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B5: {
- %9:mat2x4<f16> = load %u
- %10:void = call %a, %9
- %11:ptr<uniform, vec4<f16>, read> = access %u, 1i
- %12:vec4<f16> = load %11
- %13:void = call %b, %12
- %14:ptr<uniform, vec4<f16>, read> = access %u, 1i
- %15:vec4<f16> = load %14
- %16:vec4<f16> = swizzle %15, ywxz
- %17:void = call %b, %16
- %18:ptr<uniform, vec4<f16>, read> = access %u, 1i
- %19:f16 = load_vector_element %18, 0u
- %20:void = call %c, %19
- %21:ptr<uniform, vec4<f16>, read> = access %u, 1i
- %22:vec4<f16> = load %21
- %23:vec4<f16> = swizzle %22, ywxz
- %24:f16 = access %23, 0u
- %25:void = call %c, %24
- 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/buffer/uniform/std140/unnested/mat2x4_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_private.wgsl.expected.ir.msl
index 242ee99..f76ad5b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_private.wgsl.expected.ir.msl
@@ -1,35 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half2x4* u;
+ thread half2x4* p;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x4<f16>, read> = var @binding_point(0, 0)
- %p:ptr<private, mat2x4<f16>, read_write> = var
+kernel void f(const constant half2x4* u [[buffer(0)]]) {
+ thread half2x4 p = half2x4(0.0h);
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0].ywxz;
+ (*tint_module_vars.p)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f16> = load %u
- store %p, %4
- %5:ptr<private, vec4<f16>, read_write> = access %p, 1i
- %6:ptr<uniform, vec4<f16>, read> = access %u, 0i
- %7:vec4<f16> = load %6
- store %5, %7
- %8:ptr<private, vec4<f16>, read_write> = access %p, 1i
- %9:ptr<uniform, vec4<f16>, read> = access %u, 0i
- %10:vec4<f16> = load %9
- %11:vec4<f16> = swizzle %10, ywxz
- store %8, %11
- %12:ptr<private, vec4<f16>, read_write> = access %p, 0i
- %13:ptr<uniform, vec4<f16>, read> = access %u, 1i
- %14:f16 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat2x4_f16/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_storage.wgsl.expected.ir.msl
index c10575a..12374ed 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half2x4* u;
+ device half2x4* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x4<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat2x4<f16>, read_write> = var @binding_point(0, 1)
+kernel void f(const constant half2x4* u [[buffer(0)]], device half2x4* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0].ywxz;
+ (*tint_module_vars.s)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f16> = load %u
- store %s, %4
- %5:ptr<storage, vec4<f16>, read_write> = access %s, 1i
- %6:ptr<uniform, vec4<f16>, read> = access %u, 0i
- %7:vec4<f16> = load %6
- store %5, %7
- %8:ptr<storage, vec4<f16>, read_write> = access %s, 1i
- %9:ptr<uniform, vec4<f16>, read> = access %u, 0i
- %10:vec4<f16> = load %9
- %11:vec4<f16> = swizzle %10, ywxz
- store %8, %11
- %12:ptr<storage, vec4<f16>, read_write> = access %s, 0i
- %13:ptr<uniform, vec4<f16>, read> = access %u, 1i
- %14:f16 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index d37a124..135950a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,37 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float2x4* m;
+ thread int* counter;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<uniform, mat2x4<f32>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
+kernel void f(const constant float2x4* m [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.m=m, .counter=(&counter)};
+ const constant float2x4* const p_m = tint_module_vars.m;
+ const constant float4* const p_m_i = (&(*p_m)[i(tint_module_vars)]);
+ float2x4 const l_m = (*p_m);
+ float4 const l_m_i = (*p_m_i);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_m:ptr<uniform, mat2x4<f32>, read> = let %m
- %9:i32 = call %i
- %10:ptr<uniform, vec4<f32>, read> = access %p_m, %9
- %p_m_i:ptr<uniform, vec4<f32>, read> = let %10
- %12:mat2x4<f32> = load %p_m
- %l_m:mat2x4<f32> = let %12
- %14:vec4<f32> = load %p_m_i
- %l_m_i:vec4<f32> = let %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/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.ir.msl
index c85b6fb..2c00f86 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.ir.msl
@@ -1,51 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float2x4* u;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x4<f32>, read> = var @binding_point(0, 0)
+void a(float2x4 m) {
}
-
-%a = func(%m:mat2x4<f32>):void {
- $B2: {
- ret
- }
+void b(float4 v) {
}
-%b = func(%v:vec4<f32>):void {
- $B3: {
- ret
- }
+void c(float f) {
}
-%c = func(%f:f32):void {
- $B4: {
- ret
- }
+kernel void f(const constant float2x4* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[1]);
+ b((*tint_module_vars.u)[1].ywxz);
+ c((*tint_module_vars.u)[1][0u]);
+ c((*tint_module_vars.u)[1].ywxz[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B5: {
- %9:mat2x4<f32> = load %u
- %10:void = call %a, %9
- %11:ptr<uniform, vec4<f32>, read> = access %u, 1i
- %12:vec4<f32> = load %11
- %13:void = call %b, %12
- %14:ptr<uniform, vec4<f32>, read> = access %u, 1i
- %15:vec4<f32> = load %14
- %16:vec4<f32> = swizzle %15, ywxz
- %17:void = call %b, %16
- %18:ptr<uniform, vec4<f32>, read> = access %u, 1i
- %19:f32 = load_vector_element %18, 0u
- %20:void = call %c, %19
- %21:ptr<uniform, vec4<f32>, read> = access %u, 1i
- %22:vec4<f32> = load %21
- %23:vec4<f32> = swizzle %22, ywxz
- %24:f32 = access %23, 0u
- %25:void = call %c, %24
- 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/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.ir.msl
index a435173..4ea2b1c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.ir.msl
@@ -1,35 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float2x4* u;
+ thread float2x4* p;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x4<f32>, read> = var @binding_point(0, 0)
- %p:ptr<private, mat2x4<f32>, read_write> = var
+kernel void f(const constant float2x4* u [[buffer(0)]]) {
+ thread float2x4 p = float2x4(0.0f);
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0].ywxz;
+ (*tint_module_vars.p)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f32> = load %u
- store %p, %4
- %5:ptr<private, vec4<f32>, read_write> = access %p, 1i
- %6:ptr<uniform, vec4<f32>, read> = access %u, 0i
- %7:vec4<f32> = load %6
- store %5, %7
- %8:ptr<private, vec4<f32>, read_write> = access %p, 1i
- %9:ptr<uniform, vec4<f32>, read> = access %u, 0i
- %10:vec4<f32> = load %9
- %11:vec4<f32> = swizzle %10, ywxz
- store %8, %11
- %12:ptr<private, vec4<f32>, read_write> = access %p, 0i
- %13:ptr<uniform, vec4<f32>, read> = access %u, 1i
- %14:f32 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.ir.msl
index 776849d..513bbdb 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float2x4* u;
+ device float2x4* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x4<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat2x4<f32>, read_write> = var @binding_point(0, 1)
+kernel void f(const constant float2x4* u [[buffer(0)]], device float2x4* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0].ywxz;
+ (*tint_module_vars.s)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f32> = load %u
- store %s, %4
- %5:ptr<storage, vec4<f32>, read_write> = access %s, 1i
- %6:ptr<uniform, vec4<f32>, read> = access %u, 0i
- %7:vec4<f32> = load %6
- store %5, %7
- %8:ptr<storage, vec4<f32>, read_write> = access %s, 1i
- %9:ptr<uniform, vec4<f32>, read> = access %u, 0i
- %10:vec4<f32> = load %9
- %11:vec4<f32> = swizzle %10, ywxz
- store %8, %11
- %12:ptr<storage, vec4<f32>, read_write> = access %s, 0i
- %13:ptr<uniform, vec4<f32>, read> = access %u, 1i
- %14:f32 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index b9cb731..1299144 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,37 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half3x2* m;
+ thread int* counter;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<uniform, mat3x2<f16>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
+kernel void f(const constant half3x2* m [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.m=m, .counter=(&counter)};
+ const constant half3x2* const p_m = tint_module_vars.m;
+ const constant half2* const p_m_i = (&(*p_m)[i(tint_module_vars)]);
+ half3x2 const l_m = (*p_m);
+ half2 const l_m_i = (*p_m_i);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_m:ptr<uniform, mat3x2<f16>, read> = let %m
- %9:i32 = call %i
- %10:ptr<uniform, vec2<f16>, read> = access %p_m, %9
- %p_m_i:ptr<uniform, vec2<f16>, read> = let %10
- %12:mat3x2<f16> = load %p_m
- %l_m:mat3x2<f16> = let %12
- %14:vec2<f16> = load %p_m_i
- %l_m_i:vec2<f16> = let %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/buffer/uniform/std140/unnested/mat3x2_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_fn.wgsl.expected.ir.msl
index 51d7900..a8440f0 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_fn.wgsl.expected.ir.msl
@@ -1,51 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half3x2* u;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x2<f16>, read> = var @binding_point(0, 0)
+void a(half3x2 m) {
}
-
-%a = func(%m:mat3x2<f16>):void {
- $B2: {
- ret
- }
+void b(half2 v) {
}
-%b = func(%v:vec2<f16>):void {
- $B3: {
- ret
- }
+void c(half f) {
}
-%c = func(%f:f16):void {
- $B4: {
- ret
- }
+kernel void f(const constant half3x2* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[1]);
+ b((*tint_module_vars.u)[1].yx);
+ c((*tint_module_vars.u)[1][0u]);
+ c((*tint_module_vars.u)[1].yx[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B5: {
- %9:mat3x2<f16> = load %u
- %10:void = call %a, %9
- %11:ptr<uniform, vec2<f16>, read> = access %u, 1i
- %12:vec2<f16> = load %11
- %13:void = call %b, %12
- %14:ptr<uniform, vec2<f16>, read> = access %u, 1i
- %15:vec2<f16> = load %14
- %16:vec2<f16> = swizzle %15, yx
- %17:void = call %b, %16
- %18:ptr<uniform, vec2<f16>, read> = access %u, 1i
- %19:f16 = load_vector_element %18, 0u
- %20:void = call %c, %19
- %21:ptr<uniform, vec2<f16>, read> = access %u, 1i
- %22:vec2<f16> = load %21
- %23:vec2<f16> = swizzle %22, yx
- %24:f16 = access %23, 0u
- %25:void = call %c, %24
- 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/buffer/uniform/std140/unnested/mat3x2_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_private.wgsl.expected.ir.msl
index a0c12b4..a319e46 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_private.wgsl.expected.ir.msl
@@ -1,35 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half3x2* u;
+ thread half3x2* p;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x2<f16>, read> = var @binding_point(0, 0)
- %p:ptr<private, mat3x2<f16>, read_write> = var
+kernel void f(const constant half3x2* u [[buffer(0)]]) {
+ thread half3x2 p = half3x2(0.0h);
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0].yx;
+ (*tint_module_vars.p)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f16> = load %u
- store %p, %4
- %5:ptr<private, vec2<f16>, read_write> = access %p, 1i
- %6:ptr<uniform, vec2<f16>, read> = access %u, 0i
- %7:vec2<f16> = load %6
- store %5, %7
- %8:ptr<private, vec2<f16>, read_write> = access %p, 1i
- %9:ptr<uniform, vec2<f16>, read> = access %u, 0i
- %10:vec2<f16> = load %9
- %11:vec2<f16> = swizzle %10, yx
- store %8, %11
- %12:ptr<private, vec2<f16>, read_write> = access %p, 0i
- %13:ptr<uniform, vec2<f16>, read> = access %u, 1i
- %14:f16 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat3x2_f16/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_storage.wgsl.expected.ir.msl
index 39104de..950172d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half3x2* u;
+ device half3x2* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x2<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat3x2<f16>, read_write> = var @binding_point(0, 1)
+kernel void f(const constant half3x2* u [[buffer(0)]], device half3x2* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0].yx;
+ (*tint_module_vars.s)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f16> = load %u
- store %s, %4
- %5:ptr<storage, vec2<f16>, read_write> = access %s, 1i
- %6:ptr<uniform, vec2<f16>, read> = access %u, 0i
- %7:vec2<f16> = load %6
- store %5, %7
- %8:ptr<storage, vec2<f16>, read_write> = access %s, 1i
- %9:ptr<uniform, vec2<f16>, read> = access %u, 0i
- %10:vec2<f16> = load %9
- %11:vec2<f16> = swizzle %10, yx
- store %8, %11
- %12:ptr<storage, vec2<f16>, read_write> = access %s, 0i
- %13:ptr<uniform, vec2<f16>, read> = access %u, 1i
- %14:f16 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index a785ca7..a35f6c1 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,37 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float3x2* m;
+ thread int* counter;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<uniform, mat3x2<f32>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
+kernel void f(const constant float3x2* m [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.m=m, .counter=(&counter)};
+ const constant float3x2* const p_m = tint_module_vars.m;
+ const constant float2* const p_m_i = (&(*p_m)[i(tint_module_vars)]);
+ float3x2 const l_m = (*p_m);
+ float2 const l_m_i = (*p_m_i);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_m:ptr<uniform, mat3x2<f32>, read> = let %m
- %9:i32 = call %i
- %10:ptr<uniform, vec2<f32>, read> = access %p_m, %9
- %p_m_i:ptr<uniform, vec2<f32>, read> = let %10
- %12:mat3x2<f32> = load %p_m
- %l_m:mat3x2<f32> = let %12
- %14:vec2<f32> = load %p_m_i
- %l_m_i:vec2<f32> = let %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/buffer/uniform/std140/unnested/mat3x2_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_fn.wgsl.expected.ir.msl
index 33a39ee..4a911c4 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_fn.wgsl.expected.ir.msl
@@ -1,51 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float3x2* u;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x2<f32>, read> = var @binding_point(0, 0)
+void a(float3x2 m) {
}
-
-%a = func(%m:mat3x2<f32>):void {
- $B2: {
- ret
- }
+void b(float2 v) {
}
-%b = func(%v:vec2<f32>):void {
- $B3: {
- ret
- }
+void c(float f) {
}
-%c = func(%f:f32):void {
- $B4: {
- ret
- }
+kernel void f(const constant float3x2* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[1]);
+ b((*tint_module_vars.u)[1].yx);
+ c((*tint_module_vars.u)[1][0u]);
+ c((*tint_module_vars.u)[1].yx[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B5: {
- %9:mat3x2<f32> = load %u
- %10:void = call %a, %9
- %11:ptr<uniform, vec2<f32>, read> = access %u, 1i
- %12:vec2<f32> = load %11
- %13:void = call %b, %12
- %14:ptr<uniform, vec2<f32>, read> = access %u, 1i
- %15:vec2<f32> = load %14
- %16:vec2<f32> = swizzle %15, yx
- %17:void = call %b, %16
- %18:ptr<uniform, vec2<f32>, read> = access %u, 1i
- %19:f32 = load_vector_element %18, 0u
- %20:void = call %c, %19
- %21:ptr<uniform, vec2<f32>, read> = access %u, 1i
- %22:vec2<f32> = load %21
- %23:vec2<f32> = swizzle %22, yx
- %24:f32 = access %23, 0u
- %25:void = call %c, %24
- 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/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.ir.msl
index f618d23..16c0a92 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.ir.msl
@@ -1,35 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float3x2* u;
+ thread float3x2* p;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x2<f32>, read> = var @binding_point(0, 0)
- %p:ptr<private, mat3x2<f32>, read_write> = var
+kernel void f(const constant float3x2* u [[buffer(0)]]) {
+ thread float3x2 p = float3x2(0.0f);
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0].yx;
+ (*tint_module_vars.p)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f32> = load %u
- store %p, %4
- %5:ptr<private, vec2<f32>, read_write> = access %p, 1i
- %6:ptr<uniform, vec2<f32>, read> = access %u, 0i
- %7:vec2<f32> = load %6
- store %5, %7
- %8:ptr<private, vec2<f32>, read_write> = access %p, 1i
- %9:ptr<uniform, vec2<f32>, read> = access %u, 0i
- %10:vec2<f32> = load %9
- %11:vec2<f32> = swizzle %10, yx
- store %8, %11
- %12:ptr<private, vec2<f32>, read_write> = access %p, 0i
- %13:ptr<uniform, vec2<f32>, read> = access %u, 1i
- %14:f32 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat3x2_f32/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_storage.wgsl.expected.ir.msl
index a8519a7..99f310b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float3x2* u;
+ device float3x2* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x2<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat3x2<f32>, read_write> = var @binding_point(0, 1)
+kernel void f(const constant float3x2* u [[buffer(0)]], device float3x2* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0].yx;
+ (*tint_module_vars.s)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f32> = load %u
- store %s, %4
- %5:ptr<storage, vec2<f32>, read_write> = access %s, 1i
- %6:ptr<uniform, vec2<f32>, read> = access %u, 0i
- %7:vec2<f32> = load %6
- store %5, %7
- %8:ptr<storage, vec2<f32>, read_write> = access %s, 1i
- %9:ptr<uniform, vec2<f32>, read> = access %u, 0i
- %10:vec2<f32> = load %9
- %11:vec2<f32> = swizzle %10, yx
- store %8, %11
- %12:ptr<storage, vec2<f32>, read_write> = access %s, 0i
- %13:ptr<uniform, vec2<f32>, read> = access %u, 1i
- %14:f32 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 723ff77..7563f3c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,37 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half3x3* m;
+ thread int* counter;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<uniform, mat3x3<f16>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
+kernel void f(const constant half3x3* m [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.m=m, .counter=(&counter)};
+ const constant half3x3* const p_m = tint_module_vars.m;
+ const constant half3* const p_m_i = (&(*p_m)[i(tint_module_vars)]);
+ half3x3 const l_m = (*p_m);
+ half3 const l_m_i = (*p_m_i);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_m:ptr<uniform, mat3x3<f16>, read> = let %m
- %9:i32 = call %i
- %10:ptr<uniform, vec3<f16>, read> = access %p_m, %9
- %p_m_i:ptr<uniform, vec3<f16>, read> = let %10
- %12:mat3x3<f16> = load %p_m
- %l_m:mat3x3<f16> = let %12
- %14:vec3<f16> = load %p_m_i
- %l_m_i:vec3<f16> = let %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/buffer/uniform/std140/unnested/mat3x3_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_fn.wgsl.expected.ir.msl
index a19f3fc..42c5649 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_fn.wgsl.expected.ir.msl
@@ -1,51 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half3x3* u;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x3<f16>, read> = var @binding_point(0, 0)
+void a(half3x3 m) {
}
-
-%a = func(%m:mat3x3<f16>):void {
- $B2: {
- ret
- }
+void b(half3 v) {
}
-%b = func(%v:vec3<f16>):void {
- $B3: {
- ret
- }
+void c(half f) {
}
-%c = func(%f:f16):void {
- $B4: {
- ret
- }
+kernel void f(const constant half3x3* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[1]);
+ b((*tint_module_vars.u)[1].zxy);
+ c((*tint_module_vars.u)[1][0u]);
+ c((*tint_module_vars.u)[1].zxy[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B5: {
- %9:mat3x3<f16> = load %u
- %10:void = call %a, %9
- %11:ptr<uniform, vec3<f16>, read> = access %u, 1i
- %12:vec3<f16> = load %11
- %13:void = call %b, %12
- %14:ptr<uniform, vec3<f16>, read> = access %u, 1i
- %15:vec3<f16> = load %14
- %16:vec3<f16> = swizzle %15, zxy
- %17:void = call %b, %16
- %18:ptr<uniform, vec3<f16>, read> = access %u, 1i
- %19:f16 = load_vector_element %18, 0u
- %20:void = call %c, %19
- %21:ptr<uniform, vec3<f16>, read> = access %u, 1i
- %22:vec3<f16> = load %21
- %23:vec3<f16> = swizzle %22, zxy
- %24:f16 = access %23, 0u
- %25:void = call %c, %24
- 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/buffer/uniform/std140/unnested/mat3x3_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_private.wgsl.expected.ir.msl
index a6e0aca..ac95c53 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_private.wgsl.expected.ir.msl
@@ -1,35 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half3x3* u;
+ thread half3x3* p;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x3<f16>, read> = var @binding_point(0, 0)
- %p:ptr<private, mat3x3<f16>, read_write> = var
+kernel void f(const constant half3x3* u [[buffer(0)]]) {
+ thread half3x3 p = half3x3(0.0h);
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0].zxy;
+ (*tint_module_vars.p)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f16> = load %u
- store %p, %4
- %5:ptr<private, vec3<f16>, read_write> = access %p, 1i
- %6:ptr<uniform, vec3<f16>, read> = access %u, 0i
- %7:vec3<f16> = load %6
- store %5, %7
- %8:ptr<private, vec3<f16>, read_write> = access %p, 1i
- %9:ptr<uniform, vec3<f16>, read> = access %u, 0i
- %10:vec3<f16> = load %9
- %11:vec3<f16> = swizzle %10, zxy
- store %8, %11
- %12:ptr<private, vec3<f16>, read_write> = access %p, 0i
- %13:ptr<uniform, vec3<f16>, read> = access %u, 1i
- %14:f16 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat3x3_f16/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_storage.wgsl.expected.ir.msl
index b8d1318..920a8a0 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_storage.wgsl.expected.ir.msl
@@ -1,49 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half3x3* u;
+ device half3x3* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x3<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat3x3<f16>, read_write> = var @binding_point(0, 1)
+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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f16> = load %u
- %5:void = call %tint_store_and_preserve_padding, %s, %4
- %7:ptr<storage, vec3<f16>, read_write> = access %s, 1i
- %8:ptr<uniform, vec3<f16>, read> = access %u, 0i
- %9:vec3<f16> = load %8
- store %7, %9
- %10:ptr<storage, vec3<f16>, read_write> = access %s, 1i
- %11:ptr<uniform, vec3<f16>, read> = access %u, 0i
- %12:vec3<f16> = load %11
- %13:vec3<f16> = swizzle %12, zxy
- store %10, %13
- %14:ptr<storage, vec3<f16>, read_write> = access %s, 0i
- %15:ptr<uniform, vec3<f16>, read> = access %u, 1i
- %16:f16 = load_vector_element %15, 0i
- store_vector_element %14, 1i, %16
- ret
- }
+kernel void f(const constant half3x3* u [[buffer(0)]], device half3x3* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ tint_store_and_preserve_padding(tint_module_vars.s, (*tint_module_vars.u));
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0].zxy;
+ (*tint_module_vars.s)[0][1] = (*tint_module_vars.u)[1][0];
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f16>, read_write>, %value_param:mat3x3<f16>):void {
- $B3: {
- %19:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %20:vec3<f16> = access %value_param, 0u
- store %19, %20
- %21:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %22:vec3<f16> = access %value_param, 1u
- store %21, %22
- %23:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %24:vec3<f16> = access %value_param, 2u
- store %23, %24
- 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/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index df56e12..cada3d6 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,37 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float3x3* m;
+ thread int* counter;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<uniform, mat3x3<f32>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
+kernel void f(const constant float3x3* m [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.m=m, .counter=(&counter)};
+ const constant float3x3* const p_m = tint_module_vars.m;
+ const constant float3* const p_m_i = (&(*p_m)[i(tint_module_vars)]);
+ float3x3 const l_m = (*p_m);
+ float3 const l_m_i = (*p_m_i);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_m:ptr<uniform, mat3x3<f32>, read> = let %m
- %9:i32 = call %i
- %10:ptr<uniform, vec3<f32>, read> = access %p_m, %9
- %p_m_i:ptr<uniform, vec3<f32>, read> = let %10
- %12:mat3x3<f32> = load %p_m
- %l_m:mat3x3<f32> = let %12
- %14:vec3<f32> = load %p_m_i
- %l_m_i:vec3<f32> = let %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/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.ir.msl
index 4d57392..a605cc2 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.ir.msl
@@ -1,51 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float3x3* u;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x3<f32>, read> = var @binding_point(0, 0)
+void a(float3x3 m) {
}
-
-%a = func(%m:mat3x3<f32>):void {
- $B2: {
- ret
- }
+void b(float3 v) {
}
-%b = func(%v:vec3<f32>):void {
- $B3: {
- ret
- }
+void c(float f) {
}
-%c = func(%f:f32):void {
- $B4: {
- ret
- }
+kernel void f(const constant float3x3* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[1]);
+ b((*tint_module_vars.u)[1].zxy);
+ c((*tint_module_vars.u)[1][0u]);
+ c((*tint_module_vars.u)[1].zxy[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B5: {
- %9:mat3x3<f32> = load %u
- %10:void = call %a, %9
- %11:ptr<uniform, vec3<f32>, read> = access %u, 1i
- %12:vec3<f32> = load %11
- %13:void = call %b, %12
- %14:ptr<uniform, vec3<f32>, read> = access %u, 1i
- %15:vec3<f32> = load %14
- %16:vec3<f32> = swizzle %15, zxy
- %17:void = call %b, %16
- %18:ptr<uniform, vec3<f32>, read> = access %u, 1i
- %19:f32 = load_vector_element %18, 0u
- %20:void = call %c, %19
- %21:ptr<uniform, vec3<f32>, read> = access %u, 1i
- %22:vec3<f32> = load %21
- %23:vec3<f32> = swizzle %22, zxy
- %24:f32 = access %23, 0u
- %25:void = call %c, %24
- 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/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.ir.msl
index 0b3147b..55dad8a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.ir.msl
@@ -1,35 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float3x3* u;
+ thread float3x3* p;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x3<f32>, read> = var @binding_point(0, 0)
- %p:ptr<private, mat3x3<f32>, read_write> = var
+kernel void f(const constant float3x3* u [[buffer(0)]]) {
+ thread float3x3 p = float3x3(0.0f);
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0].zxy;
+ (*tint_module_vars.p)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f32> = load %u
- store %p, %4
- %5:ptr<private, vec3<f32>, read_write> = access %p, 1i
- %6:ptr<uniform, vec3<f32>, read> = access %u, 0i
- %7:vec3<f32> = load %6
- store %5, %7
- %8:ptr<private, vec3<f32>, read_write> = access %p, 1i
- %9:ptr<uniform, vec3<f32>, read> = access %u, 0i
- %10:vec3<f32> = load %9
- %11:vec3<f32> = swizzle %10, zxy
- store %8, %11
- %12:ptr<private, vec3<f32>, read_write> = access %p, 0i
- %13:ptr<uniform, vec3<f32>, read> = access %u, 1i
- %14:f32 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.msl
index 1e75702..a68a88b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.msl
@@ -1,49 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float3x3* u;
+ device float3x3* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x3<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat3x3<f32>, read_write> = var @binding_point(0, 1)
+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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f32> = load %u
- %5:void = call %tint_store_and_preserve_padding, %s, %4
- %7:ptr<storage, vec3<f32>, read_write> = access %s, 1i
- %8:ptr<uniform, vec3<f32>, read> = access %u, 0i
- %9:vec3<f32> = load %8
- store %7, %9
- %10:ptr<storage, vec3<f32>, read_write> = access %s, 1i
- %11:ptr<uniform, vec3<f32>, read> = access %u, 0i
- %12:vec3<f32> = load %11
- %13:vec3<f32> = swizzle %12, zxy
- store %10, %13
- %14:ptr<storage, vec3<f32>, read_write> = access %s, 0i
- %15:ptr<uniform, vec3<f32>, read> = access %u, 1i
- %16:f32 = load_vector_element %15, 0i
- store_vector_element %14, 1i, %16
- ret
- }
+kernel void f(const constant float3x3* u [[buffer(0)]], device float3x3* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ tint_store_and_preserve_padding(tint_module_vars.s, (*tint_module_vars.u));
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0].zxy;
+ (*tint_module_vars.s)[0][1] = (*tint_module_vars.u)[1][0];
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f32>, read_write>, %value_param:mat3x3<f32>):void {
- $B3: {
- %19:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %20:vec3<f32> = access %value_param, 0u
- store %19, %20
- %21:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %22:vec3<f32> = access %value_param, 1u
- store %21, %22
- %23:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %24:vec3<f32> = access %value_param, 2u
- store %23, %24
- 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/buffer/uniform/std140/unnested/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 98f0969..bdeee5b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,37 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half3x4* m;
+ thread int* counter;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<uniform, mat3x4<f16>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
+kernel void f(const constant half3x4* m [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.m=m, .counter=(&counter)};
+ const constant half3x4* const p_m = tint_module_vars.m;
+ const constant half4* const p_m_i = (&(*p_m)[i(tint_module_vars)]);
+ half3x4 const l_m = (*p_m);
+ half4 const l_m_i = (*p_m_i);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_m:ptr<uniform, mat3x4<f16>, read> = let %m
- %9:i32 = call %i
- %10:ptr<uniform, vec4<f16>, read> = access %p_m, %9
- %p_m_i:ptr<uniform, vec4<f16>, read> = let %10
- %12:mat3x4<f16> = load %p_m
- %l_m:mat3x4<f16> = let %12
- %14:vec4<f16> = load %p_m_i
- %l_m_i:vec4<f16> = let %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/buffer/uniform/std140/unnested/mat3x4_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_fn.wgsl.expected.ir.msl
index e072db3..68d5ea3 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_fn.wgsl.expected.ir.msl
@@ -1,51 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half3x4* u;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x4<f16>, read> = var @binding_point(0, 0)
+void a(half3x4 m) {
}
-
-%a = func(%m:mat3x4<f16>):void {
- $B2: {
- ret
- }
+void b(half4 v) {
}
-%b = func(%v:vec4<f16>):void {
- $B3: {
- ret
- }
+void c(half f) {
}
-%c = func(%f:f16):void {
- $B4: {
- ret
- }
+kernel void f(const constant half3x4* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[1]);
+ b((*tint_module_vars.u)[1].ywxz);
+ c((*tint_module_vars.u)[1][0u]);
+ c((*tint_module_vars.u)[1].ywxz[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B5: {
- %9:mat3x4<f16> = load %u
- %10:void = call %a, %9
- %11:ptr<uniform, vec4<f16>, read> = access %u, 1i
- %12:vec4<f16> = load %11
- %13:void = call %b, %12
- %14:ptr<uniform, vec4<f16>, read> = access %u, 1i
- %15:vec4<f16> = load %14
- %16:vec4<f16> = swizzle %15, ywxz
- %17:void = call %b, %16
- %18:ptr<uniform, vec4<f16>, read> = access %u, 1i
- %19:f16 = load_vector_element %18, 0u
- %20:void = call %c, %19
- %21:ptr<uniform, vec4<f16>, read> = access %u, 1i
- %22:vec4<f16> = load %21
- %23:vec4<f16> = swizzle %22, ywxz
- %24:f16 = access %23, 0u
- %25:void = call %c, %24
- 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/buffer/uniform/std140/unnested/mat3x4_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_private.wgsl.expected.ir.msl
index c5c8d5e..8cc1d30 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_private.wgsl.expected.ir.msl
@@ -1,35 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half3x4* u;
+ thread half3x4* p;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x4<f16>, read> = var @binding_point(0, 0)
- %p:ptr<private, mat3x4<f16>, read_write> = var
+kernel void f(const constant half3x4* u [[buffer(0)]]) {
+ thread half3x4 p = half3x4(0.0h);
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0].ywxz;
+ (*tint_module_vars.p)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f16> = load %u
- store %p, %4
- %5:ptr<private, vec4<f16>, read_write> = access %p, 1i
- %6:ptr<uniform, vec4<f16>, read> = access %u, 0i
- %7:vec4<f16> = load %6
- store %5, %7
- %8:ptr<private, vec4<f16>, read_write> = access %p, 1i
- %9:ptr<uniform, vec4<f16>, read> = access %u, 0i
- %10:vec4<f16> = load %9
- %11:vec4<f16> = swizzle %10, ywxz
- store %8, %11
- %12:ptr<private, vec4<f16>, read_write> = access %p, 0i
- %13:ptr<uniform, vec4<f16>, read> = access %u, 1i
- %14:f16 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat3x4_f16/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_storage.wgsl.expected.ir.msl
index ff20b61..1c161a2 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half3x4* u;
+ device half3x4* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x4<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat3x4<f16>, read_write> = var @binding_point(0, 1)
+kernel void f(const constant half3x4* u [[buffer(0)]], device half3x4* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0].ywxz;
+ (*tint_module_vars.s)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f16> = load %u
- store %s, %4
- %5:ptr<storage, vec4<f16>, read_write> = access %s, 1i
- %6:ptr<uniform, vec4<f16>, read> = access %u, 0i
- %7:vec4<f16> = load %6
- store %5, %7
- %8:ptr<storage, vec4<f16>, read_write> = access %s, 1i
- %9:ptr<uniform, vec4<f16>, read> = access %u, 0i
- %10:vec4<f16> = load %9
- %11:vec4<f16> = swizzle %10, ywxz
- store %8, %11
- %12:ptr<storage, vec4<f16>, read_write> = access %s, 0i
- %13:ptr<uniform, vec4<f16>, read> = access %u, 1i
- %14:f16 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 7a51367..59bb31a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,37 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float3x4* m;
+ thread int* counter;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<uniform, mat3x4<f32>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
+kernel void f(const constant float3x4* m [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.m=m, .counter=(&counter)};
+ const constant float3x4* const p_m = tint_module_vars.m;
+ const constant float4* const p_m_i = (&(*p_m)[i(tint_module_vars)]);
+ float3x4 const l_m = (*p_m);
+ float4 const l_m_i = (*p_m_i);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_m:ptr<uniform, mat3x4<f32>, read> = let %m
- %9:i32 = call %i
- %10:ptr<uniform, vec4<f32>, read> = access %p_m, %9
- %p_m_i:ptr<uniform, vec4<f32>, read> = let %10
- %12:mat3x4<f32> = load %p_m
- %l_m:mat3x4<f32> = let %12
- %14:vec4<f32> = load %p_m_i
- %l_m_i:vec4<f32> = let %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/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.ir.msl
index c29857f..c2e4ef5 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.ir.msl
@@ -1,51 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float3x4* u;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x4<f32>, read> = var @binding_point(0, 0)
+void a(float3x4 m) {
}
-
-%a = func(%m:mat3x4<f32>):void {
- $B2: {
- ret
- }
+void b(float4 v) {
}
-%b = func(%v:vec4<f32>):void {
- $B3: {
- ret
- }
+void c(float f) {
}
-%c = func(%f:f32):void {
- $B4: {
- ret
- }
+kernel void f(const constant float3x4* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[1]);
+ b((*tint_module_vars.u)[1].ywxz);
+ c((*tint_module_vars.u)[1][0u]);
+ c((*tint_module_vars.u)[1].ywxz[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B5: {
- %9:mat3x4<f32> = load %u
- %10:void = call %a, %9
- %11:ptr<uniform, vec4<f32>, read> = access %u, 1i
- %12:vec4<f32> = load %11
- %13:void = call %b, %12
- %14:ptr<uniform, vec4<f32>, read> = access %u, 1i
- %15:vec4<f32> = load %14
- %16:vec4<f32> = swizzle %15, ywxz
- %17:void = call %b, %16
- %18:ptr<uniform, vec4<f32>, read> = access %u, 1i
- %19:f32 = load_vector_element %18, 0u
- %20:void = call %c, %19
- %21:ptr<uniform, vec4<f32>, read> = access %u, 1i
- %22:vec4<f32> = load %21
- %23:vec4<f32> = swizzle %22, ywxz
- %24:f32 = access %23, 0u
- %25:void = call %c, %24
- 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/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.ir.msl
index 27467a3..820fdbe 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.ir.msl
@@ -1,35 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float3x4* u;
+ thread float3x4* p;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x4<f32>, read> = var @binding_point(0, 0)
- %p:ptr<private, mat3x4<f32>, read_write> = var
+kernel void f(const constant float3x4* u [[buffer(0)]]) {
+ thread float3x4 p = float3x4(0.0f);
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0].ywxz;
+ (*tint_module_vars.p)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f32> = load %u
- store %p, %4
- %5:ptr<private, vec4<f32>, read_write> = access %p, 1i
- %6:ptr<uniform, vec4<f32>, read> = access %u, 0i
- %7:vec4<f32> = load %6
- store %5, %7
- %8:ptr<private, vec4<f32>, read_write> = access %p, 1i
- %9:ptr<uniform, vec4<f32>, read> = access %u, 0i
- %10:vec4<f32> = load %9
- %11:vec4<f32> = swizzle %10, ywxz
- store %8, %11
- %12:ptr<private, vec4<f32>, read_write> = access %p, 0i
- %13:ptr<uniform, vec4<f32>, read> = access %u, 1i
- %14:f32 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.ir.msl
index d41ec59..709265f 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float3x4* u;
+ device float3x4* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x4<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat3x4<f32>, read_write> = var @binding_point(0, 1)
+kernel void f(const constant float3x4* u [[buffer(0)]], device float3x4* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0].ywxz;
+ (*tint_module_vars.s)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f32> = load %u
- store %s, %4
- %5:ptr<storage, vec4<f32>, read_write> = access %s, 1i
- %6:ptr<uniform, vec4<f32>, read> = access %u, 0i
- %7:vec4<f32> = load %6
- store %5, %7
- %8:ptr<storage, vec4<f32>, read_write> = access %s, 1i
- %9:ptr<uniform, vec4<f32>, read> = access %u, 0i
- %10:vec4<f32> = load %9
- %11:vec4<f32> = swizzle %10, ywxz
- store %8, %11
- %12:ptr<storage, vec4<f32>, read_write> = access %s, 0i
- %13:ptr<uniform, vec4<f32>, read> = access %u, 1i
- %14:f32 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 869cf42..2862bdb 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,37 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half4x2* m;
+ thread int* counter;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<uniform, mat4x2<f16>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
+kernel void f(const constant half4x2* m [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.m=m, .counter=(&counter)};
+ const constant half4x2* const p_m = tint_module_vars.m;
+ const constant half2* const p_m_i = (&(*p_m)[i(tint_module_vars)]);
+ half4x2 const l_m = (*p_m);
+ half2 const l_m_i = (*p_m_i);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_m:ptr<uniform, mat4x2<f16>, read> = let %m
- %9:i32 = call %i
- %10:ptr<uniform, vec2<f16>, read> = access %p_m, %9
- %p_m_i:ptr<uniform, vec2<f16>, read> = let %10
- %12:mat4x2<f16> = load %p_m
- %l_m:mat4x2<f16> = let %12
- %14:vec2<f16> = load %p_m_i
- %l_m_i:vec2<f16> = let %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/buffer/uniform/std140/unnested/mat4x2_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_fn.wgsl.expected.ir.msl
index 90525fe..b85213c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_fn.wgsl.expected.ir.msl
@@ -1,51 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half4x2* u;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x2<f16>, read> = var @binding_point(0, 0)
+void a(half4x2 m) {
}
-
-%a = func(%m:mat4x2<f16>):void {
- $B2: {
- ret
- }
+void b(half2 v) {
}
-%b = func(%v:vec2<f16>):void {
- $B3: {
- ret
- }
+void c(half f) {
}
-%c = func(%f:f16):void {
- $B4: {
- ret
- }
+kernel void f(const constant half4x2* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[1]);
+ b((*tint_module_vars.u)[1].yx);
+ c((*tint_module_vars.u)[1][0u]);
+ c((*tint_module_vars.u)[1].yx[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B5: {
- %9:mat4x2<f16> = load %u
- %10:void = call %a, %9
- %11:ptr<uniform, vec2<f16>, read> = access %u, 1i
- %12:vec2<f16> = load %11
- %13:void = call %b, %12
- %14:ptr<uniform, vec2<f16>, read> = access %u, 1i
- %15:vec2<f16> = load %14
- %16:vec2<f16> = swizzle %15, yx
- %17:void = call %b, %16
- %18:ptr<uniform, vec2<f16>, read> = access %u, 1i
- %19:f16 = load_vector_element %18, 0u
- %20:void = call %c, %19
- %21:ptr<uniform, vec2<f16>, read> = access %u, 1i
- %22:vec2<f16> = load %21
- %23:vec2<f16> = swizzle %22, yx
- %24:f16 = access %23, 0u
- %25:void = call %c, %24
- 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/buffer/uniform/std140/unnested/mat4x2_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_private.wgsl.expected.ir.msl
index 0e942db..6a9f6f0 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_private.wgsl.expected.ir.msl
@@ -1,35 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half4x2* u;
+ thread half4x2* p;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x2<f16>, read> = var @binding_point(0, 0)
- %p:ptr<private, mat4x2<f16>, read_write> = var
+kernel void f(const constant half4x2* u [[buffer(0)]]) {
+ thread half4x2 p = half4x2(0.0h);
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0].yx;
+ (*tint_module_vars.p)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f16> = load %u
- store %p, %4
- %5:ptr<private, vec2<f16>, read_write> = access %p, 1i
- %6:ptr<uniform, vec2<f16>, read> = access %u, 0i
- %7:vec2<f16> = load %6
- store %5, %7
- %8:ptr<private, vec2<f16>, read_write> = access %p, 1i
- %9:ptr<uniform, vec2<f16>, read> = access %u, 0i
- %10:vec2<f16> = load %9
- %11:vec2<f16> = swizzle %10, yx
- store %8, %11
- %12:ptr<private, vec2<f16>, read_write> = access %p, 0i
- %13:ptr<uniform, vec2<f16>, read> = access %u, 1i
- %14:f16 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat4x2_f16/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_storage.wgsl.expected.ir.msl
index 3797fed..9c8ca1c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half4x2* u;
+ device half4x2* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x2<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat4x2<f16>, read_write> = var @binding_point(0, 1)
+kernel void f(const constant half4x2* u [[buffer(0)]], device half4x2* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0].yx;
+ (*tint_module_vars.s)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f16> = load %u
- store %s, %4
- %5:ptr<storage, vec2<f16>, read_write> = access %s, 1i
- %6:ptr<uniform, vec2<f16>, read> = access %u, 0i
- %7:vec2<f16> = load %6
- store %5, %7
- %8:ptr<storage, vec2<f16>, read_write> = access %s, 1i
- %9:ptr<uniform, vec2<f16>, read> = access %u, 0i
- %10:vec2<f16> = load %9
- %11:vec2<f16> = swizzle %10, yx
- store %8, %11
- %12:ptr<storage, vec2<f16>, read_write> = access %s, 0i
- %13:ptr<uniform, vec2<f16>, read> = access %u, 1i
- %14:f16 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 0091daf..bbd0f74 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,37 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float4x2* m;
+ thread int* counter;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<uniform, mat4x2<f32>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
+kernel void f(const constant float4x2* m [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.m=m, .counter=(&counter)};
+ const constant float4x2* const p_m = tint_module_vars.m;
+ const constant float2* const p_m_i = (&(*p_m)[i(tint_module_vars)]);
+ float4x2 const l_m = (*p_m);
+ float2 const l_m_i = (*p_m_i);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_m:ptr<uniform, mat4x2<f32>, read> = let %m
- %9:i32 = call %i
- %10:ptr<uniform, vec2<f32>, read> = access %p_m, %9
- %p_m_i:ptr<uniform, vec2<f32>, read> = let %10
- %12:mat4x2<f32> = load %p_m
- %l_m:mat4x2<f32> = let %12
- %14:vec2<f32> = load %p_m_i
- %l_m_i:vec2<f32> = let %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/buffer/uniform/std140/unnested/mat4x2_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_fn.wgsl.expected.ir.msl
index dc0d78f..2928ebf 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_fn.wgsl.expected.ir.msl
@@ -1,51 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float4x2* u;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x2<f32>, read> = var @binding_point(0, 0)
+void a(float4x2 m) {
}
-
-%a = func(%m:mat4x2<f32>):void {
- $B2: {
- ret
- }
+void b(float2 v) {
}
-%b = func(%v:vec2<f32>):void {
- $B3: {
- ret
- }
+void c(float f) {
}
-%c = func(%f:f32):void {
- $B4: {
- ret
- }
+kernel void f(const constant float4x2* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[1]);
+ b((*tint_module_vars.u)[1].yx);
+ c((*tint_module_vars.u)[1][0u]);
+ c((*tint_module_vars.u)[1].yx[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B5: {
- %9:mat4x2<f32> = load %u
- %10:void = call %a, %9
- %11:ptr<uniform, vec2<f32>, read> = access %u, 1i
- %12:vec2<f32> = load %11
- %13:void = call %b, %12
- %14:ptr<uniform, vec2<f32>, read> = access %u, 1i
- %15:vec2<f32> = load %14
- %16:vec2<f32> = swizzle %15, yx
- %17:void = call %b, %16
- %18:ptr<uniform, vec2<f32>, read> = access %u, 1i
- %19:f32 = load_vector_element %18, 0u
- %20:void = call %c, %19
- %21:ptr<uniform, vec2<f32>, read> = access %u, 1i
- %22:vec2<f32> = load %21
- %23:vec2<f32> = swizzle %22, yx
- %24:f32 = access %23, 0u
- %25:void = call %c, %24
- 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/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.ir.msl
index 368cba9..5c68541 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.ir.msl
@@ -1,35 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float4x2* u;
+ thread float4x2* p;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x2<f32>, read> = var @binding_point(0, 0)
- %p:ptr<private, mat4x2<f32>, read_write> = var
+kernel void f(const constant float4x2* u [[buffer(0)]]) {
+ thread float4x2 p = float4x2(0.0f);
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0].yx;
+ (*tint_module_vars.p)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f32> = load %u
- store %p, %4
- %5:ptr<private, vec2<f32>, read_write> = access %p, 1i
- %6:ptr<uniform, vec2<f32>, read> = access %u, 0i
- %7:vec2<f32> = load %6
- store %5, %7
- %8:ptr<private, vec2<f32>, read_write> = access %p, 1i
- %9:ptr<uniform, vec2<f32>, read> = access %u, 0i
- %10:vec2<f32> = load %9
- %11:vec2<f32> = swizzle %10, yx
- store %8, %11
- %12:ptr<private, vec2<f32>, read_write> = access %p, 0i
- %13:ptr<uniform, vec2<f32>, read> = access %u, 1i
- %14:f32 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat4x2_f32/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_storage.wgsl.expected.ir.msl
index f190196..776bc7d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float4x2* u;
+ device float4x2* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x2<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat4x2<f32>, read_write> = var @binding_point(0, 1)
+kernel void f(const constant float4x2* u [[buffer(0)]], device float4x2* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0].yx;
+ (*tint_module_vars.s)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f32> = load %u
- store %s, %4
- %5:ptr<storage, vec2<f32>, read_write> = access %s, 1i
- %6:ptr<uniform, vec2<f32>, read> = access %u, 0i
- %7:vec2<f32> = load %6
- store %5, %7
- %8:ptr<storage, vec2<f32>, read_write> = access %s, 1i
- %9:ptr<uniform, vec2<f32>, read> = access %u, 0i
- %10:vec2<f32> = load %9
- %11:vec2<f32> = swizzle %10, yx
- store %8, %11
- %12:ptr<storage, vec2<f32>, read_write> = access %s, 0i
- %13:ptr<uniform, vec2<f32>, read> = access %u, 1i
- %14:f32 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 482cb42..dc9211c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,37 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half4x3* m;
+ thread int* counter;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<uniform, mat4x3<f16>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
+kernel void f(const constant half4x3* m [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.m=m, .counter=(&counter)};
+ const constant half4x3* const p_m = tint_module_vars.m;
+ const constant half3* const p_m_i = (&(*p_m)[i(tint_module_vars)]);
+ half4x3 const l_m = (*p_m);
+ half3 const l_m_i = (*p_m_i);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_m:ptr<uniform, mat4x3<f16>, read> = let %m
- %9:i32 = call %i
- %10:ptr<uniform, vec3<f16>, read> = access %p_m, %9
- %p_m_i:ptr<uniform, vec3<f16>, read> = let %10
- %12:mat4x3<f16> = load %p_m
- %l_m:mat4x3<f16> = let %12
- %14:vec3<f16> = load %p_m_i
- %l_m_i:vec3<f16> = let %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/buffer/uniform/std140/unnested/mat4x3_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_fn.wgsl.expected.ir.msl
index fb0290a..398f88b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_fn.wgsl.expected.ir.msl
@@ -1,51 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half4x3* u;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x3<f16>, read> = var @binding_point(0, 0)
+void a(half4x3 m) {
}
-
-%a = func(%m:mat4x3<f16>):void {
- $B2: {
- ret
- }
+void b(half3 v) {
}
-%b = func(%v:vec3<f16>):void {
- $B3: {
- ret
- }
+void c(half f) {
}
-%c = func(%f:f16):void {
- $B4: {
- ret
- }
+kernel void f(const constant half4x3* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[1]);
+ b((*tint_module_vars.u)[1].zxy);
+ c((*tint_module_vars.u)[1][0u]);
+ c((*tint_module_vars.u)[1].zxy[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B5: {
- %9:mat4x3<f16> = load %u
- %10:void = call %a, %9
- %11:ptr<uniform, vec3<f16>, read> = access %u, 1i
- %12:vec3<f16> = load %11
- %13:void = call %b, %12
- %14:ptr<uniform, vec3<f16>, read> = access %u, 1i
- %15:vec3<f16> = load %14
- %16:vec3<f16> = swizzle %15, zxy
- %17:void = call %b, %16
- %18:ptr<uniform, vec3<f16>, read> = access %u, 1i
- %19:f16 = load_vector_element %18, 0u
- %20:void = call %c, %19
- %21:ptr<uniform, vec3<f16>, read> = access %u, 1i
- %22:vec3<f16> = load %21
- %23:vec3<f16> = swizzle %22, zxy
- %24:f16 = access %23, 0u
- %25:void = call %c, %24
- 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/buffer/uniform/std140/unnested/mat4x3_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_private.wgsl.expected.ir.msl
index 6a01a6f..3a3d966 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_private.wgsl.expected.ir.msl
@@ -1,35 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half4x3* u;
+ thread half4x3* p;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x3<f16>, read> = var @binding_point(0, 0)
- %p:ptr<private, mat4x3<f16>, read_write> = var
+kernel void f(const constant half4x3* u [[buffer(0)]]) {
+ thread half4x3 p = half4x3(0.0h);
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0].zxy;
+ (*tint_module_vars.p)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f16> = load %u
- store %p, %4
- %5:ptr<private, vec3<f16>, read_write> = access %p, 1i
- %6:ptr<uniform, vec3<f16>, read> = access %u, 0i
- %7:vec3<f16> = load %6
- store %5, %7
- %8:ptr<private, vec3<f16>, read_write> = access %p, 1i
- %9:ptr<uniform, vec3<f16>, read> = access %u, 0i
- %10:vec3<f16> = load %9
- %11:vec3<f16> = swizzle %10, zxy
- store %8, %11
- %12:ptr<private, vec3<f16>, read_write> = access %p, 0i
- %13:ptr<uniform, vec3<f16>, read> = access %u, 1i
- %14:f16 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat4x3_f16/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_storage.wgsl.expected.ir.msl
index c327eb5..0840a07 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_storage.wgsl.expected.ir.msl
@@ -1,52 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half4x3* u;
+ device half4x3* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x3<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat4x3<f16>, read_write> = var @binding_point(0, 1)
+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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f16> = load %u
- %5:void = call %tint_store_and_preserve_padding, %s, %4
- %7:ptr<storage, vec3<f16>, read_write> = access %s, 1i
- %8:ptr<uniform, vec3<f16>, read> = access %u, 0i
- %9:vec3<f16> = load %8
- store %7, %9
- %10:ptr<storage, vec3<f16>, read_write> = access %s, 1i
- %11:ptr<uniform, vec3<f16>, read> = access %u, 0i
- %12:vec3<f16> = load %11
- %13:vec3<f16> = swizzle %12, zxy
- store %10, %13
- %14:ptr<storage, vec3<f16>, read_write> = access %s, 0i
- %15:ptr<uniform, vec3<f16>, read> = access %u, 1i
- %16:f16 = load_vector_element %15, 0i
- store_vector_element %14, 1i, %16
- ret
- }
+kernel void f(const constant half4x3* u [[buffer(0)]], device half4x3* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ tint_store_and_preserve_padding(tint_module_vars.s, (*tint_module_vars.u));
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0].zxy;
+ (*tint_module_vars.s)[0][1] = (*tint_module_vars.u)[1][0];
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f16>, read_write>, %value_param:mat4x3<f16>):void {
- $B3: {
- %19:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %20:vec3<f16> = access %value_param, 0u
- store %19, %20
- %21:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %22:vec3<f16> = access %value_param, 1u
- store %21, %22
- %23:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %24:vec3<f16> = access %value_param, 2u
- store %23, %24
- %25:ptr<storage, vec3<f16>, read_write> = access %target, 3u
- %26:vec3<f16> = access %value_param, 3u
- store %25, %26
- 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/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index adf6d98..6516037 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,37 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float4x3* m;
+ thread int* counter;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<uniform, mat4x3<f32>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
+kernel void f(const constant float4x3* m [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.m=m, .counter=(&counter)};
+ const constant float4x3* const p_m = tint_module_vars.m;
+ const constant float3* const p_m_i = (&(*p_m)[i(tint_module_vars)]);
+ float4x3 const l_m = (*p_m);
+ float3 const l_m_i = (*p_m_i);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_m:ptr<uniform, mat4x3<f32>, read> = let %m
- %9:i32 = call %i
- %10:ptr<uniform, vec3<f32>, read> = access %p_m, %9
- %p_m_i:ptr<uniform, vec3<f32>, read> = let %10
- %12:mat4x3<f32> = load %p_m
- %l_m:mat4x3<f32> = let %12
- %14:vec3<f32> = load %p_m_i
- %l_m_i:vec3<f32> = let %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/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.ir.msl
index 20ea079..9f85d72 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.ir.msl
@@ -1,51 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float4x3* u;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x3<f32>, read> = var @binding_point(0, 0)
+void a(float4x3 m) {
}
-
-%a = func(%m:mat4x3<f32>):void {
- $B2: {
- ret
- }
+void b(float3 v) {
}
-%b = func(%v:vec3<f32>):void {
- $B3: {
- ret
- }
+void c(float f) {
}
-%c = func(%f:f32):void {
- $B4: {
- ret
- }
+kernel void f(const constant float4x3* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[1]);
+ b((*tint_module_vars.u)[1].zxy);
+ c((*tint_module_vars.u)[1][0u]);
+ c((*tint_module_vars.u)[1].zxy[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B5: {
- %9:mat4x3<f32> = load %u
- %10:void = call %a, %9
- %11:ptr<uniform, vec3<f32>, read> = access %u, 1i
- %12:vec3<f32> = load %11
- %13:void = call %b, %12
- %14:ptr<uniform, vec3<f32>, read> = access %u, 1i
- %15:vec3<f32> = load %14
- %16:vec3<f32> = swizzle %15, zxy
- %17:void = call %b, %16
- %18:ptr<uniform, vec3<f32>, read> = access %u, 1i
- %19:f32 = load_vector_element %18, 0u
- %20:void = call %c, %19
- %21:ptr<uniform, vec3<f32>, read> = access %u, 1i
- %22:vec3<f32> = load %21
- %23:vec3<f32> = swizzle %22, zxy
- %24:f32 = access %23, 0u
- %25:void = call %c, %24
- 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/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.ir.msl
index ceedbe2..3000982 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.ir.msl
@@ -1,35 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float4x3* u;
+ thread float4x3* p;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x3<f32>, read> = var @binding_point(0, 0)
- %p:ptr<private, mat4x3<f32>, read_write> = var
+kernel void f(const constant float4x3* u [[buffer(0)]]) {
+ thread float4x3 p = float4x3(0.0f);
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0].zxy;
+ (*tint_module_vars.p)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f32> = load %u
- store %p, %4
- %5:ptr<private, vec3<f32>, read_write> = access %p, 1i
- %6:ptr<uniform, vec3<f32>, read> = access %u, 0i
- %7:vec3<f32> = load %6
- store %5, %7
- %8:ptr<private, vec3<f32>, read_write> = access %p, 1i
- %9:ptr<uniform, vec3<f32>, read> = access %u, 0i
- %10:vec3<f32> = load %9
- %11:vec3<f32> = swizzle %10, zxy
- store %8, %11
- %12:ptr<private, vec3<f32>, read_write> = access %p, 0i
- %13:ptr<uniform, vec3<f32>, read> = access %u, 1i
- %14:f32 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.msl
index 5c97be5..7df73c1 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.msl
@@ -1,52 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float4x3* u;
+ device float4x3* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x3<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat4x3<f32>, read_write> = var @binding_point(0, 1)
+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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f32> = load %u
- %5:void = call %tint_store_and_preserve_padding, %s, %4
- %7:ptr<storage, vec3<f32>, read_write> = access %s, 1i
- %8:ptr<uniform, vec3<f32>, read> = access %u, 0i
- %9:vec3<f32> = load %8
- store %7, %9
- %10:ptr<storage, vec3<f32>, read_write> = access %s, 1i
- %11:ptr<uniform, vec3<f32>, read> = access %u, 0i
- %12:vec3<f32> = load %11
- %13:vec3<f32> = swizzle %12, zxy
- store %10, %13
- %14:ptr<storage, vec3<f32>, read_write> = access %s, 0i
- %15:ptr<uniform, vec3<f32>, read> = access %u, 1i
- %16:f32 = load_vector_element %15, 0i
- store_vector_element %14, 1i, %16
- ret
- }
+kernel void f(const constant float4x3* u [[buffer(0)]], device float4x3* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ tint_store_and_preserve_padding(tint_module_vars.s, (*tint_module_vars.u));
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0].zxy;
+ (*tint_module_vars.s)[0][1] = (*tint_module_vars.u)[1][0];
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f32>, read_write>, %value_param:mat4x3<f32>):void {
- $B3: {
- %19:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %20:vec3<f32> = access %value_param, 0u
- store %19, %20
- %21:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %22:vec3<f32> = access %value_param, 1u
- store %21, %22
- %23:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %24:vec3<f32> = access %value_param, 2u
- store %23, %24
- %25:ptr<storage, vec3<f32>, read_write> = access %target, 3u
- %26:vec3<f32> = access %value_param, 3u
- store %25, %26
- 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/buffer/uniform/std140/unnested/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 803671e..f9d687c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,37 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half4x4* m;
+ thread int* counter;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<uniform, mat4x4<f16>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
+kernel void f(const constant half4x4* m [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.m=m, .counter=(&counter)};
+ const constant half4x4* const p_m = tint_module_vars.m;
+ const constant half4* const p_m_i = (&(*p_m)[i(tint_module_vars)]);
+ half4x4 const l_m = (*p_m);
+ half4 const l_m_i = (*p_m_i);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_m:ptr<uniform, mat4x4<f16>, read> = let %m
- %9:i32 = call %i
- %10:ptr<uniform, vec4<f16>, read> = access %p_m, %9
- %p_m_i:ptr<uniform, vec4<f16>, read> = let %10
- %12:mat4x4<f16> = load %p_m
- %l_m:mat4x4<f16> = let %12
- %14:vec4<f16> = load %p_m_i
- %l_m_i:vec4<f16> = let %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/buffer/uniform/std140/unnested/mat4x4_f16/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_fn.wgsl.expected.ir.msl
index 03b38f5d..d6675da 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_fn.wgsl.expected.ir.msl
@@ -1,51 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half4x4* u;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x4<f16>, read> = var @binding_point(0, 0)
+void a(half4x4 m) {
}
-
-%a = func(%m:mat4x4<f16>):void {
- $B2: {
- ret
- }
+void b(half4 v) {
}
-%b = func(%v:vec4<f16>):void {
- $B3: {
- ret
- }
+void c(half f) {
}
-%c = func(%f:f16):void {
- $B4: {
- ret
- }
+kernel void f(const constant half4x4* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[1]);
+ b((*tint_module_vars.u)[1].ywxz);
+ c((*tint_module_vars.u)[1][0u]);
+ c((*tint_module_vars.u)[1].ywxz[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B5: {
- %9:mat4x4<f16> = load %u
- %10:void = call %a, %9
- %11:ptr<uniform, vec4<f16>, read> = access %u, 1i
- %12:vec4<f16> = load %11
- %13:void = call %b, %12
- %14:ptr<uniform, vec4<f16>, read> = access %u, 1i
- %15:vec4<f16> = load %14
- %16:vec4<f16> = swizzle %15, ywxz
- %17:void = call %b, %16
- %18:ptr<uniform, vec4<f16>, read> = access %u, 1i
- %19:f16 = load_vector_element %18, 0u
- %20:void = call %c, %19
- %21:ptr<uniform, vec4<f16>, read> = access %u, 1i
- %22:vec4<f16> = load %21
- %23:vec4<f16> = swizzle %22, ywxz
- %24:f16 = access %23, 0u
- %25:void = call %c, %24
- 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/buffer/uniform/std140/unnested/mat4x4_f16/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_private.wgsl.expected.ir.msl
index 81b005e..77a0764 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_private.wgsl.expected.ir.msl
@@ -1,35 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half4x4* u;
+ thread half4x4* p;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x4<f16>, read> = var @binding_point(0, 0)
- %p:ptr<private, mat4x4<f16>, read_write> = var
+kernel void f(const constant half4x4* u [[buffer(0)]]) {
+ thread half4x4 p = half4x4(0.0h);
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0].ywxz;
+ (*tint_module_vars.p)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f16> = load %u
- store %p, %4
- %5:ptr<private, vec4<f16>, read_write> = access %p, 1i
- %6:ptr<uniform, vec4<f16>, read> = access %u, 0i
- %7:vec4<f16> = load %6
- store %5, %7
- %8:ptr<private, vec4<f16>, read_write> = access %p, 1i
- %9:ptr<uniform, vec4<f16>, read> = access %u, 0i
- %10:vec4<f16> = load %9
- %11:vec4<f16> = swizzle %10, ywxz
- store %8, %11
- %12:ptr<private, vec4<f16>, read_write> = access %p, 0i
- %13:ptr<uniform, vec4<f16>, read> = access %u, 1i
- %14:f16 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat4x4_f16/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_storage.wgsl.expected.ir.msl
index 8bf94bf..96f3eb6 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half4x4* u;
+ device half4x4* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x4<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat4x4<f16>, read_write> = var @binding_point(0, 1)
+kernel void f(const constant half4x4* u [[buffer(0)]], device half4x4* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0].ywxz;
+ (*tint_module_vars.s)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f16> = load %u
- store %s, %4
- %5:ptr<storage, vec4<f16>, read_write> = access %s, 1i
- %6:ptr<uniform, vec4<f16>, read> = access %u, 0i
- %7:vec4<f16> = load %6
- store %5, %7
- %8:ptr<storage, vec4<f16>, read_write> = access %s, 1i
- %9:ptr<uniform, vec4<f16>, read> = access %u, 0i
- %10:vec4<f16> = load %9
- %11:vec4<f16> = swizzle %10, ywxz
- store %8, %11
- %12:ptr<storage, vec4<f16>, read_write> = access %s, 0i
- %13:ptr<uniform, vec4<f16>, read> = access %u, 1i
- %14:f16 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
index 3a35fc9..aa9c4df 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.msl
@@ -1,37 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float4x4* m;
+ thread int* counter;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<uniform, mat4x4<f32>, read> = var @binding_point(0, 0)
- %counter:ptr<private, i32, read_write> = var, 0i
+int i(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-
-%i = func():i32 {
- $B2: {
- %4:i32 = load %counter
- %5:i32 = add %4, 1i
- store %counter, %5
- %6:i32 = load %counter
- ret %6
- }
+kernel void f(const constant float4x4* m [[buffer(0)]]) {
+ thread int counter = 0;
+ tint_module_vars_struct const tint_module_vars = {.m=m, .counter=(&counter)};
+ const constant float4x4* const p_m = tint_module_vars.m;
+ const constant float4* const p_m_i = (&(*p_m)[i(tint_module_vars)]);
+ float4x4 const l_m = (*p_m);
+ float4 const l_m_i = (*p_m_i);
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %p_m:ptr<uniform, mat4x4<f32>, read> = let %m
- %9:i32 = call %i
- %10:ptr<uniform, vec4<f32>, read> = access %p_m, %9
- %p_m_i:ptr<uniform, vec4<f32>, read> = let %10
- %12:mat4x4<f32> = load %p_m
- %l_m:mat4x4<f32> = let %12
- %14:vec4<f32> = load %p_m_i
- %l_m_i:vec4<f32> = let %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/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.ir.msl
index 8898af0..8b51e8a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.ir.msl
@@ -1,51 +1,20 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float4x4* u;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x4<f32>, read> = var @binding_point(0, 0)
+void a(float4x4 m) {
}
-
-%a = func(%m:mat4x4<f32>):void {
- $B2: {
- ret
- }
+void b(float4 v) {
}
-%b = func(%v:vec4<f32>):void {
- $B3: {
- ret
- }
+void c(float f) {
}
-%c = func(%f:f32):void {
- $B4: {
- ret
- }
+kernel void f(const constant float4x4* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ a((*tint_module_vars.u));
+ b((*tint_module_vars.u)[1]);
+ b((*tint_module_vars.u)[1].ywxz);
+ c((*tint_module_vars.u)[1][0u]);
+ c((*tint_module_vars.u)[1].ywxz[0u]);
}
-%f_1 = @compute @workgroup_size(1, 1, 1) func():void { # %f_1: 'f'
- $B5: {
- %9:mat4x4<f32> = load %u
- %10:void = call %a, %9
- %11:ptr<uniform, vec4<f32>, read> = access %u, 1i
- %12:vec4<f32> = load %11
- %13:void = call %b, %12
- %14:ptr<uniform, vec4<f32>, read> = access %u, 1i
- %15:vec4<f32> = load %14
- %16:vec4<f32> = swizzle %15, ywxz
- %17:void = call %b, %16
- %18:ptr<uniform, vec4<f32>, read> = access %u, 1i
- %19:f32 = load_vector_element %18, 0u
- %20:void = call %c, %19
- %21:ptr<uniform, vec4<f32>, read> = access %u, 1i
- %22:vec4<f32> = load %21
- %23:vec4<f32> = swizzle %22, ywxz
- %24:f32 = access %23, 0u
- %25:void = call %c, %24
- 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/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.ir.msl
index 5419a0a..270763c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.ir.msl
@@ -1,35 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float4x4* u;
+ thread float4x4* p;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x4<f32>, read> = var @binding_point(0, 0)
- %p:ptr<private, mat4x4<f32>, read_write> = var
+kernel void f(const constant float4x4* u [[buffer(0)]]) {
+ thread float4x4 p = float4x4(0.0f);
+ tint_module_vars_struct const tint_module_vars = {.u=u, .p=(&p)};
+ (*tint_module_vars.p) = (*tint_module_vars.u);
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.p)[1] = (*tint_module_vars.u)[0].ywxz;
+ (*tint_module_vars.p)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f32> = load %u
- store %p, %4
- %5:ptr<private, vec4<f32>, read_write> = access %p, 1i
- %6:ptr<uniform, vec4<f32>, read> = access %u, 0i
- %7:vec4<f32> = load %6
- store %5, %7
- %8:ptr<private, vec4<f32>, read_write> = access %p, 1i
- %9:ptr<uniform, vec4<f32>, read> = access %u, 0i
- %10:vec4<f32> = load %9
- %11:vec4<f32> = swizzle %10, ywxz
- store %8, %11
- %12:ptr<private, vec4<f32>, read_write> = access %p, 0i
- %13:ptr<uniform, vec4<f32>, read> = access %u, 1i
- %14:f32 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.ir.msl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.ir.msl
index 2046512..cefcb4b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.ir.msl
@@ -1,35 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float4x4* u;
+ device float4x4* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x4<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat4x4<f32>, read_write> = var @binding_point(0, 1)
+kernel void f(const constant float4x4* u [[buffer(0)]], device float4x4* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ (*tint_module_vars.s) = (*tint_module_vars.u);
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0];
+ (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0].ywxz;
+ (*tint_module_vars.s)[0][1] = (*tint_module_vars.u)[1][0];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f32> = load %u
- store %s, %4
- %5:ptr<storage, vec4<f32>, read_write> = access %s, 1i
- %6:ptr<uniform, vec4<f32>, read> = access %u, 0i
- %7:vec4<f32> = load %6
- store %5, %7
- %8:ptr<storage, vec4<f32>, read_write> = access %s, 1i
- %9:ptr<uniform, vec4<f32>, read> = access %u, 0i
- %10:vec4<f32> = load %9
- %11:vec4<f32> = swizzle %10, ywxz
- store %8, %11
- %12:ptr<storage, vec4<f32>, read_write> = access %s, 0i
- %13:ptr<uniform, vec4<f32>, read> = access %u, 1i
- %14:f32 = load_vector_element %13, 0i
- store_vector_element %12, 1i, %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/buffer/uniform/types/f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/f16.wgsl.expected.ir.msl
index 23ca7a8..c5b30d2 100644
--- a/test/tint/buffer/uniform/types/f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half* u;
+ device half* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, f16, read> = var @binding_point(0, 0)
- %s:ptr<storage, f16, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant half* u [[buffer(0)]], device half* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ half const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:f16 = load %u
- %x:f16 = let %4
- store %s, %x
- 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/buffer/uniform/types/f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/f32.wgsl.expected.ir.msl
index b0b6bdd..dc05668 100644
--- a/test/tint/buffer/uniform/types/f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float* u;
+ device float* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, f32, read> = var @binding_point(0, 0)
- %s:ptr<storage, f32, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant float* u [[buffer(0)]], device float* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:f32 = load %u
- %x:f32 = let %4
- store %s, %x
- 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/buffer/uniform/types/i32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/i32.wgsl.expected.ir.msl
index f8c3a23..dd0fc8a 100644
--- a/test/tint/buffer/uniform/types/i32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/i32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant int* u;
+ device int* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, i32, read> = var @binding_point(0, 0)
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant int* u [[buffer(0)]], device int* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ int const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:i32 = load %u
- %x:i32 = let %4
- store %s, %x
- 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/buffer/uniform/types/mat2x2_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat2x2_f16.wgsl.expected.ir.msl
index e500eb8..a05cbb4 100644
--- a/test/tint/buffer/uniform/types/mat2x2_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/mat2x2_f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half2x2* u;
+ device half2x2* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x2<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat2x2<f16>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant half2x2* u [[buffer(0)]], device half2x2* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ half2x2 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f16> = load %u
- %x:mat2x2<f16> = let %4
- store %s, %x
- 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/buffer/uniform/types/mat2x2_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat2x2_f32.wgsl.expected.ir.msl
index 6f523cc..9f0111e 100644
--- a/test/tint/buffer/uniform/types/mat2x2_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/mat2x2_f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float2x2* u;
+ device float2x2* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x2<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat2x2<f32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant float2x2* u [[buffer(0)]], device float2x2* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float2x2 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f32> = load %u
- %x:mat2x2<f32> = let %4
- store %s, %x
- 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/buffer/uniform/types/mat2x3_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat2x3_f16.wgsl.expected.ir.msl
index 3394820..2effcd6 100644
--- a/test/tint/buffer/uniform/types/mat2x3_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/mat2x3_f16.wgsl.expected.ir.msl
@@ -1,34 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half2x3* u;
+ device half2x3* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x3<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat2x3<f16>, read_write> = var @binding_point(0, 1)
+void tint_store_and_preserve_padding(device half2x3* const target, half2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f16> = load %u
- %x:mat2x3<f16> = let %4
- %6:void = call %tint_store_and_preserve_padding, %s, %x
- ret
- }
+kernel void tint_symbol(const constant half2x3* u [[buffer(0)]], device half2x3* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ half2x3 const x = (*tint_module_vars.u);
+ tint_store_and_preserve_padding(tint_module_vars.s, x);
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f16>, read_write>, %value_param:mat2x3<f16>):void {
- $B3: {
- %10:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %11:vec3<f16> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %13:vec3<f16> = access %value_param, 1u
- store %12, %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/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.msl
index 7067254..19199b6 100644
--- a/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.msl
@@ -1,34 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float2x3* u;
+ device float2x3* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x3<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat2x3<f32>, read_write> = var @binding_point(0, 1)
+void tint_store_and_preserve_padding(device float2x3* const target, float2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f32> = load %u
- %x:mat2x3<f32> = let %4
- %6:void = call %tint_store_and_preserve_padding, %s, %x
- ret
- }
+kernel void tint_symbol(const constant float2x3* u [[buffer(0)]], device float2x3* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float2x3 const x = (*tint_module_vars.u);
+ tint_store_and_preserve_padding(tint_module_vars.s, x);
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f32>, read_write>, %value_param:mat2x3<f32>):void {
- $B3: {
- %10:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %11:vec3<f32> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %13:vec3<f32> = access %value_param, 1u
- store %12, %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/buffer/uniform/types/mat2x4_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat2x4_f16.wgsl.expected.ir.msl
index 9d37062..2b3cf8f 100644
--- a/test/tint/buffer/uniform/types/mat2x4_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/mat2x4_f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half2x4* u;
+ device half2x4* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x4<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat2x4<f16>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant half2x4* u [[buffer(0)]], device half2x4* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ half2x4 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f16> = load %u
- %x:mat2x4<f16> = let %4
- store %s, %x
- 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/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.msl
index f0e779e..80b5744 100644
--- a/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float2x4* u;
+ device float2x4* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat2x4<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat2x4<f32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant float2x4* u [[buffer(0)]], device float2x4* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float2x4 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f32> = load %u
- %x:mat2x4<f32> = let %4
- store %s, %x
- 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/buffer/uniform/types/mat3x2_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat3x2_f16.wgsl.expected.ir.msl
index abe10dd..afe4fc4 100644
--- a/test/tint/buffer/uniform/types/mat3x2_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/mat3x2_f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half3x2* u;
+ device half3x2* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x2<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat3x2<f16>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant half3x2* u [[buffer(0)]], device half3x2* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ half3x2 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f16> = load %u
- %x:mat3x2<f16> = let %4
- store %s, %x
- 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/buffer/uniform/types/mat3x2_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat3x2_f32.wgsl.expected.ir.msl
index 670f15b..4853faa 100644
--- a/test/tint/buffer/uniform/types/mat3x2_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/mat3x2_f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float3x2* u;
+ device float3x2* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x2<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat3x2<f32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant float3x2* u [[buffer(0)]], device float3x2* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float3x2 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f32> = load %u
- %x:mat3x2<f32> = let %4
- store %s, %x
- 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/buffer/uniform/types/mat3x3_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat3x3_f16.wgsl.expected.ir.msl
index be8a99a..efacca3 100644
--- a/test/tint/buffer/uniform/types/mat3x3_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/mat3x3_f16.wgsl.expected.ir.msl
@@ -1,37 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half3x3* u;
+ device half3x3* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x3<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat3x3<f16>, read_write> = var @binding_point(0, 1)
+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];
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f16> = load %u
- %x:mat3x3<f16> = let %4
- %6:void = call %tint_store_and_preserve_padding, %s, %x
- ret
- }
+kernel void tint_symbol(const constant half3x3* u [[buffer(0)]], device half3x3* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ half3x3 const x = (*tint_module_vars.u);
+ tint_store_and_preserve_padding(tint_module_vars.s, x);
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f16>, read_write>, %value_param:mat3x3<f16>):void {
- $B3: {
- %10:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %11:vec3<f16> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %13:vec3<f16> = access %value_param, 1u
- store %12, %13
- %14:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %15:vec3<f16> = access %value_param, 2u
- store %14, %15
- 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/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.msl
index 200b1fa..5e09f19 100644
--- a/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.msl
@@ -1,37 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float3x3* u;
+ device float3x3* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x3<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat3x3<f32>, read_write> = var @binding_point(0, 1)
+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];
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f32> = load %u
- %x:mat3x3<f32> = let %4
- %6:void = call %tint_store_and_preserve_padding, %s, %x
- ret
- }
+kernel void tint_symbol(const constant float3x3* u [[buffer(0)]], device float3x3* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float3x3 const x = (*tint_module_vars.u);
+ tint_store_and_preserve_padding(tint_module_vars.s, x);
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f32>, read_write>, %value_param:mat3x3<f32>):void {
- $B3: {
- %10:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %11:vec3<f32> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %13:vec3<f32> = access %value_param, 1u
- store %12, %13
- %14:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %15:vec3<f32> = access %value_param, 2u
- store %14, %15
- 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/buffer/uniform/types/mat3x4_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat3x4_f16.wgsl.expected.ir.msl
index d6c94a1..957fccc 100644
--- a/test/tint/buffer/uniform/types/mat3x4_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/mat3x4_f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half3x4* u;
+ device half3x4* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x4<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat3x4<f16>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant half3x4* u [[buffer(0)]], device half3x4* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ half3x4 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f16> = load %u
- %x:mat3x4<f16> = let %4
- store %s, %x
- 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/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.msl
index 2ff19a9..9caac90 100644
--- a/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float3x4* u;
+ device float3x4* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat3x4<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat3x4<f32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant float3x4* u [[buffer(0)]], device float3x4* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float3x4 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f32> = load %u
- %x:mat3x4<f32> = let %4
- store %s, %x
- 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/buffer/uniform/types/mat4x2_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat4x2_f16.wgsl.expected.ir.msl
index 4d67658..7895c94 100644
--- a/test/tint/buffer/uniform/types/mat4x2_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/mat4x2_f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half4x2* u;
+ device half4x2* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x2<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat4x2<f16>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant half4x2* u [[buffer(0)]], device half4x2* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ half4x2 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f16> = load %u
- %x:mat4x2<f16> = let %4
- store %s, %x
- 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/buffer/uniform/types/mat4x2_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat4x2_f32.wgsl.expected.ir.msl
index 7c78a9d..023b586 100644
--- a/test/tint/buffer/uniform/types/mat4x2_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/mat4x2_f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float4x2* u;
+ device float4x2* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x2<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat4x2<f32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant float4x2* u [[buffer(0)]], device float4x2* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float4x2 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f32> = load %u
- %x:mat4x2<f32> = let %4
- store %s, %x
- 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/buffer/uniform/types/mat4x3_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat4x3_f16.wgsl.expected.ir.msl
index 431a296..6ffcff3 100644
--- a/test/tint/buffer/uniform/types/mat4x3_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/mat4x3_f16.wgsl.expected.ir.msl
@@ -1,40 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half4x3* u;
+ device half4x3* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x3<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat4x3<f16>, read_write> = var @binding_point(0, 1)
+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];
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f16> = load %u
- %x:mat4x3<f16> = let %4
- %6:void = call %tint_store_and_preserve_padding, %s, %x
- ret
- }
+kernel void tint_symbol(const constant half4x3* u [[buffer(0)]], device half4x3* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ half4x3 const x = (*tint_module_vars.u);
+ tint_store_and_preserve_padding(tint_module_vars.s, x);
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f16>, read_write>, %value_param:mat4x3<f16>):void {
- $B3: {
- %10:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %11:vec3<f16> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %13:vec3<f16> = access %value_param, 1u
- store %12, %13
- %14:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %15:vec3<f16> = access %value_param, 2u
- store %14, %15
- %16:ptr<storage, vec3<f16>, read_write> = access %target, 3u
- %17:vec3<f16> = access %value_param, 3u
- store %16, %17
- 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/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.msl
index e427638..3dd2c1d 100644
--- a/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.msl
@@ -1,40 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float4x3* u;
+ device float4x3* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x3<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat4x3<f32>, read_write> = var @binding_point(0, 1)
+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];
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f32> = load %u
- %x:mat4x3<f32> = let %4
- %6:void = call %tint_store_and_preserve_padding, %s, %x
- ret
- }
+kernel void tint_symbol(const constant float4x3* u [[buffer(0)]], device float4x3* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float4x3 const x = (*tint_module_vars.u);
+ tint_store_and_preserve_padding(tint_module_vars.s, x);
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f32>, read_write>, %value_param:mat4x3<f32>):void {
- $B3: {
- %10:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %11:vec3<f32> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %13:vec3<f32> = access %value_param, 1u
- store %12, %13
- %14:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %15:vec3<f32> = access %value_param, 2u
- store %14, %15
- %16:ptr<storage, vec3<f32>, read_write> = access %target, 3u
- %17:vec3<f32> = access %value_param, 3u
- store %16, %17
- 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/buffer/uniform/types/mat4x4_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat4x4_f16.wgsl.expected.ir.msl
index b8d72f2..e8c4773 100644
--- a/test/tint/buffer/uniform/types/mat4x4_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/mat4x4_f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half4x4* u;
+ device half4x4* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x4<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat4x4<f16>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant half4x4* u [[buffer(0)]], device half4x4* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ half4x4 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f16> = load %u
- %x:mat4x4<f16> = let %4
- store %s, %x
- 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/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.msl
index 56beb0c..ba36e70 100644
--- a/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float4x4* u;
+ device float4x4* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, mat4x4<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, mat4x4<f32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant float4x4* u [[buffer(0)]], device float4x4* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float4x4 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f32> = load %u
- %x:mat4x4<f32> = let %4
- store %s, %x
- 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/buffer/uniform/types/struct_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.ir.msl
index 4a7cccb..a238665 100644
--- a/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.ir.msl
@@ -1,55 +1,28 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Inner {
+ half scalar_f16;
+ half3 vec3_f16;
+ half2x4 mat2x4_f16;
+};
+struct S {
+ Inner inner;
+};
+struct tint_module_vars_struct {
+ const constant S* u;
+ device S* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Inner = struct @align(8) {
- scalar_f16:f16 @offset(0)
- vec3_f16:vec3<f16> @offset(8)
- mat2x4_f16:mat2x4<f16> @offset(16)
+void tint_store_and_preserve_padding(device Inner* const target, Inner value_param) {
+ (*target).scalar_f16 = value_param.scalar_f16;
+ (*target).vec3_f16 = value_param.vec3_f16;
+ (*target).mat2x4_f16 = value_param.mat2x4_f16;
}
-
-S = struct @align(8) {
- inner:Inner @offset(0)
+void tint_store_and_preserve_padding(device S* const target, S value_param) {
+ tint_store_and_preserve_padding((&(*target).inner), value_param.inner);
}
-
-$B1: { # root
- %u:ptr<uniform, S, read> = var @binding_point(0, 0)
- %s:ptr<storage, S, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant S* u [[buffer(0)]], device S* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ S const x = (*tint_module_vars.u);
+ tint_store_and_preserve_padding(tint_module_vars.s, x);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:S = load %u
- %x:S = let %4
- %6:void = call %tint_store_and_preserve_padding, %s, %x
- ret
- }
-}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, S, read_write>, %value_param:S):void {
- $B3: {
- %10:ptr<storage, Inner, read_write> = access %target, 0u
- %11:Inner = access %value_param, 0u
- %12:void = call %tint_store_and_preserve_padding_1, %10, %11
- ret
- }
-}
-%tint_store_and_preserve_padding_1 = func(%target_1:ptr<storage, Inner, read_write>, %value_param_1:Inner):void { # %tint_store_and_preserve_padding_1: 'tint_store_and_preserve_padding', %target_1: 'target', %value_param_1: 'value_param'
- $B4: {
- %16:ptr<storage, f16, read_write> = access %target_1, 0u
- %17:f16 = access %value_param_1, 0u
- store %16, %17
- %18:ptr<storage, vec3<f16>, read_write> = access %target_1, 1u
- %19:vec3<f16> = access %value_param_1, 1u
- store %18, %19
- %20:ptr<storage, mat2x4<f16>, read_write> = access %target_1, 2u
- %21:mat2x4<f16> = access %value_param_1, 2u
- store %20, %21
- 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/buffer/uniform/types/struct_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.msl
index fdc49bb..bf9bb49 100644
--- a/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.msl
@@ -1,55 +1,28 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Inner {
+ float scalar_f32;
+ float3 vec3_f32;
+ float2x4 mat2x4_f32;
+};
+struct S {
+ Inner inner;
+};
+struct tint_module_vars_struct {
+ const constant S* u;
+ device S* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Inner = struct @align(16) {
- scalar_f32:f32 @offset(0)
- vec3_f32:vec3<f32> @offset(16)
- mat2x4_f32:mat2x4<f32> @offset(32)
+void tint_store_and_preserve_padding(device Inner* const target, Inner value_param) {
+ (*target).scalar_f32 = value_param.scalar_f32;
+ (*target).vec3_f32 = value_param.vec3_f32;
+ (*target).mat2x4_f32 = value_param.mat2x4_f32;
}
-
-S = struct @align(16) {
- inner:Inner @offset(0)
+void tint_store_and_preserve_padding(device S* const target, S value_param) {
+ tint_store_and_preserve_padding((&(*target).inner), value_param.inner);
}
-
-$B1: { # root
- %u:ptr<uniform, S, read> = var @binding_point(0, 0)
- %s:ptr<storage, S, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant S* u [[buffer(0)]], device S* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ S const x = (*tint_module_vars.u);
+ tint_store_and_preserve_padding(tint_module_vars.s, x);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:S = load %u
- %x:S = let %4
- %6:void = call %tint_store_and_preserve_padding, %s, %x
- ret
- }
-}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, S, read_write>, %value_param:S):void {
- $B3: {
- %10:ptr<storage, Inner, read_write> = access %target, 0u
- %11:Inner = access %value_param, 0u
- %12:void = call %tint_store_and_preserve_padding_1, %10, %11
- ret
- }
-}
-%tint_store_and_preserve_padding_1 = func(%target_1:ptr<storage, Inner, read_write>, %value_param_1:Inner):void { # %tint_store_and_preserve_padding_1: 'tint_store_and_preserve_padding', %target_1: 'target', %value_param_1: 'value_param'
- $B4: {
- %16:ptr<storage, f32, read_write> = access %target_1, 0u
- %17:f32 = access %value_param_1, 0u
- store %16, %17
- %18:ptr<storage, vec3<f32>, read_write> = access %target_1, 1u
- %19:vec3<f32> = access %value_param_1, 1u
- store %18, %19
- %20:ptr<storage, mat2x4<f32>, read_write> = access %target_1, 2u
- %21:mat2x4<f32> = access %value_param_1, 2u
- store %20, %21
- 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/buffer/uniform/types/u32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/u32.wgsl.expected.ir.msl
index f81df8c..972a627 100644
--- a/test/tint/buffer/uniform/types/u32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/u32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant uint* u;
+ device uint* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, u32, read> = var @binding_point(0, 0)
- %s:ptr<storage, u32, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant uint* u [[buffer(0)]], device uint* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ uint const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:u32 = load %u
- %x:u32 = let %4
- store %s, %x
- 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/buffer/uniform/types/vec2_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec2_f16.wgsl.expected.ir.msl
index c058c67..57ff3e9 100644
--- a/test/tint/buffer/uniform/types/vec2_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/vec2_f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half2* u;
+ device half2* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, vec2<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, vec2<f16>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant half2* u [[buffer(0)]], device half2* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ half2 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec2<f16> = load %u
- %x:vec2<f16> = let %4
- store %s, %x
- 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/buffer/uniform/types/vec2_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec2_f32.wgsl.expected.ir.msl
index d8275c8..8a0d9a6 100644
--- a/test/tint/buffer/uniform/types/vec2_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/vec2_f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float2* u;
+ device float2* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, vec2<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, vec2<f32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant float2* u [[buffer(0)]], device float2* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float2 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec2<f32> = load %u
- %x:vec2<f32> = let %4
- store %s, %x
- 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/buffer/uniform/types/vec2_i32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec2_i32.wgsl.expected.ir.msl
index c033670..04f2a65 100644
--- a/test/tint/buffer/uniform/types/vec2_i32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/vec2_i32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant int2* u;
+ device int2* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, vec2<i32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, vec2<i32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant int2* u [[buffer(0)]], device int2* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ int2 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec2<i32> = load %u
- %x:vec2<i32> = let %4
- store %s, %x
- 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/buffer/uniform/types/vec2_u32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec2_u32.wgsl.expected.ir.msl
index c5e6856..db64177 100644
--- a/test/tint/buffer/uniform/types/vec2_u32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/vec2_u32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant uint2* u;
+ device uint2* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, vec2<u32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, vec2<u32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant uint2* u [[buffer(0)]], device uint2* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ uint2 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec2<u32> = load %u
- %x:vec2<u32> = let %4
- store %s, %x
- 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/buffer/uniform/types/vec3_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec3_f16.wgsl.expected.ir.msl
index e2ee911..944e852 100644
--- a/test/tint/buffer/uniform/types/vec3_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/vec3_f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half3* u;
+ device half3* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, vec3<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, vec3<f16>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant half3* u [[buffer(0)]], device half3* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ half3 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec3<f16> = load %u
- %x:vec3<f16> = let %4
- store %s, %x
- 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/buffer/uniform/types/vec3_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec3_f32.wgsl.expected.ir.msl
index 480b084..0ac2e48 100644
--- a/test/tint/buffer/uniform/types/vec3_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/vec3_f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float3* u;
+ device float3* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, vec3<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, vec3<f32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant float3* u [[buffer(0)]], device float3* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float3 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec3<f32> = load %u
- %x:vec3<f32> = let %4
- store %s, %x
- 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/buffer/uniform/types/vec3_i32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec3_i32.wgsl.expected.ir.msl
index 242cae3..c74f20c 100644
--- a/test/tint/buffer/uniform/types/vec3_i32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/vec3_i32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant int3* u;
+ device int3* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, vec3<i32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, vec3<i32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant int3* u [[buffer(0)]], device int3* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ int3 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec3<i32> = load %u
- %x:vec3<i32> = let %4
- store %s, %x
- 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/buffer/uniform/types/vec3_u32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec3_u32.wgsl.expected.ir.msl
index 18b6c5e..83d9d58 100644
--- a/test/tint/buffer/uniform/types/vec3_u32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/vec3_u32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant uint3* u;
+ device uint3* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, vec3<u32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, vec3<u32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant uint3* u [[buffer(0)]], device uint3* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ uint3 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec3<u32> = load %u
- %x:vec3<u32> = let %4
- store %s, %x
- 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/buffer/uniform/types/vec4_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec4_f16.wgsl.expected.ir.msl
index f73d656..8472176 100644
--- a/test/tint/buffer/uniform/types/vec4_f16.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/vec4_f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant half4* u;
+ device half4* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, vec4<f16>, read> = var @binding_point(0, 0)
- %s:ptr<storage, vec4<f16>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant half4* u [[buffer(0)]], device half4* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ half4 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec4<f16> = load %u
- %x:vec4<f16> = let %4
- store %s, %x
- 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/buffer/uniform/types/vec4_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec4_f32.wgsl.expected.ir.msl
index df46933..7fc7b21 100644
--- a/test/tint/buffer/uniform/types/vec4_f32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/vec4_f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float4* u;
+ device float4* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, vec4<f32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, vec4<f32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant float4* u [[buffer(0)]], device float4* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ float4 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec4<f32> = load %u
- %x:vec4<f32> = let %4
- store %s, %x
- 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/buffer/uniform/types/vec4_i32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec4_i32.wgsl.expected.ir.msl
index 3b61b9f..4708c30 100644
--- a/test/tint/buffer/uniform/types/vec4_i32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/vec4_i32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant int4* u;
+ device int4* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, vec4<i32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, vec4<i32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant int4* u [[buffer(0)]], device int4* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ int4 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec4<i32> = load %u
- %x:vec4<i32> = let %4
- store %s, %x
- 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/buffer/uniform/types/vec4_u32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec4_u32.wgsl.expected.ir.msl
index b7c1bf2..2de3973 100644
--- a/test/tint/buffer/uniform/types/vec4_u32.wgsl.expected.ir.msl
+++ b/test/tint/buffer/uniform/types/vec4_u32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant uint4* u;
+ device uint4* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, vec4<u32>, read> = var @binding_point(0, 0)
- %s:ptr<storage, vec4<u32>, read_write> = var @binding_point(0, 1)
+kernel void tint_symbol(const constant uint4* u [[buffer(0)]], device uint4* s [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u, .s=s};
+ uint4 const x = (*tint_module_vars.u);
+ (*tint_module_vars.s) = x;
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:vec4<u32> = load %u
- %x:vec4<u32> = let %4
- store %s, %x
- 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/chromium/1430309.wgsl.expected.ir.msl b/test/tint/bug/chromium/1430309.wgsl.expected.ir.msl
index 144777b..20feeef 100644
--- a/test/tint/bug/chromium/1430309.wgsl.expected.ir.msl
+++ b/test/tint/bug/chromium/1430309.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct frexp_result_f32 {
@@ -9,16 +7,14 @@
float fract;
int exp;
};
+struct tint_module_vars_struct {
+ thread frexp_result_f32* a;
+ thread frexp_result_f32_1* b;
+};
-thread frexp_result_f32 a = {};
-thread frexp_result_f32_1 b = frexp_result_f32_1{.fract=0.5f, .exp=1};
fragment float4 tint_symbol() {
- return float4(a.f, b.fract, 0.0f, 0.0f);
+ thread frexp_result_f32 a = {};
+ thread frexp_result_f32_1 b = frexp_result_f32_1{.fract=0.5f, .exp=1};
+ tint_module_vars_struct const tint_module_vars = {.a=(&a), .b=(&b)};
+ return float4((*tint_module_vars.a).f, (*tint_module_vars.b).fract, 0.0f, 0.0f);
}
-program_source:11:25: error: program scope variable must reside in constant address space
-thread frexp_result_f32 a = {};
- ^
-program_source:12:27: error: program scope variable must reside in constant address space
-thread frexp_result_f32_1 b = frexp_result_f32_1{.fract=0.5f, .exp=1};
- ^
-
diff --git a/test/tint/bug/fxc/dyn_array_idx/read/function.wgsl.expected.ir.msl b/test/tint/bug/fxc/dyn_array_idx/read/function.wgsl.expected.ir.msl
index 9def01d..93e2b199 100644
--- a/test/tint/bug/fxc/dyn_array_idx/read/function.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/dyn_array_idx/read/function.wgsl.expected.ir.msl
@@ -1,39 +1,33 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct UBO {
+ int dynamic_idx;
+};
+struct Result {
+ int out;
+};
+struct tint_module_vars_struct {
+ const constant UBO* ubo;
+ device Result* result;
+};
+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: UBO = struct @align(4) {
- dynamic_idx:i32 @offset(0)
+struct S {
+ tint_array<int, 64> data;
+};
+
+kernel void f(const constant UBO* ubo [[buffer(0)]], device Result* result [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.ubo=ubo, .result=result};
+ S s = {};
+ (*tint_module_vars.result).out = s.data[(*tint_module_vars.ubo).dynamic_idx];
}
-
-Result = struct @align(4) {
- out:i32 @offset(0)
-}
-
-S = struct @align(4) {
- data:array<i32, 64> @offset(0)
-}
-
-$B1: { # root
- %ubo:ptr<uniform, UBO, read> = var @binding_point(0, 0)
- %result:ptr<storage, Result, read_write> = var @binding_point(0, 1)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %s:ptr<function, S, read_write> = var
- %5:ptr<storage, i32, read_write> = access %result, 0u
- %6:ptr<uniform, i32, read> = access %ubo, 0u
- %7:i32 = load %6
- %8:ptr<function, i32, read_write> = access %s, 0u, %7
- %9:i32 = load %8
- store %5, %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/bug/fxc/dyn_array_idx/read/private.wgsl.expected.ir.msl b/test/tint/bug/fxc/dyn_array_idx/read/private.wgsl.expected.ir.msl
index 4c59525..c572b13 100644
--- a/test/tint/bug/fxc/dyn_array_idx/read/private.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/dyn_array_idx/read/private.wgsl.expected.ir.msl
@@ -1,39 +1,34 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct UBO {
+ int dynamic_idx;
+};
+struct Result {
+ int out;
+};
+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: UBO = struct @align(4) {
- dynamic_idx:i32 @offset(0)
+struct S {
+ tint_array<int, 64> data;
+};
+struct tint_module_vars_struct {
+ const constant UBO* ubo;
+ device Result* result;
+ thread S* s;
+};
+
+kernel void f(const constant UBO* ubo [[buffer(0)]], device Result* result [[buffer(1)]]) {
+ thread S s = {};
+ tint_module_vars_struct const tint_module_vars = {.ubo=ubo, .result=result, .s=(&s)};
+ (*tint_module_vars.result).out = (*tint_module_vars.s).data[(*tint_module_vars.ubo).dynamic_idx];
}
-
-Result = struct @align(4) {
- out:i32 @offset(0)
-}
-
-S = struct @align(4) {
- data:array<i32, 64> @offset(0)
-}
-
-$B1: { # root
- %ubo:ptr<uniform, UBO, read> = var @binding_point(0, 0)
- %result:ptr<storage, Result, read_write> = var @binding_point(0, 1)
- %s:ptr<private, S, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:ptr<storage, i32, read_write> = access %result, 0u
- %6:ptr<uniform, i32, read> = access %ubo, 0u
- %7:i32 = load %6
- %8:ptr<private, i32, read_write> = access %s, 0u, %7
- %9:i32 = load %8
- store %5, %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/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 a8f5a41..b4ba2a1 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
@@ -1,39 +1,33 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct UBO {
+ int dynamic_idx;
+};
+struct Result {
+ int out;
+};
+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: UBO = struct @align(4) {
- dynamic_idx:i32 @offset(0)
+struct SSBO {
+ tint_array<int, 4> data;
+};
+struct tint_module_vars_struct {
+ const constant UBO* ubo;
+ device Result* result;
+ device SSBO* ssbo;
+};
+
+kernel void f(const constant UBO* ubo [[buffer(0)]], device Result* result [[buffer(2)]], device SSBO* ssbo [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.ubo=ubo, .result=result, .ssbo=ssbo};
+ (*tint_module_vars.result).out = (*tint_module_vars.ssbo).data[(*tint_module_vars.ubo).dynamic_idx];
}
-
-Result = struct @align(4) {
- out:i32 @offset(0)
-}
-
-SSBO = struct @align(4) {
- data:array<i32, 4> @offset(0)
-}
-
-$B1: { # root
- %ubo:ptr<uniform, UBO, read> = var @binding_point(0, 0)
- %result:ptr<storage, Result, read_write> = var @binding_point(0, 2)
- %ssbo:ptr<storage, SSBO, read_write> = var @binding_point(0, 1)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:ptr<storage, i32, read_write> = access %result, 0u
- %6:ptr<uniform, i32, read> = access %ubo, 0u
- %7:i32 = load %6
- %8:ptr<storage, i32, read_write> = access %ssbo, 0u, %7
- %9:i32 = load %8
- store %5, %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/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 e394af7..27a2233 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
@@ -1,35 +1,30 @@
-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: UBO = struct @align(16) {
- data:array<vec4<i32>, 4> @offset(0)
- dynamic_idx:i32 @offset(64)
+struct UBO {
+ tint_array<int4, 4> data;
+ int dynamic_idx;
+};
+struct Result {
+ int out;
+};
+struct tint_module_vars_struct {
+ const constant UBO* ubo;
+ device Result* result;
+};
+
+kernel void f(const constant UBO* ubo [[buffer(0)]], device Result* result [[buffer(2)]]) {
+ tint_module_vars_struct const tint_module_vars = {.ubo=ubo, .result=result};
+ (*tint_module_vars.result).out = (*tint_module_vars.ubo).data[(*tint_module_vars.ubo).dynamic_idx][0u];
}
-
-Result = struct @align(4) {
- out:i32 @offset(0)
-}
-
-$B1: { # root
- %ubo:ptr<uniform, UBO, read> = var @binding_point(0, 0)
- %result:ptr<storage, Result, read_write> = var @binding_point(0, 2)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:ptr<storage, i32, read_write> = access %result, 0u
- %5:ptr<uniform, i32, read> = access %ubo, 1u
- %6:i32 = load %5
- %7:ptr<uniform, vec4<i32>, read> = access %ubo, 0u, %6
- %8:i32 = load_vector_element %7, 0u
- store %4, %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/bug/fxc/dyn_array_idx/write/function.wgsl.expected.ir.msl b/test/tint/bug/fxc/dyn_array_idx/write/function.wgsl.expected.ir.msl
index 3930e65..e6222b9 100644
--- a/test/tint/bug/fxc/dyn_array_idx/write/function.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/dyn_array_idx/write/function.wgsl.expected.ir.msl
@@ -1,41 +1,34 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct UBO {
+ int dynamic_idx;
+};
+struct Result {
+ int out;
+};
+struct tint_module_vars_struct {
+ const constant UBO* ubo;
+ device Result* result;
+};
+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: UBO = struct @align(4) {
- dynamic_idx:i32 @offset(0)
+struct S {
+ tint_array<int, 64> data;
+};
+
+kernel void f(const constant UBO* ubo [[buffer(0)]], device Result* result [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.ubo=ubo, .result=result};
+ S s = {};
+ s.data[(*tint_module_vars.ubo).dynamic_idx] = 1;
+ (*tint_module_vars.result).out = s.data[3];
}
-
-Result = struct @align(4) {
- out:i32 @offset(0)
-}
-
-S = struct @align(4) {
- data:array<i32, 64> @offset(0)
-}
-
-$B1: { # root
- %ubo:ptr<uniform, UBO, read> = var @binding_point(0, 0)
- %result:ptr<storage, Result, read_write> = var @binding_point(0, 1)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %s:ptr<function, S, read_write> = var
- %5:ptr<uniform, i32, read> = access %ubo, 0u
- %6:i32 = load %5
- %7:ptr<function, i32, read_write> = access %s, 0u, %6
- store %7, 1i
- %8:ptr<storage, i32, read_write> = access %result, 0u
- %9:ptr<function, i32, read_write> = access %s, 0u, 3i
- %10:i32 = load %9
- store %8, %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/bug/fxc/dyn_array_idx/write/function_via_param.wgsl.expected.ir.msl b/test/tint/bug/fxc/dyn_array_idx/write/function_via_param.wgsl.expected.ir.msl
index 2e17591..ce9dbea 100644
--- a/test/tint/bug/fxc/dyn_array_idx/write/function_via_param.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/dyn_array_idx/write/function_via_param.wgsl.expected.ir.msl
@@ -1,47 +1,37 @@
-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: UBO = struct @align(4) {
- dynamic_idx:i32 @offset(0)
-}
+struct S {
+ tint_array<int, 64> data;
+};
+struct UBO {
+ int dynamic_idx;
+};
+struct Result {
+ int out;
+};
+struct tint_module_vars_struct {
+ const constant UBO* ubo;
+ device Result* result;
+};
-Result = struct @align(4) {
- out:i32 @offset(0)
+void x(thread S* const p, tint_module_vars_struct tint_module_vars) {
+ (*p).data[(*tint_module_vars.ubo).dynamic_idx] = 1;
}
-
-S = struct @align(4) {
- data:array<i32, 64> @offset(0)
+kernel void f(const constant UBO* ubo [[buffer(0)]], device Result* result [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.ubo=ubo, .result=result};
+ S s = {};
+ x((&s), tint_module_vars);
+ (*tint_module_vars.result).out = s.data[3];
}
-
-$B1: { # root
- %ubo:ptr<uniform, UBO, read> = var @binding_point(0, 0)
- %result:ptr<storage, Result, read_write> = var @binding_point(0, 1)
-}
-
-%x = func(%p:ptr<function, S, read_write>):void {
- $B2: {
- %5:ptr<uniform, i32, read> = access %ubo, 0u
- %6:i32 = load %5
- %7:ptr<function, i32, read_write> = access %p, 0u, %6
- store %7, 1i
- ret
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %s:ptr<function, S, read_write> = var
- %10:void = call %x, %s
- %11:ptr<storage, i32, read_write> = access %result, 0u
- %12:ptr<function, i32, read_write> = access %s, 0u, 3i
- %13:i32 = load %12
- store %11, %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/dyn_array_idx/write/private.wgsl.expected.ir.msl b/test/tint/bug/fxc/dyn_array_idx/write/private.wgsl.expected.ir.msl
index fac2d98..ddcdabe 100644
--- a/test/tint/bug/fxc/dyn_array_idx/write/private.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/dyn_array_idx/write/private.wgsl.expected.ir.msl
@@ -1,41 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct UBO {
+ int dynamic_idx;
+};
+struct Result {
+ int out;
+};
+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: UBO = struct @align(4) {
- dynamic_idx:i32 @offset(0)
+struct S {
+ tint_array<int, 64> data;
+};
+struct tint_module_vars_struct {
+ const constant UBO* ubo;
+ device Result* result;
+ thread S* s;
+};
+
+kernel void f(const constant UBO* ubo [[buffer(0)]], device Result* result [[buffer(1)]]) {
+ thread S s = {};
+ tint_module_vars_struct const tint_module_vars = {.ubo=ubo, .result=result, .s=(&s)};
+ (*tint_module_vars.s).data[(*tint_module_vars.ubo).dynamic_idx] = 1;
+ (*tint_module_vars.result).out = (*tint_module_vars.s).data[3];
}
-
-Result = struct @align(4) {
- out:i32 @offset(0)
-}
-
-S = struct @align(4) {
- data:array<i32, 64> @offset(0)
-}
-
-$B1: { # root
- %ubo:ptr<uniform, UBO, read> = var @binding_point(0, 0)
- %result:ptr<storage, Result, read_write> = var @binding_point(0, 1)
- %s:ptr<private, S, read_write> = var
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:ptr<uniform, i32, read> = access %ubo, 0u
- %6:i32 = load %5
- %7:ptr<private, i32, read_write> = access %s, 0u, %6
- store %7, 1i
- %8:ptr<storage, i32, read_write> = access %result, 0u
- %9:ptr<private, i32, read_write> = access %s, 0u, 3i
- %10:i32 = load %9
- store %8, %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/bug/fxc/dyn_array_idx/write/private_via_param.wgsl.expected.ir.msl b/test/tint/bug/fxc/dyn_array_idx/write/private_via_param.wgsl.expected.ir.msl
index 573ffa1..a7bfe01 100644
--- a/test/tint/bug/fxc/dyn_array_idx/write/private_via_param.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/dyn_array_idx/write/private_via_param.wgsl.expected.ir.msl
@@ -1,47 +1,38 @@
-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: UBO = struct @align(4) {
- dynamic_idx:i32 @offset(0)
-}
+struct S {
+ tint_array<int, 64> data;
+};
+struct UBO {
+ int dynamic_idx;
+};
+struct Result {
+ int out;
+};
+struct tint_module_vars_struct {
+ const constant UBO* ubo;
+ device Result* result;
+ thread S* s;
+};
-Result = struct @align(4) {
- out:i32 @offset(0)
+void x(thread S* const p, tint_module_vars_struct tint_module_vars) {
+ (*p).data[(*tint_module_vars.ubo).dynamic_idx] = 1;
}
-
-S = struct @align(4) {
- data:array<i32, 64> @offset(0)
+kernel void f(const constant UBO* ubo [[buffer(0)]], device Result* result [[buffer(1)]]) {
+ thread S s = {};
+ tint_module_vars_struct const tint_module_vars = {.ubo=ubo, .result=result, .s=(&s)};
+ x(tint_module_vars.s, tint_module_vars);
+ (*tint_module_vars.result).out = (*tint_module_vars.s).data[3];
}
-
-$B1: { # root
- %ubo:ptr<uniform, UBO, read> = var @binding_point(0, 0)
- %result:ptr<storage, Result, read_write> = var @binding_point(0, 1)
- %s:ptr<private, S, read_write> = var
-}
-
-%x = func(%p:ptr<private, S, read_write>):void {
- $B2: {
- %6:ptr<uniform, i32, read> = access %ubo, 0u
- %7:i32 = load %6
- %8:ptr<private, i32, read_write> = access %p, 0u, %7
- store %8, 1i
- ret
- }
-}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %10:void = call %x, %s
- %11:ptr<storage, i32, read_write> = access %result, 0u
- %12:ptr<private, i32, read_write> = access %s, 0u, 3i
- %13:i32 = load %12
- store %11, %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/dyn_array_idx/write/storage.wgsl.expected.ir.msl b/test/tint/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.ir.msl
index d48f2c5..56f87ff 100644
--- a/test/tint/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.ir.msl
@@ -1,41 +1,34 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct UBO {
+ int dynamic_idx;
+};
+struct Result {
+ int out;
+};
+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: UBO = struct @align(4) {
- dynamic_idx:i32 @offset(0)
+struct SSBO {
+ tint_array<int, 4> data;
+};
+struct tint_module_vars_struct {
+ const constant UBO* ubo;
+ device Result* result;
+ device SSBO* ssbo;
+};
+
+kernel void f(const constant UBO* ubo [[buffer(0)]], device Result* result [[buffer(2)]], device SSBO* ssbo [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.ubo=ubo, .result=result, .ssbo=ssbo};
+ (*tint_module_vars.ssbo).data[(*tint_module_vars.ubo).dynamic_idx] = 1;
+ (*tint_module_vars.result).out = (*tint_module_vars.ssbo).data[3];
}
-
-Result = struct @align(4) {
- out:i32 @offset(0)
-}
-
-SSBO = struct @align(4) {
- data:array<i32, 4> @offset(0)
-}
-
-$B1: { # root
- %ubo:ptr<uniform, UBO, read> = var @binding_point(0, 0)
- %result:ptr<storage, Result, read_write> = var @binding_point(0, 2)
- %ssbo:ptr<storage, SSBO, read_write> = var @binding_point(0, 1)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:ptr<uniform, i32, read> = access %ubo, 0u
- %6:i32 = load %5
- %7:ptr<storage, i32, read_write> = access %ssbo, 0u, %6
- store %7, 1i
- %8:ptr<storage, i32, read_write> = access %result, 0u
- %9:ptr<storage, i32, read_write> = access %ssbo, 0u, 3i
- %10:i32 = load %9
- store %8, %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/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.ir.msl b/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.ir.msl
index 1896e60..bc75e3e 100644
--- a/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.ir.msl
@@ -1,13 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float2* v2f;
+ thread int3* v3i;
+ thread uint4* v4u;
+ thread bool2* v2b;
+};
-thread float2 v2f = 0.0f;
-thread int3 v3i = 0;
-thread uint4 v4u = 0u;
-thread bool2 v2b = false;
-void foo() {
+void foo(tint_module_vars_struct tint_module_vars) {
{
int i = 0;
while(true) {
@@ -15,16 +15,21 @@
} else {
break;
}
- v2f[i] = 1.0f;
- v3i[i] = 1;
- v4u[i] = 1u;
- v2b[i] = true;
+ (*tint_module_vars.v2f)[i] = 1.0f;
+ (*tint_module_vars.v3i)[i] = 1;
+ (*tint_module_vars.v4u)[i] = 1u;
+ (*tint_module_vars.v2b)[i] = true;
i = (i + 1);
continue;
}
}
}
kernel void tint_symbol() {
+ thread float2 v2f = 0.0f;
+ thread int3 v3i = 0;
+ thread uint4 v4u = 0u;
+ thread bool2 v2b = false;
+ tint_module_vars_struct const tint_module_vars = {.v2f=(&v2f), .v3i=(&v3i), .v4u=(&v4u), .v2b=(&v2b)};
{
int i = 0;
while(true) {
@@ -32,22 +37,9 @@
} else {
break;
}
- foo();
+ foo(tint_module_vars);
i = (i + 1);
continue;
}
}
}
-program_source:4:15: error: program scope variable must reside in constant address space
-thread float2 v2f = 0.0f;
- ^
-program_source:5:13: error: program scope variable must reside in constant address space
-thread int3 v3i = 0;
- ^
-program_source:6:14: error: program scope variable must reside in constant address space
-thread uint4 v4u = 0u;
- ^
-program_source:7:14: error: program scope variable must reside in constant address space
-thread bool2 v2b = false;
- ^
-
diff --git a/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.ir.msl b/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.ir.msl
index 56d2875..eddd698 100644
--- a/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.ir.msl
@@ -1,20 +1,25 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float2* v2f;
+ thread int3* v3i;
+ thread uint4* v4u;
+ thread bool2* v2b;
+};
-thread float2 v2f = 0.0f;
-thread int3 v3i = 0;
-thread uint4 v4u = 0u;
-thread bool2 v2b = false;
-void foo() {
+void foo(tint_module_vars_struct tint_module_vars) {
int i = 0;
- v2f[i] = 1.0f;
- v3i[i] = 1;
- v4u[i] = 1u;
- v2b[i] = true;
+ (*tint_module_vars.v2f)[i] = 1.0f;
+ (*tint_module_vars.v3i)[i] = 1;
+ (*tint_module_vars.v4u)[i] = 1u;
+ (*tint_module_vars.v2b)[i] = true;
}
kernel void tint_symbol() {
+ thread float2 v2f = 0.0f;
+ thread int3 v3i = 0;
+ thread uint4 v4u = 0u;
+ thread bool2 v2b = false;
+ tint_module_vars_struct const tint_module_vars = {.v2f=(&v2f), .v3i=(&v3i), .v4u=(&v4u), .v2b=(&v2b)};
{
int i = 0;
while(true) {
@@ -22,22 +27,9 @@
} else {
break;
}
- foo();
+ foo(tint_module_vars);
i = (i + 1);
continue;
}
}
}
-program_source:4:15: error: program scope variable must reside in constant address space
-thread float2 v2f = 0.0f;
- ^
-program_source:5:13: error: program scope variable must reside in constant address space
-thread int3 v3i = 0;
- ^
-program_source:6:14: error: program scope variable must reside in constant address space
-thread uint4 v4u = 0u;
- ^
-program_source:7:14: error: program scope variable must reside in constant address space
-thread bool2 v2b = false;
- ^
-
diff --git a/test/tint/bug/tint/1086.wgsl.expected.ir.msl b/test/tint/bug/tint/1086.wgsl.expected.ir.msl
index 37f69a0..91474dc 100644
--- a/test/tint/bug/tint/1086.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1086.wgsl.expected.ir.msl
@@ -1,25 +1,17 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* v;
+};
-thread float v = 0.0f;
void x(thread float* const p) {
- p = 0.0f;
+ (*p) = 0.0f;
}
-void g() {
- x(v);
+void g(tint_module_vars_struct tint_module_vars) {
+ x(tint_module_vars.v);
}
fragment void f() {
- g();
+ thread float v = 0.0f;
+ tint_module_vars_struct const tint_module_vars = {.v=(&v)};
+ g(tint_module_vars);
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float v = 0.0f;
- ^
-program_source:6:5: error: cannot assign to variable 'p' with const-qualified type 'float *const'
- p = 0.0f;
- ~ ^
-program_source:5:28: note: variable 'p' declared const here
-void x(thread float* const p) {
- ~~~~~~~~~~~~~~~~~~~~^
-
diff --git a/test/tint/bug/tint/1136.wgsl.expected.ir.msl b/test/tint/bug/tint/1136.wgsl.expected.ir.msl
index 27aafe7..27ed7f9 100644
--- a/test/tint/bug/tint/1136.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1136.wgsl.expected.ir.msl
@@ -1,28 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Buffer {
+ uint data;
+};
+struct tint_module_vars_struct {
+ device Buffer* tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Buffer = struct @align(4) {
- data:u32 @offset(0)
+void tint_symbol_1(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.tint_symbol).data = ((*tint_module_vars.tint_symbol).data + 1u);
}
-
-$B1: { # root
- %tint_symbol:ptr<storage, Buffer, read_write> = var @binding_point(0, 0)
-}
-
-%tint_symbol_1 = func():void {
- $B2: {
- %3:ptr<storage, u32, read_write> = access %tint_symbol, 0u
- %4:ptr<storage, u32, read_write> = access %tint_symbol, 0u
- %5:u32 = load %4
- %6:u32 = add %5, 1u
- store %3, %6
- 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/1321.wgsl.expected.ir.msl b/test/tint/bug/tint/1321.wgsl.expected.ir.msl
index 3304981..a7c5832 100644
--- a/test/tint/bug/tint/1321.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1321.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -21,17 +19,10 @@
fragment void tint_symbol() {
tint_array<float, 4> arr = tint_array<float, 4>{};
{
- thread float* const a = arr[foo()];
+ thread float* const a = (&arr[foo()]);
while(true) {
- float const x = a;
+ float const x = (*a);
break;
}
}
}
-program_source:22:25: error: cannot initialize a variable of type 'float *const' with an lvalue of type 'float'
- thread float* const a = arr[foo()];
- ^ ~~~~~~~~~~
-program_source:24:19: error: cannot initialize a variable of type 'const float' with an lvalue of type 'float *const'
- float const x = a;
- ^ ~
-
diff --git a/test/tint/bug/tint/1369.wgsl.expected.ir.msl b/test/tint/bug/tint/1369.wgsl.expected.ir.msl
index 9934540..7aa3f8d 100644
--- a/test/tint/bug/tint/1369.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1369.wgsl.expected.ir.msl
@@ -1,27 +1,19 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* continue_execution;
+};
-thread bool continue_execution = true;
-bool call_discard() {
- continue_execution = false;
+bool call_discard(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.continue_execution) = false;
return true;
}
fragment void f() {
- bool v = call_discard();
+ thread bool continue_execution = true;
+ tint_module_vars_struct const tint_module_vars = {.continue_execution=(&continue_execution)};
+ bool v = call_discard(tint_module_vars);
bool also_unreachable = false;
- if (!(continue_execution)) {
+ if (!((*tint_module_vars.continue_execution))) {
discard_fragment();
}
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool continue_execution = true;
- ^
-program_source:10:8: warning: unused variable 'v' [-Wunused-variable]
- bool v = call_discard();
- ^
-program_source:11:8: warning: unused variable 'also_unreachable' [-Wunused-variable]
- bool also_unreachable = false;
- ^
-
diff --git a/test/tint/bug/tint/1385.wgsl.expected.ir.msl b/test/tint/bug/tint/1385.wgsl.expected.ir.msl
index 4eab5b4..49062f4 100644
--- a/test/tint/bug/tint/1385.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1385.wgsl.expected.ir.msl
@@ -1,27 +1,25 @@
-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: $B1: { # root
- %data:ptr<storage, array<i32>, read> = var @binding_point(0, 1)
-}
+struct tint_module_vars_struct {
+ const device tint_array<int, 1>* data;
+};
-%foo = func():i32 {
- $B2: {
- %3:ptr<storage, i32, read> = access %data, 0i
- %4:i32 = load %3
- ret %4
- }
+int foo(tint_module_vars_struct tint_module_vars) {
+ return (*tint_module_vars.data)[0];
}
-%tint_symbol = @compute @workgroup_size(16, 16, 1) func():void {
- $B3: {
- %6:i32 = call %foo
- ret
- }
+kernel void tint_symbol(const device tint_array<int, 1>* data [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.data=data};
+ foo(tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/1509.wgsl.expected.ir.msl b/test/tint/bug/tint/1509.wgsl.expected.ir.msl
index 74d387f..0f0cce6 100644
--- a/test/tint/bug/tint/1509.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1509.wgsl.expected.ir.msl
@@ -1,5013 +1,3013 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* v0;
+ thread uint* v1;
+ thread uint* v2;
+ thread uint* v3;
+ thread uint* v4;
+ thread uint* v5;
+ thread uint* v6;
+ thread uint* v7;
+ thread uint* v8;
+ thread uint* v9;
+ thread uint* v10;
+ thread uint* v11;
+ thread uint* v12;
+ thread uint* v13;
+ thread uint* v14;
+ thread uint* v15;
+ thread uint* v16;
+ thread uint* v17;
+ thread uint* v18;
+ thread uint* v19;
+ thread uint* v20;
+ thread uint* v21;
+ thread uint* v22;
+ thread uint* v23;
+ thread uint* v24;
+ thread uint* v25;
+ thread uint* v26;
+ thread uint* v27;
+ thread uint* v28;
+ thread uint* v29;
+ thread uint* v30;
+ thread uint* v31;
+ thread uint* v32;
+ thread uint* v33;
+ thread uint* v34;
+ thread uint* v35;
+ thread uint* v36;
+ thread uint* v37;
+ thread uint* v38;
+ thread uint* v39;
+ thread uint* v40;
+ thread uint* v41;
+ thread uint* v42;
+ thread uint* v43;
+ thread uint* v44;
+ thread uint* v45;
+ thread uint* v46;
+ thread uint* v47;
+ thread uint* v48;
+ thread uint* v49;
+ thread uint* v50;
+ thread uint* v51;
+ thread uint* v52;
+ thread uint* v53;
+ thread uint* v54;
+ thread uint* v55;
+ thread uint* v56;
+ thread uint* v57;
+ thread uint* v58;
+ thread uint* v59;
+ thread uint* v60;
+ thread uint* v61;
+ thread uint* v62;
+ thread uint* v63;
+ thread uint* v64;
+ thread uint* v65;
+ thread uint* v66;
+ thread uint* v67;
+ thread uint* v68;
+ thread uint* v69;
+ thread uint* v70;
+ thread uint* v71;
+ thread uint* v72;
+ thread uint* v73;
+ thread uint* v74;
+ thread uint* v75;
+ thread uint* v76;
+ thread uint* v77;
+ thread uint* v78;
+ thread uint* v79;
+ thread uint* v80;
+ thread uint* v81;
+ thread uint* v82;
+ thread uint* v83;
+ thread uint* v84;
+ thread uint* v85;
+ thread uint* v86;
+ thread uint* v87;
+ thread uint* v88;
+ thread uint* v89;
+ thread uint* v90;
+ thread uint* v91;
+ thread uint* v92;
+ thread uint* v93;
+ thread uint* v94;
+ thread uint* v95;
+ thread uint* v96;
+ thread uint* v97;
+ thread uint* v98;
+ thread uint* v99;
+ thread uint* v100;
+ thread uint* v101;
+ thread uint* v102;
+ thread uint* v103;
+ thread uint* v104;
+ thread uint* v105;
+ thread uint* v106;
+ thread uint* v107;
+ thread uint* v108;
+ thread uint* v109;
+ thread uint* v110;
+ thread uint* v111;
+ thread uint* v112;
+ thread uint* v113;
+ thread uint* v114;
+ thread uint* v115;
+ thread uint* v116;
+ thread uint* v117;
+ thread uint* v118;
+ thread uint* v119;
+ thread uint* v120;
+ thread uint* v121;
+ thread uint* v122;
+ thread uint* v123;
+ thread uint* v124;
+ thread uint* v125;
+ thread uint* v126;
+ thread uint* v127;
+ thread uint* v128;
+ thread uint* v129;
+ thread uint* v130;
+ thread uint* v131;
+ thread uint* v132;
+ thread uint* v133;
+ thread uint* v134;
+ thread uint* v135;
+ thread uint* v136;
+ thread uint* v137;
+ thread uint* v138;
+ thread uint* v139;
+ thread uint* v140;
+ thread uint* v141;
+ thread uint* v142;
+ thread uint* v143;
+ thread uint* v144;
+ thread uint* v145;
+ thread uint* v146;
+ thread uint* v147;
+ thread uint* v148;
+ thread uint* v149;
+ thread uint* v150;
+ thread uint* v151;
+ thread uint* v152;
+ thread uint* v153;
+ thread uint* v154;
+ thread uint* v155;
+ thread uint* v156;
+ thread uint* v157;
+ thread uint* v158;
+ thread uint* v159;
+ thread uint* v160;
+ thread uint* v161;
+ thread uint* v162;
+ thread uint* v163;
+ thread uint* v164;
+ thread uint* v165;
+ thread uint* v166;
+ thread uint* v167;
+ thread uint* v168;
+ thread uint* v169;
+ thread uint* v170;
+ thread uint* v171;
+ thread uint* v172;
+ thread uint* v173;
+ thread uint* v174;
+ thread uint* v175;
+ thread uint* v176;
+ thread uint* v177;
+ thread uint* v178;
+ thread uint* v179;
+ thread uint* v180;
+ thread uint* v181;
+ thread uint* v182;
+ thread uint* v183;
+ thread uint* v184;
+ thread uint* v185;
+ thread uint* v186;
+ thread uint* v187;
+ thread uint* v188;
+ thread uint* v189;
+ thread uint* v190;
+ thread uint* v191;
+ thread uint* v192;
+ thread uint* v193;
+ thread uint* v194;
+ thread uint* v195;
+ thread uint* v196;
+ thread uint* v197;
+ thread uint* v198;
+ thread uint* v199;
+ thread uint* v200;
+ thread uint* v201;
+ thread uint* v202;
+ thread uint* v203;
+ thread uint* v204;
+ thread uint* v205;
+ thread uint* v206;
+ thread uint* v207;
+ thread uint* v208;
+ thread uint* v209;
+ thread uint* v210;
+ thread uint* v211;
+ thread uint* v212;
+ thread uint* v213;
+ thread uint* v214;
+ thread uint* v215;
+ thread uint* v216;
+ thread uint* v217;
+ thread uint* v218;
+ thread uint* v219;
+ thread uint* v220;
+ thread uint* v221;
+ thread uint* v222;
+ thread uint* v223;
+ thread uint* v224;
+ thread uint* v225;
+ thread uint* v226;
+ thread uint* v227;
+ thread uint* v228;
+ thread uint* v229;
+ thread uint* v230;
+ thread uint* v231;
+ thread uint* v232;
+ thread uint* v233;
+ thread uint* v234;
+ thread uint* v235;
+ thread uint* v236;
+ thread uint* v237;
+ thread uint* v238;
+ thread uint* v239;
+ thread uint* v240;
+ thread uint* v241;
+ thread uint* v242;
+ thread uint* v243;
+ thread uint* v244;
+ thread uint* v245;
+ thread uint* v246;
+ thread uint* v247;
+ thread uint* v248;
+ thread uint* v249;
+ thread uint* v250;
+ thread uint* v251;
+ thread uint* v252;
+ thread uint* v253;
+ thread uint* v254;
+ thread uint* v255;
+ thread uint* v256;
+ thread uint* v257;
+ thread uint* v258;
+ thread uint* v259;
+ thread uint* v260;
+ thread uint* v261;
+ thread uint* v262;
+ thread uint* v263;
+ thread uint* v264;
+ thread uint* v265;
+ thread uint* v266;
+ thread uint* v267;
+ thread uint* v268;
+ thread uint* v269;
+ thread uint* v270;
+ thread uint* v271;
+ thread uint* v272;
+ thread uint* v273;
+ thread uint* v274;
+ thread uint* v275;
+ thread uint* v276;
+ thread uint* v277;
+ thread uint* v278;
+ thread uint* v279;
+ thread uint* v280;
+ thread uint* v281;
+ thread uint* v282;
+ thread uint* v283;
+ thread uint* v284;
+ thread uint* v285;
+ thread uint* v286;
+ thread uint* v287;
+ thread uint* v288;
+ thread uint* v289;
+ thread uint* v290;
+ thread uint* v291;
+ thread uint* v292;
+ thread uint* v293;
+ thread uint* v294;
+ thread uint* v295;
+ thread uint* v296;
+ thread uint* v297;
+ thread uint* v298;
+ thread uint* v299;
+ thread uint* v300;
+ thread uint* v301;
+ thread uint* v302;
+ thread uint* v303;
+ thread uint* v304;
+ thread uint* v305;
+ thread uint* v306;
+ thread uint* v307;
+ thread uint* v308;
+ thread uint* v309;
+ thread uint* v310;
+ thread uint* v311;
+ thread uint* v312;
+ thread uint* v313;
+ thread uint* v314;
+ thread uint* v315;
+ thread uint* v316;
+ thread uint* v317;
+ thread uint* v318;
+ thread uint* v319;
+ thread uint* v320;
+ thread uint* v321;
+ thread uint* v322;
+ thread uint* v323;
+ thread uint* v324;
+ thread uint* v325;
+ thread uint* v326;
+ thread uint* v327;
+ thread uint* v328;
+ thread uint* v329;
+ thread uint* v330;
+ thread uint* v331;
+ thread uint* v332;
+ thread uint* v333;
+ thread uint* v334;
+ thread uint* v335;
+ thread uint* v336;
+ thread uint* v337;
+ thread uint* v338;
+ thread uint* v339;
+ thread uint* v340;
+ thread uint* v341;
+ thread uint* v342;
+ thread uint* v343;
+ thread uint* v344;
+ thread uint* v345;
+ thread uint* v346;
+ thread uint* v347;
+ thread uint* v348;
+ thread uint* v349;
+ thread uint* v350;
+ thread uint* v351;
+ thread uint* v352;
+ thread uint* v353;
+ thread uint* v354;
+ thread uint* v355;
+ thread uint* v356;
+ thread uint* v357;
+ thread uint* v358;
+ thread uint* v359;
+ thread uint* v360;
+ thread uint* v361;
+ thread uint* v362;
+ thread uint* v363;
+ thread uint* v364;
+ thread uint* v365;
+ thread uint* v366;
+ thread uint* v367;
+ thread uint* v368;
+ thread uint* v369;
+ thread uint* v370;
+ thread uint* v371;
+ thread uint* v372;
+ thread uint* v373;
+ thread uint* v374;
+ thread uint* v375;
+ thread uint* v376;
+ thread uint* v377;
+ thread uint* v378;
+ thread uint* v379;
+ thread uint* v380;
+ thread uint* v381;
+ thread uint* v382;
+ thread uint* v383;
+ thread uint* v384;
+ thread uint* v385;
+ thread uint* v386;
+ thread uint* v387;
+ thread uint* v388;
+ thread uint* v389;
+ thread uint* v390;
+ thread uint* v391;
+ thread uint* v392;
+ thread uint* v393;
+ thread uint* v394;
+ thread uint* v395;
+ thread uint* v396;
+ thread uint* v397;
+ thread uint* v398;
+ thread uint* v399;
+ thread uint* v400;
+ thread uint* v401;
+ thread uint* v402;
+ thread uint* v403;
+ thread uint* v404;
+ thread uint* v405;
+ thread uint* v406;
+ thread uint* v407;
+ thread uint* v408;
+ thread uint* v409;
+ thread uint* v410;
+ thread uint* v411;
+ thread uint* v412;
+ thread uint* v413;
+ thread uint* v414;
+ thread uint* v415;
+ thread uint* v416;
+ thread uint* v417;
+ thread uint* v418;
+ thread uint* v419;
+ thread uint* v420;
+ thread uint* v421;
+ thread uint* v422;
+ thread uint* v423;
+ thread uint* v424;
+ thread uint* v425;
+ thread uint* v426;
+ thread uint* v427;
+ thread uint* v428;
+ thread uint* v429;
+ thread uint* v430;
+ thread uint* v431;
+ thread uint* v432;
+ thread uint* v433;
+ thread uint* v434;
+ thread uint* v435;
+ thread uint* v436;
+ thread uint* v437;
+ thread uint* v438;
+ thread uint* v439;
+ thread uint* v440;
+ thread uint* v441;
+ thread uint* v442;
+ thread uint* v443;
+ thread uint* v444;
+ thread uint* v445;
+ thread uint* v446;
+ thread uint* v447;
+ thread uint* v448;
+ thread uint* v449;
+ thread uint* v450;
+ thread uint* v451;
+ thread uint* v452;
+ thread uint* v453;
+ thread uint* v454;
+ thread uint* v455;
+ thread uint* v456;
+ thread uint* v457;
+ thread uint* v458;
+ thread uint* v459;
+ thread uint* v460;
+ thread uint* v461;
+ thread uint* v462;
+ thread uint* v463;
+ thread uint* v464;
+ thread uint* v465;
+ thread uint* v466;
+ thread uint* v467;
+ thread uint* v468;
+ thread uint* v469;
+ thread uint* v470;
+ thread uint* v471;
+ thread uint* v472;
+ thread uint* v473;
+ thread uint* v474;
+ thread uint* v475;
+ thread uint* v476;
+ thread uint* v477;
+ thread uint* v478;
+ thread uint* v479;
+ thread uint* v480;
+ thread uint* v481;
+ thread uint* v482;
+ thread uint* v483;
+ thread uint* v484;
+ thread uint* v485;
+ thread uint* v486;
+ thread uint* v487;
+ thread uint* v488;
+ thread uint* v489;
+ thread uint* v490;
+ thread uint* v491;
+ thread uint* v492;
+ thread uint* v493;
+ thread uint* v494;
+ thread uint* v495;
+ thread uint* v496;
+ thread uint* v497;
+ thread uint* v498;
+ thread uint* v499;
+ thread uint* v500;
+ thread uint* v501;
+ thread uint* v502;
+ thread uint* v503;
+ thread uint* v504;
+ thread uint* v505;
+ thread uint* v506;
+ thread uint* v507;
+ thread uint* v508;
+ thread uint* v509;
+ thread uint* v510;
+ thread uint* v511;
+ thread uint* v512;
+ thread uint* v513;
+ thread uint* v514;
+ thread uint* v515;
+ thread uint* v516;
+ thread uint* v517;
+ thread uint* v518;
+ thread uint* v519;
+ thread uint* v520;
+ thread uint* v521;
+ thread uint* v522;
+ thread uint* v523;
+ thread uint* v524;
+ thread uint* v525;
+ thread uint* v526;
+ thread uint* v527;
+ thread uint* v528;
+ thread uint* v529;
+ thread uint* v530;
+ thread uint* v531;
+ thread uint* v532;
+ thread uint* v533;
+ thread uint* v534;
+ thread uint* v535;
+ thread uint* v536;
+ thread uint* v537;
+ thread uint* v538;
+ thread uint* v539;
+ thread uint* v540;
+ thread uint* v541;
+ thread uint* v542;
+ thread uint* v543;
+ thread uint* v544;
+ thread uint* v545;
+ thread uint* v546;
+ thread uint* v547;
+ thread uint* v548;
+ thread uint* v549;
+ thread uint* v550;
+ thread uint* v551;
+ thread uint* v552;
+ thread uint* v553;
+ thread uint* v554;
+ thread uint* v555;
+ thread uint* v556;
+ thread uint* v557;
+ thread uint* v558;
+ thread uint* v559;
+ thread uint* v560;
+ thread uint* v561;
+ thread uint* v562;
+ thread uint* v563;
+ thread uint* v564;
+ thread uint* v565;
+ thread uint* v566;
+ thread uint* v567;
+ thread uint* v568;
+ thread uint* v569;
+ thread uint* v570;
+ thread uint* v571;
+ thread uint* v572;
+ thread uint* v573;
+ thread uint* v574;
+ thread uint* v575;
+ thread uint* v576;
+ thread uint* v577;
+ thread uint* v578;
+ thread uint* v579;
+ thread uint* v580;
+ thread uint* v581;
+ thread uint* v582;
+ thread uint* v583;
+ thread uint* v584;
+ thread uint* v585;
+ thread uint* v586;
+ thread uint* v587;
+ thread uint* v588;
+ thread uint* v589;
+ thread uint* v590;
+ thread uint* v591;
+ thread uint* v592;
+ thread uint* v593;
+ thread uint* v594;
+ thread uint* v595;
+ thread uint* v596;
+ thread uint* v597;
+ thread uint* v598;
+ thread uint* v599;
+ thread uint* v600;
+ thread uint* v601;
+ thread uint* v602;
+ thread uint* v603;
+ thread uint* v604;
+ thread uint* v605;
+ thread uint* v606;
+ thread uint* v607;
+ thread uint* v608;
+ thread uint* v609;
+ thread uint* v610;
+ thread uint* v611;
+ thread uint* v612;
+ thread uint* v613;
+ thread uint* v614;
+ thread uint* v615;
+ thread uint* v616;
+ thread uint* v617;
+ thread uint* v618;
+ thread uint* v619;
+ thread uint* v620;
+ thread uint* v621;
+ thread uint* v622;
+ thread uint* v623;
+ thread uint* v624;
+ thread uint* v625;
+ thread uint* v626;
+ thread uint* v627;
+ thread uint* v628;
+ thread uint* v629;
+ thread uint* v630;
+ thread uint* v631;
+ thread uint* v632;
+ thread uint* v633;
+ thread uint* v634;
+ thread uint* v635;
+ thread uint* v636;
+ thread uint* v637;
+ thread uint* v638;
+ thread uint* v639;
+ thread uint* v640;
+ thread uint* v641;
+ thread uint* v642;
+ thread uint* v643;
+ thread uint* v644;
+ thread uint* v645;
+ thread uint* v646;
+ thread uint* v647;
+ thread uint* v648;
+ thread uint* v649;
+ thread uint* v650;
+ thread uint* v651;
+ thread uint* v652;
+ thread uint* v653;
+ thread uint* v654;
+ thread uint* v655;
+ thread uint* v656;
+ thread uint* v657;
+ thread uint* v658;
+ thread uint* v659;
+ thread uint* v660;
+ thread uint* v661;
+ thread uint* v662;
+ thread uint* v663;
+ thread uint* v664;
+ thread uint* v665;
+ thread uint* v666;
+ thread uint* v667;
+ thread uint* v668;
+ thread uint* v669;
+ thread uint* v670;
+ thread uint* v671;
+ thread uint* v672;
+ thread uint* v673;
+ thread uint* v674;
+ thread uint* v675;
+ thread uint* v676;
+ thread uint* v677;
+ thread uint* v678;
+ thread uint* v679;
+ thread uint* v680;
+ thread uint* v681;
+ thread uint* v682;
+ thread uint* v683;
+ thread uint* v684;
+ thread uint* v685;
+ thread uint* v686;
+ thread uint* v687;
+ thread uint* v688;
+ thread uint* v689;
+ thread uint* v690;
+ thread uint* v691;
+ thread uint* v692;
+ thread uint* v693;
+ thread uint* v694;
+ thread uint* v695;
+ thread uint* v696;
+ thread uint* v697;
+ thread uint* v698;
+ thread uint* v699;
+ thread uint* v700;
+ thread uint* v701;
+ thread uint* v702;
+ thread uint* v703;
+ thread uint* v704;
+ thread uint* v705;
+ thread uint* v706;
+ thread uint* v707;
+ thread uint* v708;
+ thread uint* v709;
+ thread uint* v710;
+ thread uint* v711;
+ thread uint* v712;
+ thread uint* v713;
+ thread uint* v714;
+ thread uint* v715;
+ thread uint* v716;
+ thread uint* v717;
+ thread uint* v718;
+ thread uint* v719;
+ thread uint* v720;
+ thread uint* v721;
+ thread uint* v722;
+ thread uint* v723;
+ thread uint* v724;
+ thread uint* v725;
+ thread uint* v726;
+ thread uint* v727;
+ thread uint* v728;
+ thread uint* v729;
+ thread uint* v730;
+ thread uint* v731;
+ thread uint* v732;
+ thread uint* v733;
+ thread uint* v734;
+ thread uint* v735;
+ thread uint* v736;
+ thread uint* v737;
+ thread uint* v738;
+ thread uint* v739;
+ thread uint* v740;
+ thread uint* v741;
+ thread uint* v742;
+ thread uint* v743;
+ thread uint* v744;
+ thread uint* v745;
+ thread uint* v746;
+ thread uint* v747;
+ thread uint* v748;
+ thread uint* v749;
+ thread uint* v750;
+ thread uint* v751;
+ thread uint* v752;
+ thread uint* v753;
+ thread uint* v754;
+ thread uint* v755;
+ thread uint* v756;
+ thread uint* v757;
+ thread uint* v758;
+ thread uint* v759;
+ thread uint* v760;
+ thread uint* v761;
+ thread uint* v762;
+ thread uint* v763;
+ thread uint* v764;
+ thread uint* v765;
+ thread uint* v766;
+ thread uint* v767;
+ thread uint* v768;
+ thread uint* v769;
+ thread uint* v770;
+ thread uint* v771;
+ thread uint* v772;
+ thread uint* v773;
+ thread uint* v774;
+ thread uint* v775;
+ thread uint* v776;
+ thread uint* v777;
+ thread uint* v778;
+ thread uint* v779;
+ thread uint* v780;
+ thread uint* v781;
+ thread uint* v782;
+ thread uint* v783;
+ thread uint* v784;
+ thread uint* v785;
+ thread uint* v786;
+ thread uint* v787;
+ thread uint* v788;
+ thread uint* v789;
+ thread uint* v790;
+ thread uint* v791;
+ thread uint* v792;
+ thread uint* v793;
+ thread uint* v794;
+ thread uint* v795;
+ thread uint* v796;
+ thread uint* v797;
+ thread uint* v798;
+ thread uint* v799;
+ thread uint* v800;
+ thread uint* v801;
+ thread uint* v802;
+ thread uint* v803;
+ thread uint* v804;
+ thread uint* v805;
+ thread uint* v806;
+ thread uint* v807;
+ thread uint* v808;
+ thread uint* v809;
+ thread uint* v810;
+ thread uint* v811;
+ thread uint* v812;
+ thread uint* v813;
+ thread uint* v814;
+ thread uint* v815;
+ thread uint* v816;
+ thread uint* v817;
+ thread uint* v818;
+ thread uint* v819;
+ thread uint* v820;
+ thread uint* v821;
+ thread uint* v822;
+ thread uint* v823;
+ thread uint* v824;
+ thread uint* v825;
+ thread uint* v826;
+ thread uint* v827;
+ thread uint* v828;
+ thread uint* v829;
+ thread uint* v830;
+ thread uint* v831;
+ thread uint* v832;
+ thread uint* v833;
+ thread uint* v834;
+ thread uint* v835;
+ thread uint* v836;
+ thread uint* v837;
+ thread uint* v838;
+ thread uint* v839;
+ thread uint* v840;
+ thread uint* v841;
+ thread uint* v842;
+ thread uint* v843;
+ thread uint* v844;
+ thread uint* v845;
+ thread uint* v846;
+ thread uint* v847;
+ thread uint* v848;
+ thread uint* v849;
+ thread uint* v850;
+ thread uint* v851;
+ thread uint* v852;
+ thread uint* v853;
+ thread uint* v854;
+ thread uint* v855;
+ thread uint* v856;
+ thread uint* v857;
+ thread uint* v858;
+ thread uint* v859;
+ thread uint* v860;
+ thread uint* v861;
+ thread uint* v862;
+ thread uint* v863;
+ thread uint* v864;
+ thread uint* v865;
+ thread uint* v866;
+ thread uint* v867;
+ thread uint* v868;
+ thread uint* v869;
+ thread uint* v870;
+ thread uint* v871;
+ thread uint* v872;
+ thread uint* v873;
+ thread uint* v874;
+ thread uint* v875;
+ thread uint* v876;
+ thread uint* v877;
+ thread uint* v878;
+ thread uint* v879;
+ thread uint* v880;
+ thread uint* v881;
+ thread uint* v882;
+ thread uint* v883;
+ thread uint* v884;
+ thread uint* v885;
+ thread uint* v886;
+ thread uint* v887;
+ thread uint* v888;
+ thread uint* v889;
+ thread uint* v890;
+ thread uint* v891;
+ thread uint* v892;
+ thread uint* v893;
+ thread uint* v894;
+ thread uint* v895;
+ thread uint* v896;
+ thread uint* v897;
+ thread uint* v898;
+ thread uint* v899;
+ thread uint* v900;
+ thread uint* v901;
+ thread uint* v902;
+ thread uint* v903;
+ thread uint* v904;
+ thread uint* v905;
+ thread uint* v906;
+ thread uint* v907;
+ thread uint* v908;
+ thread uint* v909;
+ thread uint* v910;
+ thread uint* v911;
+ thread uint* v912;
+ thread uint* v913;
+ thread uint* v914;
+ thread uint* v915;
+ thread uint* v916;
+ thread uint* v917;
+ thread uint* v918;
+ thread uint* v919;
+ thread uint* v920;
+ thread uint* v921;
+ thread uint* v922;
+ thread uint* v923;
+ thread uint* v924;
+ thread uint* v925;
+ thread uint* v926;
+ thread uint* v927;
+ thread uint* v928;
+ thread uint* v929;
+ thread uint* v930;
+ thread uint* v931;
+ thread uint* v932;
+ thread uint* v933;
+ thread uint* v934;
+ thread uint* v935;
+ thread uint* v936;
+ thread uint* v937;
+ thread uint* v938;
+ thread uint* v939;
+ thread uint* v940;
+ thread uint* v941;
+ thread uint* v942;
+ thread uint* v943;
+ thread uint* v944;
+ thread uint* v945;
+ thread uint* v946;
+ thread uint* v947;
+ thread uint* v948;
+ thread uint* v949;
+ thread uint* v950;
+ thread uint* v951;
+ thread uint* v952;
+ thread uint* v953;
+ thread uint* v954;
+ thread uint* v955;
+ thread uint* v956;
+ thread uint* v957;
+ thread uint* v958;
+ thread uint* v959;
+ thread uint* v960;
+ thread uint* v961;
+ thread uint* v962;
+ thread uint* v963;
+ thread uint* v964;
+ thread uint* v965;
+ thread uint* v966;
+ thread uint* v967;
+ thread uint* v968;
+ thread uint* v969;
+ thread uint* v970;
+ thread uint* v971;
+ thread uint* v972;
+ thread uint* v973;
+ thread uint* v974;
+ thread uint* v975;
+ thread uint* v976;
+ thread uint* v977;
+ thread uint* v978;
+ thread uint* v979;
+ thread uint* v980;
+ thread uint* v981;
+ thread uint* v982;
+ thread uint* v983;
+ thread uint* v984;
+ thread uint* v985;
+ thread uint* v986;
+ thread uint* v987;
+ thread uint* v988;
+ thread uint* v989;
+ thread uint* v990;
+ thread uint* v991;
+ thread uint* v992;
+ thread uint* v993;
+ thread uint* v994;
+ thread uint* v995;
+ thread uint* v996;
+ thread uint* v997;
+ thread uint* v998;
+ thread uint* v999;
+};
-thread uint v0 = 0u;
-thread uint v1 = 0u;
-thread uint v2 = 0u;
-thread uint v3 = 0u;
-thread uint v4 = 0u;
-thread uint v5 = 0u;
-thread uint v6 = 0u;
-thread uint v7 = 0u;
-thread uint v8 = 0u;
-thread uint v9 = 0u;
-thread uint v10 = 0u;
-thread uint v11 = 0u;
-thread uint v12 = 0u;
-thread uint v13 = 0u;
-thread uint v14 = 0u;
-thread uint v15 = 0u;
-thread uint v16 = 0u;
-thread uint v17 = 0u;
-thread uint v18 = 0u;
-thread uint v19 = 0u;
-thread uint v20 = 0u;
-thread uint v21 = 0u;
-thread uint v22 = 0u;
-thread uint v23 = 0u;
-thread uint v24 = 0u;
-thread uint v25 = 0u;
-thread uint v26 = 0u;
-thread uint v27 = 0u;
-thread uint v28 = 0u;
-thread uint v29 = 0u;
-thread uint v30 = 0u;
-thread uint v31 = 0u;
-thread uint v32 = 0u;
-thread uint v33 = 0u;
-thread uint v34 = 0u;
-thread uint v35 = 0u;
-thread uint v36 = 0u;
-thread uint v37 = 0u;
-thread uint v38 = 0u;
-thread uint v39 = 0u;
-thread uint v40 = 0u;
-thread uint v41 = 0u;
-thread uint v42 = 0u;
-thread uint v43 = 0u;
-thread uint v44 = 0u;
-thread uint v45 = 0u;
-thread uint v46 = 0u;
-thread uint v47 = 0u;
-thread uint v48 = 0u;
-thread uint v49 = 0u;
-thread uint v50 = 0u;
-thread uint v51 = 0u;
-thread uint v52 = 0u;
-thread uint v53 = 0u;
-thread uint v54 = 0u;
-thread uint v55 = 0u;
-thread uint v56 = 0u;
-thread uint v57 = 0u;
-thread uint v58 = 0u;
-thread uint v59 = 0u;
-thread uint v60 = 0u;
-thread uint v61 = 0u;
-thread uint v62 = 0u;
-thread uint v63 = 0u;
-thread uint v64 = 0u;
-thread uint v65 = 0u;
-thread uint v66 = 0u;
-thread uint v67 = 0u;
-thread uint v68 = 0u;
-thread uint v69 = 0u;
-thread uint v70 = 0u;
-thread uint v71 = 0u;
-thread uint v72 = 0u;
-thread uint v73 = 0u;
-thread uint v74 = 0u;
-thread uint v75 = 0u;
-thread uint v76 = 0u;
-thread uint v77 = 0u;
-thread uint v78 = 0u;
-thread uint v79 = 0u;
-thread uint v80 = 0u;
-thread uint v81 = 0u;
-thread uint v82 = 0u;
-thread uint v83 = 0u;
-thread uint v84 = 0u;
-thread uint v85 = 0u;
-thread uint v86 = 0u;
-thread uint v87 = 0u;
-thread uint v88 = 0u;
-thread uint v89 = 0u;
-thread uint v90 = 0u;
-thread uint v91 = 0u;
-thread uint v92 = 0u;
-thread uint v93 = 0u;
-thread uint v94 = 0u;
-thread uint v95 = 0u;
-thread uint v96 = 0u;
-thread uint v97 = 0u;
-thread uint v98 = 0u;
-thread uint v99 = 0u;
-thread uint v100 = 0u;
-thread uint v101 = 0u;
-thread uint v102 = 0u;
-thread uint v103 = 0u;
-thread uint v104 = 0u;
-thread uint v105 = 0u;
-thread uint v106 = 0u;
-thread uint v107 = 0u;
-thread uint v108 = 0u;
-thread uint v109 = 0u;
-thread uint v110 = 0u;
-thread uint v111 = 0u;
-thread uint v112 = 0u;
-thread uint v113 = 0u;
-thread uint v114 = 0u;
-thread uint v115 = 0u;
-thread uint v116 = 0u;
-thread uint v117 = 0u;
-thread uint v118 = 0u;
-thread uint v119 = 0u;
-thread uint v120 = 0u;
-thread uint v121 = 0u;
-thread uint v122 = 0u;
-thread uint v123 = 0u;
-thread uint v124 = 0u;
-thread uint v125 = 0u;
-thread uint v126 = 0u;
-thread uint v127 = 0u;
-thread uint v128 = 0u;
-thread uint v129 = 0u;
-thread uint v130 = 0u;
-thread uint v131 = 0u;
-thread uint v132 = 0u;
-thread uint v133 = 0u;
-thread uint v134 = 0u;
-thread uint v135 = 0u;
-thread uint v136 = 0u;
-thread uint v137 = 0u;
-thread uint v138 = 0u;
-thread uint v139 = 0u;
-thread uint v140 = 0u;
-thread uint v141 = 0u;
-thread uint v142 = 0u;
-thread uint v143 = 0u;
-thread uint v144 = 0u;
-thread uint v145 = 0u;
-thread uint v146 = 0u;
-thread uint v147 = 0u;
-thread uint v148 = 0u;
-thread uint v149 = 0u;
-thread uint v150 = 0u;
-thread uint v151 = 0u;
-thread uint v152 = 0u;
-thread uint v153 = 0u;
-thread uint v154 = 0u;
-thread uint v155 = 0u;
-thread uint v156 = 0u;
-thread uint v157 = 0u;
-thread uint v158 = 0u;
-thread uint v159 = 0u;
-thread uint v160 = 0u;
-thread uint v161 = 0u;
-thread uint v162 = 0u;
-thread uint v163 = 0u;
-thread uint v164 = 0u;
-thread uint v165 = 0u;
-thread uint v166 = 0u;
-thread uint v167 = 0u;
-thread uint v168 = 0u;
-thread uint v169 = 0u;
-thread uint v170 = 0u;
-thread uint v171 = 0u;
-thread uint v172 = 0u;
-thread uint v173 = 0u;
-thread uint v174 = 0u;
-thread uint v175 = 0u;
-thread uint v176 = 0u;
-thread uint v177 = 0u;
-thread uint v178 = 0u;
-thread uint v179 = 0u;
-thread uint v180 = 0u;
-thread uint v181 = 0u;
-thread uint v182 = 0u;
-thread uint v183 = 0u;
-thread uint v184 = 0u;
-thread uint v185 = 0u;
-thread uint v186 = 0u;
-thread uint v187 = 0u;
-thread uint v188 = 0u;
-thread uint v189 = 0u;
-thread uint v190 = 0u;
-thread uint v191 = 0u;
-thread uint v192 = 0u;
-thread uint v193 = 0u;
-thread uint v194 = 0u;
-thread uint v195 = 0u;
-thread uint v196 = 0u;
-thread uint v197 = 0u;
-thread uint v198 = 0u;
-thread uint v199 = 0u;
-thread uint v200 = 0u;
-thread uint v201 = 0u;
-thread uint v202 = 0u;
-thread uint v203 = 0u;
-thread uint v204 = 0u;
-thread uint v205 = 0u;
-thread uint v206 = 0u;
-thread uint v207 = 0u;
-thread uint v208 = 0u;
-thread uint v209 = 0u;
-thread uint v210 = 0u;
-thread uint v211 = 0u;
-thread uint v212 = 0u;
-thread uint v213 = 0u;
-thread uint v214 = 0u;
-thread uint v215 = 0u;
-thread uint v216 = 0u;
-thread uint v217 = 0u;
-thread uint v218 = 0u;
-thread uint v219 = 0u;
-thread uint v220 = 0u;
-thread uint v221 = 0u;
-thread uint v222 = 0u;
-thread uint v223 = 0u;
-thread uint v224 = 0u;
-thread uint v225 = 0u;
-thread uint v226 = 0u;
-thread uint v227 = 0u;
-thread uint v228 = 0u;
-thread uint v229 = 0u;
-thread uint v230 = 0u;
-thread uint v231 = 0u;
-thread uint v232 = 0u;
-thread uint v233 = 0u;
-thread uint v234 = 0u;
-thread uint v235 = 0u;
-thread uint v236 = 0u;
-thread uint v237 = 0u;
-thread uint v238 = 0u;
-thread uint v239 = 0u;
-thread uint v240 = 0u;
-thread uint v241 = 0u;
-thread uint v242 = 0u;
-thread uint v243 = 0u;
-thread uint v244 = 0u;
-thread uint v245 = 0u;
-thread uint v246 = 0u;
-thread uint v247 = 0u;
-thread uint v248 = 0u;
-thread uint v249 = 0u;
-thread uint v250 = 0u;
-thread uint v251 = 0u;
-thread uint v252 = 0u;
-thread uint v253 = 0u;
-thread uint v254 = 0u;
-thread uint v255 = 0u;
-thread uint v256 = 0u;
-thread uint v257 = 0u;
-thread uint v258 = 0u;
-thread uint v259 = 0u;
-thread uint v260 = 0u;
-thread uint v261 = 0u;
-thread uint v262 = 0u;
-thread uint v263 = 0u;
-thread uint v264 = 0u;
-thread uint v265 = 0u;
-thread uint v266 = 0u;
-thread uint v267 = 0u;
-thread uint v268 = 0u;
-thread uint v269 = 0u;
-thread uint v270 = 0u;
-thread uint v271 = 0u;
-thread uint v272 = 0u;
-thread uint v273 = 0u;
-thread uint v274 = 0u;
-thread uint v275 = 0u;
-thread uint v276 = 0u;
-thread uint v277 = 0u;
-thread uint v278 = 0u;
-thread uint v279 = 0u;
-thread uint v280 = 0u;
-thread uint v281 = 0u;
-thread uint v282 = 0u;
-thread uint v283 = 0u;
-thread uint v284 = 0u;
-thread uint v285 = 0u;
-thread uint v286 = 0u;
-thread uint v287 = 0u;
-thread uint v288 = 0u;
-thread uint v289 = 0u;
-thread uint v290 = 0u;
-thread uint v291 = 0u;
-thread uint v292 = 0u;
-thread uint v293 = 0u;
-thread uint v294 = 0u;
-thread uint v295 = 0u;
-thread uint v296 = 0u;
-thread uint v297 = 0u;
-thread uint v298 = 0u;
-thread uint v299 = 0u;
-thread uint v300 = 0u;
-thread uint v301 = 0u;
-thread uint v302 = 0u;
-thread uint v303 = 0u;
-thread uint v304 = 0u;
-thread uint v305 = 0u;
-thread uint v306 = 0u;
-thread uint v307 = 0u;
-thread uint v308 = 0u;
-thread uint v309 = 0u;
-thread uint v310 = 0u;
-thread uint v311 = 0u;
-thread uint v312 = 0u;
-thread uint v313 = 0u;
-thread uint v314 = 0u;
-thread uint v315 = 0u;
-thread uint v316 = 0u;
-thread uint v317 = 0u;
-thread uint v318 = 0u;
-thread uint v319 = 0u;
-thread uint v320 = 0u;
-thread uint v321 = 0u;
-thread uint v322 = 0u;
-thread uint v323 = 0u;
-thread uint v324 = 0u;
-thread uint v325 = 0u;
-thread uint v326 = 0u;
-thread uint v327 = 0u;
-thread uint v328 = 0u;
-thread uint v329 = 0u;
-thread uint v330 = 0u;
-thread uint v331 = 0u;
-thread uint v332 = 0u;
-thread uint v333 = 0u;
-thread uint v334 = 0u;
-thread uint v335 = 0u;
-thread uint v336 = 0u;
-thread uint v337 = 0u;
-thread uint v338 = 0u;
-thread uint v339 = 0u;
-thread uint v340 = 0u;
-thread uint v341 = 0u;
-thread uint v342 = 0u;
-thread uint v343 = 0u;
-thread uint v344 = 0u;
-thread uint v345 = 0u;
-thread uint v346 = 0u;
-thread uint v347 = 0u;
-thread uint v348 = 0u;
-thread uint v349 = 0u;
-thread uint v350 = 0u;
-thread uint v351 = 0u;
-thread uint v352 = 0u;
-thread uint v353 = 0u;
-thread uint v354 = 0u;
-thread uint v355 = 0u;
-thread uint v356 = 0u;
-thread uint v357 = 0u;
-thread uint v358 = 0u;
-thread uint v359 = 0u;
-thread uint v360 = 0u;
-thread uint v361 = 0u;
-thread uint v362 = 0u;
-thread uint v363 = 0u;
-thread uint v364 = 0u;
-thread uint v365 = 0u;
-thread uint v366 = 0u;
-thread uint v367 = 0u;
-thread uint v368 = 0u;
-thread uint v369 = 0u;
-thread uint v370 = 0u;
-thread uint v371 = 0u;
-thread uint v372 = 0u;
-thread uint v373 = 0u;
-thread uint v374 = 0u;
-thread uint v375 = 0u;
-thread uint v376 = 0u;
-thread uint v377 = 0u;
-thread uint v378 = 0u;
-thread uint v379 = 0u;
-thread uint v380 = 0u;
-thread uint v381 = 0u;
-thread uint v382 = 0u;
-thread uint v383 = 0u;
-thread uint v384 = 0u;
-thread uint v385 = 0u;
-thread uint v386 = 0u;
-thread uint v387 = 0u;
-thread uint v388 = 0u;
-thread uint v389 = 0u;
-thread uint v390 = 0u;
-thread uint v391 = 0u;
-thread uint v392 = 0u;
-thread uint v393 = 0u;
-thread uint v394 = 0u;
-thread uint v395 = 0u;
-thread uint v396 = 0u;
-thread uint v397 = 0u;
-thread uint v398 = 0u;
-thread uint v399 = 0u;
-thread uint v400 = 0u;
-thread uint v401 = 0u;
-thread uint v402 = 0u;
-thread uint v403 = 0u;
-thread uint v404 = 0u;
-thread uint v405 = 0u;
-thread uint v406 = 0u;
-thread uint v407 = 0u;
-thread uint v408 = 0u;
-thread uint v409 = 0u;
-thread uint v410 = 0u;
-thread uint v411 = 0u;
-thread uint v412 = 0u;
-thread uint v413 = 0u;
-thread uint v414 = 0u;
-thread uint v415 = 0u;
-thread uint v416 = 0u;
-thread uint v417 = 0u;
-thread uint v418 = 0u;
-thread uint v419 = 0u;
-thread uint v420 = 0u;
-thread uint v421 = 0u;
-thread uint v422 = 0u;
-thread uint v423 = 0u;
-thread uint v424 = 0u;
-thread uint v425 = 0u;
-thread uint v426 = 0u;
-thread uint v427 = 0u;
-thread uint v428 = 0u;
-thread uint v429 = 0u;
-thread uint v430 = 0u;
-thread uint v431 = 0u;
-thread uint v432 = 0u;
-thread uint v433 = 0u;
-thread uint v434 = 0u;
-thread uint v435 = 0u;
-thread uint v436 = 0u;
-thread uint v437 = 0u;
-thread uint v438 = 0u;
-thread uint v439 = 0u;
-thread uint v440 = 0u;
-thread uint v441 = 0u;
-thread uint v442 = 0u;
-thread uint v443 = 0u;
-thread uint v444 = 0u;
-thread uint v445 = 0u;
-thread uint v446 = 0u;
-thread uint v447 = 0u;
-thread uint v448 = 0u;
-thread uint v449 = 0u;
-thread uint v450 = 0u;
-thread uint v451 = 0u;
-thread uint v452 = 0u;
-thread uint v453 = 0u;
-thread uint v454 = 0u;
-thread uint v455 = 0u;
-thread uint v456 = 0u;
-thread uint v457 = 0u;
-thread uint v458 = 0u;
-thread uint v459 = 0u;
-thread uint v460 = 0u;
-thread uint v461 = 0u;
-thread uint v462 = 0u;
-thread uint v463 = 0u;
-thread uint v464 = 0u;
-thread uint v465 = 0u;
-thread uint v466 = 0u;
-thread uint v467 = 0u;
-thread uint v468 = 0u;
-thread uint v469 = 0u;
-thread uint v470 = 0u;
-thread uint v471 = 0u;
-thread uint v472 = 0u;
-thread uint v473 = 0u;
-thread uint v474 = 0u;
-thread uint v475 = 0u;
-thread uint v476 = 0u;
-thread uint v477 = 0u;
-thread uint v478 = 0u;
-thread uint v479 = 0u;
-thread uint v480 = 0u;
-thread uint v481 = 0u;
-thread uint v482 = 0u;
-thread uint v483 = 0u;
-thread uint v484 = 0u;
-thread uint v485 = 0u;
-thread uint v486 = 0u;
-thread uint v487 = 0u;
-thread uint v488 = 0u;
-thread uint v489 = 0u;
-thread uint v490 = 0u;
-thread uint v491 = 0u;
-thread uint v492 = 0u;
-thread uint v493 = 0u;
-thread uint v494 = 0u;
-thread uint v495 = 0u;
-thread uint v496 = 0u;
-thread uint v497 = 0u;
-thread uint v498 = 0u;
-thread uint v499 = 0u;
-thread uint v500 = 0u;
-thread uint v501 = 0u;
-thread uint v502 = 0u;
-thread uint v503 = 0u;
-thread uint v504 = 0u;
-thread uint v505 = 0u;
-thread uint v506 = 0u;
-thread uint v507 = 0u;
-thread uint v508 = 0u;
-thread uint v509 = 0u;
-thread uint v510 = 0u;
-thread uint v511 = 0u;
-thread uint v512 = 0u;
-thread uint v513 = 0u;
-thread uint v514 = 0u;
-thread uint v515 = 0u;
-thread uint v516 = 0u;
-thread uint v517 = 0u;
-thread uint v518 = 0u;
-thread uint v519 = 0u;
-thread uint v520 = 0u;
-thread uint v521 = 0u;
-thread uint v522 = 0u;
-thread uint v523 = 0u;
-thread uint v524 = 0u;
-thread uint v525 = 0u;
-thread uint v526 = 0u;
-thread uint v527 = 0u;
-thread uint v528 = 0u;
-thread uint v529 = 0u;
-thread uint v530 = 0u;
-thread uint v531 = 0u;
-thread uint v532 = 0u;
-thread uint v533 = 0u;
-thread uint v534 = 0u;
-thread uint v535 = 0u;
-thread uint v536 = 0u;
-thread uint v537 = 0u;
-thread uint v538 = 0u;
-thread uint v539 = 0u;
-thread uint v540 = 0u;
-thread uint v541 = 0u;
-thread uint v542 = 0u;
-thread uint v543 = 0u;
-thread uint v544 = 0u;
-thread uint v545 = 0u;
-thread uint v546 = 0u;
-thread uint v547 = 0u;
-thread uint v548 = 0u;
-thread uint v549 = 0u;
-thread uint v550 = 0u;
-thread uint v551 = 0u;
-thread uint v552 = 0u;
-thread uint v553 = 0u;
-thread uint v554 = 0u;
-thread uint v555 = 0u;
-thread uint v556 = 0u;
-thread uint v557 = 0u;
-thread uint v558 = 0u;
-thread uint v559 = 0u;
-thread uint v560 = 0u;
-thread uint v561 = 0u;
-thread uint v562 = 0u;
-thread uint v563 = 0u;
-thread uint v564 = 0u;
-thread uint v565 = 0u;
-thread uint v566 = 0u;
-thread uint v567 = 0u;
-thread uint v568 = 0u;
-thread uint v569 = 0u;
-thread uint v570 = 0u;
-thread uint v571 = 0u;
-thread uint v572 = 0u;
-thread uint v573 = 0u;
-thread uint v574 = 0u;
-thread uint v575 = 0u;
-thread uint v576 = 0u;
-thread uint v577 = 0u;
-thread uint v578 = 0u;
-thread uint v579 = 0u;
-thread uint v580 = 0u;
-thread uint v581 = 0u;
-thread uint v582 = 0u;
-thread uint v583 = 0u;
-thread uint v584 = 0u;
-thread uint v585 = 0u;
-thread uint v586 = 0u;
-thread uint v587 = 0u;
-thread uint v588 = 0u;
-thread uint v589 = 0u;
-thread uint v590 = 0u;
-thread uint v591 = 0u;
-thread uint v592 = 0u;
-thread uint v593 = 0u;
-thread uint v594 = 0u;
-thread uint v595 = 0u;
-thread uint v596 = 0u;
-thread uint v597 = 0u;
-thread uint v598 = 0u;
-thread uint v599 = 0u;
-thread uint v600 = 0u;
-thread uint v601 = 0u;
-thread uint v602 = 0u;
-thread uint v603 = 0u;
-thread uint v604 = 0u;
-thread uint v605 = 0u;
-thread uint v606 = 0u;
-thread uint v607 = 0u;
-thread uint v608 = 0u;
-thread uint v609 = 0u;
-thread uint v610 = 0u;
-thread uint v611 = 0u;
-thread uint v612 = 0u;
-thread uint v613 = 0u;
-thread uint v614 = 0u;
-thread uint v615 = 0u;
-thread uint v616 = 0u;
-thread uint v617 = 0u;
-thread uint v618 = 0u;
-thread uint v619 = 0u;
-thread uint v620 = 0u;
-thread uint v621 = 0u;
-thread uint v622 = 0u;
-thread uint v623 = 0u;
-thread uint v624 = 0u;
-thread uint v625 = 0u;
-thread uint v626 = 0u;
-thread uint v627 = 0u;
-thread uint v628 = 0u;
-thread uint v629 = 0u;
-thread uint v630 = 0u;
-thread uint v631 = 0u;
-thread uint v632 = 0u;
-thread uint v633 = 0u;
-thread uint v634 = 0u;
-thread uint v635 = 0u;
-thread uint v636 = 0u;
-thread uint v637 = 0u;
-thread uint v638 = 0u;
-thread uint v639 = 0u;
-thread uint v640 = 0u;
-thread uint v641 = 0u;
-thread uint v642 = 0u;
-thread uint v643 = 0u;
-thread uint v644 = 0u;
-thread uint v645 = 0u;
-thread uint v646 = 0u;
-thread uint v647 = 0u;
-thread uint v648 = 0u;
-thread uint v649 = 0u;
-thread uint v650 = 0u;
-thread uint v651 = 0u;
-thread uint v652 = 0u;
-thread uint v653 = 0u;
-thread uint v654 = 0u;
-thread uint v655 = 0u;
-thread uint v656 = 0u;
-thread uint v657 = 0u;
-thread uint v658 = 0u;
-thread uint v659 = 0u;
-thread uint v660 = 0u;
-thread uint v661 = 0u;
-thread uint v662 = 0u;
-thread uint v663 = 0u;
-thread uint v664 = 0u;
-thread uint v665 = 0u;
-thread uint v666 = 0u;
-thread uint v667 = 0u;
-thread uint v668 = 0u;
-thread uint v669 = 0u;
-thread uint v670 = 0u;
-thread uint v671 = 0u;
-thread uint v672 = 0u;
-thread uint v673 = 0u;
-thread uint v674 = 0u;
-thread uint v675 = 0u;
-thread uint v676 = 0u;
-thread uint v677 = 0u;
-thread uint v678 = 0u;
-thread uint v679 = 0u;
-thread uint v680 = 0u;
-thread uint v681 = 0u;
-thread uint v682 = 0u;
-thread uint v683 = 0u;
-thread uint v684 = 0u;
-thread uint v685 = 0u;
-thread uint v686 = 0u;
-thread uint v687 = 0u;
-thread uint v688 = 0u;
-thread uint v689 = 0u;
-thread uint v690 = 0u;
-thread uint v691 = 0u;
-thread uint v692 = 0u;
-thread uint v693 = 0u;
-thread uint v694 = 0u;
-thread uint v695 = 0u;
-thread uint v696 = 0u;
-thread uint v697 = 0u;
-thread uint v698 = 0u;
-thread uint v699 = 0u;
-thread uint v700 = 0u;
-thread uint v701 = 0u;
-thread uint v702 = 0u;
-thread uint v703 = 0u;
-thread uint v704 = 0u;
-thread uint v705 = 0u;
-thread uint v706 = 0u;
-thread uint v707 = 0u;
-thread uint v708 = 0u;
-thread uint v709 = 0u;
-thread uint v710 = 0u;
-thread uint v711 = 0u;
-thread uint v712 = 0u;
-thread uint v713 = 0u;
-thread uint v714 = 0u;
-thread uint v715 = 0u;
-thread uint v716 = 0u;
-thread uint v717 = 0u;
-thread uint v718 = 0u;
-thread uint v719 = 0u;
-thread uint v720 = 0u;
-thread uint v721 = 0u;
-thread uint v722 = 0u;
-thread uint v723 = 0u;
-thread uint v724 = 0u;
-thread uint v725 = 0u;
-thread uint v726 = 0u;
-thread uint v727 = 0u;
-thread uint v728 = 0u;
-thread uint v729 = 0u;
-thread uint v730 = 0u;
-thread uint v731 = 0u;
-thread uint v732 = 0u;
-thread uint v733 = 0u;
-thread uint v734 = 0u;
-thread uint v735 = 0u;
-thread uint v736 = 0u;
-thread uint v737 = 0u;
-thread uint v738 = 0u;
-thread uint v739 = 0u;
-thread uint v740 = 0u;
-thread uint v741 = 0u;
-thread uint v742 = 0u;
-thread uint v743 = 0u;
-thread uint v744 = 0u;
-thread uint v745 = 0u;
-thread uint v746 = 0u;
-thread uint v747 = 0u;
-thread uint v748 = 0u;
-thread uint v749 = 0u;
-thread uint v750 = 0u;
-thread uint v751 = 0u;
-thread uint v752 = 0u;
-thread uint v753 = 0u;
-thread uint v754 = 0u;
-thread uint v755 = 0u;
-thread uint v756 = 0u;
-thread uint v757 = 0u;
-thread uint v758 = 0u;
-thread uint v759 = 0u;
-thread uint v760 = 0u;
-thread uint v761 = 0u;
-thread uint v762 = 0u;
-thread uint v763 = 0u;
-thread uint v764 = 0u;
-thread uint v765 = 0u;
-thread uint v766 = 0u;
-thread uint v767 = 0u;
-thread uint v768 = 0u;
-thread uint v769 = 0u;
-thread uint v770 = 0u;
-thread uint v771 = 0u;
-thread uint v772 = 0u;
-thread uint v773 = 0u;
-thread uint v774 = 0u;
-thread uint v775 = 0u;
-thread uint v776 = 0u;
-thread uint v777 = 0u;
-thread uint v778 = 0u;
-thread uint v779 = 0u;
-thread uint v780 = 0u;
-thread uint v781 = 0u;
-thread uint v782 = 0u;
-thread uint v783 = 0u;
-thread uint v784 = 0u;
-thread uint v785 = 0u;
-thread uint v786 = 0u;
-thread uint v787 = 0u;
-thread uint v788 = 0u;
-thread uint v789 = 0u;
-thread uint v790 = 0u;
-thread uint v791 = 0u;
-thread uint v792 = 0u;
-thread uint v793 = 0u;
-thread uint v794 = 0u;
-thread uint v795 = 0u;
-thread uint v796 = 0u;
-thread uint v797 = 0u;
-thread uint v798 = 0u;
-thread uint v799 = 0u;
-thread uint v800 = 0u;
-thread uint v801 = 0u;
-thread uint v802 = 0u;
-thread uint v803 = 0u;
-thread uint v804 = 0u;
-thread uint v805 = 0u;
-thread uint v806 = 0u;
-thread uint v807 = 0u;
-thread uint v808 = 0u;
-thread uint v809 = 0u;
-thread uint v810 = 0u;
-thread uint v811 = 0u;
-thread uint v812 = 0u;
-thread uint v813 = 0u;
-thread uint v814 = 0u;
-thread uint v815 = 0u;
-thread uint v816 = 0u;
-thread uint v817 = 0u;
-thread uint v818 = 0u;
-thread uint v819 = 0u;
-thread uint v820 = 0u;
-thread uint v821 = 0u;
-thread uint v822 = 0u;
-thread uint v823 = 0u;
-thread uint v824 = 0u;
-thread uint v825 = 0u;
-thread uint v826 = 0u;
-thread uint v827 = 0u;
-thread uint v828 = 0u;
-thread uint v829 = 0u;
-thread uint v830 = 0u;
-thread uint v831 = 0u;
-thread uint v832 = 0u;
-thread uint v833 = 0u;
-thread uint v834 = 0u;
-thread uint v835 = 0u;
-thread uint v836 = 0u;
-thread uint v837 = 0u;
-thread uint v838 = 0u;
-thread uint v839 = 0u;
-thread uint v840 = 0u;
-thread uint v841 = 0u;
-thread uint v842 = 0u;
-thread uint v843 = 0u;
-thread uint v844 = 0u;
-thread uint v845 = 0u;
-thread uint v846 = 0u;
-thread uint v847 = 0u;
-thread uint v848 = 0u;
-thread uint v849 = 0u;
-thread uint v850 = 0u;
-thread uint v851 = 0u;
-thread uint v852 = 0u;
-thread uint v853 = 0u;
-thread uint v854 = 0u;
-thread uint v855 = 0u;
-thread uint v856 = 0u;
-thread uint v857 = 0u;
-thread uint v858 = 0u;
-thread uint v859 = 0u;
-thread uint v860 = 0u;
-thread uint v861 = 0u;
-thread uint v862 = 0u;
-thread uint v863 = 0u;
-thread uint v864 = 0u;
-thread uint v865 = 0u;
-thread uint v866 = 0u;
-thread uint v867 = 0u;
-thread uint v868 = 0u;
-thread uint v869 = 0u;
-thread uint v870 = 0u;
-thread uint v871 = 0u;
-thread uint v872 = 0u;
-thread uint v873 = 0u;
-thread uint v874 = 0u;
-thread uint v875 = 0u;
-thread uint v876 = 0u;
-thread uint v877 = 0u;
-thread uint v878 = 0u;
-thread uint v879 = 0u;
-thread uint v880 = 0u;
-thread uint v881 = 0u;
-thread uint v882 = 0u;
-thread uint v883 = 0u;
-thread uint v884 = 0u;
-thread uint v885 = 0u;
-thread uint v886 = 0u;
-thread uint v887 = 0u;
-thread uint v888 = 0u;
-thread uint v889 = 0u;
-thread uint v890 = 0u;
-thread uint v891 = 0u;
-thread uint v892 = 0u;
-thread uint v893 = 0u;
-thread uint v894 = 0u;
-thread uint v895 = 0u;
-thread uint v896 = 0u;
-thread uint v897 = 0u;
-thread uint v898 = 0u;
-thread uint v899 = 0u;
-thread uint v900 = 0u;
-thread uint v901 = 0u;
-thread uint v902 = 0u;
-thread uint v903 = 0u;
-thread uint v904 = 0u;
-thread uint v905 = 0u;
-thread uint v906 = 0u;
-thread uint v907 = 0u;
-thread uint v908 = 0u;
-thread uint v909 = 0u;
-thread uint v910 = 0u;
-thread uint v911 = 0u;
-thread uint v912 = 0u;
-thread uint v913 = 0u;
-thread uint v914 = 0u;
-thread uint v915 = 0u;
-thread uint v916 = 0u;
-thread uint v917 = 0u;
-thread uint v918 = 0u;
-thread uint v919 = 0u;
-thread uint v920 = 0u;
-thread uint v921 = 0u;
-thread uint v922 = 0u;
-thread uint v923 = 0u;
-thread uint v924 = 0u;
-thread uint v925 = 0u;
-thread uint v926 = 0u;
-thread uint v927 = 0u;
-thread uint v928 = 0u;
-thread uint v929 = 0u;
-thread uint v930 = 0u;
-thread uint v931 = 0u;
-thread uint v932 = 0u;
-thread uint v933 = 0u;
-thread uint v934 = 0u;
-thread uint v935 = 0u;
-thread uint v936 = 0u;
-thread uint v937 = 0u;
-thread uint v938 = 0u;
-thread uint v939 = 0u;
-thread uint v940 = 0u;
-thread uint v941 = 0u;
-thread uint v942 = 0u;
-thread uint v943 = 0u;
-thread uint v944 = 0u;
-thread uint v945 = 0u;
-thread uint v946 = 0u;
-thread uint v947 = 0u;
-thread uint v948 = 0u;
-thread uint v949 = 0u;
-thread uint v950 = 0u;
-thread uint v951 = 0u;
-thread uint v952 = 0u;
-thread uint v953 = 0u;
-thread uint v954 = 0u;
-thread uint v955 = 0u;
-thread uint v956 = 0u;
-thread uint v957 = 0u;
-thread uint v958 = 0u;
-thread uint v959 = 0u;
-thread uint v960 = 0u;
-thread uint v961 = 0u;
-thread uint v962 = 0u;
-thread uint v963 = 0u;
-thread uint v964 = 0u;
-thread uint v965 = 0u;
-thread uint v966 = 0u;
-thread uint v967 = 0u;
-thread uint v968 = 0u;
-thread uint v969 = 0u;
-thread uint v970 = 0u;
-thread uint v971 = 0u;
-thread uint v972 = 0u;
-thread uint v973 = 0u;
-thread uint v974 = 0u;
-thread uint v975 = 0u;
-thread uint v976 = 0u;
-thread uint v977 = 0u;
-thread uint v978 = 0u;
-thread uint v979 = 0u;
-thread uint v980 = 0u;
-thread uint v981 = 0u;
-thread uint v982 = 0u;
-thread uint v983 = 0u;
-thread uint v984 = 0u;
-thread uint v985 = 0u;
-thread uint v986 = 0u;
-thread uint v987 = 0u;
-thread uint v988 = 0u;
-thread uint v989 = 0u;
-thread uint v990 = 0u;
-thread uint v991 = 0u;
-thread uint v992 = 0u;
-thread uint v993 = 0u;
-thread uint v994 = 0u;
-thread uint v995 = 0u;
-thread uint v996 = 0u;
-thread uint v997 = 0u;
-thread uint v998 = 0u;
-thread uint v999 = 0u;
-uint foo() {
+uint foo(tint_module_vars_struct tint_module_vars) {
uint x = 0u;
- x = (x + v0);
- x = (x + v1);
- x = (x + v2);
- x = (x + v3);
- x = (x + v4);
- x = (x + v5);
- x = (x + v6);
- x = (x + v7);
- x = (x + v8);
- x = (x + v9);
- x = (x + v10);
- x = (x + v11);
- x = (x + v12);
- x = (x + v13);
- x = (x + v14);
- x = (x + v15);
- x = (x + v16);
- x = (x + v17);
- x = (x + v18);
- x = (x + v19);
- x = (x + v20);
- x = (x + v21);
- x = (x + v22);
- x = (x + v23);
- x = (x + v24);
- x = (x + v25);
- x = (x + v26);
- x = (x + v27);
- x = (x + v28);
- x = (x + v29);
- x = (x + v30);
- x = (x + v31);
- x = (x + v32);
- x = (x + v33);
- x = (x + v34);
- x = (x + v35);
- x = (x + v36);
- x = (x + v37);
- x = (x + v38);
- x = (x + v39);
- x = (x + v40);
- x = (x + v41);
- x = (x + v42);
- x = (x + v43);
- x = (x + v44);
- x = (x + v45);
- x = (x + v46);
- x = (x + v47);
- x = (x + v48);
- x = (x + v49);
- x = (x + v50);
- x = (x + v51);
- x = (x + v52);
- x = (x + v53);
- x = (x + v54);
- x = (x + v55);
- x = (x + v56);
- x = (x + v57);
- x = (x + v58);
- x = (x + v59);
- x = (x + v60);
- x = (x + v61);
- x = (x + v62);
- x = (x + v63);
- x = (x + v64);
- x = (x + v65);
- x = (x + v66);
- x = (x + v67);
- x = (x + v68);
- x = (x + v69);
- x = (x + v70);
- x = (x + v71);
- x = (x + v72);
- x = (x + v73);
- x = (x + v74);
- x = (x + v75);
- x = (x + v76);
- x = (x + v77);
- x = (x + v78);
- x = (x + v79);
- x = (x + v80);
- x = (x + v81);
- x = (x + v82);
- x = (x + v83);
- x = (x + v84);
- x = (x + v85);
- x = (x + v86);
- x = (x + v87);
- x = (x + v88);
- x = (x + v89);
- x = (x + v90);
- x = (x + v91);
- x = (x + v92);
- x = (x + v93);
- x = (x + v94);
- x = (x + v95);
- x = (x + v96);
- x = (x + v97);
- x = (x + v98);
- x = (x + v99);
- x = (x + v100);
- x = (x + v101);
- x = (x + v102);
- x = (x + v103);
- x = (x + v104);
- x = (x + v105);
- x = (x + v106);
- x = (x + v107);
- x = (x + v108);
- x = (x + v109);
- x = (x + v110);
- x = (x + v111);
- x = (x + v112);
- x = (x + v113);
- x = (x + v114);
- x = (x + v115);
- x = (x + v116);
- x = (x + v117);
- x = (x + v118);
- x = (x + v119);
- x = (x + v120);
- x = (x + v121);
- x = (x + v122);
- x = (x + v123);
- x = (x + v124);
- x = (x + v125);
- x = (x + v126);
- x = (x + v127);
- x = (x + v128);
- x = (x + v129);
- x = (x + v130);
- x = (x + v131);
- x = (x + v132);
- x = (x + v133);
- x = (x + v134);
- x = (x + v135);
- x = (x + v136);
- x = (x + v137);
- x = (x + v138);
- x = (x + v139);
- x = (x + v140);
- x = (x + v141);
- x = (x + v142);
- x = (x + v143);
- x = (x + v144);
- x = (x + v145);
- x = (x + v146);
- x = (x + v147);
- x = (x + v148);
- x = (x + v149);
- x = (x + v150);
- x = (x + v151);
- x = (x + v152);
- x = (x + v153);
- x = (x + v154);
- x = (x + v155);
- x = (x + v156);
- x = (x + v157);
- x = (x + v158);
- x = (x + v159);
- x = (x + v160);
- x = (x + v161);
- x = (x + v162);
- x = (x + v163);
- x = (x + v164);
- x = (x + v165);
- x = (x + v166);
- x = (x + v167);
- x = (x + v168);
- x = (x + v169);
- x = (x + v170);
- x = (x + v171);
- x = (x + v172);
- x = (x + v173);
- x = (x + v174);
- x = (x + v175);
- x = (x + v176);
- x = (x + v177);
- x = (x + v178);
- x = (x + v179);
- x = (x + v180);
- x = (x + v181);
- x = (x + v182);
- x = (x + v183);
- x = (x + v184);
- x = (x + v185);
- x = (x + v186);
- x = (x + v187);
- x = (x + v188);
- x = (x + v189);
- x = (x + v190);
- x = (x + v191);
- x = (x + v192);
- x = (x + v193);
- x = (x + v194);
- x = (x + v195);
- x = (x + v196);
- x = (x + v197);
- x = (x + v198);
- x = (x + v199);
- x = (x + v200);
- x = (x + v201);
- x = (x + v202);
- x = (x + v203);
- x = (x + v204);
- x = (x + v205);
- x = (x + v206);
- x = (x + v207);
- x = (x + v208);
- x = (x + v209);
- x = (x + v210);
- x = (x + v211);
- x = (x + v212);
- x = (x + v213);
- x = (x + v214);
- x = (x + v215);
- x = (x + v216);
- x = (x + v217);
- x = (x + v218);
- x = (x + v219);
- x = (x + v220);
- x = (x + v221);
- x = (x + v222);
- x = (x + v223);
- x = (x + v224);
- x = (x + v225);
- x = (x + v226);
- x = (x + v227);
- x = (x + v228);
- x = (x + v229);
- x = (x + v230);
- x = (x + v231);
- x = (x + v232);
- x = (x + v233);
- x = (x + v234);
- x = (x + v235);
- x = (x + v236);
- x = (x + v237);
- x = (x + v238);
- x = (x + v239);
- x = (x + v240);
- x = (x + v241);
- x = (x + v242);
- x = (x + v243);
- x = (x + v244);
- x = (x + v245);
- x = (x + v246);
- x = (x + v247);
- x = (x + v248);
- x = (x + v249);
- x = (x + v250);
- x = (x + v251);
- x = (x + v252);
- x = (x + v253);
- x = (x + v254);
- x = (x + v255);
- x = (x + v256);
- x = (x + v257);
- x = (x + v258);
- x = (x + v259);
- x = (x + v260);
- x = (x + v261);
- x = (x + v262);
- x = (x + v263);
- x = (x + v264);
- x = (x + v265);
- x = (x + v266);
- x = (x + v267);
- x = (x + v268);
- x = (x + v269);
- x = (x + v270);
- x = (x + v271);
- x = (x + v272);
- x = (x + v273);
- x = (x + v274);
- x = (x + v275);
- x = (x + v276);
- x = (x + v277);
- x = (x + v278);
- x = (x + v279);
- x = (x + v280);
- x = (x + v281);
- x = (x + v282);
- x = (x + v283);
- x = (x + v284);
- x = (x + v285);
- x = (x + v286);
- x = (x + v287);
- x = (x + v288);
- x = (x + v289);
- x = (x + v290);
- x = (x + v291);
- x = (x + v292);
- x = (x + v293);
- x = (x + v294);
- x = (x + v295);
- x = (x + v296);
- x = (x + v297);
- x = (x + v298);
- x = (x + v299);
- x = (x + v300);
- x = (x + v301);
- x = (x + v302);
- x = (x + v303);
- x = (x + v304);
- x = (x + v305);
- x = (x + v306);
- x = (x + v307);
- x = (x + v308);
- x = (x + v309);
- x = (x + v310);
- x = (x + v311);
- x = (x + v312);
- x = (x + v313);
- x = (x + v314);
- x = (x + v315);
- x = (x + v316);
- x = (x + v317);
- x = (x + v318);
- x = (x + v319);
- x = (x + v320);
- x = (x + v321);
- x = (x + v322);
- x = (x + v323);
- x = (x + v324);
- x = (x + v325);
- x = (x + v326);
- x = (x + v327);
- x = (x + v328);
- x = (x + v329);
- x = (x + v330);
- x = (x + v331);
- x = (x + v332);
- x = (x + v333);
- x = (x + v334);
- x = (x + v335);
- x = (x + v336);
- x = (x + v337);
- x = (x + v338);
- x = (x + v339);
- x = (x + v340);
- x = (x + v341);
- x = (x + v342);
- x = (x + v343);
- x = (x + v344);
- x = (x + v345);
- x = (x + v346);
- x = (x + v347);
- x = (x + v348);
- x = (x + v349);
- x = (x + v350);
- x = (x + v351);
- x = (x + v352);
- x = (x + v353);
- x = (x + v354);
- x = (x + v355);
- x = (x + v356);
- x = (x + v357);
- x = (x + v358);
- x = (x + v359);
- x = (x + v360);
- x = (x + v361);
- x = (x + v362);
- x = (x + v363);
- x = (x + v364);
- x = (x + v365);
- x = (x + v366);
- x = (x + v367);
- x = (x + v368);
- x = (x + v369);
- x = (x + v370);
- x = (x + v371);
- x = (x + v372);
- x = (x + v373);
- x = (x + v374);
- x = (x + v375);
- x = (x + v376);
- x = (x + v377);
- x = (x + v378);
- x = (x + v379);
- x = (x + v380);
- x = (x + v381);
- x = (x + v382);
- x = (x + v383);
- x = (x + v384);
- x = (x + v385);
- x = (x + v386);
- x = (x + v387);
- x = (x + v388);
- x = (x + v389);
- x = (x + v390);
- x = (x + v391);
- x = (x + v392);
- x = (x + v393);
- x = (x + v394);
- x = (x + v395);
- x = (x + v396);
- x = (x + v397);
- x = (x + v398);
- x = (x + v399);
- x = (x + v400);
- x = (x + v401);
- x = (x + v402);
- x = (x + v403);
- x = (x + v404);
- x = (x + v405);
- x = (x + v406);
- x = (x + v407);
- x = (x + v408);
- x = (x + v409);
- x = (x + v410);
- x = (x + v411);
- x = (x + v412);
- x = (x + v413);
- x = (x + v414);
- x = (x + v415);
- x = (x + v416);
- x = (x + v417);
- x = (x + v418);
- x = (x + v419);
- x = (x + v420);
- x = (x + v421);
- x = (x + v422);
- x = (x + v423);
- x = (x + v424);
- x = (x + v425);
- x = (x + v426);
- x = (x + v427);
- x = (x + v428);
- x = (x + v429);
- x = (x + v430);
- x = (x + v431);
- x = (x + v432);
- x = (x + v433);
- x = (x + v434);
- x = (x + v435);
- x = (x + v436);
- x = (x + v437);
- x = (x + v438);
- x = (x + v439);
- x = (x + v440);
- x = (x + v441);
- x = (x + v442);
- x = (x + v443);
- x = (x + v444);
- x = (x + v445);
- x = (x + v446);
- x = (x + v447);
- x = (x + v448);
- x = (x + v449);
- x = (x + v450);
- x = (x + v451);
- x = (x + v452);
- x = (x + v453);
- x = (x + v454);
- x = (x + v455);
- x = (x + v456);
- x = (x + v457);
- x = (x + v458);
- x = (x + v459);
- x = (x + v460);
- x = (x + v461);
- x = (x + v462);
- x = (x + v463);
- x = (x + v464);
- x = (x + v465);
- x = (x + v466);
- x = (x + v467);
- x = (x + v468);
- x = (x + v469);
- x = (x + v470);
- x = (x + v471);
- x = (x + v472);
- x = (x + v473);
- x = (x + v474);
- x = (x + v475);
- x = (x + v476);
- x = (x + v477);
- x = (x + v478);
- x = (x + v479);
- x = (x + v480);
- x = (x + v481);
- x = (x + v482);
- x = (x + v483);
- x = (x + v484);
- x = (x + v485);
- x = (x + v486);
- x = (x + v487);
- x = (x + v488);
- x = (x + v489);
- x = (x + v490);
- x = (x + v491);
- x = (x + v492);
- x = (x + v493);
- x = (x + v494);
- x = (x + v495);
- x = (x + v496);
- x = (x + v497);
- x = (x + v498);
- x = (x + v499);
- x = (x + v500);
- x = (x + v501);
- x = (x + v502);
- x = (x + v503);
- x = (x + v504);
- x = (x + v505);
- x = (x + v506);
- x = (x + v507);
- x = (x + v508);
- x = (x + v509);
- x = (x + v510);
- x = (x + v511);
- x = (x + v512);
- x = (x + v513);
- x = (x + v514);
- x = (x + v515);
- x = (x + v516);
- x = (x + v517);
- x = (x + v518);
- x = (x + v519);
- x = (x + v520);
- x = (x + v521);
- x = (x + v522);
- x = (x + v523);
- x = (x + v524);
- x = (x + v525);
- x = (x + v526);
- x = (x + v527);
- x = (x + v528);
- x = (x + v529);
- x = (x + v530);
- x = (x + v531);
- x = (x + v532);
- x = (x + v533);
- x = (x + v534);
- x = (x + v535);
- x = (x + v536);
- x = (x + v537);
- x = (x + v538);
- x = (x + v539);
- x = (x + v540);
- x = (x + v541);
- x = (x + v542);
- x = (x + v543);
- x = (x + v544);
- x = (x + v545);
- x = (x + v546);
- x = (x + v547);
- x = (x + v548);
- x = (x + v549);
- x = (x + v550);
- x = (x + v551);
- x = (x + v552);
- x = (x + v553);
- x = (x + v554);
- x = (x + v555);
- x = (x + v556);
- x = (x + v557);
- x = (x + v558);
- x = (x + v559);
- x = (x + v560);
- x = (x + v561);
- x = (x + v562);
- x = (x + v563);
- x = (x + v564);
- x = (x + v565);
- x = (x + v566);
- x = (x + v567);
- x = (x + v568);
- x = (x + v569);
- x = (x + v570);
- x = (x + v571);
- x = (x + v572);
- x = (x + v573);
- x = (x + v574);
- x = (x + v575);
- x = (x + v576);
- x = (x + v577);
- x = (x + v578);
- x = (x + v579);
- x = (x + v580);
- x = (x + v581);
- x = (x + v582);
- x = (x + v583);
- x = (x + v584);
- x = (x + v585);
- x = (x + v586);
- x = (x + v587);
- x = (x + v588);
- x = (x + v589);
- x = (x + v590);
- x = (x + v591);
- x = (x + v592);
- x = (x + v593);
- x = (x + v594);
- x = (x + v595);
- x = (x + v596);
- x = (x + v597);
- x = (x + v598);
- x = (x + v599);
- x = (x + v600);
- x = (x + v601);
- x = (x + v602);
- x = (x + v603);
- x = (x + v604);
- x = (x + v605);
- x = (x + v606);
- x = (x + v607);
- x = (x + v608);
- x = (x + v609);
- x = (x + v610);
- x = (x + v611);
- x = (x + v612);
- x = (x + v613);
- x = (x + v614);
- x = (x + v615);
- x = (x + v616);
- x = (x + v617);
- x = (x + v618);
- x = (x + v619);
- x = (x + v620);
- x = (x + v621);
- x = (x + v622);
- x = (x + v623);
- x = (x + v624);
- x = (x + v625);
- x = (x + v626);
- x = (x + v627);
- x = (x + v628);
- x = (x + v629);
- x = (x + v630);
- x = (x + v631);
- x = (x + v632);
- x = (x + v633);
- x = (x + v634);
- x = (x + v635);
- x = (x + v636);
- x = (x + v637);
- x = (x + v638);
- x = (x + v639);
- x = (x + v640);
- x = (x + v641);
- x = (x + v642);
- x = (x + v643);
- x = (x + v644);
- x = (x + v645);
- x = (x + v646);
- x = (x + v647);
- x = (x + v648);
- x = (x + v649);
- x = (x + v650);
- x = (x + v651);
- x = (x + v652);
- x = (x + v653);
- x = (x + v654);
- x = (x + v655);
- x = (x + v656);
- x = (x + v657);
- x = (x + v658);
- x = (x + v659);
- x = (x + v660);
- x = (x + v661);
- x = (x + v662);
- x = (x + v663);
- x = (x + v664);
- x = (x + v665);
- x = (x + v666);
- x = (x + v667);
- x = (x + v668);
- x = (x + v669);
- x = (x + v670);
- x = (x + v671);
- x = (x + v672);
- x = (x + v673);
- x = (x + v674);
- x = (x + v675);
- x = (x + v676);
- x = (x + v677);
- x = (x + v678);
- x = (x + v679);
- x = (x + v680);
- x = (x + v681);
- x = (x + v682);
- x = (x + v683);
- x = (x + v684);
- x = (x + v685);
- x = (x + v686);
- x = (x + v687);
- x = (x + v688);
- x = (x + v689);
- x = (x + v690);
- x = (x + v691);
- x = (x + v692);
- x = (x + v693);
- x = (x + v694);
- x = (x + v695);
- x = (x + v696);
- x = (x + v697);
- x = (x + v698);
- x = (x + v699);
- x = (x + v700);
- x = (x + v701);
- x = (x + v702);
- x = (x + v703);
- x = (x + v704);
- x = (x + v705);
- x = (x + v706);
- x = (x + v707);
- x = (x + v708);
- x = (x + v709);
- x = (x + v710);
- x = (x + v711);
- x = (x + v712);
- x = (x + v713);
- x = (x + v714);
- x = (x + v715);
- x = (x + v716);
- x = (x + v717);
- x = (x + v718);
- x = (x + v719);
- x = (x + v720);
- x = (x + v721);
- x = (x + v722);
- x = (x + v723);
- x = (x + v724);
- x = (x + v725);
- x = (x + v726);
- x = (x + v727);
- x = (x + v728);
- x = (x + v729);
- x = (x + v730);
- x = (x + v731);
- x = (x + v732);
- x = (x + v733);
- x = (x + v734);
- x = (x + v735);
- x = (x + v736);
- x = (x + v737);
- x = (x + v738);
- x = (x + v739);
- x = (x + v740);
- x = (x + v741);
- x = (x + v742);
- x = (x + v743);
- x = (x + v744);
- x = (x + v745);
- x = (x + v746);
- x = (x + v747);
- x = (x + v748);
- x = (x + v749);
- x = (x + v750);
- x = (x + v751);
- x = (x + v752);
- x = (x + v753);
- x = (x + v754);
- x = (x + v755);
- x = (x + v756);
- x = (x + v757);
- x = (x + v758);
- x = (x + v759);
- x = (x + v760);
- x = (x + v761);
- x = (x + v762);
- x = (x + v763);
- x = (x + v764);
- x = (x + v765);
- x = (x + v766);
- x = (x + v767);
- x = (x + v768);
- x = (x + v769);
- x = (x + v770);
- x = (x + v771);
- x = (x + v772);
- x = (x + v773);
- x = (x + v774);
- x = (x + v775);
- x = (x + v776);
- x = (x + v777);
- x = (x + v778);
- x = (x + v779);
- x = (x + v780);
- x = (x + v781);
- x = (x + v782);
- x = (x + v783);
- x = (x + v784);
- x = (x + v785);
- x = (x + v786);
- x = (x + v787);
- x = (x + v788);
- x = (x + v789);
- x = (x + v790);
- x = (x + v791);
- x = (x + v792);
- x = (x + v793);
- x = (x + v794);
- x = (x + v795);
- x = (x + v796);
- x = (x + v797);
- x = (x + v798);
- x = (x + v799);
- x = (x + v800);
- x = (x + v801);
- x = (x + v802);
- x = (x + v803);
- x = (x + v804);
- x = (x + v805);
- x = (x + v806);
- x = (x + v807);
- x = (x + v808);
- x = (x + v809);
- x = (x + v810);
- x = (x + v811);
- x = (x + v812);
- x = (x + v813);
- x = (x + v814);
- x = (x + v815);
- x = (x + v816);
- x = (x + v817);
- x = (x + v818);
- x = (x + v819);
- x = (x + v820);
- x = (x + v821);
- x = (x + v822);
- x = (x + v823);
- x = (x + v824);
- x = (x + v825);
- x = (x + v826);
- x = (x + v827);
- x = (x + v828);
- x = (x + v829);
- x = (x + v830);
- x = (x + v831);
- x = (x + v832);
- x = (x + v833);
- x = (x + v834);
- x = (x + v835);
- x = (x + v836);
- x = (x + v837);
- x = (x + v838);
- x = (x + v839);
- x = (x + v840);
- x = (x + v841);
- x = (x + v842);
- x = (x + v843);
- x = (x + v844);
- x = (x + v845);
- x = (x + v846);
- x = (x + v847);
- x = (x + v848);
- x = (x + v849);
- x = (x + v850);
- x = (x + v851);
- x = (x + v852);
- x = (x + v853);
- x = (x + v854);
- x = (x + v855);
- x = (x + v856);
- x = (x + v857);
- x = (x + v858);
- x = (x + v859);
- x = (x + v860);
- x = (x + v861);
- x = (x + v862);
- x = (x + v863);
- x = (x + v864);
- x = (x + v865);
- x = (x + v866);
- x = (x + v867);
- x = (x + v868);
- x = (x + v869);
- x = (x + v870);
- x = (x + v871);
- x = (x + v872);
- x = (x + v873);
- x = (x + v874);
- x = (x + v875);
- x = (x + v876);
- x = (x + v877);
- x = (x + v878);
- x = (x + v879);
- x = (x + v880);
- x = (x + v881);
- x = (x + v882);
- x = (x + v883);
- x = (x + v884);
- x = (x + v885);
- x = (x + v886);
- x = (x + v887);
- x = (x + v888);
- x = (x + v889);
- x = (x + v890);
- x = (x + v891);
- x = (x + v892);
- x = (x + v893);
- x = (x + v894);
- x = (x + v895);
- x = (x + v896);
- x = (x + v897);
- x = (x + v898);
- x = (x + v899);
- x = (x + v900);
- x = (x + v901);
- x = (x + v902);
- x = (x + v903);
- x = (x + v904);
- x = (x + v905);
- x = (x + v906);
- x = (x + v907);
- x = (x + v908);
- x = (x + v909);
- x = (x + v910);
- x = (x + v911);
- x = (x + v912);
- x = (x + v913);
- x = (x + v914);
- x = (x + v915);
- x = (x + v916);
- x = (x + v917);
- x = (x + v918);
- x = (x + v919);
- x = (x + v920);
- x = (x + v921);
- x = (x + v922);
- x = (x + v923);
- x = (x + v924);
- x = (x + v925);
- x = (x + v926);
- x = (x + v927);
- x = (x + v928);
- x = (x + v929);
- x = (x + v930);
- x = (x + v931);
- x = (x + v932);
- x = (x + v933);
- x = (x + v934);
- x = (x + v935);
- x = (x + v936);
- x = (x + v937);
- x = (x + v938);
- x = (x + v939);
- x = (x + v940);
- x = (x + v941);
- x = (x + v942);
- x = (x + v943);
- x = (x + v944);
- x = (x + v945);
- x = (x + v946);
- x = (x + v947);
- x = (x + v948);
- x = (x + v949);
- x = (x + v950);
- x = (x + v951);
- x = (x + v952);
- x = (x + v953);
- x = (x + v954);
- x = (x + v955);
- x = (x + v956);
- x = (x + v957);
- x = (x + v958);
- x = (x + v959);
- x = (x + v960);
- x = (x + v961);
- x = (x + v962);
- x = (x + v963);
- x = (x + v964);
- x = (x + v965);
- x = (x + v966);
- x = (x + v967);
- x = (x + v968);
- x = (x + v969);
- x = (x + v970);
- x = (x + v971);
- x = (x + v972);
- x = (x + v973);
- x = (x + v974);
- x = (x + v975);
- x = (x + v976);
- x = (x + v977);
- x = (x + v978);
- x = (x + v979);
- x = (x + v980);
- x = (x + v981);
- x = (x + v982);
- x = (x + v983);
- x = (x + v984);
- x = (x + v985);
- x = (x + v986);
- x = (x + v987);
- x = (x + v988);
- x = (x + v989);
- x = (x + v990);
- x = (x + v991);
- x = (x + v992);
- x = (x + v993);
- x = (x + v994);
- x = (x + v995);
- x = (x + v996);
- x = (x + v997);
- x = (x + v998);
- x = (x + v999);
+ x = (x + (*tint_module_vars.v0));
+ x = (x + (*tint_module_vars.v1));
+ x = (x + (*tint_module_vars.v2));
+ x = (x + (*tint_module_vars.v3));
+ x = (x + (*tint_module_vars.v4));
+ x = (x + (*tint_module_vars.v5));
+ x = (x + (*tint_module_vars.v6));
+ x = (x + (*tint_module_vars.v7));
+ x = (x + (*tint_module_vars.v8));
+ x = (x + (*tint_module_vars.v9));
+ x = (x + (*tint_module_vars.v10));
+ x = (x + (*tint_module_vars.v11));
+ x = (x + (*tint_module_vars.v12));
+ x = (x + (*tint_module_vars.v13));
+ x = (x + (*tint_module_vars.v14));
+ x = (x + (*tint_module_vars.v15));
+ x = (x + (*tint_module_vars.v16));
+ x = (x + (*tint_module_vars.v17));
+ x = (x + (*tint_module_vars.v18));
+ x = (x + (*tint_module_vars.v19));
+ x = (x + (*tint_module_vars.v20));
+ x = (x + (*tint_module_vars.v21));
+ x = (x + (*tint_module_vars.v22));
+ x = (x + (*tint_module_vars.v23));
+ x = (x + (*tint_module_vars.v24));
+ x = (x + (*tint_module_vars.v25));
+ x = (x + (*tint_module_vars.v26));
+ x = (x + (*tint_module_vars.v27));
+ x = (x + (*tint_module_vars.v28));
+ x = (x + (*tint_module_vars.v29));
+ x = (x + (*tint_module_vars.v30));
+ x = (x + (*tint_module_vars.v31));
+ x = (x + (*tint_module_vars.v32));
+ x = (x + (*tint_module_vars.v33));
+ x = (x + (*tint_module_vars.v34));
+ x = (x + (*tint_module_vars.v35));
+ x = (x + (*tint_module_vars.v36));
+ x = (x + (*tint_module_vars.v37));
+ x = (x + (*tint_module_vars.v38));
+ x = (x + (*tint_module_vars.v39));
+ x = (x + (*tint_module_vars.v40));
+ x = (x + (*tint_module_vars.v41));
+ x = (x + (*tint_module_vars.v42));
+ x = (x + (*tint_module_vars.v43));
+ x = (x + (*tint_module_vars.v44));
+ x = (x + (*tint_module_vars.v45));
+ x = (x + (*tint_module_vars.v46));
+ x = (x + (*tint_module_vars.v47));
+ x = (x + (*tint_module_vars.v48));
+ x = (x + (*tint_module_vars.v49));
+ x = (x + (*tint_module_vars.v50));
+ x = (x + (*tint_module_vars.v51));
+ x = (x + (*tint_module_vars.v52));
+ x = (x + (*tint_module_vars.v53));
+ x = (x + (*tint_module_vars.v54));
+ x = (x + (*tint_module_vars.v55));
+ x = (x + (*tint_module_vars.v56));
+ x = (x + (*tint_module_vars.v57));
+ x = (x + (*tint_module_vars.v58));
+ x = (x + (*tint_module_vars.v59));
+ x = (x + (*tint_module_vars.v60));
+ x = (x + (*tint_module_vars.v61));
+ x = (x + (*tint_module_vars.v62));
+ x = (x + (*tint_module_vars.v63));
+ x = (x + (*tint_module_vars.v64));
+ x = (x + (*tint_module_vars.v65));
+ x = (x + (*tint_module_vars.v66));
+ x = (x + (*tint_module_vars.v67));
+ x = (x + (*tint_module_vars.v68));
+ x = (x + (*tint_module_vars.v69));
+ x = (x + (*tint_module_vars.v70));
+ x = (x + (*tint_module_vars.v71));
+ x = (x + (*tint_module_vars.v72));
+ x = (x + (*tint_module_vars.v73));
+ x = (x + (*tint_module_vars.v74));
+ x = (x + (*tint_module_vars.v75));
+ x = (x + (*tint_module_vars.v76));
+ x = (x + (*tint_module_vars.v77));
+ x = (x + (*tint_module_vars.v78));
+ x = (x + (*tint_module_vars.v79));
+ x = (x + (*tint_module_vars.v80));
+ x = (x + (*tint_module_vars.v81));
+ x = (x + (*tint_module_vars.v82));
+ x = (x + (*tint_module_vars.v83));
+ x = (x + (*tint_module_vars.v84));
+ x = (x + (*tint_module_vars.v85));
+ x = (x + (*tint_module_vars.v86));
+ x = (x + (*tint_module_vars.v87));
+ x = (x + (*tint_module_vars.v88));
+ x = (x + (*tint_module_vars.v89));
+ x = (x + (*tint_module_vars.v90));
+ x = (x + (*tint_module_vars.v91));
+ x = (x + (*tint_module_vars.v92));
+ x = (x + (*tint_module_vars.v93));
+ x = (x + (*tint_module_vars.v94));
+ x = (x + (*tint_module_vars.v95));
+ x = (x + (*tint_module_vars.v96));
+ x = (x + (*tint_module_vars.v97));
+ x = (x + (*tint_module_vars.v98));
+ x = (x + (*tint_module_vars.v99));
+ x = (x + (*tint_module_vars.v100));
+ x = (x + (*tint_module_vars.v101));
+ x = (x + (*tint_module_vars.v102));
+ x = (x + (*tint_module_vars.v103));
+ x = (x + (*tint_module_vars.v104));
+ x = (x + (*tint_module_vars.v105));
+ x = (x + (*tint_module_vars.v106));
+ x = (x + (*tint_module_vars.v107));
+ x = (x + (*tint_module_vars.v108));
+ x = (x + (*tint_module_vars.v109));
+ x = (x + (*tint_module_vars.v110));
+ x = (x + (*tint_module_vars.v111));
+ x = (x + (*tint_module_vars.v112));
+ x = (x + (*tint_module_vars.v113));
+ x = (x + (*tint_module_vars.v114));
+ x = (x + (*tint_module_vars.v115));
+ x = (x + (*tint_module_vars.v116));
+ x = (x + (*tint_module_vars.v117));
+ x = (x + (*tint_module_vars.v118));
+ x = (x + (*tint_module_vars.v119));
+ x = (x + (*tint_module_vars.v120));
+ x = (x + (*tint_module_vars.v121));
+ x = (x + (*tint_module_vars.v122));
+ x = (x + (*tint_module_vars.v123));
+ x = (x + (*tint_module_vars.v124));
+ x = (x + (*tint_module_vars.v125));
+ x = (x + (*tint_module_vars.v126));
+ x = (x + (*tint_module_vars.v127));
+ x = (x + (*tint_module_vars.v128));
+ x = (x + (*tint_module_vars.v129));
+ x = (x + (*tint_module_vars.v130));
+ x = (x + (*tint_module_vars.v131));
+ x = (x + (*tint_module_vars.v132));
+ x = (x + (*tint_module_vars.v133));
+ x = (x + (*tint_module_vars.v134));
+ x = (x + (*tint_module_vars.v135));
+ x = (x + (*tint_module_vars.v136));
+ x = (x + (*tint_module_vars.v137));
+ x = (x + (*tint_module_vars.v138));
+ x = (x + (*tint_module_vars.v139));
+ x = (x + (*tint_module_vars.v140));
+ x = (x + (*tint_module_vars.v141));
+ x = (x + (*tint_module_vars.v142));
+ x = (x + (*tint_module_vars.v143));
+ x = (x + (*tint_module_vars.v144));
+ x = (x + (*tint_module_vars.v145));
+ x = (x + (*tint_module_vars.v146));
+ x = (x + (*tint_module_vars.v147));
+ x = (x + (*tint_module_vars.v148));
+ x = (x + (*tint_module_vars.v149));
+ x = (x + (*tint_module_vars.v150));
+ x = (x + (*tint_module_vars.v151));
+ x = (x + (*tint_module_vars.v152));
+ x = (x + (*tint_module_vars.v153));
+ x = (x + (*tint_module_vars.v154));
+ x = (x + (*tint_module_vars.v155));
+ x = (x + (*tint_module_vars.v156));
+ x = (x + (*tint_module_vars.v157));
+ x = (x + (*tint_module_vars.v158));
+ x = (x + (*tint_module_vars.v159));
+ x = (x + (*tint_module_vars.v160));
+ x = (x + (*tint_module_vars.v161));
+ x = (x + (*tint_module_vars.v162));
+ x = (x + (*tint_module_vars.v163));
+ x = (x + (*tint_module_vars.v164));
+ x = (x + (*tint_module_vars.v165));
+ x = (x + (*tint_module_vars.v166));
+ x = (x + (*tint_module_vars.v167));
+ x = (x + (*tint_module_vars.v168));
+ x = (x + (*tint_module_vars.v169));
+ x = (x + (*tint_module_vars.v170));
+ x = (x + (*tint_module_vars.v171));
+ x = (x + (*tint_module_vars.v172));
+ x = (x + (*tint_module_vars.v173));
+ x = (x + (*tint_module_vars.v174));
+ x = (x + (*tint_module_vars.v175));
+ x = (x + (*tint_module_vars.v176));
+ x = (x + (*tint_module_vars.v177));
+ x = (x + (*tint_module_vars.v178));
+ x = (x + (*tint_module_vars.v179));
+ x = (x + (*tint_module_vars.v180));
+ x = (x + (*tint_module_vars.v181));
+ x = (x + (*tint_module_vars.v182));
+ x = (x + (*tint_module_vars.v183));
+ x = (x + (*tint_module_vars.v184));
+ x = (x + (*tint_module_vars.v185));
+ x = (x + (*tint_module_vars.v186));
+ x = (x + (*tint_module_vars.v187));
+ x = (x + (*tint_module_vars.v188));
+ x = (x + (*tint_module_vars.v189));
+ x = (x + (*tint_module_vars.v190));
+ x = (x + (*tint_module_vars.v191));
+ x = (x + (*tint_module_vars.v192));
+ x = (x + (*tint_module_vars.v193));
+ x = (x + (*tint_module_vars.v194));
+ x = (x + (*tint_module_vars.v195));
+ x = (x + (*tint_module_vars.v196));
+ x = (x + (*tint_module_vars.v197));
+ x = (x + (*tint_module_vars.v198));
+ x = (x + (*tint_module_vars.v199));
+ x = (x + (*tint_module_vars.v200));
+ x = (x + (*tint_module_vars.v201));
+ x = (x + (*tint_module_vars.v202));
+ x = (x + (*tint_module_vars.v203));
+ x = (x + (*tint_module_vars.v204));
+ x = (x + (*tint_module_vars.v205));
+ x = (x + (*tint_module_vars.v206));
+ x = (x + (*tint_module_vars.v207));
+ x = (x + (*tint_module_vars.v208));
+ x = (x + (*tint_module_vars.v209));
+ x = (x + (*tint_module_vars.v210));
+ x = (x + (*tint_module_vars.v211));
+ x = (x + (*tint_module_vars.v212));
+ x = (x + (*tint_module_vars.v213));
+ x = (x + (*tint_module_vars.v214));
+ x = (x + (*tint_module_vars.v215));
+ x = (x + (*tint_module_vars.v216));
+ x = (x + (*tint_module_vars.v217));
+ x = (x + (*tint_module_vars.v218));
+ x = (x + (*tint_module_vars.v219));
+ x = (x + (*tint_module_vars.v220));
+ x = (x + (*tint_module_vars.v221));
+ x = (x + (*tint_module_vars.v222));
+ x = (x + (*tint_module_vars.v223));
+ x = (x + (*tint_module_vars.v224));
+ x = (x + (*tint_module_vars.v225));
+ x = (x + (*tint_module_vars.v226));
+ x = (x + (*tint_module_vars.v227));
+ x = (x + (*tint_module_vars.v228));
+ x = (x + (*tint_module_vars.v229));
+ x = (x + (*tint_module_vars.v230));
+ x = (x + (*tint_module_vars.v231));
+ x = (x + (*tint_module_vars.v232));
+ x = (x + (*tint_module_vars.v233));
+ x = (x + (*tint_module_vars.v234));
+ x = (x + (*tint_module_vars.v235));
+ x = (x + (*tint_module_vars.v236));
+ x = (x + (*tint_module_vars.v237));
+ x = (x + (*tint_module_vars.v238));
+ x = (x + (*tint_module_vars.v239));
+ x = (x + (*tint_module_vars.v240));
+ x = (x + (*tint_module_vars.v241));
+ x = (x + (*tint_module_vars.v242));
+ x = (x + (*tint_module_vars.v243));
+ x = (x + (*tint_module_vars.v244));
+ x = (x + (*tint_module_vars.v245));
+ x = (x + (*tint_module_vars.v246));
+ x = (x + (*tint_module_vars.v247));
+ x = (x + (*tint_module_vars.v248));
+ x = (x + (*tint_module_vars.v249));
+ x = (x + (*tint_module_vars.v250));
+ x = (x + (*tint_module_vars.v251));
+ x = (x + (*tint_module_vars.v252));
+ x = (x + (*tint_module_vars.v253));
+ x = (x + (*tint_module_vars.v254));
+ x = (x + (*tint_module_vars.v255));
+ x = (x + (*tint_module_vars.v256));
+ x = (x + (*tint_module_vars.v257));
+ x = (x + (*tint_module_vars.v258));
+ x = (x + (*tint_module_vars.v259));
+ x = (x + (*tint_module_vars.v260));
+ x = (x + (*tint_module_vars.v261));
+ x = (x + (*tint_module_vars.v262));
+ x = (x + (*tint_module_vars.v263));
+ x = (x + (*tint_module_vars.v264));
+ x = (x + (*tint_module_vars.v265));
+ x = (x + (*tint_module_vars.v266));
+ x = (x + (*tint_module_vars.v267));
+ x = (x + (*tint_module_vars.v268));
+ x = (x + (*tint_module_vars.v269));
+ x = (x + (*tint_module_vars.v270));
+ x = (x + (*tint_module_vars.v271));
+ x = (x + (*tint_module_vars.v272));
+ x = (x + (*tint_module_vars.v273));
+ x = (x + (*tint_module_vars.v274));
+ x = (x + (*tint_module_vars.v275));
+ x = (x + (*tint_module_vars.v276));
+ x = (x + (*tint_module_vars.v277));
+ x = (x + (*tint_module_vars.v278));
+ x = (x + (*tint_module_vars.v279));
+ x = (x + (*tint_module_vars.v280));
+ x = (x + (*tint_module_vars.v281));
+ x = (x + (*tint_module_vars.v282));
+ x = (x + (*tint_module_vars.v283));
+ x = (x + (*tint_module_vars.v284));
+ x = (x + (*tint_module_vars.v285));
+ x = (x + (*tint_module_vars.v286));
+ x = (x + (*tint_module_vars.v287));
+ x = (x + (*tint_module_vars.v288));
+ x = (x + (*tint_module_vars.v289));
+ x = (x + (*tint_module_vars.v290));
+ x = (x + (*tint_module_vars.v291));
+ x = (x + (*tint_module_vars.v292));
+ x = (x + (*tint_module_vars.v293));
+ x = (x + (*tint_module_vars.v294));
+ x = (x + (*tint_module_vars.v295));
+ x = (x + (*tint_module_vars.v296));
+ x = (x + (*tint_module_vars.v297));
+ x = (x + (*tint_module_vars.v298));
+ x = (x + (*tint_module_vars.v299));
+ x = (x + (*tint_module_vars.v300));
+ x = (x + (*tint_module_vars.v301));
+ x = (x + (*tint_module_vars.v302));
+ x = (x + (*tint_module_vars.v303));
+ x = (x + (*tint_module_vars.v304));
+ x = (x + (*tint_module_vars.v305));
+ x = (x + (*tint_module_vars.v306));
+ x = (x + (*tint_module_vars.v307));
+ x = (x + (*tint_module_vars.v308));
+ x = (x + (*tint_module_vars.v309));
+ x = (x + (*tint_module_vars.v310));
+ x = (x + (*tint_module_vars.v311));
+ x = (x + (*tint_module_vars.v312));
+ x = (x + (*tint_module_vars.v313));
+ x = (x + (*tint_module_vars.v314));
+ x = (x + (*tint_module_vars.v315));
+ x = (x + (*tint_module_vars.v316));
+ x = (x + (*tint_module_vars.v317));
+ x = (x + (*tint_module_vars.v318));
+ x = (x + (*tint_module_vars.v319));
+ x = (x + (*tint_module_vars.v320));
+ x = (x + (*tint_module_vars.v321));
+ x = (x + (*tint_module_vars.v322));
+ x = (x + (*tint_module_vars.v323));
+ x = (x + (*tint_module_vars.v324));
+ x = (x + (*tint_module_vars.v325));
+ x = (x + (*tint_module_vars.v326));
+ x = (x + (*tint_module_vars.v327));
+ x = (x + (*tint_module_vars.v328));
+ x = (x + (*tint_module_vars.v329));
+ x = (x + (*tint_module_vars.v330));
+ x = (x + (*tint_module_vars.v331));
+ x = (x + (*tint_module_vars.v332));
+ x = (x + (*tint_module_vars.v333));
+ x = (x + (*tint_module_vars.v334));
+ x = (x + (*tint_module_vars.v335));
+ x = (x + (*tint_module_vars.v336));
+ x = (x + (*tint_module_vars.v337));
+ x = (x + (*tint_module_vars.v338));
+ x = (x + (*tint_module_vars.v339));
+ x = (x + (*tint_module_vars.v340));
+ x = (x + (*tint_module_vars.v341));
+ x = (x + (*tint_module_vars.v342));
+ x = (x + (*tint_module_vars.v343));
+ x = (x + (*tint_module_vars.v344));
+ x = (x + (*tint_module_vars.v345));
+ x = (x + (*tint_module_vars.v346));
+ x = (x + (*tint_module_vars.v347));
+ x = (x + (*tint_module_vars.v348));
+ x = (x + (*tint_module_vars.v349));
+ x = (x + (*tint_module_vars.v350));
+ x = (x + (*tint_module_vars.v351));
+ x = (x + (*tint_module_vars.v352));
+ x = (x + (*tint_module_vars.v353));
+ x = (x + (*tint_module_vars.v354));
+ x = (x + (*tint_module_vars.v355));
+ x = (x + (*tint_module_vars.v356));
+ x = (x + (*tint_module_vars.v357));
+ x = (x + (*tint_module_vars.v358));
+ x = (x + (*tint_module_vars.v359));
+ x = (x + (*tint_module_vars.v360));
+ x = (x + (*tint_module_vars.v361));
+ x = (x + (*tint_module_vars.v362));
+ x = (x + (*tint_module_vars.v363));
+ x = (x + (*tint_module_vars.v364));
+ x = (x + (*tint_module_vars.v365));
+ x = (x + (*tint_module_vars.v366));
+ x = (x + (*tint_module_vars.v367));
+ x = (x + (*tint_module_vars.v368));
+ x = (x + (*tint_module_vars.v369));
+ x = (x + (*tint_module_vars.v370));
+ x = (x + (*tint_module_vars.v371));
+ x = (x + (*tint_module_vars.v372));
+ x = (x + (*tint_module_vars.v373));
+ x = (x + (*tint_module_vars.v374));
+ x = (x + (*tint_module_vars.v375));
+ x = (x + (*tint_module_vars.v376));
+ x = (x + (*tint_module_vars.v377));
+ x = (x + (*tint_module_vars.v378));
+ x = (x + (*tint_module_vars.v379));
+ x = (x + (*tint_module_vars.v380));
+ x = (x + (*tint_module_vars.v381));
+ x = (x + (*tint_module_vars.v382));
+ x = (x + (*tint_module_vars.v383));
+ x = (x + (*tint_module_vars.v384));
+ x = (x + (*tint_module_vars.v385));
+ x = (x + (*tint_module_vars.v386));
+ x = (x + (*tint_module_vars.v387));
+ x = (x + (*tint_module_vars.v388));
+ x = (x + (*tint_module_vars.v389));
+ x = (x + (*tint_module_vars.v390));
+ x = (x + (*tint_module_vars.v391));
+ x = (x + (*tint_module_vars.v392));
+ x = (x + (*tint_module_vars.v393));
+ x = (x + (*tint_module_vars.v394));
+ x = (x + (*tint_module_vars.v395));
+ x = (x + (*tint_module_vars.v396));
+ x = (x + (*tint_module_vars.v397));
+ x = (x + (*tint_module_vars.v398));
+ x = (x + (*tint_module_vars.v399));
+ x = (x + (*tint_module_vars.v400));
+ x = (x + (*tint_module_vars.v401));
+ x = (x + (*tint_module_vars.v402));
+ x = (x + (*tint_module_vars.v403));
+ x = (x + (*tint_module_vars.v404));
+ x = (x + (*tint_module_vars.v405));
+ x = (x + (*tint_module_vars.v406));
+ x = (x + (*tint_module_vars.v407));
+ x = (x + (*tint_module_vars.v408));
+ x = (x + (*tint_module_vars.v409));
+ x = (x + (*tint_module_vars.v410));
+ x = (x + (*tint_module_vars.v411));
+ x = (x + (*tint_module_vars.v412));
+ x = (x + (*tint_module_vars.v413));
+ x = (x + (*tint_module_vars.v414));
+ x = (x + (*tint_module_vars.v415));
+ x = (x + (*tint_module_vars.v416));
+ x = (x + (*tint_module_vars.v417));
+ x = (x + (*tint_module_vars.v418));
+ x = (x + (*tint_module_vars.v419));
+ x = (x + (*tint_module_vars.v420));
+ x = (x + (*tint_module_vars.v421));
+ x = (x + (*tint_module_vars.v422));
+ x = (x + (*tint_module_vars.v423));
+ x = (x + (*tint_module_vars.v424));
+ x = (x + (*tint_module_vars.v425));
+ x = (x + (*tint_module_vars.v426));
+ x = (x + (*tint_module_vars.v427));
+ x = (x + (*tint_module_vars.v428));
+ x = (x + (*tint_module_vars.v429));
+ x = (x + (*tint_module_vars.v430));
+ x = (x + (*tint_module_vars.v431));
+ x = (x + (*tint_module_vars.v432));
+ x = (x + (*tint_module_vars.v433));
+ x = (x + (*tint_module_vars.v434));
+ x = (x + (*tint_module_vars.v435));
+ x = (x + (*tint_module_vars.v436));
+ x = (x + (*tint_module_vars.v437));
+ x = (x + (*tint_module_vars.v438));
+ x = (x + (*tint_module_vars.v439));
+ x = (x + (*tint_module_vars.v440));
+ x = (x + (*tint_module_vars.v441));
+ x = (x + (*tint_module_vars.v442));
+ x = (x + (*tint_module_vars.v443));
+ x = (x + (*tint_module_vars.v444));
+ x = (x + (*tint_module_vars.v445));
+ x = (x + (*tint_module_vars.v446));
+ x = (x + (*tint_module_vars.v447));
+ x = (x + (*tint_module_vars.v448));
+ x = (x + (*tint_module_vars.v449));
+ x = (x + (*tint_module_vars.v450));
+ x = (x + (*tint_module_vars.v451));
+ x = (x + (*tint_module_vars.v452));
+ x = (x + (*tint_module_vars.v453));
+ x = (x + (*tint_module_vars.v454));
+ x = (x + (*tint_module_vars.v455));
+ x = (x + (*tint_module_vars.v456));
+ x = (x + (*tint_module_vars.v457));
+ x = (x + (*tint_module_vars.v458));
+ x = (x + (*tint_module_vars.v459));
+ x = (x + (*tint_module_vars.v460));
+ x = (x + (*tint_module_vars.v461));
+ x = (x + (*tint_module_vars.v462));
+ x = (x + (*tint_module_vars.v463));
+ x = (x + (*tint_module_vars.v464));
+ x = (x + (*tint_module_vars.v465));
+ x = (x + (*tint_module_vars.v466));
+ x = (x + (*tint_module_vars.v467));
+ x = (x + (*tint_module_vars.v468));
+ x = (x + (*tint_module_vars.v469));
+ x = (x + (*tint_module_vars.v470));
+ x = (x + (*tint_module_vars.v471));
+ x = (x + (*tint_module_vars.v472));
+ x = (x + (*tint_module_vars.v473));
+ x = (x + (*tint_module_vars.v474));
+ x = (x + (*tint_module_vars.v475));
+ x = (x + (*tint_module_vars.v476));
+ x = (x + (*tint_module_vars.v477));
+ x = (x + (*tint_module_vars.v478));
+ x = (x + (*tint_module_vars.v479));
+ x = (x + (*tint_module_vars.v480));
+ x = (x + (*tint_module_vars.v481));
+ x = (x + (*tint_module_vars.v482));
+ x = (x + (*tint_module_vars.v483));
+ x = (x + (*tint_module_vars.v484));
+ x = (x + (*tint_module_vars.v485));
+ x = (x + (*tint_module_vars.v486));
+ x = (x + (*tint_module_vars.v487));
+ x = (x + (*tint_module_vars.v488));
+ x = (x + (*tint_module_vars.v489));
+ x = (x + (*tint_module_vars.v490));
+ x = (x + (*tint_module_vars.v491));
+ x = (x + (*tint_module_vars.v492));
+ x = (x + (*tint_module_vars.v493));
+ x = (x + (*tint_module_vars.v494));
+ x = (x + (*tint_module_vars.v495));
+ x = (x + (*tint_module_vars.v496));
+ x = (x + (*tint_module_vars.v497));
+ x = (x + (*tint_module_vars.v498));
+ x = (x + (*tint_module_vars.v499));
+ x = (x + (*tint_module_vars.v500));
+ x = (x + (*tint_module_vars.v501));
+ x = (x + (*tint_module_vars.v502));
+ x = (x + (*tint_module_vars.v503));
+ x = (x + (*tint_module_vars.v504));
+ x = (x + (*tint_module_vars.v505));
+ x = (x + (*tint_module_vars.v506));
+ x = (x + (*tint_module_vars.v507));
+ x = (x + (*tint_module_vars.v508));
+ x = (x + (*tint_module_vars.v509));
+ x = (x + (*tint_module_vars.v510));
+ x = (x + (*tint_module_vars.v511));
+ x = (x + (*tint_module_vars.v512));
+ x = (x + (*tint_module_vars.v513));
+ x = (x + (*tint_module_vars.v514));
+ x = (x + (*tint_module_vars.v515));
+ x = (x + (*tint_module_vars.v516));
+ x = (x + (*tint_module_vars.v517));
+ x = (x + (*tint_module_vars.v518));
+ x = (x + (*tint_module_vars.v519));
+ x = (x + (*tint_module_vars.v520));
+ x = (x + (*tint_module_vars.v521));
+ x = (x + (*tint_module_vars.v522));
+ x = (x + (*tint_module_vars.v523));
+ x = (x + (*tint_module_vars.v524));
+ x = (x + (*tint_module_vars.v525));
+ x = (x + (*tint_module_vars.v526));
+ x = (x + (*tint_module_vars.v527));
+ x = (x + (*tint_module_vars.v528));
+ x = (x + (*tint_module_vars.v529));
+ x = (x + (*tint_module_vars.v530));
+ x = (x + (*tint_module_vars.v531));
+ x = (x + (*tint_module_vars.v532));
+ x = (x + (*tint_module_vars.v533));
+ x = (x + (*tint_module_vars.v534));
+ x = (x + (*tint_module_vars.v535));
+ x = (x + (*tint_module_vars.v536));
+ x = (x + (*tint_module_vars.v537));
+ x = (x + (*tint_module_vars.v538));
+ x = (x + (*tint_module_vars.v539));
+ x = (x + (*tint_module_vars.v540));
+ x = (x + (*tint_module_vars.v541));
+ x = (x + (*tint_module_vars.v542));
+ x = (x + (*tint_module_vars.v543));
+ x = (x + (*tint_module_vars.v544));
+ x = (x + (*tint_module_vars.v545));
+ x = (x + (*tint_module_vars.v546));
+ x = (x + (*tint_module_vars.v547));
+ x = (x + (*tint_module_vars.v548));
+ x = (x + (*tint_module_vars.v549));
+ x = (x + (*tint_module_vars.v550));
+ x = (x + (*tint_module_vars.v551));
+ x = (x + (*tint_module_vars.v552));
+ x = (x + (*tint_module_vars.v553));
+ x = (x + (*tint_module_vars.v554));
+ x = (x + (*tint_module_vars.v555));
+ x = (x + (*tint_module_vars.v556));
+ x = (x + (*tint_module_vars.v557));
+ x = (x + (*tint_module_vars.v558));
+ x = (x + (*tint_module_vars.v559));
+ x = (x + (*tint_module_vars.v560));
+ x = (x + (*tint_module_vars.v561));
+ x = (x + (*tint_module_vars.v562));
+ x = (x + (*tint_module_vars.v563));
+ x = (x + (*tint_module_vars.v564));
+ x = (x + (*tint_module_vars.v565));
+ x = (x + (*tint_module_vars.v566));
+ x = (x + (*tint_module_vars.v567));
+ x = (x + (*tint_module_vars.v568));
+ x = (x + (*tint_module_vars.v569));
+ x = (x + (*tint_module_vars.v570));
+ x = (x + (*tint_module_vars.v571));
+ x = (x + (*tint_module_vars.v572));
+ x = (x + (*tint_module_vars.v573));
+ x = (x + (*tint_module_vars.v574));
+ x = (x + (*tint_module_vars.v575));
+ x = (x + (*tint_module_vars.v576));
+ x = (x + (*tint_module_vars.v577));
+ x = (x + (*tint_module_vars.v578));
+ x = (x + (*tint_module_vars.v579));
+ x = (x + (*tint_module_vars.v580));
+ x = (x + (*tint_module_vars.v581));
+ x = (x + (*tint_module_vars.v582));
+ x = (x + (*tint_module_vars.v583));
+ x = (x + (*tint_module_vars.v584));
+ x = (x + (*tint_module_vars.v585));
+ x = (x + (*tint_module_vars.v586));
+ x = (x + (*tint_module_vars.v587));
+ x = (x + (*tint_module_vars.v588));
+ x = (x + (*tint_module_vars.v589));
+ x = (x + (*tint_module_vars.v590));
+ x = (x + (*tint_module_vars.v591));
+ x = (x + (*tint_module_vars.v592));
+ x = (x + (*tint_module_vars.v593));
+ x = (x + (*tint_module_vars.v594));
+ x = (x + (*tint_module_vars.v595));
+ x = (x + (*tint_module_vars.v596));
+ x = (x + (*tint_module_vars.v597));
+ x = (x + (*tint_module_vars.v598));
+ x = (x + (*tint_module_vars.v599));
+ x = (x + (*tint_module_vars.v600));
+ x = (x + (*tint_module_vars.v601));
+ x = (x + (*tint_module_vars.v602));
+ x = (x + (*tint_module_vars.v603));
+ x = (x + (*tint_module_vars.v604));
+ x = (x + (*tint_module_vars.v605));
+ x = (x + (*tint_module_vars.v606));
+ x = (x + (*tint_module_vars.v607));
+ x = (x + (*tint_module_vars.v608));
+ x = (x + (*tint_module_vars.v609));
+ x = (x + (*tint_module_vars.v610));
+ x = (x + (*tint_module_vars.v611));
+ x = (x + (*tint_module_vars.v612));
+ x = (x + (*tint_module_vars.v613));
+ x = (x + (*tint_module_vars.v614));
+ x = (x + (*tint_module_vars.v615));
+ x = (x + (*tint_module_vars.v616));
+ x = (x + (*tint_module_vars.v617));
+ x = (x + (*tint_module_vars.v618));
+ x = (x + (*tint_module_vars.v619));
+ x = (x + (*tint_module_vars.v620));
+ x = (x + (*tint_module_vars.v621));
+ x = (x + (*tint_module_vars.v622));
+ x = (x + (*tint_module_vars.v623));
+ x = (x + (*tint_module_vars.v624));
+ x = (x + (*tint_module_vars.v625));
+ x = (x + (*tint_module_vars.v626));
+ x = (x + (*tint_module_vars.v627));
+ x = (x + (*tint_module_vars.v628));
+ x = (x + (*tint_module_vars.v629));
+ x = (x + (*tint_module_vars.v630));
+ x = (x + (*tint_module_vars.v631));
+ x = (x + (*tint_module_vars.v632));
+ x = (x + (*tint_module_vars.v633));
+ x = (x + (*tint_module_vars.v634));
+ x = (x + (*tint_module_vars.v635));
+ x = (x + (*tint_module_vars.v636));
+ x = (x + (*tint_module_vars.v637));
+ x = (x + (*tint_module_vars.v638));
+ x = (x + (*tint_module_vars.v639));
+ x = (x + (*tint_module_vars.v640));
+ x = (x + (*tint_module_vars.v641));
+ x = (x + (*tint_module_vars.v642));
+ x = (x + (*tint_module_vars.v643));
+ x = (x + (*tint_module_vars.v644));
+ x = (x + (*tint_module_vars.v645));
+ x = (x + (*tint_module_vars.v646));
+ x = (x + (*tint_module_vars.v647));
+ x = (x + (*tint_module_vars.v648));
+ x = (x + (*tint_module_vars.v649));
+ x = (x + (*tint_module_vars.v650));
+ x = (x + (*tint_module_vars.v651));
+ x = (x + (*tint_module_vars.v652));
+ x = (x + (*tint_module_vars.v653));
+ x = (x + (*tint_module_vars.v654));
+ x = (x + (*tint_module_vars.v655));
+ x = (x + (*tint_module_vars.v656));
+ x = (x + (*tint_module_vars.v657));
+ x = (x + (*tint_module_vars.v658));
+ x = (x + (*tint_module_vars.v659));
+ x = (x + (*tint_module_vars.v660));
+ x = (x + (*tint_module_vars.v661));
+ x = (x + (*tint_module_vars.v662));
+ x = (x + (*tint_module_vars.v663));
+ x = (x + (*tint_module_vars.v664));
+ x = (x + (*tint_module_vars.v665));
+ x = (x + (*tint_module_vars.v666));
+ x = (x + (*tint_module_vars.v667));
+ x = (x + (*tint_module_vars.v668));
+ x = (x + (*tint_module_vars.v669));
+ x = (x + (*tint_module_vars.v670));
+ x = (x + (*tint_module_vars.v671));
+ x = (x + (*tint_module_vars.v672));
+ x = (x + (*tint_module_vars.v673));
+ x = (x + (*tint_module_vars.v674));
+ x = (x + (*tint_module_vars.v675));
+ x = (x + (*tint_module_vars.v676));
+ x = (x + (*tint_module_vars.v677));
+ x = (x + (*tint_module_vars.v678));
+ x = (x + (*tint_module_vars.v679));
+ x = (x + (*tint_module_vars.v680));
+ x = (x + (*tint_module_vars.v681));
+ x = (x + (*tint_module_vars.v682));
+ x = (x + (*tint_module_vars.v683));
+ x = (x + (*tint_module_vars.v684));
+ x = (x + (*tint_module_vars.v685));
+ x = (x + (*tint_module_vars.v686));
+ x = (x + (*tint_module_vars.v687));
+ x = (x + (*tint_module_vars.v688));
+ x = (x + (*tint_module_vars.v689));
+ x = (x + (*tint_module_vars.v690));
+ x = (x + (*tint_module_vars.v691));
+ x = (x + (*tint_module_vars.v692));
+ x = (x + (*tint_module_vars.v693));
+ x = (x + (*tint_module_vars.v694));
+ x = (x + (*tint_module_vars.v695));
+ x = (x + (*tint_module_vars.v696));
+ x = (x + (*tint_module_vars.v697));
+ x = (x + (*tint_module_vars.v698));
+ x = (x + (*tint_module_vars.v699));
+ x = (x + (*tint_module_vars.v700));
+ x = (x + (*tint_module_vars.v701));
+ x = (x + (*tint_module_vars.v702));
+ x = (x + (*tint_module_vars.v703));
+ x = (x + (*tint_module_vars.v704));
+ x = (x + (*tint_module_vars.v705));
+ x = (x + (*tint_module_vars.v706));
+ x = (x + (*tint_module_vars.v707));
+ x = (x + (*tint_module_vars.v708));
+ x = (x + (*tint_module_vars.v709));
+ x = (x + (*tint_module_vars.v710));
+ x = (x + (*tint_module_vars.v711));
+ x = (x + (*tint_module_vars.v712));
+ x = (x + (*tint_module_vars.v713));
+ x = (x + (*tint_module_vars.v714));
+ x = (x + (*tint_module_vars.v715));
+ x = (x + (*tint_module_vars.v716));
+ x = (x + (*tint_module_vars.v717));
+ x = (x + (*tint_module_vars.v718));
+ x = (x + (*tint_module_vars.v719));
+ x = (x + (*tint_module_vars.v720));
+ x = (x + (*tint_module_vars.v721));
+ x = (x + (*tint_module_vars.v722));
+ x = (x + (*tint_module_vars.v723));
+ x = (x + (*tint_module_vars.v724));
+ x = (x + (*tint_module_vars.v725));
+ x = (x + (*tint_module_vars.v726));
+ x = (x + (*tint_module_vars.v727));
+ x = (x + (*tint_module_vars.v728));
+ x = (x + (*tint_module_vars.v729));
+ x = (x + (*tint_module_vars.v730));
+ x = (x + (*tint_module_vars.v731));
+ x = (x + (*tint_module_vars.v732));
+ x = (x + (*tint_module_vars.v733));
+ x = (x + (*tint_module_vars.v734));
+ x = (x + (*tint_module_vars.v735));
+ x = (x + (*tint_module_vars.v736));
+ x = (x + (*tint_module_vars.v737));
+ x = (x + (*tint_module_vars.v738));
+ x = (x + (*tint_module_vars.v739));
+ x = (x + (*tint_module_vars.v740));
+ x = (x + (*tint_module_vars.v741));
+ x = (x + (*tint_module_vars.v742));
+ x = (x + (*tint_module_vars.v743));
+ x = (x + (*tint_module_vars.v744));
+ x = (x + (*tint_module_vars.v745));
+ x = (x + (*tint_module_vars.v746));
+ x = (x + (*tint_module_vars.v747));
+ x = (x + (*tint_module_vars.v748));
+ x = (x + (*tint_module_vars.v749));
+ x = (x + (*tint_module_vars.v750));
+ x = (x + (*tint_module_vars.v751));
+ x = (x + (*tint_module_vars.v752));
+ x = (x + (*tint_module_vars.v753));
+ x = (x + (*tint_module_vars.v754));
+ x = (x + (*tint_module_vars.v755));
+ x = (x + (*tint_module_vars.v756));
+ x = (x + (*tint_module_vars.v757));
+ x = (x + (*tint_module_vars.v758));
+ x = (x + (*tint_module_vars.v759));
+ x = (x + (*tint_module_vars.v760));
+ x = (x + (*tint_module_vars.v761));
+ x = (x + (*tint_module_vars.v762));
+ x = (x + (*tint_module_vars.v763));
+ x = (x + (*tint_module_vars.v764));
+ x = (x + (*tint_module_vars.v765));
+ x = (x + (*tint_module_vars.v766));
+ x = (x + (*tint_module_vars.v767));
+ x = (x + (*tint_module_vars.v768));
+ x = (x + (*tint_module_vars.v769));
+ x = (x + (*tint_module_vars.v770));
+ x = (x + (*tint_module_vars.v771));
+ x = (x + (*tint_module_vars.v772));
+ x = (x + (*tint_module_vars.v773));
+ x = (x + (*tint_module_vars.v774));
+ x = (x + (*tint_module_vars.v775));
+ x = (x + (*tint_module_vars.v776));
+ x = (x + (*tint_module_vars.v777));
+ x = (x + (*tint_module_vars.v778));
+ x = (x + (*tint_module_vars.v779));
+ x = (x + (*tint_module_vars.v780));
+ x = (x + (*tint_module_vars.v781));
+ x = (x + (*tint_module_vars.v782));
+ x = (x + (*tint_module_vars.v783));
+ x = (x + (*tint_module_vars.v784));
+ x = (x + (*tint_module_vars.v785));
+ x = (x + (*tint_module_vars.v786));
+ x = (x + (*tint_module_vars.v787));
+ x = (x + (*tint_module_vars.v788));
+ x = (x + (*tint_module_vars.v789));
+ x = (x + (*tint_module_vars.v790));
+ x = (x + (*tint_module_vars.v791));
+ x = (x + (*tint_module_vars.v792));
+ x = (x + (*tint_module_vars.v793));
+ x = (x + (*tint_module_vars.v794));
+ x = (x + (*tint_module_vars.v795));
+ x = (x + (*tint_module_vars.v796));
+ x = (x + (*tint_module_vars.v797));
+ x = (x + (*tint_module_vars.v798));
+ x = (x + (*tint_module_vars.v799));
+ x = (x + (*tint_module_vars.v800));
+ x = (x + (*tint_module_vars.v801));
+ x = (x + (*tint_module_vars.v802));
+ x = (x + (*tint_module_vars.v803));
+ x = (x + (*tint_module_vars.v804));
+ x = (x + (*tint_module_vars.v805));
+ x = (x + (*tint_module_vars.v806));
+ x = (x + (*tint_module_vars.v807));
+ x = (x + (*tint_module_vars.v808));
+ x = (x + (*tint_module_vars.v809));
+ x = (x + (*tint_module_vars.v810));
+ x = (x + (*tint_module_vars.v811));
+ x = (x + (*tint_module_vars.v812));
+ x = (x + (*tint_module_vars.v813));
+ x = (x + (*tint_module_vars.v814));
+ x = (x + (*tint_module_vars.v815));
+ x = (x + (*tint_module_vars.v816));
+ x = (x + (*tint_module_vars.v817));
+ x = (x + (*tint_module_vars.v818));
+ x = (x + (*tint_module_vars.v819));
+ x = (x + (*tint_module_vars.v820));
+ x = (x + (*tint_module_vars.v821));
+ x = (x + (*tint_module_vars.v822));
+ x = (x + (*tint_module_vars.v823));
+ x = (x + (*tint_module_vars.v824));
+ x = (x + (*tint_module_vars.v825));
+ x = (x + (*tint_module_vars.v826));
+ x = (x + (*tint_module_vars.v827));
+ x = (x + (*tint_module_vars.v828));
+ x = (x + (*tint_module_vars.v829));
+ x = (x + (*tint_module_vars.v830));
+ x = (x + (*tint_module_vars.v831));
+ x = (x + (*tint_module_vars.v832));
+ x = (x + (*tint_module_vars.v833));
+ x = (x + (*tint_module_vars.v834));
+ x = (x + (*tint_module_vars.v835));
+ x = (x + (*tint_module_vars.v836));
+ x = (x + (*tint_module_vars.v837));
+ x = (x + (*tint_module_vars.v838));
+ x = (x + (*tint_module_vars.v839));
+ x = (x + (*tint_module_vars.v840));
+ x = (x + (*tint_module_vars.v841));
+ x = (x + (*tint_module_vars.v842));
+ x = (x + (*tint_module_vars.v843));
+ x = (x + (*tint_module_vars.v844));
+ x = (x + (*tint_module_vars.v845));
+ x = (x + (*tint_module_vars.v846));
+ x = (x + (*tint_module_vars.v847));
+ x = (x + (*tint_module_vars.v848));
+ x = (x + (*tint_module_vars.v849));
+ x = (x + (*tint_module_vars.v850));
+ x = (x + (*tint_module_vars.v851));
+ x = (x + (*tint_module_vars.v852));
+ x = (x + (*tint_module_vars.v853));
+ x = (x + (*tint_module_vars.v854));
+ x = (x + (*tint_module_vars.v855));
+ x = (x + (*tint_module_vars.v856));
+ x = (x + (*tint_module_vars.v857));
+ x = (x + (*tint_module_vars.v858));
+ x = (x + (*tint_module_vars.v859));
+ x = (x + (*tint_module_vars.v860));
+ x = (x + (*tint_module_vars.v861));
+ x = (x + (*tint_module_vars.v862));
+ x = (x + (*tint_module_vars.v863));
+ x = (x + (*tint_module_vars.v864));
+ x = (x + (*tint_module_vars.v865));
+ x = (x + (*tint_module_vars.v866));
+ x = (x + (*tint_module_vars.v867));
+ x = (x + (*tint_module_vars.v868));
+ x = (x + (*tint_module_vars.v869));
+ x = (x + (*tint_module_vars.v870));
+ x = (x + (*tint_module_vars.v871));
+ x = (x + (*tint_module_vars.v872));
+ x = (x + (*tint_module_vars.v873));
+ x = (x + (*tint_module_vars.v874));
+ x = (x + (*tint_module_vars.v875));
+ x = (x + (*tint_module_vars.v876));
+ x = (x + (*tint_module_vars.v877));
+ x = (x + (*tint_module_vars.v878));
+ x = (x + (*tint_module_vars.v879));
+ x = (x + (*tint_module_vars.v880));
+ x = (x + (*tint_module_vars.v881));
+ x = (x + (*tint_module_vars.v882));
+ x = (x + (*tint_module_vars.v883));
+ x = (x + (*tint_module_vars.v884));
+ x = (x + (*tint_module_vars.v885));
+ x = (x + (*tint_module_vars.v886));
+ x = (x + (*tint_module_vars.v887));
+ x = (x + (*tint_module_vars.v888));
+ x = (x + (*tint_module_vars.v889));
+ x = (x + (*tint_module_vars.v890));
+ x = (x + (*tint_module_vars.v891));
+ x = (x + (*tint_module_vars.v892));
+ x = (x + (*tint_module_vars.v893));
+ x = (x + (*tint_module_vars.v894));
+ x = (x + (*tint_module_vars.v895));
+ x = (x + (*tint_module_vars.v896));
+ x = (x + (*tint_module_vars.v897));
+ x = (x + (*tint_module_vars.v898));
+ x = (x + (*tint_module_vars.v899));
+ x = (x + (*tint_module_vars.v900));
+ x = (x + (*tint_module_vars.v901));
+ x = (x + (*tint_module_vars.v902));
+ x = (x + (*tint_module_vars.v903));
+ x = (x + (*tint_module_vars.v904));
+ x = (x + (*tint_module_vars.v905));
+ x = (x + (*tint_module_vars.v906));
+ x = (x + (*tint_module_vars.v907));
+ x = (x + (*tint_module_vars.v908));
+ x = (x + (*tint_module_vars.v909));
+ x = (x + (*tint_module_vars.v910));
+ x = (x + (*tint_module_vars.v911));
+ x = (x + (*tint_module_vars.v912));
+ x = (x + (*tint_module_vars.v913));
+ x = (x + (*tint_module_vars.v914));
+ x = (x + (*tint_module_vars.v915));
+ x = (x + (*tint_module_vars.v916));
+ x = (x + (*tint_module_vars.v917));
+ x = (x + (*tint_module_vars.v918));
+ x = (x + (*tint_module_vars.v919));
+ x = (x + (*tint_module_vars.v920));
+ x = (x + (*tint_module_vars.v921));
+ x = (x + (*tint_module_vars.v922));
+ x = (x + (*tint_module_vars.v923));
+ x = (x + (*tint_module_vars.v924));
+ x = (x + (*tint_module_vars.v925));
+ x = (x + (*tint_module_vars.v926));
+ x = (x + (*tint_module_vars.v927));
+ x = (x + (*tint_module_vars.v928));
+ x = (x + (*tint_module_vars.v929));
+ x = (x + (*tint_module_vars.v930));
+ x = (x + (*tint_module_vars.v931));
+ x = (x + (*tint_module_vars.v932));
+ x = (x + (*tint_module_vars.v933));
+ x = (x + (*tint_module_vars.v934));
+ x = (x + (*tint_module_vars.v935));
+ x = (x + (*tint_module_vars.v936));
+ x = (x + (*tint_module_vars.v937));
+ x = (x + (*tint_module_vars.v938));
+ x = (x + (*tint_module_vars.v939));
+ x = (x + (*tint_module_vars.v940));
+ x = (x + (*tint_module_vars.v941));
+ x = (x + (*tint_module_vars.v942));
+ x = (x + (*tint_module_vars.v943));
+ x = (x + (*tint_module_vars.v944));
+ x = (x + (*tint_module_vars.v945));
+ x = (x + (*tint_module_vars.v946));
+ x = (x + (*tint_module_vars.v947));
+ x = (x + (*tint_module_vars.v948));
+ x = (x + (*tint_module_vars.v949));
+ x = (x + (*tint_module_vars.v950));
+ x = (x + (*tint_module_vars.v951));
+ x = (x + (*tint_module_vars.v952));
+ x = (x + (*tint_module_vars.v953));
+ x = (x + (*tint_module_vars.v954));
+ x = (x + (*tint_module_vars.v955));
+ x = (x + (*tint_module_vars.v956));
+ x = (x + (*tint_module_vars.v957));
+ x = (x + (*tint_module_vars.v958));
+ x = (x + (*tint_module_vars.v959));
+ x = (x + (*tint_module_vars.v960));
+ x = (x + (*tint_module_vars.v961));
+ x = (x + (*tint_module_vars.v962));
+ x = (x + (*tint_module_vars.v963));
+ x = (x + (*tint_module_vars.v964));
+ x = (x + (*tint_module_vars.v965));
+ x = (x + (*tint_module_vars.v966));
+ x = (x + (*tint_module_vars.v967));
+ x = (x + (*tint_module_vars.v968));
+ x = (x + (*tint_module_vars.v969));
+ x = (x + (*tint_module_vars.v970));
+ x = (x + (*tint_module_vars.v971));
+ x = (x + (*tint_module_vars.v972));
+ x = (x + (*tint_module_vars.v973));
+ x = (x + (*tint_module_vars.v974));
+ x = (x + (*tint_module_vars.v975));
+ x = (x + (*tint_module_vars.v976));
+ x = (x + (*tint_module_vars.v977));
+ x = (x + (*tint_module_vars.v978));
+ x = (x + (*tint_module_vars.v979));
+ x = (x + (*tint_module_vars.v980));
+ x = (x + (*tint_module_vars.v981));
+ x = (x + (*tint_module_vars.v982));
+ x = (x + (*tint_module_vars.v983));
+ x = (x + (*tint_module_vars.v984));
+ x = (x + (*tint_module_vars.v985));
+ x = (x + (*tint_module_vars.v986));
+ x = (x + (*tint_module_vars.v987));
+ x = (x + (*tint_module_vars.v988));
+ x = (x + (*tint_module_vars.v989));
+ x = (x + (*tint_module_vars.v990));
+ x = (x + (*tint_module_vars.v991));
+ x = (x + (*tint_module_vars.v992));
+ x = (x + (*tint_module_vars.v993));
+ x = (x + (*tint_module_vars.v994));
+ x = (x + (*tint_module_vars.v995));
+ x = (x + (*tint_module_vars.v996));
+ x = (x + (*tint_module_vars.v997));
+ x = (x + (*tint_module_vars.v998));
+ x = (x + (*tint_module_vars.v999));
return x;
}
fragment uint tint_symbol() {
- return foo();
+ thread uint v0 = 0u;
+ thread uint v1 = 0u;
+ thread uint v2 = 0u;
+ thread uint v3 = 0u;
+ thread uint v4 = 0u;
+ thread uint v5 = 0u;
+ thread uint v6 = 0u;
+ thread uint v7 = 0u;
+ thread uint v8 = 0u;
+ thread uint v9 = 0u;
+ thread uint v10 = 0u;
+ thread uint v11 = 0u;
+ thread uint v12 = 0u;
+ thread uint v13 = 0u;
+ thread uint v14 = 0u;
+ thread uint v15 = 0u;
+ thread uint v16 = 0u;
+ thread uint v17 = 0u;
+ thread uint v18 = 0u;
+ thread uint v19 = 0u;
+ thread uint v20 = 0u;
+ thread uint v21 = 0u;
+ thread uint v22 = 0u;
+ thread uint v23 = 0u;
+ thread uint v24 = 0u;
+ thread uint v25 = 0u;
+ thread uint v26 = 0u;
+ thread uint v27 = 0u;
+ thread uint v28 = 0u;
+ thread uint v29 = 0u;
+ thread uint v30 = 0u;
+ thread uint v31 = 0u;
+ thread uint v32 = 0u;
+ thread uint v33 = 0u;
+ thread uint v34 = 0u;
+ thread uint v35 = 0u;
+ thread uint v36 = 0u;
+ thread uint v37 = 0u;
+ thread uint v38 = 0u;
+ thread uint v39 = 0u;
+ thread uint v40 = 0u;
+ thread uint v41 = 0u;
+ thread uint v42 = 0u;
+ thread uint v43 = 0u;
+ thread uint v44 = 0u;
+ thread uint v45 = 0u;
+ thread uint v46 = 0u;
+ thread uint v47 = 0u;
+ thread uint v48 = 0u;
+ thread uint v49 = 0u;
+ thread uint v50 = 0u;
+ thread uint v51 = 0u;
+ thread uint v52 = 0u;
+ thread uint v53 = 0u;
+ thread uint v54 = 0u;
+ thread uint v55 = 0u;
+ thread uint v56 = 0u;
+ thread uint v57 = 0u;
+ thread uint v58 = 0u;
+ thread uint v59 = 0u;
+ thread uint v60 = 0u;
+ thread uint v61 = 0u;
+ thread uint v62 = 0u;
+ thread uint v63 = 0u;
+ thread uint v64 = 0u;
+ thread uint v65 = 0u;
+ thread uint v66 = 0u;
+ thread uint v67 = 0u;
+ thread uint v68 = 0u;
+ thread uint v69 = 0u;
+ thread uint v70 = 0u;
+ thread uint v71 = 0u;
+ thread uint v72 = 0u;
+ thread uint v73 = 0u;
+ thread uint v74 = 0u;
+ thread uint v75 = 0u;
+ thread uint v76 = 0u;
+ thread uint v77 = 0u;
+ thread uint v78 = 0u;
+ thread uint v79 = 0u;
+ thread uint v80 = 0u;
+ thread uint v81 = 0u;
+ thread uint v82 = 0u;
+ thread uint v83 = 0u;
+ thread uint v84 = 0u;
+ thread uint v85 = 0u;
+ thread uint v86 = 0u;
+ thread uint v87 = 0u;
+ thread uint v88 = 0u;
+ thread uint v89 = 0u;
+ thread uint v90 = 0u;
+ thread uint v91 = 0u;
+ thread uint v92 = 0u;
+ thread uint v93 = 0u;
+ thread uint v94 = 0u;
+ thread uint v95 = 0u;
+ thread uint v96 = 0u;
+ thread uint v97 = 0u;
+ thread uint v98 = 0u;
+ thread uint v99 = 0u;
+ thread uint v100 = 0u;
+ thread uint v101 = 0u;
+ thread uint v102 = 0u;
+ thread uint v103 = 0u;
+ thread uint v104 = 0u;
+ thread uint v105 = 0u;
+ thread uint v106 = 0u;
+ thread uint v107 = 0u;
+ thread uint v108 = 0u;
+ thread uint v109 = 0u;
+ thread uint v110 = 0u;
+ thread uint v111 = 0u;
+ thread uint v112 = 0u;
+ thread uint v113 = 0u;
+ thread uint v114 = 0u;
+ thread uint v115 = 0u;
+ thread uint v116 = 0u;
+ thread uint v117 = 0u;
+ thread uint v118 = 0u;
+ thread uint v119 = 0u;
+ thread uint v120 = 0u;
+ thread uint v121 = 0u;
+ thread uint v122 = 0u;
+ thread uint v123 = 0u;
+ thread uint v124 = 0u;
+ thread uint v125 = 0u;
+ thread uint v126 = 0u;
+ thread uint v127 = 0u;
+ thread uint v128 = 0u;
+ thread uint v129 = 0u;
+ thread uint v130 = 0u;
+ thread uint v131 = 0u;
+ thread uint v132 = 0u;
+ thread uint v133 = 0u;
+ thread uint v134 = 0u;
+ thread uint v135 = 0u;
+ thread uint v136 = 0u;
+ thread uint v137 = 0u;
+ thread uint v138 = 0u;
+ thread uint v139 = 0u;
+ thread uint v140 = 0u;
+ thread uint v141 = 0u;
+ thread uint v142 = 0u;
+ thread uint v143 = 0u;
+ thread uint v144 = 0u;
+ thread uint v145 = 0u;
+ thread uint v146 = 0u;
+ thread uint v147 = 0u;
+ thread uint v148 = 0u;
+ thread uint v149 = 0u;
+ thread uint v150 = 0u;
+ thread uint v151 = 0u;
+ thread uint v152 = 0u;
+ thread uint v153 = 0u;
+ thread uint v154 = 0u;
+ thread uint v155 = 0u;
+ thread uint v156 = 0u;
+ thread uint v157 = 0u;
+ thread uint v158 = 0u;
+ thread uint v159 = 0u;
+ thread uint v160 = 0u;
+ thread uint v161 = 0u;
+ thread uint v162 = 0u;
+ thread uint v163 = 0u;
+ thread uint v164 = 0u;
+ thread uint v165 = 0u;
+ thread uint v166 = 0u;
+ thread uint v167 = 0u;
+ thread uint v168 = 0u;
+ thread uint v169 = 0u;
+ thread uint v170 = 0u;
+ thread uint v171 = 0u;
+ thread uint v172 = 0u;
+ thread uint v173 = 0u;
+ thread uint v174 = 0u;
+ thread uint v175 = 0u;
+ thread uint v176 = 0u;
+ thread uint v177 = 0u;
+ thread uint v178 = 0u;
+ thread uint v179 = 0u;
+ thread uint v180 = 0u;
+ thread uint v181 = 0u;
+ thread uint v182 = 0u;
+ thread uint v183 = 0u;
+ thread uint v184 = 0u;
+ thread uint v185 = 0u;
+ thread uint v186 = 0u;
+ thread uint v187 = 0u;
+ thread uint v188 = 0u;
+ thread uint v189 = 0u;
+ thread uint v190 = 0u;
+ thread uint v191 = 0u;
+ thread uint v192 = 0u;
+ thread uint v193 = 0u;
+ thread uint v194 = 0u;
+ thread uint v195 = 0u;
+ thread uint v196 = 0u;
+ thread uint v197 = 0u;
+ thread uint v198 = 0u;
+ thread uint v199 = 0u;
+ thread uint v200 = 0u;
+ thread uint v201 = 0u;
+ thread uint v202 = 0u;
+ thread uint v203 = 0u;
+ thread uint v204 = 0u;
+ thread uint v205 = 0u;
+ thread uint v206 = 0u;
+ thread uint v207 = 0u;
+ thread uint v208 = 0u;
+ thread uint v209 = 0u;
+ thread uint v210 = 0u;
+ thread uint v211 = 0u;
+ thread uint v212 = 0u;
+ thread uint v213 = 0u;
+ thread uint v214 = 0u;
+ thread uint v215 = 0u;
+ thread uint v216 = 0u;
+ thread uint v217 = 0u;
+ thread uint v218 = 0u;
+ thread uint v219 = 0u;
+ thread uint v220 = 0u;
+ thread uint v221 = 0u;
+ thread uint v222 = 0u;
+ thread uint v223 = 0u;
+ thread uint v224 = 0u;
+ thread uint v225 = 0u;
+ thread uint v226 = 0u;
+ thread uint v227 = 0u;
+ thread uint v228 = 0u;
+ thread uint v229 = 0u;
+ thread uint v230 = 0u;
+ thread uint v231 = 0u;
+ thread uint v232 = 0u;
+ thread uint v233 = 0u;
+ thread uint v234 = 0u;
+ thread uint v235 = 0u;
+ thread uint v236 = 0u;
+ thread uint v237 = 0u;
+ thread uint v238 = 0u;
+ thread uint v239 = 0u;
+ thread uint v240 = 0u;
+ thread uint v241 = 0u;
+ thread uint v242 = 0u;
+ thread uint v243 = 0u;
+ thread uint v244 = 0u;
+ thread uint v245 = 0u;
+ thread uint v246 = 0u;
+ thread uint v247 = 0u;
+ thread uint v248 = 0u;
+ thread uint v249 = 0u;
+ thread uint v250 = 0u;
+ thread uint v251 = 0u;
+ thread uint v252 = 0u;
+ thread uint v253 = 0u;
+ thread uint v254 = 0u;
+ thread uint v255 = 0u;
+ thread uint v256 = 0u;
+ thread uint v257 = 0u;
+ thread uint v258 = 0u;
+ thread uint v259 = 0u;
+ thread uint v260 = 0u;
+ thread uint v261 = 0u;
+ thread uint v262 = 0u;
+ thread uint v263 = 0u;
+ thread uint v264 = 0u;
+ thread uint v265 = 0u;
+ thread uint v266 = 0u;
+ thread uint v267 = 0u;
+ thread uint v268 = 0u;
+ thread uint v269 = 0u;
+ thread uint v270 = 0u;
+ thread uint v271 = 0u;
+ thread uint v272 = 0u;
+ thread uint v273 = 0u;
+ thread uint v274 = 0u;
+ thread uint v275 = 0u;
+ thread uint v276 = 0u;
+ thread uint v277 = 0u;
+ thread uint v278 = 0u;
+ thread uint v279 = 0u;
+ thread uint v280 = 0u;
+ thread uint v281 = 0u;
+ thread uint v282 = 0u;
+ thread uint v283 = 0u;
+ thread uint v284 = 0u;
+ thread uint v285 = 0u;
+ thread uint v286 = 0u;
+ thread uint v287 = 0u;
+ thread uint v288 = 0u;
+ thread uint v289 = 0u;
+ thread uint v290 = 0u;
+ thread uint v291 = 0u;
+ thread uint v292 = 0u;
+ thread uint v293 = 0u;
+ thread uint v294 = 0u;
+ thread uint v295 = 0u;
+ thread uint v296 = 0u;
+ thread uint v297 = 0u;
+ thread uint v298 = 0u;
+ thread uint v299 = 0u;
+ thread uint v300 = 0u;
+ thread uint v301 = 0u;
+ thread uint v302 = 0u;
+ thread uint v303 = 0u;
+ thread uint v304 = 0u;
+ thread uint v305 = 0u;
+ thread uint v306 = 0u;
+ thread uint v307 = 0u;
+ thread uint v308 = 0u;
+ thread uint v309 = 0u;
+ thread uint v310 = 0u;
+ thread uint v311 = 0u;
+ thread uint v312 = 0u;
+ thread uint v313 = 0u;
+ thread uint v314 = 0u;
+ thread uint v315 = 0u;
+ thread uint v316 = 0u;
+ thread uint v317 = 0u;
+ thread uint v318 = 0u;
+ thread uint v319 = 0u;
+ thread uint v320 = 0u;
+ thread uint v321 = 0u;
+ thread uint v322 = 0u;
+ thread uint v323 = 0u;
+ thread uint v324 = 0u;
+ thread uint v325 = 0u;
+ thread uint v326 = 0u;
+ thread uint v327 = 0u;
+ thread uint v328 = 0u;
+ thread uint v329 = 0u;
+ thread uint v330 = 0u;
+ thread uint v331 = 0u;
+ thread uint v332 = 0u;
+ thread uint v333 = 0u;
+ thread uint v334 = 0u;
+ thread uint v335 = 0u;
+ thread uint v336 = 0u;
+ thread uint v337 = 0u;
+ thread uint v338 = 0u;
+ thread uint v339 = 0u;
+ thread uint v340 = 0u;
+ thread uint v341 = 0u;
+ thread uint v342 = 0u;
+ thread uint v343 = 0u;
+ thread uint v344 = 0u;
+ thread uint v345 = 0u;
+ thread uint v346 = 0u;
+ thread uint v347 = 0u;
+ thread uint v348 = 0u;
+ thread uint v349 = 0u;
+ thread uint v350 = 0u;
+ thread uint v351 = 0u;
+ thread uint v352 = 0u;
+ thread uint v353 = 0u;
+ thread uint v354 = 0u;
+ thread uint v355 = 0u;
+ thread uint v356 = 0u;
+ thread uint v357 = 0u;
+ thread uint v358 = 0u;
+ thread uint v359 = 0u;
+ thread uint v360 = 0u;
+ thread uint v361 = 0u;
+ thread uint v362 = 0u;
+ thread uint v363 = 0u;
+ thread uint v364 = 0u;
+ thread uint v365 = 0u;
+ thread uint v366 = 0u;
+ thread uint v367 = 0u;
+ thread uint v368 = 0u;
+ thread uint v369 = 0u;
+ thread uint v370 = 0u;
+ thread uint v371 = 0u;
+ thread uint v372 = 0u;
+ thread uint v373 = 0u;
+ thread uint v374 = 0u;
+ thread uint v375 = 0u;
+ thread uint v376 = 0u;
+ thread uint v377 = 0u;
+ thread uint v378 = 0u;
+ thread uint v379 = 0u;
+ thread uint v380 = 0u;
+ thread uint v381 = 0u;
+ thread uint v382 = 0u;
+ thread uint v383 = 0u;
+ thread uint v384 = 0u;
+ thread uint v385 = 0u;
+ thread uint v386 = 0u;
+ thread uint v387 = 0u;
+ thread uint v388 = 0u;
+ thread uint v389 = 0u;
+ thread uint v390 = 0u;
+ thread uint v391 = 0u;
+ thread uint v392 = 0u;
+ thread uint v393 = 0u;
+ thread uint v394 = 0u;
+ thread uint v395 = 0u;
+ thread uint v396 = 0u;
+ thread uint v397 = 0u;
+ thread uint v398 = 0u;
+ thread uint v399 = 0u;
+ thread uint v400 = 0u;
+ thread uint v401 = 0u;
+ thread uint v402 = 0u;
+ thread uint v403 = 0u;
+ thread uint v404 = 0u;
+ thread uint v405 = 0u;
+ thread uint v406 = 0u;
+ thread uint v407 = 0u;
+ thread uint v408 = 0u;
+ thread uint v409 = 0u;
+ thread uint v410 = 0u;
+ thread uint v411 = 0u;
+ thread uint v412 = 0u;
+ thread uint v413 = 0u;
+ thread uint v414 = 0u;
+ thread uint v415 = 0u;
+ thread uint v416 = 0u;
+ thread uint v417 = 0u;
+ thread uint v418 = 0u;
+ thread uint v419 = 0u;
+ thread uint v420 = 0u;
+ thread uint v421 = 0u;
+ thread uint v422 = 0u;
+ thread uint v423 = 0u;
+ thread uint v424 = 0u;
+ thread uint v425 = 0u;
+ thread uint v426 = 0u;
+ thread uint v427 = 0u;
+ thread uint v428 = 0u;
+ thread uint v429 = 0u;
+ thread uint v430 = 0u;
+ thread uint v431 = 0u;
+ thread uint v432 = 0u;
+ thread uint v433 = 0u;
+ thread uint v434 = 0u;
+ thread uint v435 = 0u;
+ thread uint v436 = 0u;
+ thread uint v437 = 0u;
+ thread uint v438 = 0u;
+ thread uint v439 = 0u;
+ thread uint v440 = 0u;
+ thread uint v441 = 0u;
+ thread uint v442 = 0u;
+ thread uint v443 = 0u;
+ thread uint v444 = 0u;
+ thread uint v445 = 0u;
+ thread uint v446 = 0u;
+ thread uint v447 = 0u;
+ thread uint v448 = 0u;
+ thread uint v449 = 0u;
+ thread uint v450 = 0u;
+ thread uint v451 = 0u;
+ thread uint v452 = 0u;
+ thread uint v453 = 0u;
+ thread uint v454 = 0u;
+ thread uint v455 = 0u;
+ thread uint v456 = 0u;
+ thread uint v457 = 0u;
+ thread uint v458 = 0u;
+ thread uint v459 = 0u;
+ thread uint v460 = 0u;
+ thread uint v461 = 0u;
+ thread uint v462 = 0u;
+ thread uint v463 = 0u;
+ thread uint v464 = 0u;
+ thread uint v465 = 0u;
+ thread uint v466 = 0u;
+ thread uint v467 = 0u;
+ thread uint v468 = 0u;
+ thread uint v469 = 0u;
+ thread uint v470 = 0u;
+ thread uint v471 = 0u;
+ thread uint v472 = 0u;
+ thread uint v473 = 0u;
+ thread uint v474 = 0u;
+ thread uint v475 = 0u;
+ thread uint v476 = 0u;
+ thread uint v477 = 0u;
+ thread uint v478 = 0u;
+ thread uint v479 = 0u;
+ thread uint v480 = 0u;
+ thread uint v481 = 0u;
+ thread uint v482 = 0u;
+ thread uint v483 = 0u;
+ thread uint v484 = 0u;
+ thread uint v485 = 0u;
+ thread uint v486 = 0u;
+ thread uint v487 = 0u;
+ thread uint v488 = 0u;
+ thread uint v489 = 0u;
+ thread uint v490 = 0u;
+ thread uint v491 = 0u;
+ thread uint v492 = 0u;
+ thread uint v493 = 0u;
+ thread uint v494 = 0u;
+ thread uint v495 = 0u;
+ thread uint v496 = 0u;
+ thread uint v497 = 0u;
+ thread uint v498 = 0u;
+ thread uint v499 = 0u;
+ thread uint v500 = 0u;
+ thread uint v501 = 0u;
+ thread uint v502 = 0u;
+ thread uint v503 = 0u;
+ thread uint v504 = 0u;
+ thread uint v505 = 0u;
+ thread uint v506 = 0u;
+ thread uint v507 = 0u;
+ thread uint v508 = 0u;
+ thread uint v509 = 0u;
+ thread uint v510 = 0u;
+ thread uint v511 = 0u;
+ thread uint v512 = 0u;
+ thread uint v513 = 0u;
+ thread uint v514 = 0u;
+ thread uint v515 = 0u;
+ thread uint v516 = 0u;
+ thread uint v517 = 0u;
+ thread uint v518 = 0u;
+ thread uint v519 = 0u;
+ thread uint v520 = 0u;
+ thread uint v521 = 0u;
+ thread uint v522 = 0u;
+ thread uint v523 = 0u;
+ thread uint v524 = 0u;
+ thread uint v525 = 0u;
+ thread uint v526 = 0u;
+ thread uint v527 = 0u;
+ thread uint v528 = 0u;
+ thread uint v529 = 0u;
+ thread uint v530 = 0u;
+ thread uint v531 = 0u;
+ thread uint v532 = 0u;
+ thread uint v533 = 0u;
+ thread uint v534 = 0u;
+ thread uint v535 = 0u;
+ thread uint v536 = 0u;
+ thread uint v537 = 0u;
+ thread uint v538 = 0u;
+ thread uint v539 = 0u;
+ thread uint v540 = 0u;
+ thread uint v541 = 0u;
+ thread uint v542 = 0u;
+ thread uint v543 = 0u;
+ thread uint v544 = 0u;
+ thread uint v545 = 0u;
+ thread uint v546 = 0u;
+ thread uint v547 = 0u;
+ thread uint v548 = 0u;
+ thread uint v549 = 0u;
+ thread uint v550 = 0u;
+ thread uint v551 = 0u;
+ thread uint v552 = 0u;
+ thread uint v553 = 0u;
+ thread uint v554 = 0u;
+ thread uint v555 = 0u;
+ thread uint v556 = 0u;
+ thread uint v557 = 0u;
+ thread uint v558 = 0u;
+ thread uint v559 = 0u;
+ thread uint v560 = 0u;
+ thread uint v561 = 0u;
+ thread uint v562 = 0u;
+ thread uint v563 = 0u;
+ thread uint v564 = 0u;
+ thread uint v565 = 0u;
+ thread uint v566 = 0u;
+ thread uint v567 = 0u;
+ thread uint v568 = 0u;
+ thread uint v569 = 0u;
+ thread uint v570 = 0u;
+ thread uint v571 = 0u;
+ thread uint v572 = 0u;
+ thread uint v573 = 0u;
+ thread uint v574 = 0u;
+ thread uint v575 = 0u;
+ thread uint v576 = 0u;
+ thread uint v577 = 0u;
+ thread uint v578 = 0u;
+ thread uint v579 = 0u;
+ thread uint v580 = 0u;
+ thread uint v581 = 0u;
+ thread uint v582 = 0u;
+ thread uint v583 = 0u;
+ thread uint v584 = 0u;
+ thread uint v585 = 0u;
+ thread uint v586 = 0u;
+ thread uint v587 = 0u;
+ thread uint v588 = 0u;
+ thread uint v589 = 0u;
+ thread uint v590 = 0u;
+ thread uint v591 = 0u;
+ thread uint v592 = 0u;
+ thread uint v593 = 0u;
+ thread uint v594 = 0u;
+ thread uint v595 = 0u;
+ thread uint v596 = 0u;
+ thread uint v597 = 0u;
+ thread uint v598 = 0u;
+ thread uint v599 = 0u;
+ thread uint v600 = 0u;
+ thread uint v601 = 0u;
+ thread uint v602 = 0u;
+ thread uint v603 = 0u;
+ thread uint v604 = 0u;
+ thread uint v605 = 0u;
+ thread uint v606 = 0u;
+ thread uint v607 = 0u;
+ thread uint v608 = 0u;
+ thread uint v609 = 0u;
+ thread uint v610 = 0u;
+ thread uint v611 = 0u;
+ thread uint v612 = 0u;
+ thread uint v613 = 0u;
+ thread uint v614 = 0u;
+ thread uint v615 = 0u;
+ thread uint v616 = 0u;
+ thread uint v617 = 0u;
+ thread uint v618 = 0u;
+ thread uint v619 = 0u;
+ thread uint v620 = 0u;
+ thread uint v621 = 0u;
+ thread uint v622 = 0u;
+ thread uint v623 = 0u;
+ thread uint v624 = 0u;
+ thread uint v625 = 0u;
+ thread uint v626 = 0u;
+ thread uint v627 = 0u;
+ thread uint v628 = 0u;
+ thread uint v629 = 0u;
+ thread uint v630 = 0u;
+ thread uint v631 = 0u;
+ thread uint v632 = 0u;
+ thread uint v633 = 0u;
+ thread uint v634 = 0u;
+ thread uint v635 = 0u;
+ thread uint v636 = 0u;
+ thread uint v637 = 0u;
+ thread uint v638 = 0u;
+ thread uint v639 = 0u;
+ thread uint v640 = 0u;
+ thread uint v641 = 0u;
+ thread uint v642 = 0u;
+ thread uint v643 = 0u;
+ thread uint v644 = 0u;
+ thread uint v645 = 0u;
+ thread uint v646 = 0u;
+ thread uint v647 = 0u;
+ thread uint v648 = 0u;
+ thread uint v649 = 0u;
+ thread uint v650 = 0u;
+ thread uint v651 = 0u;
+ thread uint v652 = 0u;
+ thread uint v653 = 0u;
+ thread uint v654 = 0u;
+ thread uint v655 = 0u;
+ thread uint v656 = 0u;
+ thread uint v657 = 0u;
+ thread uint v658 = 0u;
+ thread uint v659 = 0u;
+ thread uint v660 = 0u;
+ thread uint v661 = 0u;
+ thread uint v662 = 0u;
+ thread uint v663 = 0u;
+ thread uint v664 = 0u;
+ thread uint v665 = 0u;
+ thread uint v666 = 0u;
+ thread uint v667 = 0u;
+ thread uint v668 = 0u;
+ thread uint v669 = 0u;
+ thread uint v670 = 0u;
+ thread uint v671 = 0u;
+ thread uint v672 = 0u;
+ thread uint v673 = 0u;
+ thread uint v674 = 0u;
+ thread uint v675 = 0u;
+ thread uint v676 = 0u;
+ thread uint v677 = 0u;
+ thread uint v678 = 0u;
+ thread uint v679 = 0u;
+ thread uint v680 = 0u;
+ thread uint v681 = 0u;
+ thread uint v682 = 0u;
+ thread uint v683 = 0u;
+ thread uint v684 = 0u;
+ thread uint v685 = 0u;
+ thread uint v686 = 0u;
+ thread uint v687 = 0u;
+ thread uint v688 = 0u;
+ thread uint v689 = 0u;
+ thread uint v690 = 0u;
+ thread uint v691 = 0u;
+ thread uint v692 = 0u;
+ thread uint v693 = 0u;
+ thread uint v694 = 0u;
+ thread uint v695 = 0u;
+ thread uint v696 = 0u;
+ thread uint v697 = 0u;
+ thread uint v698 = 0u;
+ thread uint v699 = 0u;
+ thread uint v700 = 0u;
+ thread uint v701 = 0u;
+ thread uint v702 = 0u;
+ thread uint v703 = 0u;
+ thread uint v704 = 0u;
+ thread uint v705 = 0u;
+ thread uint v706 = 0u;
+ thread uint v707 = 0u;
+ thread uint v708 = 0u;
+ thread uint v709 = 0u;
+ thread uint v710 = 0u;
+ thread uint v711 = 0u;
+ thread uint v712 = 0u;
+ thread uint v713 = 0u;
+ thread uint v714 = 0u;
+ thread uint v715 = 0u;
+ thread uint v716 = 0u;
+ thread uint v717 = 0u;
+ thread uint v718 = 0u;
+ thread uint v719 = 0u;
+ thread uint v720 = 0u;
+ thread uint v721 = 0u;
+ thread uint v722 = 0u;
+ thread uint v723 = 0u;
+ thread uint v724 = 0u;
+ thread uint v725 = 0u;
+ thread uint v726 = 0u;
+ thread uint v727 = 0u;
+ thread uint v728 = 0u;
+ thread uint v729 = 0u;
+ thread uint v730 = 0u;
+ thread uint v731 = 0u;
+ thread uint v732 = 0u;
+ thread uint v733 = 0u;
+ thread uint v734 = 0u;
+ thread uint v735 = 0u;
+ thread uint v736 = 0u;
+ thread uint v737 = 0u;
+ thread uint v738 = 0u;
+ thread uint v739 = 0u;
+ thread uint v740 = 0u;
+ thread uint v741 = 0u;
+ thread uint v742 = 0u;
+ thread uint v743 = 0u;
+ thread uint v744 = 0u;
+ thread uint v745 = 0u;
+ thread uint v746 = 0u;
+ thread uint v747 = 0u;
+ thread uint v748 = 0u;
+ thread uint v749 = 0u;
+ thread uint v750 = 0u;
+ thread uint v751 = 0u;
+ thread uint v752 = 0u;
+ thread uint v753 = 0u;
+ thread uint v754 = 0u;
+ thread uint v755 = 0u;
+ thread uint v756 = 0u;
+ thread uint v757 = 0u;
+ thread uint v758 = 0u;
+ thread uint v759 = 0u;
+ thread uint v760 = 0u;
+ thread uint v761 = 0u;
+ thread uint v762 = 0u;
+ thread uint v763 = 0u;
+ thread uint v764 = 0u;
+ thread uint v765 = 0u;
+ thread uint v766 = 0u;
+ thread uint v767 = 0u;
+ thread uint v768 = 0u;
+ thread uint v769 = 0u;
+ thread uint v770 = 0u;
+ thread uint v771 = 0u;
+ thread uint v772 = 0u;
+ thread uint v773 = 0u;
+ thread uint v774 = 0u;
+ thread uint v775 = 0u;
+ thread uint v776 = 0u;
+ thread uint v777 = 0u;
+ thread uint v778 = 0u;
+ thread uint v779 = 0u;
+ thread uint v780 = 0u;
+ thread uint v781 = 0u;
+ thread uint v782 = 0u;
+ thread uint v783 = 0u;
+ thread uint v784 = 0u;
+ thread uint v785 = 0u;
+ thread uint v786 = 0u;
+ thread uint v787 = 0u;
+ thread uint v788 = 0u;
+ thread uint v789 = 0u;
+ thread uint v790 = 0u;
+ thread uint v791 = 0u;
+ thread uint v792 = 0u;
+ thread uint v793 = 0u;
+ thread uint v794 = 0u;
+ thread uint v795 = 0u;
+ thread uint v796 = 0u;
+ thread uint v797 = 0u;
+ thread uint v798 = 0u;
+ thread uint v799 = 0u;
+ thread uint v800 = 0u;
+ thread uint v801 = 0u;
+ thread uint v802 = 0u;
+ thread uint v803 = 0u;
+ thread uint v804 = 0u;
+ thread uint v805 = 0u;
+ thread uint v806 = 0u;
+ thread uint v807 = 0u;
+ thread uint v808 = 0u;
+ thread uint v809 = 0u;
+ thread uint v810 = 0u;
+ thread uint v811 = 0u;
+ thread uint v812 = 0u;
+ thread uint v813 = 0u;
+ thread uint v814 = 0u;
+ thread uint v815 = 0u;
+ thread uint v816 = 0u;
+ thread uint v817 = 0u;
+ thread uint v818 = 0u;
+ thread uint v819 = 0u;
+ thread uint v820 = 0u;
+ thread uint v821 = 0u;
+ thread uint v822 = 0u;
+ thread uint v823 = 0u;
+ thread uint v824 = 0u;
+ thread uint v825 = 0u;
+ thread uint v826 = 0u;
+ thread uint v827 = 0u;
+ thread uint v828 = 0u;
+ thread uint v829 = 0u;
+ thread uint v830 = 0u;
+ thread uint v831 = 0u;
+ thread uint v832 = 0u;
+ thread uint v833 = 0u;
+ thread uint v834 = 0u;
+ thread uint v835 = 0u;
+ thread uint v836 = 0u;
+ thread uint v837 = 0u;
+ thread uint v838 = 0u;
+ thread uint v839 = 0u;
+ thread uint v840 = 0u;
+ thread uint v841 = 0u;
+ thread uint v842 = 0u;
+ thread uint v843 = 0u;
+ thread uint v844 = 0u;
+ thread uint v845 = 0u;
+ thread uint v846 = 0u;
+ thread uint v847 = 0u;
+ thread uint v848 = 0u;
+ thread uint v849 = 0u;
+ thread uint v850 = 0u;
+ thread uint v851 = 0u;
+ thread uint v852 = 0u;
+ thread uint v853 = 0u;
+ thread uint v854 = 0u;
+ thread uint v855 = 0u;
+ thread uint v856 = 0u;
+ thread uint v857 = 0u;
+ thread uint v858 = 0u;
+ thread uint v859 = 0u;
+ thread uint v860 = 0u;
+ thread uint v861 = 0u;
+ thread uint v862 = 0u;
+ thread uint v863 = 0u;
+ thread uint v864 = 0u;
+ thread uint v865 = 0u;
+ thread uint v866 = 0u;
+ thread uint v867 = 0u;
+ thread uint v868 = 0u;
+ thread uint v869 = 0u;
+ thread uint v870 = 0u;
+ thread uint v871 = 0u;
+ thread uint v872 = 0u;
+ thread uint v873 = 0u;
+ thread uint v874 = 0u;
+ thread uint v875 = 0u;
+ thread uint v876 = 0u;
+ thread uint v877 = 0u;
+ thread uint v878 = 0u;
+ thread uint v879 = 0u;
+ thread uint v880 = 0u;
+ thread uint v881 = 0u;
+ thread uint v882 = 0u;
+ thread uint v883 = 0u;
+ thread uint v884 = 0u;
+ thread uint v885 = 0u;
+ thread uint v886 = 0u;
+ thread uint v887 = 0u;
+ thread uint v888 = 0u;
+ thread uint v889 = 0u;
+ thread uint v890 = 0u;
+ thread uint v891 = 0u;
+ thread uint v892 = 0u;
+ thread uint v893 = 0u;
+ thread uint v894 = 0u;
+ thread uint v895 = 0u;
+ thread uint v896 = 0u;
+ thread uint v897 = 0u;
+ thread uint v898 = 0u;
+ thread uint v899 = 0u;
+ thread uint v900 = 0u;
+ thread uint v901 = 0u;
+ thread uint v902 = 0u;
+ thread uint v903 = 0u;
+ thread uint v904 = 0u;
+ thread uint v905 = 0u;
+ thread uint v906 = 0u;
+ thread uint v907 = 0u;
+ thread uint v908 = 0u;
+ thread uint v909 = 0u;
+ thread uint v910 = 0u;
+ thread uint v911 = 0u;
+ thread uint v912 = 0u;
+ thread uint v913 = 0u;
+ thread uint v914 = 0u;
+ thread uint v915 = 0u;
+ thread uint v916 = 0u;
+ thread uint v917 = 0u;
+ thread uint v918 = 0u;
+ thread uint v919 = 0u;
+ thread uint v920 = 0u;
+ thread uint v921 = 0u;
+ thread uint v922 = 0u;
+ thread uint v923 = 0u;
+ thread uint v924 = 0u;
+ thread uint v925 = 0u;
+ thread uint v926 = 0u;
+ thread uint v927 = 0u;
+ thread uint v928 = 0u;
+ thread uint v929 = 0u;
+ thread uint v930 = 0u;
+ thread uint v931 = 0u;
+ thread uint v932 = 0u;
+ thread uint v933 = 0u;
+ thread uint v934 = 0u;
+ thread uint v935 = 0u;
+ thread uint v936 = 0u;
+ thread uint v937 = 0u;
+ thread uint v938 = 0u;
+ thread uint v939 = 0u;
+ thread uint v940 = 0u;
+ thread uint v941 = 0u;
+ thread uint v942 = 0u;
+ thread uint v943 = 0u;
+ thread uint v944 = 0u;
+ thread uint v945 = 0u;
+ thread uint v946 = 0u;
+ thread uint v947 = 0u;
+ thread uint v948 = 0u;
+ thread uint v949 = 0u;
+ thread uint v950 = 0u;
+ thread uint v951 = 0u;
+ thread uint v952 = 0u;
+ thread uint v953 = 0u;
+ thread uint v954 = 0u;
+ thread uint v955 = 0u;
+ thread uint v956 = 0u;
+ thread uint v957 = 0u;
+ thread uint v958 = 0u;
+ thread uint v959 = 0u;
+ thread uint v960 = 0u;
+ thread uint v961 = 0u;
+ thread uint v962 = 0u;
+ thread uint v963 = 0u;
+ thread uint v964 = 0u;
+ thread uint v965 = 0u;
+ thread uint v966 = 0u;
+ thread uint v967 = 0u;
+ thread uint v968 = 0u;
+ thread uint v969 = 0u;
+ thread uint v970 = 0u;
+ thread uint v971 = 0u;
+ thread uint v972 = 0u;
+ thread uint v973 = 0u;
+ thread uint v974 = 0u;
+ thread uint v975 = 0u;
+ thread uint v976 = 0u;
+ thread uint v977 = 0u;
+ thread uint v978 = 0u;
+ thread uint v979 = 0u;
+ thread uint v980 = 0u;
+ thread uint v981 = 0u;
+ thread uint v982 = 0u;
+ thread uint v983 = 0u;
+ thread uint v984 = 0u;
+ thread uint v985 = 0u;
+ thread uint v986 = 0u;
+ thread uint v987 = 0u;
+ thread uint v988 = 0u;
+ thread uint v989 = 0u;
+ thread uint v990 = 0u;
+ thread uint v991 = 0u;
+ thread uint v992 = 0u;
+ thread uint v993 = 0u;
+ thread uint v994 = 0u;
+ thread uint v995 = 0u;
+ thread uint v996 = 0u;
+ thread uint v997 = 0u;
+ thread uint v998 = 0u;
+ thread uint v999 = 0u;
+ tint_module_vars_struct const tint_module_vars = {.v0=(&v0), .v1=(&v1), .v2=(&v2), .v3=(&v3), .v4=(&v4), .v5=(&v5), .v6=(&v6), .v7=(&v7), .v8=(&v8), .v9=(&v9), .v10=(&v10), .v11=(&v11), .v12=(&v12), .v13=(&v13), .v14=(&v14), .v15=(&v15), .v16=(&v16), .v17=(&v17), .v18=(&v18), .v19=(&v19), .v20=(&v20), .v21=(&v21), .v22=(&v22), .v23=(&v23), .v24=(&v24), .v25=(&v25), .v26=(&v26), .v27=(&v27), .v28=(&v28), .v29=(&v29), .v30=(&v30), .v31=(&v31), .v32=(&v32), .v33=(&v33), .v34=(&v34), .v35=(&v35), .v36=(&v36), .v37=(&v37), .v38=(&v38), .v39=(&v39), .v40=(&v40), .v41=(&v41), .v42=(&v42), .v43=(&v43), .v44=(&v44), .v45=(&v45), .v46=(&v46), .v47=(&v47), .v48=(&v48), .v49=(&v49), .v50=(&v50), .v51=(&v51), .v52=(&v52), .v53=(&v53), .v54=(&v54), .v55=(&v55), .v56=(&v56), .v57=(&v57), .v58=(&v58), .v59=(&v59), .v60=(&v60), .v61=(&v61), .v62=(&v62), .v63=(&v63), .v64=(&v64), .v65=(&v65), .v66=(&v66), .v67=(&v67), .v68=(&v68), .v69=(&v69), .v70=(&v70), .v71=(&v71), .v72=(&v72), .v73=(&v73), .v74=(&v74), .v75=(&v75), .v76=(&v76), .v77=(&v77), .v78=(&v78), .v79=(&v79), .v80=(&v80), .v81=(&v81), .v82=(&v82), .v83=(&v83), .v84=(&v84), .v85=(&v85), .v86=(&v86), .v87=(&v87), .v88=(&v88), .v89=(&v89), .v90=(&v90), .v91=(&v91), .v92=(&v92), .v93=(&v93), .v94=(&v94), .v95=(&v95), .v96=(&v96), .v97=(&v97), .v98=(&v98), .v99=(&v99), .v100=(&v100), .v101=(&v101), .v102=(&v102), .v103=(&v103), .v104=(&v104), .v105=(&v105), .v106=(&v106), .v107=(&v107), .v108=(&v108), .v109=(&v109), .v110=(&v110), .v111=(&v111), .v112=(&v112), .v113=(&v113), .v114=(&v114), .v115=(&v115), .v116=(&v116), .v117=(&v117), .v118=(&v118), .v119=(&v119), .v120=(&v120), .v121=(&v121), .v122=(&v122), .v123=(&v123), .v124=(&v124), .v125=(&v125), .v126=(&v126), .v127=(&v127), .v128=(&v128), .v129=(&v129), .v130=(&v130), .v131=(&v131), .v132=(&v132), .v133=(&v133), .v134=(&v134), .v135=(&v135), .v136=(&v136), .v137=(&v137), .v138=(&v138), .v139=(&v139), .v140=(&v140), .v141=(&v141), .v142=(&v142), .v143=(&v143), .v144=(&v144), .v145=(&v145), .v146=(&v146), .v147=(&v147), .v148=(&v148), .v149=(&v149), .v150=(&v150), .v151=(&v151), .v152=(&v152), .v153=(&v153), .v154=(&v154), .v155=(&v155), .v156=(&v156), .v157=(&v157), .v158=(&v158), .v159=(&v159), .v160=(&v160), .v161=(&v161), .v162=(&v162), .v163=(&v163), .v164=(&v164), .v165=(&v165), .v166=(&v166), .v167=(&v167), .v168=(&v168), .v169=(&v169), .v170=(&v170), .v171=(&v171), .v172=(&v172), .v173=(&v173), .v174=(&v174), .v175=(&v175), .v176=(&v176), .v177=(&v177), .v178=(&v178), .v179=(&v179), .v180=(&v180), .v181=(&v181), .v182=(&v182), .v183=(&v183), .v184=(&v184), .v185=(&v185), .v186=(&v186), .v187=(&v187), .v188=(&v188), .v189=(&v189), .v190=(&v190), .v191=(&v191), .v192=(&v192), .v193=(&v193), .v194=(&v194), .v195=(&v195), .v196=(&v196), .v197=(&v197), .v198=(&v198), .v199=(&v199), .v200=(&v200), .v201=(&v201), .v202=(&v202), .v203=(&v203), .v204=(&v204), .v205=(&v205), .v206=(&v206), .v207=(&v207), .v208=(&v208), .v209=(&v209), .v210=(&v210), .v211=(&v211), .v212=(&v212), .v213=(&v213), .v214=(&v214), .v215=(&v215), .v216=(&v216), .v217=(&v217), .v218=(&v218), .v219=(&v219), .v220=(&v220), .v221=(&v221), .v222=(&v222), .v223=(&v223), .v224=(&v224), .v225=(&v225), .v226=(&v226), .v227=(&v227), .v228=(&v228), .v229=(&v229), .v230=(&v230), .v231=(&v231), .v232=(&v232), .v233=(&v233), .v234=(&v234), .v235=(&v235), .v236=(&v236), .v237=(&v237), .v238=(&v238), .v239=(&v239), .v240=(&v240), .v241=(&v241), .v242=(&v242), .v243=(&v243), .v244=(&v244), .v245=(&v245), .v246=(&v246), .v247=(&v247), .v248=(&v248), .v249=(&v249), .v250=(&v250), .v251=(&v251), .v252=(&v252), .v253=(&v253), .v254=(&v254), .v255=(&v255), .v256=(&v256), .v257=(&v257), .v258=(&v258), .v259=(&v259), .v260=(&v260), .v261=(&v261), .v262=(&v262), .v263=(&v263), .v264=(&v264), .v265=(&v265), .v266=(&v266), .v267=(&v267), .v268=(&v268), .v269=(&v269), .v270=(&v270), .v271=(&v271), .v272=(&v272), .v273=(&v273), .v274=(&v274), .v275=(&v275), .v276=(&v276), .v277=(&v277), .v278=(&v278), .v279=(&v279), .v280=(&v280), .v281=(&v281), .v282=(&v282), .v283=(&v283), .v284=(&v284), .v285=(&v285), .v286=(&v286), .v287=(&v287), .v288=(&v288), .v289=(&v289), .v290=(&v290), .v291=(&v291), .v292=(&v292), .v293=(&v293), .v294=(&v294), .v295=(&v295), .v296=(&v296), .v297=(&v297), .v298=(&v298), .v299=(&v299), .v300=(&v300), .v301=(&v301), .v302=(&v302), .v303=(&v303), .v304=(&v304), .v305=(&v305), .v306=(&v306), .v307=(&v307), .v308=(&v308), .v309=(&v309), .v310=(&v310), .v311=(&v311), .v312=(&v312), .v313=(&v313), .v314=(&v314), .v315=(&v315), .v316=(&v316), .v317=(&v317), .v318=(&v318), .v319=(&v319), .v320=(&v320), .v321=(&v321), .v322=(&v322), .v323=(&v323), .v324=(&v324), .v325=(&v325), .v326=(&v326), .v327=(&v327), .v328=(&v328), .v329=(&v329), .v330=(&v330), .v331=(&v331), .v332=(&v332), .v333=(&v333), .v334=(&v334), .v335=(&v335), .v336=(&v336), .v337=(&v337), .v338=(&v338), .v339=(&v339), .v340=(&v340), .v341=(&v341), .v342=(&v342), .v343=(&v343), .v344=(&v344), .v345=(&v345), .v346=(&v346), .v347=(&v347), .v348=(&v348), .v349=(&v349), .v350=(&v350), .v351=(&v351), .v352=(&v352), .v353=(&v353), .v354=(&v354), .v355=(&v355), .v356=(&v356), .v357=(&v357), .v358=(&v358), .v359=(&v359), .v360=(&v360), .v361=(&v361), .v362=(&v362), .v363=(&v363), .v364=(&v364), .v365=(&v365), .v366=(&v366), .v367=(&v367), .v368=(&v368), .v369=(&v369), .v370=(&v370), .v371=(&v371), .v372=(&v372), .v373=(&v373), .v374=(&v374), .v375=(&v375), .v376=(&v376), .v377=(&v377), .v378=(&v378), .v379=(&v379), .v380=(&v380), .v381=(&v381), .v382=(&v382), .v383=(&v383), .v384=(&v384), .v385=(&v385), .v386=(&v386), .v387=(&v387), .v388=(&v388), .v389=(&v389), .v390=(&v390), .v391=(&v391), .v392=(&v392), .v393=(&v393), .v394=(&v394), .v395=(&v395), .v396=(&v396), .v397=(&v397), .v398=(&v398), .v399=(&v399), .v400=(&v400), .v401=(&v401), .v402=(&v402), .v403=(&v403), .v404=(&v404), .v405=(&v405), .v406=(&v406), .v407=(&v407), .v408=(&v408), .v409=(&v409), .v410=(&v410), .v411=(&v411), .v412=(&v412), .v413=(&v413), .v414=(&v414), .v415=(&v415), .v416=(&v416), .v417=(&v417), .v418=(&v418), .v419=(&v419), .v420=(&v420), .v421=(&v421), .v422=(&v422), .v423=(&v423), .v424=(&v424), .v425=(&v425), .v426=(&v426), .v427=(&v427), .v428=(&v428), .v429=(&v429), .v430=(&v430), .v431=(&v431), .v432=(&v432), .v433=(&v433), .v434=(&v434), .v435=(&v435), .v436=(&v436), .v437=(&v437), .v438=(&v438), .v439=(&v439), .v440=(&v440), .v441=(&v441), .v442=(&v442), .v443=(&v443), .v444=(&v444), .v445=(&v445), .v446=(&v446), .v447=(&v447), .v448=(&v448), .v449=(&v449), .v450=(&v450), .v451=(&v451), .v452=(&v452), .v453=(&v453), .v454=(&v454), .v455=(&v455), .v456=(&v456), .v457=(&v457), .v458=(&v458), .v459=(&v459), .v460=(&v460), .v461=(&v461), .v462=(&v462), .v463=(&v463), .v464=(&v464), .v465=(&v465), .v466=(&v466), .v467=(&v467), .v468=(&v468), .v469=(&v469), .v470=(&v470), .v471=(&v471), .v472=(&v472), .v473=(&v473), .v474=(&v474), .v475=(&v475), .v476=(&v476), .v477=(&v477), .v478=(&v478), .v479=(&v479), .v480=(&v480), .v481=(&v481), .v482=(&v482), .v483=(&v483), .v484=(&v484), .v485=(&v485), .v486=(&v486), .v487=(&v487), .v488=(&v488), .v489=(&v489), .v490=(&v490), .v491=(&v491), .v492=(&v492), .v493=(&v493), .v494=(&v494), .v495=(&v495), .v496=(&v496), .v497=(&v497), .v498=(&v498), .v499=(&v499), .v500=(&v500), .v501=(&v501), .v502=(&v502), .v503=(&v503), .v504=(&v504), .v505=(&v505), .v506=(&v506), .v507=(&v507), .v508=(&v508), .v509=(&v509), .v510=(&v510), .v511=(&v511), .v512=(&v512), .v513=(&v513), .v514=(&v514), .v515=(&v515), .v516=(&v516), .v517=(&v517), .v518=(&v518), .v519=(&v519), .v520=(&v520), .v521=(&v521), .v522=(&v522), .v523=(&v523), .v524=(&v524), .v525=(&v525), .v526=(&v526), .v527=(&v527), .v528=(&v528), .v529=(&v529), .v530=(&v530), .v531=(&v531), .v532=(&v532), .v533=(&v533), .v534=(&v534), .v535=(&v535), .v536=(&v536), .v537=(&v537), .v538=(&v538), .v539=(&v539), .v540=(&v540), .v541=(&v541), .v542=(&v542), .v543=(&v543), .v544=(&v544), .v545=(&v545), .v546=(&v546), .v547=(&v547), .v548=(&v548), .v549=(&v549), .v550=(&v550), .v551=(&v551), .v552=(&v552), .v553=(&v553), .v554=(&v554), .v555=(&v555), .v556=(&v556), .v557=(&v557), .v558=(&v558), .v559=(&v559), .v560=(&v560), .v561=(&v561), .v562=(&v562), .v563=(&v563), .v564=(&v564), .v565=(&v565), .v566=(&v566), .v567=(&v567), .v568=(&v568), .v569=(&v569), .v570=(&v570), .v571=(&v571), .v572=(&v572), .v573=(&v573), .v574=(&v574), .v575=(&v575), .v576=(&v576), .v577=(&v577), .v578=(&v578), .v579=(&v579), .v580=(&v580), .v581=(&v581), .v582=(&v582), .v583=(&v583), .v584=(&v584), .v585=(&v585), .v586=(&v586), .v587=(&v587), .v588=(&v588), .v589=(&v589), .v590=(&v590), .v591=(&v591), .v592=(&v592), .v593=(&v593), .v594=(&v594), .v595=(&v595), .v596=(&v596), .v597=(&v597), .v598=(&v598), .v599=(&v599), .v600=(&v600), .v601=(&v601), .v602=(&v602), .v603=(&v603), .v604=(&v604), .v605=(&v605), .v606=(&v606), .v607=(&v607), .v608=(&v608), .v609=(&v609), .v610=(&v610), .v611=(&v611), .v612=(&v612), .v613=(&v613), .v614=(&v614), .v615=(&v615), .v616=(&v616), .v617=(&v617), .v618=(&v618), .v619=(&v619), .v620=(&v620), .v621=(&v621), .v622=(&v622), .v623=(&v623), .v624=(&v624), .v625=(&v625), .v626=(&v626), .v627=(&v627), .v628=(&v628), .v629=(&v629), .v630=(&v630), .v631=(&v631), .v632=(&v632), .v633=(&v633), .v634=(&v634), .v635=(&v635), .v636=(&v636), .v637=(&v637), .v638=(&v638), .v639=(&v639), .v640=(&v640), .v641=(&v641), .v642=(&v642), .v643=(&v643), .v644=(&v644), .v645=(&v645), .v646=(&v646), .v647=(&v647), .v648=(&v648), .v649=(&v649), .v650=(&v650), .v651=(&v651), .v652=(&v652), .v653=(&v653), .v654=(&v654), .v655=(&v655), .v656=(&v656), .v657=(&v657), .v658=(&v658), .v659=(&v659), .v660=(&v660), .v661=(&v661), .v662=(&v662), .v663=(&v663), .v664=(&v664), .v665=(&v665), .v666=(&v666), .v667=(&v667), .v668=(&v668), .v669=(&v669), .v670=(&v670), .v671=(&v671), .v672=(&v672), .v673=(&v673), .v674=(&v674), .v675=(&v675), .v676=(&v676), .v677=(&v677), .v678=(&v678), .v679=(&v679), .v680=(&v680), .v681=(&v681), .v682=(&v682), .v683=(&v683), .v684=(&v684), .v685=(&v685), .v686=(&v686), .v687=(&v687), .v688=(&v688), .v689=(&v689), .v690=(&v690), .v691=(&v691), .v692=(&v692), .v693=(&v693), .v694=(&v694), .v695=(&v695), .v696=(&v696), .v697=(&v697), .v698=(&v698), .v699=(&v699), .v700=(&v700), .v701=(&v701), .v702=(&v702), .v703=(&v703), .v704=(&v704), .v705=(&v705), .v706=(&v706), .v707=(&v707), .v708=(&v708), .v709=(&v709), .v710=(&v710), .v711=(&v711), .v712=(&v712), .v713=(&v713), .v714=(&v714), .v715=(&v715), .v716=(&v716), .v717=(&v717), .v718=(&v718), .v719=(&v719), .v720=(&v720), .v721=(&v721), .v722=(&v722), .v723=(&v723), .v724=(&v724), .v725=(&v725), .v726=(&v726), .v727=(&v727), .v728=(&v728), .v729=(&v729), .v730=(&v730), .v731=(&v731), .v732=(&v732), .v733=(&v733), .v734=(&v734), .v735=(&v735), .v736=(&v736), .v737=(&v737), .v738=(&v738), .v739=(&v739), .v740=(&v740), .v741=(&v741), .v742=(&v742), .v743=(&v743), .v744=(&v744), .v745=(&v745), .v746=(&v746), .v747=(&v747), .v748=(&v748), .v749=(&v749), .v750=(&v750), .v751=(&v751), .v752=(&v752), .v753=(&v753), .v754=(&v754), .v755=(&v755), .v756=(&v756), .v757=(&v757), .v758=(&v758), .v759=(&v759), .v760=(&v760), .v761=(&v761), .v762=(&v762), .v763=(&v763), .v764=(&v764), .v765=(&v765), .v766=(&v766), .v767=(&v767), .v768=(&v768), .v769=(&v769), .v770=(&v770), .v771=(&v771), .v772=(&v772), .v773=(&v773), .v774=(&v774), .v775=(&v775), .v776=(&v776), .v777=(&v777), .v778=(&v778), .v779=(&v779), .v780=(&v780), .v781=(&v781), .v782=(&v782), .v783=(&v783), .v784=(&v784), .v785=(&v785), .v786=(&v786), .v787=(&v787), .v788=(&v788), .v789=(&v789), .v790=(&v790), .v791=(&v791), .v792=(&v792), .v793=(&v793), .v794=(&v794), .v795=(&v795), .v796=(&v796), .v797=(&v797), .v798=(&v798), .v799=(&v799), .v800=(&v800), .v801=(&v801), .v802=(&v802), .v803=(&v803), .v804=(&v804), .v805=(&v805), .v806=(&v806), .v807=(&v807), .v808=(&v808), .v809=(&v809), .v810=(&v810), .v811=(&v811), .v812=(&v812), .v813=(&v813), .v814=(&v814), .v815=(&v815), .v816=(&v816), .v817=(&v817), .v818=(&v818), .v819=(&v819), .v820=(&v820), .v821=(&v821), .v822=(&v822), .v823=(&v823), .v824=(&v824), .v825=(&v825), .v826=(&v826), .v827=(&v827), .v828=(&v828), .v829=(&v829), .v830=(&v830), .v831=(&v831), .v832=(&v832), .v833=(&v833), .v834=(&v834), .v835=(&v835), .v836=(&v836), .v837=(&v837), .v838=(&v838), .v839=(&v839), .v840=(&v840), .v841=(&v841), .v842=(&v842), .v843=(&v843), .v844=(&v844), .v845=(&v845), .v846=(&v846), .v847=(&v847), .v848=(&v848), .v849=(&v849), .v850=(&v850), .v851=(&v851), .v852=(&v852), .v853=(&v853), .v854=(&v854), .v855=(&v855), .v856=(&v856), .v857=(&v857), .v858=(&v858), .v859=(&v859), .v860=(&v860), .v861=(&v861), .v862=(&v862), .v863=(&v863), .v864=(&v864), .v865=(&v865), .v866=(&v866), .v867=(&v867), .v868=(&v868), .v869=(&v869), .v870=(&v870), .v871=(&v871), .v872=(&v872), .v873=(&v873), .v874=(&v874), .v875=(&v875), .v876=(&v876), .v877=(&v877), .v878=(&v878), .v879=(&v879), .v880=(&v880), .v881=(&v881), .v882=(&v882), .v883=(&v883), .v884=(&v884), .v885=(&v885), .v886=(&v886), .v887=(&v887), .v888=(&v888), .v889=(&v889), .v890=(&v890), .v891=(&v891), .v892=(&v892), .v893=(&v893), .v894=(&v894), .v895=(&v895), .v896=(&v896), .v897=(&v897), .v898=(&v898), .v899=(&v899), .v900=(&v900), .v901=(&v901), .v902=(&v902), .v903=(&v903), .v904=(&v904), .v905=(&v905), .v906=(&v906), .v907=(&v907), .v908=(&v908), .v909=(&v909), .v910=(&v910), .v911=(&v911), .v912=(&v912), .v913=(&v913), .v914=(&v914), .v915=(&v915), .v916=(&v916), .v917=(&v917), .v918=(&v918), .v919=(&v919), .v920=(&v920), .v921=(&v921), .v922=(&v922), .v923=(&v923), .v924=(&v924), .v925=(&v925), .v926=(&v926), .v927=(&v927), .v928=(&v928), .v929=(&v929), .v930=(&v930), .v931=(&v931), .v932=(&v932), .v933=(&v933), .v934=(&v934), .v935=(&v935), .v936=(&v936), .v937=(&v937), .v938=(&v938), .v939=(&v939), .v940=(&v940), .v941=(&v941), .v942=(&v942), .v943=(&v943), .v944=(&v944), .v945=(&v945), .v946=(&v946), .v947=(&v947), .v948=(&v948), .v949=(&v949), .v950=(&v950), .v951=(&v951), .v952=(&v952), .v953=(&v953), .v954=(&v954), .v955=(&v955), .v956=(&v956), .v957=(&v957), .v958=(&v958), .v959=(&v959), .v960=(&v960), .v961=(&v961), .v962=(&v962), .v963=(&v963), .v964=(&v964), .v965=(&v965), .v966=(&v966), .v967=(&v967), .v968=(&v968), .v969=(&v969), .v970=(&v970), .v971=(&v971), .v972=(&v972), .v973=(&v973), .v974=(&v974), .v975=(&v975), .v976=(&v976), .v977=(&v977), .v978=(&v978), .v979=(&v979), .v980=(&v980), .v981=(&v981), .v982=(&v982), .v983=(&v983), .v984=(&v984), .v985=(&v985), .v986=(&v986), .v987=(&v987), .v988=(&v988), .v989=(&v989), .v990=(&v990), .v991=(&v991), .v992=(&v992), .v993=(&v993), .v994=(&v994), .v995=(&v995), .v996=(&v996), .v997=(&v997), .v998=(&v998), .v999=(&v999)};
+ return foo(tint_module_vars);
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint v0 = 0u;
- ^
-program_source:5:13: error: program scope variable must reside in constant address space
-thread uint v1 = 0u;
- ^
-program_source:6:13: error: program scope variable must reside in constant address space
-thread uint v2 = 0u;
- ^
-program_source:7:13: error: program scope variable must reside in constant address space
-thread uint v3 = 0u;
- ^
-program_source:8:13: error: program scope variable must reside in constant address space
-thread uint v4 = 0u;
- ^
-program_source:9:13: error: program scope variable must reside in constant address space
-thread uint v5 = 0u;
- ^
-program_source:10:13: error: program scope variable must reside in constant address space
-thread uint v6 = 0u;
- ^
-program_source:11:13: error: program scope variable must reside in constant address space
-thread uint v7 = 0u;
- ^
-program_source:12:13: error: program scope variable must reside in constant address space
-thread uint v8 = 0u;
- ^
-program_source:13:13: error: program scope variable must reside in constant address space
-thread uint v9 = 0u;
- ^
-program_source:14:13: error: program scope variable must reside in constant address space
-thread uint v10 = 0u;
- ^
-program_source:15:13: error: program scope variable must reside in constant address space
-thread uint v11 = 0u;
- ^
-program_source:16:13: error: program scope variable must reside in constant address space
-thread uint v12 = 0u;
- ^
-program_source:17:13: error: program scope variable must reside in constant address space
-thread uint v13 = 0u;
- ^
-program_source:18:13: error: program scope variable must reside in constant address space
-thread uint v14 = 0u;
- ^
-program_source:19:13: error: program scope variable must reside in constant address space
-thread uint v15 = 0u;
- ^
-program_source:20:13: error: program scope variable must reside in constant address space
-thread uint v16 = 0u;
- ^
-program_source:21:13: error: program scope variable must reside in constant address space
-thread uint v17 = 0u;
- ^
-program_source:22:13: error: program scope variable must reside in constant address space
-thread uint v18 = 0u;
- ^
-program_source:23:13: error: program scope variable must reside in constant address space
-thread uint v19 = 0u;
- ^
-program_source:24:13: error: program scope variable must reside in constant address space
-thread uint v20 = 0u;
- ^
-program_source:25:13: error: program scope variable must reside in constant address space
-thread uint v21 = 0u;
- ^
-program_source:26:13: error: program scope variable must reside in constant address space
-thread uint v22 = 0u;
- ^
-program_source:27:13: error: program scope variable must reside in constant address space
-thread uint v23 = 0u;
- ^
-program_source:28:13: error: program scope variable must reside in constant address space
-thread uint v24 = 0u;
- ^
-program_source:29:13: error: program scope variable must reside in constant address space
-thread uint v25 = 0u;
- ^
-program_source:30:13: error: program scope variable must reside in constant address space
-thread uint v26 = 0u;
- ^
-program_source:31:13: error: program scope variable must reside in constant address space
-thread uint v27 = 0u;
- ^
-program_source:32:13: error: program scope variable must reside in constant address space
-thread uint v28 = 0u;
- ^
-program_source:33:13: error: program scope variable must reside in constant address space
-thread uint v29 = 0u;
- ^
-program_source:34:13: error: program scope variable must reside in constant address space
-thread uint v30 = 0u;
- ^
-program_source:35:13: error: program scope variable must reside in constant address space
-thread uint v31 = 0u;
- ^
-program_source:36:13: error: program scope variable must reside in constant address space
-thread uint v32 = 0u;
- ^
-program_source:37:13: error: program scope variable must reside in constant address space
-thread uint v33 = 0u;
- ^
-program_source:38:13: error: program scope variable must reside in constant address space
-thread uint v34 = 0u;
- ^
-program_source:39:13: error: program scope variable must reside in constant address space
-thread uint v35 = 0u;
- ^
-program_source:40:13: error: program scope variable must reside in constant address space
-thread uint v36 = 0u;
- ^
-program_source:41:13: error: program scope variable must reside in constant address space
-thread uint v37 = 0u;
- ^
-program_source:42:13: error: program scope variable must reside in constant address space
-thread uint v38 = 0u;
- ^
-program_source:43:13: error: program scope variable must reside in constant address space
-thread uint v39 = 0u;
- ^
-program_source:44:13: error: program scope variable must reside in constant address space
-thread uint v40 = 0u;
- ^
-program_source:45:13: error: program scope variable must reside in constant address space
-thread uint v41 = 0u;
- ^
-program_source:46:13: error: program scope variable must reside in constant address space
-thread uint v42 = 0u;
- ^
-program_source:47:13: error: program scope variable must reside in constant address space
-thread uint v43 = 0u;
- ^
-program_source:48:13: error: program scope variable must reside in constant address space
-thread uint v44 = 0u;
- ^
-program_source:49:13: error: program scope variable must reside in constant address space
-thread uint v45 = 0u;
- ^
-program_source:50:13: error: program scope variable must reside in constant address space
-thread uint v46 = 0u;
- ^
-program_source:51:13: error: program scope variable must reside in constant address space
-thread uint v47 = 0u;
- ^
-program_source:52:13: error: program scope variable must reside in constant address space
-thread uint v48 = 0u;
- ^
-program_source:53:13: error: program scope variable must reside in constant address space
-thread uint v49 = 0u;
- ^
-program_source:54:13: error: program scope variable must reside in constant address space
-thread uint v50 = 0u;
- ^
-program_source:55:13: error: program scope variable must reside in constant address space
-thread uint v51 = 0u;
- ^
-program_source:56:13: error: program scope variable must reside in constant address space
-thread uint v52 = 0u;
- ^
-program_source:57:13: error: program scope variable must reside in constant address space
-thread uint v53 = 0u;
- ^
-program_source:58:13: error: program scope variable must reside in constant address space
-thread uint v54 = 0u;
- ^
-program_source:59:13: error: program scope variable must reside in constant address space
-thread uint v55 = 0u;
- ^
-program_source:60:13: error: program scope variable must reside in constant address space
-thread uint v56 = 0u;
- ^
-program_source:61:13: error: program scope variable must reside in constant address space
-thread uint v57 = 0u;
- ^
-program_source:62:13: error: program scope variable must reside in constant address space
-thread uint v58 = 0u;
- ^
-program_source:63:13: error: program scope variable must reside in constant address space
-thread uint v59 = 0u;
- ^
-program_source:64:13: error: program scope variable must reside in constant address space
-thread uint v60 = 0u;
- ^
-program_source:65:13: error: program scope variable must reside in constant address space
-thread uint v61 = 0u;
- ^
-program_source:66:13: error: program scope variable must reside in constant address space
-thread uint v62 = 0u;
- ^
-program_source:67:13: error: program scope variable must reside in constant address space
-thread uint v63 = 0u;
- ^
-program_source:68:13: error: program scope variable must reside in constant address space
-thread uint v64 = 0u;
- ^
-program_source:69:13: error: program scope variable must reside in constant address space
-thread uint v65 = 0u;
- ^
-program_source:70:13: error: program scope variable must reside in constant address space
-thread uint v66 = 0u;
- ^
-program_source:71:13: error: program scope variable must reside in constant address space
-thread uint v67 = 0u;
- ^
-program_source:72:13: error: program scope variable must reside in constant address space
-thread uint v68 = 0u;
- ^
-program_source:73:13: error: program scope variable must reside in constant address space
-thread uint v69 = 0u;
- ^
-program_source:74:13: error: program scope variable must reside in constant address space
-thread uint v70 = 0u;
- ^
-program_source:75:13: error: program scope variable must reside in constant address space
-thread uint v71 = 0u;
- ^
-program_source:76:13: error: program scope variable must reside in constant address space
-thread uint v72 = 0u;
- ^
-program_source:77:13: error: program scope variable must reside in constant address space
-thread uint v73 = 0u;
- ^
-program_source:78:13: error: program scope variable must reside in constant address space
-thread uint v74 = 0u;
- ^
-program_source:79:13: error: program scope variable must reside in constant address space
-thread uint v75 = 0u;
- ^
-program_source:80:13: error: program scope variable must reside in constant address space
-thread uint v76 = 0u;
- ^
-program_source:81:13: error: program scope variable must reside in constant address space
-thread uint v77 = 0u;
- ^
-program_source:82:13: error: program scope variable must reside in constant address space
-thread uint v78 = 0u;
- ^
-program_source:83:13: error: program scope variable must reside in constant address space
-thread uint v79 = 0u;
- ^
-program_source:84:13: error: program scope variable must reside in constant address space
-thread uint v80 = 0u;
- ^
-program_source:85:13: error: program scope variable must reside in constant address space
-thread uint v81 = 0u;
- ^
-program_source:86:13: error: program scope variable must reside in constant address space
-thread uint v82 = 0u;
- ^
-program_source:87:13: error: program scope variable must reside in constant address space
-thread uint v83 = 0u;
- ^
-program_source:88:13: error: program scope variable must reside in constant address space
-thread uint v84 = 0u;
- ^
-program_source:89:13: error: program scope variable must reside in constant address space
-thread uint v85 = 0u;
- ^
-program_source:90:13: error: program scope variable must reside in constant address space
-thread uint v86 = 0u;
- ^
-program_source:91:13: error: program scope variable must reside in constant address space
-thread uint v87 = 0u;
- ^
-program_source:92:13: error: program scope variable must reside in constant address space
-thread uint v88 = 0u;
- ^
-program_source:93:13: error: program scope variable must reside in constant address space
-thread uint v89 = 0u;
- ^
-program_source:94:13: error: program scope variable must reside in constant address space
-thread uint v90 = 0u;
- ^
-program_source:95:13: error: program scope variable must reside in constant address space
-thread uint v91 = 0u;
- ^
-program_source:96:13: error: program scope variable must reside in constant address space
-thread uint v92 = 0u;
- ^
-program_source:97:13: error: program scope variable must reside in constant address space
-thread uint v93 = 0u;
- ^
-program_source:98:13: error: program scope variable must reside in constant address space
-thread uint v94 = 0u;
- ^
-program_source:99:13: error: program scope variable must reside in constant address space
-thread uint v95 = 0u;
- ^
-program_source:100:13: error: program scope variable must reside in constant address space
-thread uint v96 = 0u;
- ^
-program_source:101:13: error: program scope variable must reside in constant address space
-thread uint v97 = 0u;
- ^
-program_source:102:13: error: program scope variable must reside in constant address space
-thread uint v98 = 0u;
- ^
-program_source:103:13: error: program scope variable must reside in constant address space
-thread uint v99 = 0u;
- ^
-program_source:104:13: error: program scope variable must reside in constant address space
-thread uint v100 = 0u;
- ^
-program_source:105:13: error: program scope variable must reside in constant address space
-thread uint v101 = 0u;
- ^
-program_source:106:13: error: program scope variable must reside in constant address space
-thread uint v102 = 0u;
- ^
-program_source:107:13: error: program scope variable must reside in constant address space
-thread uint v103 = 0u;
- ^
-program_source:108:13: error: program scope variable must reside in constant address space
-thread uint v104 = 0u;
- ^
-program_source:109:13: error: program scope variable must reside in constant address space
-thread uint v105 = 0u;
- ^
-program_source:110:13: error: program scope variable must reside in constant address space
-thread uint v106 = 0u;
- ^
-program_source:111:13: error: program scope variable must reside in constant address space
-thread uint v107 = 0u;
- ^
-program_source:112:13: error: program scope variable must reside in constant address space
-thread uint v108 = 0u;
- ^
-program_source:113:13: error: program scope variable must reside in constant address space
-thread uint v109 = 0u;
- ^
-program_source:114:13: error: program scope variable must reside in constant address space
-thread uint v110 = 0u;
- ^
-program_source:115:13: error: program scope variable must reside in constant address space
-thread uint v111 = 0u;
- ^
-program_source:116:13: error: program scope variable must reside in constant address space
-thread uint v112 = 0u;
- ^
-program_source:117:13: error: program scope variable must reside in constant address space
-thread uint v113 = 0u;
- ^
-program_source:118:13: error: program scope variable must reside in constant address space
-thread uint v114 = 0u;
- ^
-program_source:119:13: error: program scope variable must reside in constant address space
-thread uint v115 = 0u;
- ^
-program_source:120:13: error: program scope variable must reside in constant address space
-thread uint v116 = 0u;
- ^
-program_source:121:13: error: program scope variable must reside in constant address space
-thread uint v117 = 0u;
- ^
-program_source:122:13: error: program scope variable must reside in constant address space
-thread uint v118 = 0u;
- ^
-program_source:123:13: error: program scope variable must reside in constant address space
-thread uint v119 = 0u;
- ^
-program_source:124:13: error: program scope variable must reside in constant address space
-thread uint v120 = 0u;
- ^
-program_source:125:13: error: program scope variable must reside in constant address space
-thread uint v121 = 0u;
- ^
-program_source:126:13: error: program scope variable must reside in constant address space
-thread uint v122 = 0u;
- ^
-program_source:127:13: error: program scope variable must reside in constant address space
-thread uint v123 = 0u;
- ^
-program_source:128:13: error: program scope variable must reside in constant address space
-thread uint v124 = 0u;
- ^
-program_source:129:13: error: program scope variable must reside in constant address space
-thread uint v125 = 0u;
- ^
-program_source:130:13: error: program scope variable must reside in constant address space
-thread uint v126 = 0u;
- ^
-program_source:131:13: error: program scope variable must reside in constant address space
-thread uint v127 = 0u;
- ^
-program_source:132:13: error: program scope variable must reside in constant address space
-thread uint v128 = 0u;
- ^
-program_source:133:13: error: program scope variable must reside in constant address space
-thread uint v129 = 0u;
- ^
-program_source:134:13: error: program scope variable must reside in constant address space
-thread uint v130 = 0u;
- ^
-program_source:135:13: error: program scope variable must reside in constant address space
-thread uint v131 = 0u;
- ^
-program_source:136:13: error: program scope variable must reside in constant address space
-thread uint v132 = 0u;
- ^
-program_source:137:13: error: program scope variable must reside in constant address space
-thread uint v133 = 0u;
- ^
-program_source:138:13: error: program scope variable must reside in constant address space
-thread uint v134 = 0u;
- ^
-program_source:139:13: error: program scope variable must reside in constant address space
-thread uint v135 = 0u;
- ^
-program_source:140:13: error: program scope variable must reside in constant address space
-thread uint v136 = 0u;
- ^
-program_source:141:13: error: program scope variable must reside in constant address space
-thread uint v137 = 0u;
- ^
-program_source:142:13: error: program scope variable must reside in constant address space
-thread uint v138 = 0u;
- ^
-program_source:143:13: error: program scope variable must reside in constant address space
-thread uint v139 = 0u;
- ^
-program_source:144:13: error: program scope variable must reside in constant address space
-thread uint v140 = 0u;
- ^
-program_source:145:13: error: program scope variable must reside in constant address space
-thread uint v141 = 0u;
- ^
-program_source:146:13: error: program scope variable must reside in constant address space
-thread uint v142 = 0u;
- ^
-program_source:147:13: error: program scope variable must reside in constant address space
-thread uint v143 = 0u;
- ^
-program_source:148:13: error: program scope variable must reside in constant address space
-thread uint v144 = 0u;
- ^
-program_source:149:13: error: program scope variable must reside in constant address space
-thread uint v145 = 0u;
- ^
-program_source:150:13: error: program scope variable must reside in constant address space
-thread uint v146 = 0u;
- ^
-program_source:151:13: error: program scope variable must reside in constant address space
-thread uint v147 = 0u;
- ^
-program_source:152:13: error: program scope variable must reside in constant address space
-thread uint v148 = 0u;
- ^
-program_source:153:13: error: program scope variable must reside in constant address space
-thread uint v149 = 0u;
- ^
-program_source:154:13: error: program scope variable must reside in constant address space
-thread uint v150 = 0u;
- ^
-program_source:155:13: error: program scope variable must reside in constant address space
-thread uint v151 = 0u;
- ^
-program_source:156:13: error: program scope variable must reside in constant address space
-thread uint v152 = 0u;
- ^
-program_source:157:13: error: program scope variable must reside in constant address space
-thread uint v153 = 0u;
- ^
-program_source:158:13: error: program scope variable must reside in constant address space
-thread uint v154 = 0u;
- ^
-program_source:159:13: error: program scope variable must reside in constant address space
-thread uint v155 = 0u;
- ^
-program_source:160:13: error: program scope variable must reside in constant address space
-thread uint v156 = 0u;
- ^
-program_source:161:13: error: program scope variable must reside in constant address space
-thread uint v157 = 0u;
- ^
-program_source:162:13: error: program scope variable must reside in constant address space
-thread uint v158 = 0u;
- ^
-program_source:163:13: error: program scope variable must reside in constant address space
-thread uint v159 = 0u;
- ^
-program_source:164:13: error: program scope variable must reside in constant address space
-thread uint v160 = 0u;
- ^
-program_source:165:13: error: program scope variable must reside in constant address space
-thread uint v161 = 0u;
- ^
-program_source:166:13: error: program scope variable must reside in constant address space
-thread uint v162 = 0u;
- ^
-program_source:167:13: error: program scope variable must reside in constant address space
-thread uint v163 = 0u;
- ^
-program_source:168:13: error: program scope variable must reside in constant address space
-thread uint v164 = 0u;
- ^
-program_source:169:13: error: program scope variable must reside in constant address space
-thread uint v165 = 0u;
- ^
-program_source:170:13: error: program scope variable must reside in constant address space
-thread uint v166 = 0u;
- ^
-program_source:171:13: error: program scope variable must reside in constant address space
-thread uint v167 = 0u;
- ^
-program_source:172:13: error: program scope variable must reside in constant address space
-thread uint v168 = 0u;
- ^
-program_source:173:13: error: program scope variable must reside in constant address space
-thread uint v169 = 0u;
- ^
-program_source:174:13: error: program scope variable must reside in constant address space
-thread uint v170 = 0u;
- ^
-program_source:175:13: error: program scope variable must reside in constant address space
-thread uint v171 = 0u;
- ^
-program_source:176:13: error: program scope variable must reside in constant address space
-thread uint v172 = 0u;
- ^
-program_source:177:13: error: program scope variable must reside in constant address space
-thread uint v173 = 0u;
- ^
-program_source:178:13: error: program scope variable must reside in constant address space
-thread uint v174 = 0u;
- ^
-program_source:179:13: error: program scope variable must reside in constant address space
-thread uint v175 = 0u;
- ^
-program_source:180:13: error: program scope variable must reside in constant address space
-thread uint v176 = 0u;
- ^
-program_source:181:13: error: program scope variable must reside in constant address space
-thread uint v177 = 0u;
- ^
-program_source:182:13: error: program scope variable must reside in constant address space
-thread uint v178 = 0u;
- ^
-program_source:183:13: error: program scope variable must reside in constant address space
-thread uint v179 = 0u;
- ^
-program_source:184:13: error: program scope variable must reside in constant address space
-thread uint v180 = 0u;
- ^
-program_source:185:13: error: program scope variable must reside in constant address space
-thread uint v181 = 0u;
- ^
-program_source:186:13: error: program scope variable must reside in constant address space
-thread uint v182 = 0u;
- ^
-program_source:187:13: error: program scope variable must reside in constant address space
-thread uint v183 = 0u;
- ^
-program_source:188:13: error: program scope variable must reside in constant address space
-thread uint v184 = 0u;
- ^
-program_source:189:13: error: program scope variable must reside in constant address space
-thread uint v185 = 0u;
- ^
-program_source:190:13: error: program scope variable must reside in constant address space
-thread uint v186 = 0u;
- ^
-program_source:191:13: error: program scope variable must reside in constant address space
-thread uint v187 = 0u;
- ^
-program_source:192:13: error: program scope variable must reside in constant address space
-thread uint v188 = 0u;
- ^
-program_source:193:13: error: program scope variable must reside in constant address space
-thread uint v189 = 0u;
- ^
-program_source:194:13: error: program scope variable must reside in constant address space
-thread uint v190 = 0u;
- ^
-program_source:195:13: error: program scope variable must reside in constant address space
-thread uint v191 = 0u;
- ^
-program_source:196:13: error: program scope variable must reside in constant address space
-thread uint v192 = 0u;
- ^
-program_source:197:13: error: program scope variable must reside in constant address space
-thread uint v193 = 0u;
- ^
-program_source:198:13: error: program scope variable must reside in constant address space
-thread uint v194 = 0u;
- ^
-program_source:199:13: error: program scope variable must reside in constant address space
-thread uint v195 = 0u;
- ^
-program_source:200:13: error: program scope variable must reside in constant address space
-thread uint v196 = 0u;
- ^
-program_source:201:13: error: program scope variable must reside in constant address space
-thread uint v197 = 0u;
- ^
-program_source:202:13: error: program scope variable must reside in constant address space
-thread uint v198 = 0u;
- ^
-program_source:203:13: error: program scope variable must reside in constant address space
-thread uint v199 = 0u;
- ^
-program_source:204:13: error: program scope variable must reside in constant address space
-thread uint v200 = 0u;
- ^
-program_source:205:13: error: program scope variable must reside in constant address space
-thread uint v201 = 0u;
- ^
-program_source:206:13: error: program scope variable must reside in constant address space
-thread uint v202 = 0u;
- ^
-program_source:207:13: error: program scope variable must reside in constant address space
-thread uint v203 = 0u;
- ^
-program_source:208:13: error: program scope variable must reside in constant address space
-thread uint v204 = 0u;
- ^
-program_source:209:13: error: program scope variable must reside in constant address space
-thread uint v205 = 0u;
- ^
-program_source:210:13: error: program scope variable must reside in constant address space
-thread uint v206 = 0u;
- ^
-program_source:211:13: error: program scope variable must reside in constant address space
-thread uint v207 = 0u;
- ^
-program_source:212:13: error: program scope variable must reside in constant address space
-thread uint v208 = 0u;
- ^
-program_source:213:13: error: program scope variable must reside in constant address space
-thread uint v209 = 0u;
- ^
-program_source:214:13: error: program scope variable must reside in constant address space
-thread uint v210 = 0u;
- ^
-program_source:215:13: error: program scope variable must reside in constant address space
-thread uint v211 = 0u;
- ^
-program_source:216:13: error: program scope variable must reside in constant address space
-thread uint v212 = 0u;
- ^
-program_source:217:13: error: program scope variable must reside in constant address space
-thread uint v213 = 0u;
- ^
-program_source:218:13: error: program scope variable must reside in constant address space
-thread uint v214 = 0u;
- ^
-program_source:219:13: error: program scope variable must reside in constant address space
-thread uint v215 = 0u;
- ^
-program_source:220:13: error: program scope variable must reside in constant address space
-thread uint v216 = 0u;
- ^
-program_source:221:13: error: program scope variable must reside in constant address space
-thread uint v217 = 0u;
- ^
-program_source:222:13: error: program scope variable must reside in constant address space
-thread uint v218 = 0u;
- ^
-program_source:223:13: error: program scope variable must reside in constant address space
-thread uint v219 = 0u;
- ^
-program_source:224:13: error: program scope variable must reside in constant address space
-thread uint v220 = 0u;
- ^
-program_source:225:13: error: program scope variable must reside in constant address space
-thread uint v221 = 0u;
- ^
-program_source:226:13: error: program scope variable must reside in constant address space
-thread uint v222 = 0u;
- ^
-program_source:227:13: error: program scope variable must reside in constant address space
-thread uint v223 = 0u;
- ^
-program_source:228:13: error: program scope variable must reside in constant address space
-thread uint v224 = 0u;
- ^
-program_source:229:13: error: program scope variable must reside in constant address space
-thread uint v225 = 0u;
- ^
-program_source:230:13: error: program scope variable must reside in constant address space
-thread uint v226 = 0u;
- ^
-program_source:231:13: error: program scope variable must reside in constant address space
-thread uint v227 = 0u;
- ^
-program_source:232:13: error: program scope variable must reside in constant address space
-thread uint v228 = 0u;
- ^
-program_source:233:13: error: program scope variable must reside in constant address space
-thread uint v229 = 0u;
- ^
-program_source:234:13: error: program scope variable must reside in constant address space
-thread uint v230 = 0u;
- ^
-program_source:235:13: error: program scope variable must reside in constant address space
-thread uint v231 = 0u;
- ^
-program_source:236:13: error: program scope variable must reside in constant address space
-thread uint v232 = 0u;
- ^
-program_source:237:13: error: program scope variable must reside in constant address space
-thread uint v233 = 0u;
- ^
-program_source:238:13: error: program scope variable must reside in constant address space
-thread uint v234 = 0u;
- ^
-program_source:239:13: error: program scope variable must reside in constant address space
-thread uint v235 = 0u;
- ^
-program_source:240:13: error: program scope variable must reside in constant address space
-thread uint v236 = 0u;
- ^
-program_source:241:13: error: program scope variable must reside in constant address space
-thread uint v237 = 0u;
- ^
-program_source:242:13: error: program scope variable must reside in constant address space
-thread uint v238 = 0u;
- ^
-program_source:243:13: error: program scope variable must reside in constant address space
-thread uint v239 = 0u;
- ^
-program_source:244:13: error: program scope variable must reside in constant address space
-thread uint v240 = 0u;
- ^
-program_source:245:13: error: program scope variable must reside in constant address space
-thread uint v241 = 0u;
- ^
-program_source:246:13: error: program scope variable must reside in constant address space
-thread uint v242 = 0u;
- ^
-program_source:247:13: error: program scope variable must reside in constant address space
-thread uint v243 = 0u;
- ^
-program_source:248:13: error: program scope variable must reside in constant address space
-thread uint v244 = 0u;
- ^
-program_source:249:13: error: program scope variable must reside in constant address space
-thread uint v245 = 0u;
- ^
-program_source:250:13: error: program scope variable must reside in constant address space
-thread uint v246 = 0u;
- ^
-program_source:251:13: error: program scope variable must reside in constant address space
-thread uint v247 = 0u;
- ^
-program_source:252:13: error: program scope variable must reside in constant address space
-thread uint v248 = 0u;
- ^
-program_source:253:13: error: program scope variable must reside in constant address space
-thread uint v249 = 0u;
- ^
-program_source:254:13: error: program scope variable must reside in constant address space
-thread uint v250 = 0u;
- ^
-program_source:255:13: error: program scope variable must reside in constant address space
-thread uint v251 = 0u;
- ^
-program_source:256:13: error: program scope variable must reside in constant address space
-thread uint v252 = 0u;
- ^
-program_source:257:13: error: program scope variable must reside in constant address space
-thread uint v253 = 0u;
- ^
-program_source:258:13: error: program scope variable must reside in constant address space
-thread uint v254 = 0u;
- ^
-program_source:259:13: error: program scope variable must reside in constant address space
-thread uint v255 = 0u;
- ^
-program_source:260:13: error: program scope variable must reside in constant address space
-thread uint v256 = 0u;
- ^
-program_source:261:13: error: program scope variable must reside in constant address space
-thread uint v257 = 0u;
- ^
-program_source:262:13: error: program scope variable must reside in constant address space
-thread uint v258 = 0u;
- ^
-program_source:263:13: error: program scope variable must reside in constant address space
-thread uint v259 = 0u;
- ^
-program_source:264:13: error: program scope variable must reside in constant address space
-thread uint v260 = 0u;
- ^
-program_source:265:13: error: program scope variable must reside in constant address space
-thread uint v261 = 0u;
- ^
-program_source:266:13: error: program scope variable must reside in constant address space
-thread uint v262 = 0u;
- ^
-program_source:267:13: error: program scope variable must reside in constant address space
-thread uint v263 = 0u;
- ^
-program_source:268:13: error: program scope variable must reside in constant address space
-thread uint v264 = 0u;
- ^
-program_source:269:13: error: program scope variable must reside in constant address space
-thread uint v265 = 0u;
- ^
-program_source:270:13: error: program scope variable must reside in constant address space
-thread uint v266 = 0u;
- ^
-program_source:271:13: error: program scope variable must reside in constant address space
-thread uint v267 = 0u;
- ^
-program_source:272:13: error: program scope variable must reside in constant address space
-thread uint v268 = 0u;
- ^
-program_source:273:13: error: program scope variable must reside in constant address space
-thread uint v269 = 0u;
- ^
-program_source:274:13: error: program scope variable must reside in constant address space
-thread uint v270 = 0u;
- ^
-program_source:275:13: error: program scope variable must reside in constant address space
-thread uint v271 = 0u;
- ^
-program_source:276:13: error: program scope variable must reside in constant address space
-thread uint v272 = 0u;
- ^
-program_source:277:13: error: program scope variable must reside in constant address space
-thread uint v273 = 0u;
- ^
-program_source:278:13: error: program scope variable must reside in constant address space
-thread uint v274 = 0u;
- ^
-program_source:279:13: error: program scope variable must reside in constant address space
-thread uint v275 = 0u;
- ^
-program_source:280:13: error: program scope variable must reside in constant address space
-thread uint v276 = 0u;
- ^
-program_source:281:13: error: program scope variable must reside in constant address space
-thread uint v277 = 0u;
- ^
-program_source:282:13: error: program scope variable must reside in constant address space
-thread uint v278 = 0u;
- ^
-program_source:283:13: error: program scope variable must reside in constant address space
-thread uint v279 = 0u;
- ^
-program_source:284:13: error: program scope variable must reside in constant address space
-thread uint v280 = 0u;
- ^
-program_source:285:13: error: program scope variable must reside in constant address space
-thread uint v281 = 0u;
- ^
-program_source:286:13: error: program scope variable must reside in constant address space
-thread uint v282 = 0u;
- ^
-program_source:287:13: error: program scope variable must reside in constant address space
-thread uint v283 = 0u;
- ^
-program_source:288:13: error: program scope variable must reside in constant address space
-thread uint v284 = 0u;
- ^
-program_source:289:13: error: program scope variable must reside in constant address space
-thread uint v285 = 0u;
- ^
-program_source:290:13: error: program scope variable must reside in constant address space
-thread uint v286 = 0u;
- ^
-program_source:291:13: error: program scope variable must reside in constant address space
-thread uint v287 = 0u;
- ^
-program_source:292:13: error: program scope variable must reside in constant address space
-thread uint v288 = 0u;
- ^
-program_source:293:13: error: program scope variable must reside in constant address space
-thread uint v289 = 0u;
- ^
-program_source:294:13: error: program scope variable must reside in constant address space
-thread uint v290 = 0u;
- ^
-program_source:295:13: error: program scope variable must reside in constant address space
-thread uint v291 = 0u;
- ^
-program_source:296:13: error: program scope variable must reside in constant address space
-thread uint v292 = 0u;
- ^
-program_source:297:13: error: program scope variable must reside in constant address space
-thread uint v293 = 0u;
- ^
-program_source:298:13: error: program scope variable must reside in constant address space
-thread uint v294 = 0u;
- ^
-program_source:299:13: error: program scope variable must reside in constant address space
-thread uint v295 = 0u;
- ^
-program_source:300:13: error: program scope variable must reside in constant address space
-thread uint v296 = 0u;
- ^
-program_source:301:13: error: program scope variable must reside in constant address space
-thread uint v297 = 0u;
- ^
-program_source:302:13: error: program scope variable must reside in constant address space
-thread uint v298 = 0u;
- ^
-program_source:303:13: error: program scope variable must reside in constant address space
-thread uint v299 = 0u;
- ^
-program_source:304:13: error: program scope variable must reside in constant address space
-thread uint v300 = 0u;
- ^
-program_source:305:13: error: program scope variable must reside in constant address space
-thread uint v301 = 0u;
- ^
-program_source:306:13: error: program scope variable must reside in constant address space
-thread uint v302 = 0u;
- ^
-program_source:307:13: error: program scope variable must reside in constant address space
-thread uint v303 = 0u;
- ^
-program_source:308:13: error: program scope variable must reside in constant address space
-thread uint v304 = 0u;
- ^
-program_source:309:13: error: program scope variable must reside in constant address space
-thread uint v305 = 0u;
- ^
-program_source:310:13: error: program scope variable must reside in constant address space
-thread uint v306 = 0u;
- ^
-program_source:311:13: error: program scope variable must reside in constant address space
-thread uint v307 = 0u;
- ^
-program_source:312:13: error: program scope variable must reside in constant address space
-thread uint v308 = 0u;
- ^
-program_source:313:13: error: program scope variable must reside in constant address space
-thread uint v309 = 0u;
- ^
-program_source:314:13: error: program scope variable must reside in constant address space
-thread uint v310 = 0u;
- ^
-program_source:315:13: error: program scope variable must reside in constant address space
-thread uint v311 = 0u;
- ^
-program_source:316:13: error: program scope variable must reside in constant address space
-thread uint v312 = 0u;
- ^
-program_source:317:13: error: program scope variable must reside in constant address space
-thread uint v313 = 0u;
- ^
-program_source:318:13: error: program scope variable must reside in constant address space
-thread uint v314 = 0u;
- ^
-program_source:319:13: error: program scope variable must reside in constant address space
-thread uint v315 = 0u;
- ^
-program_source:320:13: error: program scope variable must reside in constant address space
-thread uint v316 = 0u;
- ^
-program_source:321:13: error: program scope variable must reside in constant address space
-thread uint v317 = 0u;
- ^
-program_source:322:13: error: program scope variable must reside in constant address space
-thread uint v318 = 0u;
- ^
-program_source:323:13: error: program scope variable must reside in constant address space
-thread uint v319 = 0u;
- ^
-program_source:324:13: error: program scope variable must reside in constant address space
-thread uint v320 = 0u;
- ^
-program_source:325:13: error: program scope variable must reside in constant address space
-thread uint v321 = 0u;
- ^
-program_source:326:13: error: program scope variable must reside in constant address space
-thread uint v322 = 0u;
- ^
-program_source:327:13: error: program scope variable must reside in constant address space
-thread uint v323 = 0u;
- ^
-program_source:328:13: error: program scope variable must reside in constant address space
-thread uint v324 = 0u;
- ^
-program_source:329:13: error: program scope variable must reside in constant address space
-thread uint v325 = 0u;
- ^
-program_source:330:13: error: program scope variable must reside in constant address space
-thread uint v326 = 0u;
- ^
-program_source:331:13: error: program scope variable must reside in constant address space
-thread uint v327 = 0u;
- ^
-program_source:332:13: error: program scope variable must reside in constant address space
-thread uint v328 = 0u;
- ^
-program_source:333:13: error: program scope variable must reside in constant address space
-thread uint v329 = 0u;
- ^
-program_source:334:13: error: program scope variable must reside in constant address space
-thread uint v330 = 0u;
- ^
-program_source:335:13: error: program scope variable must reside in constant address space
-thread uint v331 = 0u;
- ^
-program_source:336:13: error: program scope variable must reside in constant address space
-thread uint v332 = 0u;
- ^
-program_source:337:13: error: program scope variable must reside in constant address space
-thread uint v333 = 0u;
- ^
-program_source:338:13: error: program scope variable must reside in constant address space
-thread uint v334 = 0u;
- ^
-program_source:339:13: error: program scope variable must reside in constant address space
-thread uint v335 = 0u;
- ^
-program_source:340:13: error: program scope variable must reside in constant address space
-thread uint v336 = 0u;
- ^
-program_source:341:13: error: program scope variable must reside in constant address space
-thread uint v337 = 0u;
- ^
-program_source:342:13: error: program scope variable must reside in constant address space
-thread uint v338 = 0u;
- ^
-program_source:343:13: error: program scope variable must reside in constant address space
-thread uint v339 = 0u;
- ^
-program_source:344:13: error: program scope variable must reside in constant address space
-thread uint v340 = 0u;
- ^
-program_source:345:13: error: program scope variable must reside in constant address space
-thread uint v341 = 0u;
- ^
-program_source:346:13: error: program scope variable must reside in constant address space
-thread uint v342 = 0u;
- ^
-program_source:347:13: error: program scope variable must reside in constant address space
-thread uint v343 = 0u;
- ^
-program_source:348:13: error: program scope variable must reside in constant address space
-thread uint v344 = 0u;
- ^
-program_source:349:13: error: program scope variable must reside in constant address space
-thread uint v345 = 0u;
- ^
-program_source:350:13: error: program scope variable must reside in constant address space
-thread uint v346 = 0u;
- ^
-program_source:351:13: error: program scope variable must reside in constant address space
-thread uint v347 = 0u;
- ^
-program_source:352:13: error: program scope variable must reside in constant address space
-thread uint v348 = 0u;
- ^
-program_source:353:13: error: program scope variable must reside in constant address space
-thread uint v349 = 0u;
- ^
-program_source:354:13: error: program scope variable must reside in constant address space
-thread uint v350 = 0u;
- ^
-program_source:355:13: error: program scope variable must reside in constant address space
-thread uint v351 = 0u;
- ^
-program_source:356:13: error: program scope variable must reside in constant address space
-thread uint v352 = 0u;
- ^
-program_source:357:13: error: program scope variable must reside in constant address space
-thread uint v353 = 0u;
- ^
-program_source:358:13: error: program scope variable must reside in constant address space
-thread uint v354 = 0u;
- ^
-program_source:359:13: error: program scope variable must reside in constant address space
-thread uint v355 = 0u;
- ^
-program_source:360:13: error: program scope variable must reside in constant address space
-thread uint v356 = 0u;
- ^
-program_source:361:13: error: program scope variable must reside in constant address space
-thread uint v357 = 0u;
- ^
-program_source:362:13: error: program scope variable must reside in constant address space
-thread uint v358 = 0u;
- ^
-program_source:363:13: error: program scope variable must reside in constant address space
-thread uint v359 = 0u;
- ^
-program_source:364:13: error: program scope variable must reside in constant address space
-thread uint v360 = 0u;
- ^
-program_source:365:13: error: program scope variable must reside in constant address space
-thread uint v361 = 0u;
- ^
-program_source:366:13: error: program scope variable must reside in constant address space
-thread uint v362 = 0u;
- ^
-program_source:367:13: error: program scope variable must reside in constant address space
-thread uint v363 = 0u;
- ^
-program_source:368:13: error: program scope variable must reside in constant address space
-thread uint v364 = 0u;
- ^
-program_source:369:13: error: program scope variable must reside in constant address space
-thread uint v365 = 0u;
- ^
-program_source:370:13: error: program scope variable must reside in constant address space
-thread uint v366 = 0u;
- ^
-program_source:371:13: error: program scope variable must reside in constant address space
-thread uint v367 = 0u;
- ^
-program_source:372:13: error: program scope variable must reside in constant address space
-thread uint v368 = 0u;
- ^
-program_source:373:13: error: program scope variable must reside in constant address space
-thread uint v369 = 0u;
- ^
-program_source:374:13: error: program scope variable must reside in constant address space
-thread uint v370 = 0u;
- ^
-program_source:375:13: error: program scope variable must reside in constant address space
-thread uint v371 = 0u;
- ^
-program_source:376:13: error: program scope variable must reside in constant address space
-thread uint v372 = 0u;
- ^
-program_source:377:13: error: program scope variable must reside in constant address space
-thread uint v373 = 0u;
- ^
-program_source:378:13: error: program scope variable must reside in constant address space
-thread uint v374 = 0u;
- ^
-program_source:379:13: error: program scope variable must reside in constant address space
-thread uint v375 = 0u;
- ^
-program_source:380:13: error: program scope variable must reside in constant address space
-thread uint v376 = 0u;
- ^
-program_source:381:13: error: program scope variable must reside in constant address space
-thread uint v377 = 0u;
- ^
-program_source:382:13: error: program scope variable must reside in constant address space
-thread uint v378 = 0u;
- ^
-program_source:383:13: error: program scope variable must reside in constant address space
-thread uint v379 = 0u;
- ^
-program_source:384:13: error: program scope variable must reside in constant address space
-thread uint v380 = 0u;
- ^
-program_source:385:13: error: program scope variable must reside in constant address space
-thread uint v381 = 0u;
- ^
-program_source:386:13: error: program scope variable must reside in constant address space
-thread uint v382 = 0u;
- ^
-program_source:387:13: error: program scope variable must reside in constant address space
-thread uint v383 = 0u;
- ^
-program_source:388:13: error: program scope variable must reside in constant address space
-thread uint v384 = 0u;
- ^
-program_source:389:13: error: program scope variable must reside in constant address space
-thread uint v385 = 0u;
- ^
-program_source:390:13: error: program scope variable must reside in constant address space
-thread uint v386 = 0u;
- ^
-program_source:391:13: error: program scope variable must reside in constant address space
-thread uint v387 = 0u;
- ^
-program_source:392:13: error: program scope variable must reside in constant address space
-thread uint v388 = 0u;
- ^
-program_source:393:13: error: program scope variable must reside in constant address space
-thread uint v389 = 0u;
- ^
-program_source:394:13: error: program scope variable must reside in constant address space
-thread uint v390 = 0u;
- ^
-program_source:395:13: error: program scope variable must reside in constant address space
-thread uint v391 = 0u;
- ^
-program_source:396:13: error: program scope variable must reside in constant address space
-thread uint v392 = 0u;
- ^
-program_source:397:13: error: program scope variable must reside in constant address space
-thread uint v393 = 0u;
- ^
-program_source:398:13: error: program scope variable must reside in constant address space
-thread uint v394 = 0u;
- ^
-program_source:399:13: error: program scope variable must reside in constant address space
-thread uint v395 = 0u;
- ^
-program_source:400:13: error: program scope variable must reside in constant address space
-thread uint v396 = 0u;
- ^
-program_source:401:13: error: program scope variable must reside in constant address space
-thread uint v397 = 0u;
- ^
-program_source:402:13: error: program scope variable must reside in constant address space
-thread uint v398 = 0u;
- ^
-program_source:403:13: error: program scope variable must reside in constant address space
-thread uint v399 = 0u;
- ^
-program_source:404:13: error: program scope variable must reside in constant address space
-thread uint v400 = 0u;
- ^
-program_source:405:13: error: program scope variable must reside in constant address space
-thread uint v401 = 0u;
- ^
-program_source:406:13: error: program scope variable must reside in constant address space
-thread uint v402 = 0u;
- ^
-program_source:407:13: error: program scope variable must reside in constant address space
-thread uint v403 = 0u;
- ^
-program_source:408:13: error: program scope variable must reside in constant address space
-thread uint v404 = 0u;
- ^
-program_source:409:13: error: program scope variable must reside in constant address space
-thread uint v405 = 0u;
- ^
-program_source:410:13: error: program scope variable must reside in constant address space
-thread uint v406 = 0u;
- ^
-program_source:411:13: error: program scope variable must reside in constant address space
-thread uint v407 = 0u;
- ^
-program_source:412:13: error: program scope variable must reside in constant address space
-thread uint v408 = 0u;
- ^
-program_source:413:13: error: program scope variable must reside in constant address space
-thread uint v409 = 0u;
- ^
-program_source:414:13: error: program scope variable must reside in constant address space
-thread uint v410 = 0u;
- ^
-program_source:415:13: error: program scope variable must reside in constant address space
-thread uint v411 = 0u;
- ^
-program_source:416:13: error: program scope variable must reside in constant address space
-thread uint v412 = 0u;
- ^
-program_source:417:13: error: program scope variable must reside in constant address space
-thread uint v413 = 0u;
- ^
-program_source:418:13: error: program scope variable must reside in constant address space
-thread uint v414 = 0u;
- ^
-program_source:419:13: error: program scope variable must reside in constant address space
-thread uint v415 = 0u;
- ^
-program_source:420:13: error: program scope variable must reside in constant address space
-thread uint v416 = 0u;
- ^
-program_source:421:13: error: program scope variable must reside in constant address space
-thread uint v417 = 0u;
- ^
-program_source:422:13: error: program scope variable must reside in constant address space
-thread uint v418 = 0u;
- ^
-program_source:423:13: error: program scope variable must reside in constant address space
-thread uint v419 = 0u;
- ^
-program_source:424:13: error: program scope variable must reside in constant address space
-thread uint v420 = 0u;
- ^
-program_source:425:13: error: program scope variable must reside in constant address space
-thread uint v421 = 0u;
- ^
-program_source:426:13: error: program scope variable must reside in constant address space
-thread uint v422 = 0u;
- ^
-program_source:427:13: error: program scope variable must reside in constant address space
-thread uint v423 = 0u;
- ^
-program_source:428:13: error: program scope variable must reside in constant address space
-thread uint v424 = 0u;
- ^
-program_source:429:13: error: program scope variable must reside in constant address space
-thread uint v425 = 0u;
- ^
-program_source:430:13: error: program scope variable must reside in constant address space
-thread uint v426 = 0u;
- ^
-program_source:431:13: error: program scope variable must reside in constant address space
-thread uint v427 = 0u;
- ^
-program_source:432:13: error: program scope variable must reside in constant address space
-thread uint v428 = 0u;
- ^
-program_source:433:13: error: program scope variable must reside in constant address space
-thread uint v429 = 0u;
- ^
-program_source:434:13: error: program scope variable must reside in constant address space
-thread uint v430 = 0u;
- ^
-program_source:435:13: error: program scope variable must reside in constant address space
-thread uint v431 = 0u;
- ^
-program_source:436:13: error: program scope variable must reside in constant address space
-thread uint v432 = 0u;
- ^
-program_source:437:13: error: program scope variable must reside in constant address space
-thread uint v433 = 0u;
- ^
-program_source:438:13: error: program scope variable must reside in constant address space
-thread uint v434 = 0u;
- ^
-program_source:439:13: error: program scope variable must reside in constant address space
-thread uint v435 = 0u;
- ^
-program_source:440:13: error: program scope variable must reside in constant address space
-thread uint v436 = 0u;
- ^
-program_source:441:13: error: program scope variable must reside in constant address space
-thread uint v437 = 0u;
- ^
-program_source:442:13: error: program scope variable must reside in constant address space
-thread uint v438 = 0u;
- ^
-program_source:443:13: error: program scope variable must reside in constant address space
-thread uint v439 = 0u;
- ^
-program_source:444:13: error: program scope variable must reside in constant address space
-thread uint v440 = 0u;
- ^
-program_source:445:13: error: program scope variable must reside in constant address space
-thread uint v441 = 0u;
- ^
-program_source:446:13: error: program scope variable must reside in constant address space
-thread uint v442 = 0u;
- ^
-program_source:447:13: error: program scope variable must reside in constant address space
-thread uint v443 = 0u;
- ^
-program_source:448:13: error: program scope variable must reside in constant address space
-thread uint v444 = 0u;
- ^
-program_source:449:13: error: program scope variable must reside in constant address space
-thread uint v445 = 0u;
- ^
-program_source:450:13: error: program scope variable must reside in constant address space
-thread uint v446 = 0u;
- ^
-program_source:451:13: error: program scope variable must reside in constant address space
-thread uint v447 = 0u;
- ^
-program_source:452:13: error: program scope variable must reside in constant address space
-thread uint v448 = 0u;
- ^
-program_source:453:13: error: program scope variable must reside in constant address space
-thread uint v449 = 0u;
- ^
-program_source:454:13: error: program scope variable must reside in constant address space
-thread uint v450 = 0u;
- ^
-program_source:455:13: error: program scope variable must reside in constant address space
-thread uint v451 = 0u;
- ^
-program_source:456:13: error: program scope variable must reside in constant address space
-thread uint v452 = 0u;
- ^
-program_source:457:13: error: program scope variable must reside in constant address space
-thread uint v453 = 0u;
- ^
-program_source:458:13: error: program scope variable must reside in constant address space
-thread uint v454 = 0u;
- ^
-program_source:459:13: error: program scope variable must reside in constant address space
-thread uint v455 = 0u;
- ^
-program_source:460:13: error: program scope variable must reside in constant address space
-thread uint v456 = 0u;
- ^
-program_source:461:13: error: program scope variable must reside in constant address space
-thread uint v457 = 0u;
- ^
-program_source:462:13: error: program scope variable must reside in constant address space
-thread uint v458 = 0u;
- ^
-program_source:463:13: error: program scope variable must reside in constant address space
-thread uint v459 = 0u;
- ^
-program_source:464:13: error: program scope variable must reside in constant address space
-thread uint v460 = 0u;
- ^
-program_source:465:13: error: program scope variable must reside in constant address space
-thread uint v461 = 0u;
- ^
-program_source:466:13: error: program scope variable must reside in constant address space
-thread uint v462 = 0u;
- ^
-program_source:467:13: error: program scope variable must reside in constant address space
-thread uint v463 = 0u;
- ^
-program_source:468:13: error: program scope variable must reside in constant address space
-thread uint v464 = 0u;
- ^
-program_source:469:13: error: program scope variable must reside in constant address space
-thread uint v465 = 0u;
- ^
-program_source:470:13: error: program scope variable must reside in constant address space
-thread uint v466 = 0u;
- ^
-program_source:471:13: error: program scope variable must reside in constant address space
-thread uint v467 = 0u;
- ^
-program_source:472:13: error: program scope variable must reside in constant address space
-thread uint v468 = 0u;
- ^
-program_source:473:13: error: program scope variable must reside in constant address space
-thread uint v469 = 0u;
- ^
-program_source:474:13: error: program scope variable must reside in constant address space
-thread uint v470 = 0u;
- ^
-program_source:475:13: error: program scope variable must reside in constant address space
-thread uint v471 = 0u;
- ^
-program_source:476:13: error: program scope variable must reside in constant address space
-thread uint v472 = 0u;
- ^
-program_source:477:13: error: program scope variable must reside in constant address space
-thread uint v473 = 0u;
- ^
-program_source:478:13: error: program scope variable must reside in constant address space
-thread uint v474 = 0u;
- ^
-program_source:479:13: error: program scope variable must reside in constant address space
-thread uint v475 = 0u;
- ^
-program_source:480:13: error: program scope variable must reside in constant address space
-thread uint v476 = 0u;
- ^
-program_source:481:13: error: program scope variable must reside in constant address space
-thread uint v477 = 0u;
- ^
-program_source:482:13: error: program scope variable must reside in constant address space
-thread uint v478 = 0u;
- ^
-program_source:483:13: error: program scope variable must reside in constant address space
-thread uint v479 = 0u;
- ^
-program_source:484:13: error: program scope variable must reside in constant address space
-thread uint v480 = 0u;
- ^
-program_source:485:13: error: program scope variable must reside in constant address space
-thread uint v481 = 0u;
- ^
-program_source:486:13: error: program scope variable must reside in constant address space
-thread uint v482 = 0u;
- ^
-program_source:487:13: error: program scope variable must reside in constant address space
-thread uint v483 = 0u;
- ^
-program_source:488:13: error: program scope variable must reside in constant address space
-thread uint v484 = 0u;
- ^
-program_source:489:13: error: program scope variable must reside in constant address space
-thread uint v485 = 0u;
- ^
-program_source:490:13: error: program scope variable must reside in constant address space
-thread uint v486 = 0u;
- ^
-program_source:491:13: error: program scope variable must reside in constant address space
-thread uint v487 = 0u;
- ^
-program_source:492:13: error: program scope variable must reside in constant address space
-thread uint v488 = 0u;
- ^
-program_source:493:13: error: program scope variable must reside in constant address space
-thread uint v489 = 0u;
- ^
-program_source:494:13: error: program scope variable must reside in constant address space
-thread uint v490 = 0u;
- ^
-program_source:495:13: error: program scope variable must reside in constant address space
-thread uint v491 = 0u;
- ^
-program_source:496:13: error: program scope variable must reside in constant address space
-thread uint v492 = 0u;
- ^
-program_source:497:13: error: program scope variable must reside in constant address space
-thread uint v493 = 0u;
- ^
-program_source:498:13: error: program scope variable must reside in constant address space
-thread uint v494 = 0u;
- ^
-program_source:499:13: error: program scope variable must reside in constant address space
-thread uint v495 = 0u;
- ^
-program_source:500:13: error: program scope variable must reside in constant address space
-thread uint v496 = 0u;
- ^
-program_source:501:13: error: program scope variable must reside in constant address space
-thread uint v497 = 0u;
- ^
-program_source:502:13: error: program scope variable must reside in constant address space
-thread uint v498 = 0u;
- ^
-program_source:503:13: error: program scope variable must reside in constant address space
-thread uint v499 = 0u;
- ^
-program_source:504:13: error: program scope variable must reside in constant address space
-thread uint v500 = 0u;
- ^
-program_source:505:13: error: program scope variable must reside in constant address space
-thread uint v501 = 0u;
- ^
-program_source:506:13: error: program scope variable must reside in constant address space
-thread uint v502 = 0u;
- ^
-program_source:507:13: error: program scope variable must reside in constant address space
-thread uint v503 = 0u;
- ^
-program_source:508:13: error: program scope variable must reside in constant address space
-thread uint v504 = 0u;
- ^
-program_source:509:13: error: program scope variable must reside in constant address space
-thread uint v505 = 0u;
- ^
-program_source:510:13: error: program scope variable must reside in constant address space
-thread uint v506 = 0u;
- ^
-program_source:511:13: error: program scope variable must reside in constant address space
-thread uint v507 = 0u;
- ^
-program_source:512:13: error: program scope variable must reside in constant address space
-thread uint v508 = 0u;
- ^
-program_source:513:13: error: program scope variable must reside in constant address space
-thread uint v509 = 0u;
- ^
-program_source:514:13: error: program scope variable must reside in constant address space
-thread uint v510 = 0u;
- ^
-program_source:515:13: error: program scope variable must reside in constant address space
-thread uint v511 = 0u;
- ^
-program_source:516:13: error: program scope variable must reside in constant address space
-thread uint v512 = 0u;
- ^
-program_source:517:13: error: program scope variable must reside in constant address space
-thread uint v513 = 0u;
- ^
-program_source:518:13: error: program scope variable must reside in constant address space
-thread uint v514 = 0u;
- ^
-program_source:519:13: error: program scope variable must reside in constant address space
-thread uint v515 = 0u;
- ^
-program_source:520:13: error: program scope variable must reside in constant address space
-thread uint v516 = 0u;
- ^
-program_source:521:13: error: program scope variable must reside in constant address space
-thread uint v517 = 0u;
- ^
-program_source:522:13: error: program scope variable must reside in constant address space
-thread uint v518 = 0u;
- ^
-program_source:523:13: error: program scope variable must reside in constant address space
-thread uint v519 = 0u;
- ^
-program_source:524:13: error: program scope variable must reside in constant address space
-thread uint v520 = 0u;
- ^
-program_source:525:13: error: program scope variable must reside in constant address space
-thread uint v521 = 0u;
- ^
-program_source:526:13: error: program scope variable must reside in constant address space
-thread uint v522 = 0u;
- ^
-program_source:527:13: error: program scope variable must reside in constant address space
-thread uint v523 = 0u;
- ^
-program_source:528:13: error: program scope variable must reside in constant address space
-thread uint v524 = 0u;
- ^
-program_source:529:13: error: program scope variable must reside in constant address space
-thread uint v525 = 0u;
- ^
-program_source:530:13: error: program scope variable must reside in constant address space
-thread uint v526 = 0u;
- ^
-program_source:531:13: error: program scope variable must reside in constant address space
-thread uint v527 = 0u;
- ^
-program_source:532:13: error: program scope variable must reside in constant address space
-thread uint v528 = 0u;
- ^
-program_source:533:13: error: program scope variable must reside in constant address space
-thread uint v529 = 0u;
- ^
-program_source:534:13: error: program scope variable must reside in constant address space
-thread uint v530 = 0u;
- ^
-program_source:535:13: error: program scope variable must reside in constant address space
-thread uint v531 = 0u;
- ^
-program_source:536:13: error: program scope variable must reside in constant address space
-thread uint v532 = 0u;
- ^
-program_source:537:13: error: program scope variable must reside in constant address space
-thread uint v533 = 0u;
- ^
-program_source:538:13: error: program scope variable must reside in constant address space
-thread uint v534 = 0u;
- ^
-program_source:539:13: error: program scope variable must reside in constant address space
-thread uint v535 = 0u;
- ^
-program_source:540:13: error: program scope variable must reside in constant address space
-thread uint v536 = 0u;
- ^
-program_source:541:13: error: program scope variable must reside in constant address space
-thread uint v537 = 0u;
- ^
-program_source:542:13: error: program scope variable must reside in constant address space
-thread uint v538 = 0u;
- ^
-program_source:543:13: error: program scope variable must reside in constant address space
-thread uint v539 = 0u;
- ^
-program_source:544:13: error: program scope variable must reside in constant address space
-thread uint v540 = 0u;
- ^
-program_source:545:13: error: program scope variable must reside in constant address space
-thread uint v541 = 0u;
- ^
-program_source:546:13: error: program scope variable must reside in constant address space
-thread uint v542 = 0u;
- ^
-program_source:547:13: error: program scope variable must reside in constant address space
-thread uint v543 = 0u;
- ^
-program_source:548:13: error: program scope variable must reside in constant address space
-thread uint v544 = 0u;
- ^
-program_source:549:13: error: program scope variable must reside in constant address space
-thread uint v545 = 0u;
- ^
-program_source:550:13: error: program scope variable must reside in constant address space
-thread uint v546 = 0u;
- ^
-program_source:551:13: error: program scope variable must reside in constant address space
-thread uint v547 = 0u;
- ^
-program_source:552:13: error: program scope variable must reside in constant address space
-thread uint v548 = 0u;
- ^
-program_source:553:13: error: program scope variable must reside in constant address space
-thread uint v549 = 0u;
- ^
-program_source:554:13: error: program scope variable must reside in constant address space
-thread uint v550 = 0u;
- ^
-program_source:555:13: error: program scope variable must reside in constant address space
-thread uint v551 = 0u;
- ^
-program_source:556:13: error: program scope variable must reside in constant address space
-thread uint v552 = 0u;
- ^
-program_source:557:13: error: program scope variable must reside in constant address space
-thread uint v553 = 0u;
- ^
-program_source:558:13: error: program scope variable must reside in constant address space
-thread uint v554 = 0u;
- ^
-program_source:559:13: error: program scope variable must reside in constant address space
-thread uint v555 = 0u;
- ^
-program_source:560:13: error: program scope variable must reside in constant address space
-thread uint v556 = 0u;
- ^
-program_source:561:13: error: program scope variable must reside in constant address space
-thread uint v557 = 0u;
- ^
-program_source:562:13: error: program scope variable must reside in constant address space
-thread uint v558 = 0u;
- ^
-program_source:563:13: error: program scope variable must reside in constant address space
-thread uint v559 = 0u;
- ^
-program_source:564:13: error: program scope variable must reside in constant address space
-thread uint v560 = 0u;
- ^
-program_source:565:13: error: program scope variable must reside in constant address space
-thread uint v561 = 0u;
- ^
-program_source:566:13: error: program scope variable must reside in constant address space
-thread uint v562 = 0u;
- ^
-program_source:567:13: error: program scope variable must reside in constant address space
-thread uint v563 = 0u;
- ^
-program_source:568:13: error: program scope variable must reside in constant address space
-thread uint v564 = 0u;
- ^
-program_source:569:13: error: program scope variable must reside in constant address space
-thread uint v565 = 0u;
- ^
-program_source:570:13: error: program scope variable must reside in constant address space
-thread uint v566 = 0u;
- ^
-program_source:571:13: error: program scope variable must reside in constant address space
-thread uint v567 = 0u;
- ^
-program_source:572:13: error: program scope variable must reside in constant address space
-thread uint v568 = 0u;
- ^
-program_source:573:13: error: program scope variable must reside in constant address space
-thread uint v569 = 0u;
- ^
-program_source:574:13: error: program scope variable must reside in constant address space
-thread uint v570 = 0u;
- ^
-program_source:575:13: error: program scope variable must reside in constant address space
-thread uint v571 = 0u;
- ^
-program_source:576:13: error: program scope variable must reside in constant address space
-thread uint v572 = 0u;
- ^
-program_source:577:13: error: program scope variable must reside in constant address space
-thread uint v573 = 0u;
- ^
-program_source:578:13: error: program scope variable must reside in constant address space
-thread uint v574 = 0u;
- ^
-program_source:579:13: error: program scope variable must reside in constant address space
-thread uint v575 = 0u;
- ^
-program_source:580:13: error: program scope variable must reside in constant address space
-thread uint v576 = 0u;
- ^
-program_source:581:13: error: program scope variable must reside in constant address space
-thread uint v577 = 0u;
- ^
-program_source:582:13: error: program scope variable must reside in constant address space
-thread uint v578 = 0u;
- ^
-program_source:583:13: error: program scope variable must reside in constant address space
-thread uint v579 = 0u;
- ^
-program_source:584:13: error: program scope variable must reside in constant address space
-thread uint v580 = 0u;
- ^
-program_source:585:13: error: program scope variable must reside in constant address space
-thread uint v581 = 0u;
- ^
-program_source:586:13: error: program scope variable must reside in constant address space
-thread uint v582 = 0u;
- ^
-program_source:587:13: error: program scope variable must reside in constant address space
-thread uint v583 = 0u;
- ^
-program_source:588:13: error: program scope variable must reside in constant address space
-thread uint v584 = 0u;
- ^
-program_source:589:13: error: program scope variable must reside in constant address space
-thread uint v585 = 0u;
- ^
-program_source:590:13: error: program scope variable must reside in constant address space
-thread uint v586 = 0u;
- ^
-program_source:591:13: error: program scope variable must reside in constant address space
-thread uint v587 = 0u;
- ^
-program_source:592:13: error: program scope variable must reside in constant address space
-thread uint v588 = 0u;
- ^
-program_source:593:13: error: program scope variable must reside in constant address space
-thread uint v589 = 0u;
- ^
-program_source:594:13: error: program scope variable must reside in constant address space
-thread uint v590 = 0u;
- ^
-program_source:595:13: error: program scope variable must reside in constant address space
-thread uint v591 = 0u;
- ^
-program_source:596:13: error: program scope variable must reside in constant address space
-thread uint v592 = 0u;
- ^
-program_source:597:13: error: program scope variable must reside in constant address space
-thread uint v593 = 0u;
- ^
-program_source:598:13: error: program scope variable must reside in constant address space
-thread uint v594 = 0u;
- ^
-program_source:599:13: error: program scope variable must reside in constant address space
-thread uint v595 = 0u;
- ^
-program_source:600:13: error: program scope variable must reside in constant address space
-thread uint v596 = 0u;
- ^
-program_source:601:13: error: program scope variable must reside in constant address space
-thread uint v597 = 0u;
- ^
-program_source:602:13: error: program scope variable must reside in constant address space
-thread uint v598 = 0u;
- ^
-program_source:603:13: error: program scope variable must reside in constant address space
-thread uint v599 = 0u;
- ^
-program_source:604:13: error: program scope variable must reside in constant address space
-thread uint v600 = 0u;
- ^
-program_source:605:13: error: program scope variable must reside in constant address space
-thread uint v601 = 0u;
- ^
-program_source:606:13: error: program scope variable must reside in constant address space
-thread uint v602 = 0u;
- ^
-program_source:607:13: error: program scope variable must reside in constant address space
-thread uint v603 = 0u;
- ^
-program_source:608:13: error: program scope variable must reside in constant address space
-thread uint v604 = 0u;
- ^
-program_source:609:13: error: program scope variable must reside in constant address space
-thread uint v605 = 0u;
- ^
-program_source:610:13: error: program scope variable must reside in constant address space
-thread uint v606 = 0u;
- ^
-program_source:611:13: error: program scope variable must reside in constant address space
-thread uint v607 = 0u;
- ^
-program_source:612:13: error: program scope variable must reside in constant address space
-thread uint v608 = 0u;
- ^
-program_source:613:13: error: program scope variable must reside in constant address space
-thread uint v609 = 0u;
- ^
-program_source:614:13: error: program scope variable must reside in constant address space
-thread uint v610 = 0u;
- ^
-program_source:615:13: error: program scope variable must reside in constant address space
-thread uint v611 = 0u;
- ^
-program_source:616:13: error: program scope variable must reside in constant address space
-thread uint v612 = 0u;
- ^
-program_source:617:13: error: program scope variable must reside in constant address space
-thread uint v613 = 0u;
- ^
-program_source:618:13: error: program scope variable must reside in constant address space
-thread uint v614 = 0u;
- ^
-program_source:619:13: error: program scope variable must reside in constant address space
-thread uint v615 = 0u;
- ^
-program_source:620:13: error: program scope variable must reside in constant address space
-thread uint v616 = 0u;
- ^
-program_source:621:13: error: program scope variable must reside in constant address space
-thread uint v617 = 0u;
- ^
-program_source:622:13: error: program scope variable must reside in constant address space
-thread uint v618 = 0u;
- ^
-program_source:623:13: error: program scope variable must reside in constant address space
-thread uint v619 = 0u;
- ^
-program_source:624:13: error: program scope variable must reside in constant address space
-thread uint v620 = 0u;
- ^
-program_source:625:13: error: program scope variable must reside in constant address space
-thread uint v621 = 0u;
- ^
-program_source:626:13: error: program scope variable must reside in constant address space
-thread uint v622 = 0u;
- ^
-program_source:627:13: error: program scope variable must reside in constant address space
-thread uint v623 = 0u;
- ^
-program_source:628:13: error: program scope variable must reside in constant address space
-thread uint v624 = 0u;
- ^
-program_source:629:13: error: program scope variable must reside in constant address space
-thread uint v625 = 0u;
- ^
-program_source:630:13: error: program scope variable must reside in constant address space
-thread uint v626 = 0u;
- ^
-program_source:631:13: error: program scope variable must reside in constant address space
-thread uint v627 = 0u;
- ^
-program_source:632:13: error: program scope variable must reside in constant address space
-thread uint v628 = 0u;
- ^
-program_source:633:13: error: program scope variable must reside in constant address space
-thread uint v629 = 0u;
- ^
-program_source:634:13: error: program scope variable must reside in constant address space
-thread uint v630 = 0u;
- ^
-program_source:635:13: error: program scope variable must reside in constant address space
-thread uint v631 = 0u;
- ^
-program_source:636:13: error: program scope variable must reside in constant address space
-thread uint v632 = 0u;
- ^
-program_source:637:13: error: program scope variable must reside in constant address space
-thread uint v633 = 0u;
- ^
-program_source:638:13: error: program scope variable must reside in constant address space
-thread uint v634 = 0u;
- ^
-program_source:639:13: error: program scope variable must reside in constant address space
-thread uint v635 = 0u;
- ^
-program_source:640:13: error: program scope variable must reside in constant address space
-thread uint v636 = 0u;
- ^
-program_source:641:13: error: program scope variable must reside in constant address space
-thread uint v637 = 0u;
- ^
-program_source:642:13: error: program scope variable must reside in constant address space
-thread uint v638 = 0u;
- ^
-program_source:643:13: error: program scope variable must reside in constant address space
-thread uint v639 = 0u;
- ^
-program_source:644:13: error: program scope variable must reside in constant address space
-thread uint v640 = 0u;
- ^
-program_source:645:13: error: program scope variable must reside in constant address space
-thread uint v641 = 0u;
- ^
-program_source:646:13: error: program scope variable must reside in constant address space
-thread uint v642 = 0u;
- ^
-program_source:647:13: error: program scope variable must reside in constant address space
-thread uint v643 = 0u;
- ^
-program_source:648:13: error: program scope variable must reside in constant address space
-thread uint v644 = 0u;
- ^
-program_source:649:13: error: program scope variable must reside in constant address space
-thread uint v645 = 0u;
- ^
-program_source:650:13: error: program scope variable must reside in constant address space
-thread uint v646 = 0u;
- ^
-program_source:651:13: error: program scope variable must reside in constant address space
-thread uint v647 = 0u;
- ^
-program_source:652:13: error: program scope variable must reside in constant address space
-thread uint v648 = 0u;
- ^
-program_source:653:13: error: program scope variable must reside in constant address space
-thread uint v649 = 0u;
- ^
-program_source:654:13: error: program scope variable must reside in constant address space
-thread uint v650 = 0u;
- ^
-program_source:655:13: error: program scope variable must reside in constant address space
-thread uint v651 = 0u;
- ^
-program_source:656:13: error: program scope variable must reside in constant address space
-thread uint v652 = 0u;
- ^
-program_source:657:13: error: program scope variable must reside in constant address space
-thread uint v653 = 0u;
- ^
-program_source:658:13: error: program scope variable must reside in constant address space
-thread uint v654 = 0u;
- ^
-program_source:659:13: error: program scope variable must reside in constant address space
-thread uint v655 = 0u;
- ^
-program_source:660:13: error: program scope variable must reside in constant address space
-thread uint v656 = 0u;
- ^
-program_source:661:13: error: program scope variable must reside in constant address space
-thread uint v657 = 0u;
- ^
-program_source:662:13: error: program scope variable must reside in constant address space
-thread uint v658 = 0u;
- ^
-program_source:663:13: error: program scope variable must reside in constant address space
-thread uint v659 = 0u;
- ^
-program_source:664:13: error: program scope variable must reside in constant address space
-thread uint v660 = 0u;
- ^
-program_source:665:13: error: program scope variable must reside in constant address space
-thread uint v661 = 0u;
- ^
-program_source:666:13: error: program scope variable must reside in constant address space
-thread uint v662 = 0u;
- ^
-program_source:667:13: error: program scope variable must reside in constant address space
-thread uint v663 = 0u;
- ^
-program_source:668:13: error: program scope variable must reside in constant address space
-thread uint v664 = 0u;
- ^
-program_source:669:13: error: program scope variable must reside in constant address space
-thread uint v665 = 0u;
- ^
-program_source:670:13: error: program scope variable must reside in constant address space
-thread uint v666 = 0u;
- ^
-program_source:671:13: error: program scope variable must reside in constant address space
-thread uint v667 = 0u;
- ^
-program_source:672:13: error: program scope variable must reside in constant address space
-thread uint v668 = 0u;
- ^
-program_source:673:13: error: program scope variable must reside in constant address space
-thread uint v669 = 0u;
- ^
-program_source:674:13: error: program scope variable must reside in constant address space
-thread uint v670 = 0u;
- ^
-program_source:675:13: error: program scope variable must reside in constant address space
-thread uint v671 = 0u;
- ^
-program_source:676:13: error: program scope variable must reside in constant address space
-thread uint v672 = 0u;
- ^
-program_source:677:13: error: program scope variable must reside in constant address space
-thread uint v673 = 0u;
- ^
-program_source:678:13: error: program scope variable must reside in constant address space
-thread uint v674 = 0u;
- ^
-program_source:679:13: error: program scope variable must reside in constant address space
-thread uint v675 = 0u;
- ^
-program_source:680:13: error: program scope variable must reside in constant address space
-thread uint v676 = 0u;
- ^
-program_source:681:13: error: program scope variable must reside in constant address space
-thread uint v677 = 0u;
- ^
-program_source:682:13: error: program scope variable must reside in constant address space
-thread uint v678 = 0u;
- ^
-program_source:683:13: error: program scope variable must reside in constant address space
-thread uint v679 = 0u;
- ^
-program_source:684:13: error: program scope variable must reside in constant address space
-thread uint v680 = 0u;
- ^
-program_source:685:13: error: program scope variable must reside in constant address space
-thread uint v681 = 0u;
- ^
-program_source:686:13: error: program scope variable must reside in constant address space
-thread uint v682 = 0u;
- ^
-program_source:687:13: error: program scope variable must reside in constant address space
-thread uint v683 = 0u;
- ^
-program_source:688:13: error: program scope variable must reside in constant address space
-thread uint v684 = 0u;
- ^
-program_source:689:13: error: program scope variable must reside in constant address space
-thread uint v685 = 0u;
- ^
-program_source:690:13: error: program scope variable must reside in constant address space
-thread uint v686 = 0u;
- ^
-program_source:691:13: error: program scope variable must reside in constant address space
-thread uint v687 = 0u;
- ^
-program_source:692:13: error: program scope variable must reside in constant address space
-thread uint v688 = 0u;
- ^
-program_source:693:13: error: program scope variable must reside in constant address space
-thread uint v689 = 0u;
- ^
-program_source:694:13: error: program scope variable must reside in constant address space
-thread uint v690 = 0u;
- ^
-program_source:695:13: error: program scope variable must reside in constant address space
-thread uint v691 = 0u;
- ^
-program_source:696:13: error: program scope variable must reside in constant address space
-thread uint v692 = 0u;
- ^
-program_source:697:13: error: program scope variable must reside in constant address space
-thread uint v693 = 0u;
- ^
-program_source:698:13: error: program scope variable must reside in constant address space
-thread uint v694 = 0u;
- ^
-program_source:699:13: error: program scope variable must reside in constant address space
-thread uint v695 = 0u;
- ^
-program_source:700:13: error: program scope variable must reside in constant address space
-thread uint v696 = 0u;
- ^
-program_source:701:13: error: program scope variable must reside in constant address space
-thread uint v697 = 0u;
- ^
-program_source:702:13: error: program scope variable must reside in constant address space
-thread uint v698 = 0u;
- ^
-program_source:703:13: error: program scope variable must reside in constant address space
-thread uint v699 = 0u;
- ^
-program_source:704:13: error: program scope variable must reside in constant address space
-thread uint v700 = 0u;
- ^
-program_source:705:13: error: program scope variable must reside in constant address space
-thread uint v701 = 0u;
- ^
-program_source:706:13: error: program scope variable must reside in constant address space
-thread uint v702 = 0u;
- ^
-program_source:707:13: error: program scope variable must reside in constant address space
-thread uint v703 = 0u;
- ^
-program_source:708:13: error: program scope variable must reside in constant address space
-thread uint v704 = 0u;
- ^
-program_source:709:13: error: program scope variable must reside in constant address space
-thread uint v705 = 0u;
- ^
-program_source:710:13: error: program scope variable must reside in constant address space
-thread uint v706 = 0u;
- ^
-program_source:711:13: error: program scope variable must reside in constant address space
-thread uint v707 = 0u;
- ^
-program_source:712:13: error: program scope variable must reside in constant address space
-thread uint v708 = 0u;
- ^
-program_source:713:13: error: program scope variable must reside in constant address space
-thread uint v709 = 0u;
- ^
-program_source:714:13: error: program scope variable must reside in constant address space
-thread uint v710 = 0u;
- ^
-program_source:715:13: error: program scope variable must reside in constant address space
-thread uint v711 = 0u;
- ^
-program_source:716:13: error: program scope variable must reside in constant address space
-thread uint v712 = 0u;
- ^
-program_source:717:13: error: program scope variable must reside in constant address space
-thread uint v713 = 0u;
- ^
-program_source:718:13: error: program scope variable must reside in constant address space
-thread uint v714 = 0u;
- ^
-program_source:719:13: error: program scope variable must reside in constant address space
-thread uint v715 = 0u;
- ^
-program_source:720:13: error: program scope variable must reside in constant address space
-thread uint v716 = 0u;
- ^
-program_source:721:13: error: program scope variable must reside in constant address space
-thread uint v717 = 0u;
- ^
-program_source:722:13: error: program scope variable must reside in constant address space
-thread uint v718 = 0u;
- ^
-program_source:723:13: error: program scope variable must reside in constant address space
-thread uint v719 = 0u;
- ^
-program_source:724:13: error: program scope variable must reside in constant address space
-thread uint v720 = 0u;
- ^
-program_source:725:13: error: program scope variable must reside in constant address space
-thread uint v721 = 0u;
- ^
-program_source:726:13: error: program scope variable must reside in constant address space
-thread uint v722 = 0u;
- ^
-program_source:727:13: error: program scope variable must reside in constant address space
-thread uint v723 = 0u;
- ^
-program_source:728:13: error: program scope variable must reside in constant address space
-thread uint v724 = 0u;
- ^
-program_source:729:13: error: program scope variable must reside in constant address space
-thread uint v725 = 0u;
- ^
-program_source:730:13: error: program scope variable must reside in constant address space
-thread uint v726 = 0u;
- ^
-program_source:731:13: error: program scope variable must reside in constant address space
-thread uint v727 = 0u;
- ^
-program_source:732:13: error: program scope variable must reside in constant address space
-thread uint v728 = 0u;
- ^
-program_source:733:13: error: program scope variable must reside in constant address space
-thread uint v729 = 0u;
- ^
-program_source:734:13: error: program scope variable must reside in constant address space
-thread uint v730 = 0u;
- ^
-program_source:735:13: error: program scope variable must reside in constant address space
-thread uint v731 = 0u;
- ^
-program_source:736:13: error: program scope variable must reside in constant address space
-thread uint v732 = 0u;
- ^
-program_source:737:13: error: program scope variable must reside in constant address space
-thread uint v733 = 0u;
- ^
-program_source:738:13: error: program scope variable must reside in constant address space
-thread uint v734 = 0u;
- ^
-program_source:739:13: error: program scope variable must reside in constant address space
-thread uint v735 = 0u;
- ^
-program_source:740:13: error: program scope variable must reside in constant address space
-thread uint v736 = 0u;
- ^
-program_source:741:13: error: program scope variable must reside in constant address space
-thread uint v737 = 0u;
- ^
-program_source:742:13: error: program scope variable must reside in constant address space
-thread uint v738 = 0u;
- ^
-program_source:743:13: error: program scope variable must reside in constant address space
-thread uint v739 = 0u;
- ^
-program_source:744:13: error: program scope variable must reside in constant address space
-thread uint v740 = 0u;
- ^
-program_source:745:13: error: program scope variable must reside in constant address space
-thread uint v741 = 0u;
- ^
-program_source:746:13: error: program scope variable must reside in constant address space
-thread uint v742 = 0u;
- ^
-program_source:747:13: error: program scope variable must reside in constant address space
-thread uint v743 = 0u;
- ^
-program_source:748:13: error: program scope variable must reside in constant address space
-thread uint v744 = 0u;
- ^
-program_source:749:13: error: program scope variable must reside in constant address space
-thread uint v745 = 0u;
- ^
-program_source:750:13: error: program scope variable must reside in constant address space
-thread uint v746 = 0u;
- ^
-program_source:751:13: error: program scope variable must reside in constant address space
-thread uint v747 = 0u;
- ^
-program_source:752:13: error: program scope variable must reside in constant address space
-thread uint v748 = 0u;
- ^
-program_source:753:13: error: program scope variable must reside in constant address space
-thread uint v749 = 0u;
- ^
-program_source:754:13: error: program scope variable must reside in constant address space
-thread uint v750 = 0u;
- ^
-program_source:755:13: error: program scope variable must reside in constant address space
-thread uint v751 = 0u;
- ^
-program_source:756:13: error: program scope variable must reside in constant address space
-thread uint v752 = 0u;
- ^
-program_source:757:13: error: program scope variable must reside in constant address space
-thread uint v753 = 0u;
- ^
-program_source:758:13: error: program scope variable must reside in constant address space
-thread uint v754 = 0u;
- ^
-program_source:759:13: error: program scope variable must reside in constant address space
-thread uint v755 = 0u;
- ^
-program_source:760:13: error: program scope variable must reside in constant address space
-thread uint v756 = 0u;
- ^
-program_source:761:13: error: program scope variable must reside in constant address space
-thread uint v757 = 0u;
- ^
-program_source:762:13: error: program scope variable must reside in constant address space
-thread uint v758 = 0u;
- ^
-program_source:763:13: error: program scope variable must reside in constant address space
-thread uint v759 = 0u;
- ^
-program_source:764:13: error: program scope variable must reside in constant address space
-thread uint v760 = 0u;
- ^
-program_source:765:13: error: program scope variable must reside in constant address space
-thread uint v761 = 0u;
- ^
-program_source:766:13: error: program scope variable must reside in constant address space
-thread uint v762 = 0u;
- ^
-program_source:767:13: error: program scope variable must reside in constant address space
-thread uint v763 = 0u;
- ^
-program_source:768:13: error: program scope variable must reside in constant address space
-thread uint v764 = 0u;
- ^
-program_source:769:13: error: program scope variable must reside in constant address space
-thread uint v765 = 0u;
- ^
-program_source:770:13: error: program scope variable must reside in constant address space
-thread uint v766 = 0u;
- ^
-program_source:771:13: error: program scope variable must reside in constant address space
-thread uint v767 = 0u;
- ^
-program_source:772:13: error: program scope variable must reside in constant address space
-thread uint v768 = 0u;
- ^
-program_source:773:13: error: program scope variable must reside in constant address space
-thread uint v769 = 0u;
- ^
-program_source:774:13: error: program scope variable must reside in constant address space
-thread uint v770 = 0u;
- ^
-program_source:775:13: error: program scope variable must reside in constant address space
-thread uint v771 = 0u;
- ^
-program_source:776:13: error: program scope variable must reside in constant address space
-thread uint v772 = 0u;
- ^
-program_source:777:13: error: program scope variable must reside in constant address space
-thread uint v773 = 0u;
- ^
-program_source:778:13: error: program scope variable must reside in constant address space
-thread uint v774 = 0u;
- ^
-program_source:779:13: error: program scope variable must reside in constant address space
-thread uint v775 = 0u;
- ^
-program_source:780:13: error: program scope variable must reside in constant address space
-thread uint v776 = 0u;
- ^
-program_source:781:13: error: program scope variable must reside in constant address space
-thread uint v777 = 0u;
- ^
-program_source:782:13: error: program scope variable must reside in constant address space
-thread uint v778 = 0u;
- ^
-program_source:783:13: error: program scope variable must reside in constant address space
-thread uint v779 = 0u;
- ^
-program_source:784:13: error: program scope variable must reside in constant address space
-thread uint v780 = 0u;
- ^
-program_source:785:13: error: program scope variable must reside in constant address space
-thread uint v781 = 0u;
- ^
-program_source:786:13: error: program scope variable must reside in constant address space
-thread uint v782 = 0u;
- ^
-program_source:787:13: error: program scope variable must reside in constant address space
-thread uint v783 = 0u;
- ^
-program_source:788:13: error: program scope variable must reside in constant address space
-thread uint v784 = 0u;
- ^
-program_source:789:13: error: program scope variable must reside in constant address space
-thread uint v785 = 0u;
- ^
-program_source:790:13: error: program scope variable must reside in constant address space
-thread uint v786 = 0u;
- ^
-program_source:791:13: error: program scope variable must reside in constant address space
-thread uint v787 = 0u;
- ^
-program_source:792:13: error: program scope variable must reside in constant address space
-thread uint v788 = 0u;
- ^
-program_source:793:13: error: program scope variable must reside in constant address space
-thread uint v789 = 0u;
- ^
-program_source:794:13: error: program scope variable must reside in constant address space
-thread uint v790 = 0u;
- ^
-program_source:795:13: error: program scope variable must reside in constant address space
-thread uint v791 = 0u;
- ^
-program_source:796:13: error: program scope variable must reside in constant address space
-thread uint v792 = 0u;
- ^
-program_source:797:13: error: program scope variable must reside in constant address space
-thread uint v793 = 0u;
- ^
-program_source:798:13: error: program scope variable must reside in constant address space
-thread uint v794 = 0u;
- ^
-program_source:799:13: error: program scope variable must reside in constant address space
-thread uint v795 = 0u;
- ^
-program_source:800:13: error: program scope variable must reside in constant address space
-thread uint v796 = 0u;
- ^
-program_source:801:13: error: program scope variable must reside in constant address space
-thread uint v797 = 0u;
- ^
-program_source:802:13: error: program scope variable must reside in constant address space
-thread uint v798 = 0u;
- ^
-program_source:803:13: error: program scope variable must reside in constant address space
-thread uint v799 = 0u;
- ^
-program_source:804:13: error: program scope variable must reside in constant address space
-thread uint v800 = 0u;
- ^
-program_source:805:13: error: program scope variable must reside in constant address space
-thread uint v801 = 0u;
- ^
-program_source:806:13: error: program scope variable must reside in constant address space
-thread uint v802 = 0u;
- ^
-program_source:807:13: error: program scope variable must reside in constant address space
-thread uint v803 = 0u;
- ^
-program_source:808:13: error: program scope variable must reside in constant address space
-thread uint v804 = 0u;
- ^
-program_source:809:13: error: program scope variable must reside in constant address space
-thread uint v805 = 0u;
- ^
-program_source:810:13: error: program scope variable must reside in constant address space
-thread uint v806 = 0u;
- ^
-program_source:811:13: error: program scope variable must reside in constant address space
-thread uint v807 = 0u;
- ^
-program_source:812:13: error: program scope variable must reside in constant address space
-thread uint v808 = 0u;
- ^
-program_source:813:13: error: program scope variable must reside in constant address space
-thread uint v809 = 0u;
- ^
-program_source:814:13: error: program scope variable must reside in constant address space
-thread uint v810 = 0u;
- ^
-program_source:815:13: error: program scope variable must reside in constant address space
-thread uint v811 = 0u;
- ^
-program_source:816:13: error: program scope variable must reside in constant address space
-thread uint v812 = 0u;
- ^
-program_source:817:13: error: program scope variable must reside in constant address space
-thread uint v813 = 0u;
- ^
-program_source:818:13: error: program scope variable must reside in constant address space
-thread uint v814 = 0u;
- ^
-program_source:819:13: error: program scope variable must reside in constant address space
-thread uint v815 = 0u;
- ^
-program_source:820:13: error: program scope variable must reside in constant address space
-thread uint v816 = 0u;
- ^
-program_source:821:13: error: program scope variable must reside in constant address space
-thread uint v817 = 0u;
- ^
-program_source:822:13: error: program scope variable must reside in constant address space
-thread uint v818 = 0u;
- ^
-program_source:823:13: error: program scope variable must reside in constant address space
-thread uint v819 = 0u;
- ^
-program_source:824:13: error: program scope variable must reside in constant address space
-thread uint v820 = 0u;
- ^
-program_source:825:13: error: program scope variable must reside in constant address space
-thread uint v821 = 0u;
- ^
-program_source:826:13: error: program scope variable must reside in constant address space
-thread uint v822 = 0u;
- ^
-program_source:827:13: error: program scope variable must reside in constant address space
-thread uint v823 = 0u;
- ^
-program_source:828:13: error: program scope variable must reside in constant address space
-thread uint v824 = 0u;
- ^
-program_source:829:13: error: program scope variable must reside in constant address space
-thread uint v825 = 0u;
- ^
-program_source:830:13: error: program scope variable must reside in constant address space
-thread uint v826 = 0u;
- ^
-program_source:831:13: error: program scope variable must reside in constant address space
-thread uint v827 = 0u;
- ^
-program_source:832:13: error: program scope variable must reside in constant address space
-thread uint v828 = 0u;
- ^
-program_source:833:13: error: program scope variable must reside in constant address space
-thread uint v829 = 0u;
- ^
-program_source:834:13: error: program scope variable must reside in constant address space
-thread uint v830 = 0u;
- ^
-program_source:835:13: error: program scope variable must reside in constant address space
-thread uint v831 = 0u;
- ^
-program_source:836:13: error: program scope variable must reside in constant address space
-thread uint v832 = 0u;
- ^
-program_source:837:13: error: program scope variable must reside in constant address space
-thread uint v833 = 0u;
- ^
-program_source:838:13: error: program scope variable must reside in constant address space
-thread uint v834 = 0u;
- ^
-program_source:839:13: error: program scope variable must reside in constant address space
-thread uint v835 = 0u;
- ^
-program_source:840:13: error: program scope variable must reside in constant address space
-thread uint v836 = 0u;
- ^
-program_source:841:13: error: program scope variable must reside in constant address space
-thread uint v837 = 0u;
- ^
-program_source:842:13: error: program scope variable must reside in constant address space
-thread uint v838 = 0u;
- ^
-program_source:843:13: error: program scope variable must reside in constant address space
-thread uint v839 = 0u;
- ^
-program_source:844:13: error: program scope variable must reside in constant address space
-thread uint v840 = 0u;
- ^
-program_source:845:13: error: program scope variable must reside in constant address space
-thread uint v841 = 0u;
- ^
-program_source:846:13: error: program scope variable must reside in constant address space
-thread uint v842 = 0u;
- ^
-program_source:847:13: error: program scope variable must reside in constant address space
-thread uint v843 = 0u;
- ^
-program_source:848:13: error: program scope variable must reside in constant address space
-thread uint v844 = 0u;
- ^
-program_source:849:13: error: program scope variable must reside in constant address space
-thread uint v845 = 0u;
- ^
-program_source:850:13: error: program scope variable must reside in constant address space
-thread uint v846 = 0u;
- ^
-program_source:851:13: error: program scope variable must reside in constant address space
-thread uint v847 = 0u;
- ^
-program_source:852:13: error: program scope variable must reside in constant address space
-thread uint v848 = 0u;
- ^
-program_source:853:13: error: program scope variable must reside in constant address space
-thread uint v849 = 0u;
- ^
-program_source:854:13: error: program scope variable must reside in constant address space
-thread uint v850 = 0u;
- ^
-program_source:855:13: error: program scope variable must reside in constant address space
-thread uint v851 = 0u;
- ^
-program_source:856:13: error: program scope variable must reside in constant address space
-thread uint v852 = 0u;
- ^
-program_source:857:13: error: program scope variable must reside in constant address space
-thread uint v853 = 0u;
- ^
-program_source:858:13: error: program scope variable must reside in constant address space
-thread uint v854 = 0u;
- ^
-program_source:859:13: error: program scope variable must reside in constant address space
-thread uint v855 = 0u;
- ^
-program_source:860:13: error: program scope variable must reside in constant address space
-thread uint v856 = 0u;
- ^
-program_source:861:13: error: program scope variable must reside in constant address space
-thread uint v857 = 0u;
- ^
-program_source:862:13: error: program scope variable must reside in constant address space
-thread uint v858 = 0u;
- ^
-program_source:863:13: error: program scope variable must reside in constant address space
-thread uint v859 = 0u;
- ^
-program_source:864:13: error: program scope variable must reside in constant address space
-thread uint v860 = 0u;
- ^
-program_source:865:13: error: program scope variable must reside in constant address space
-thread uint v861 = 0u;
- ^
-program_source:866:13: error: program scope variable must reside in constant address space
-thread uint v862 = 0u;
- ^
-program_source:867:13: error: program scope variable must reside in constant address space
-thread uint v863 = 0u;
- ^
-program_source:868:13: error: program scope variable must reside in constant address space
-thread uint v864 = 0u;
- ^
-program_source:869:13: error: program scope variable must reside in constant address space
-thread uint v865 = 0u;
- ^
-program_source:870:13: error: program scope variable must reside in constant address space
-thread uint v866 = 0u;
- ^
-program_source:871:13: error: program scope variable must reside in constant address space
-thread uint v867 = 0u;
- ^
-program_source:872:13: error: program scope variable must reside in constant address space
-thread uint v868 = 0u;
- ^
-program_source:873:13: error: program scope variable must reside in constant address space
-thread uint v869 = 0u;
- ^
-program_source:874:13: error: program scope variable must reside in constant address space
-thread uint v870 = 0u;
- ^
-program_source:875:13: error: program scope variable must reside in constant address space
-thread uint v871 = 0u;
- ^
-program_source:876:13: error: program scope variable must reside in constant address space
-thread uint v872 = 0u;
- ^
-program_source:877:13: error: program scope variable must reside in constant address space
-thread uint v873 = 0u;
- ^
-program_source:878:13: error: program scope variable must reside in constant address space
-thread uint v874 = 0u;
- ^
-program_source:879:13: error: program scope variable must reside in constant address space
-thread uint v875 = 0u;
- ^
-program_source:880:13: error: program scope variable must reside in constant address space
-thread uint v876 = 0u;
- ^
-program_source:881:13: error: program scope variable must reside in constant address space
-thread uint v877 = 0u;
- ^
-program_source:882:13: error: program scope variable must reside in constant address space
-thread uint v878 = 0u;
- ^
-program_source:883:13: error: program scope variable must reside in constant address space
-thread uint v879 = 0u;
- ^
-program_source:884:13: error: program scope variable must reside in constant address space
-thread uint v880 = 0u;
- ^
-program_source:885:13: error: program scope variable must reside in constant address space
-thread uint v881 = 0u;
- ^
-program_source:886:13: error: program scope variable must reside in constant address space
-thread uint v882 = 0u;
- ^
-program_source:887:13: error: program scope variable must reside in constant address space
-thread uint v883 = 0u;
- ^
-program_source:888:13: error: program scope variable must reside in constant address space
-thread uint v884 = 0u;
- ^
-program_source:889:13: error: program scope variable must reside in constant address space
-thread uint v885 = 0u;
- ^
-program_source:890:13: error: program scope variable must reside in constant address space
-thread uint v886 = 0u;
- ^
-program_source:891:13: error: program scope variable must reside in constant address space
-thread uint v887 = 0u;
- ^
-program_source:892:13: error: program scope variable must reside in constant address space
-thread uint v888 = 0u;
- ^
-program_source:893:13: error: program scope variable must reside in constant address space
-thread uint v889 = 0u;
- ^
-program_source:894:13: error: program scope variable must reside in constant address space
-thread uint v890 = 0u;
- ^
-program_source:895:13: error: program scope variable must reside in constant address space
-thread uint v891 = 0u;
- ^
-program_source:896:13: error: program scope variable must reside in constant address space
-thread uint v892 = 0u;
- ^
-program_source:897:13: error: program scope variable must reside in constant address space
-thread uint v893 = 0u;
- ^
-program_source:898:13: error: program scope variable must reside in constant address space
-thread uint v894 = 0u;
- ^
-program_source:899:13: error: program scope variable must reside in constant address space
-thread uint v895 = 0u;
- ^
-program_source:900:13: error: program scope variable must reside in constant address space
-thread uint v896 = 0u;
- ^
-program_source:901:13: error: program scope variable must reside in constant address space
-thread uint v897 = 0u;
- ^
-program_source:902:13: error: program scope variable must reside in constant address space
-thread uint v898 = 0u;
- ^
-program_source:903:13: error: program scope variable must reside in constant address space
-thread uint v899 = 0u;
- ^
-program_source:904:13: error: program scope variable must reside in constant address space
-thread uint v900 = 0u;
- ^
-program_source:905:13: error: program scope variable must reside in constant address space
-thread uint v901 = 0u;
- ^
-program_source:906:13: error: program scope variable must reside in constant address space
-thread uint v902 = 0u;
- ^
-program_source:907:13: error: program scope variable must reside in constant address space
-thread uint v903 = 0u;
- ^
-program_source:908:13: error: program scope variable must reside in constant address space
-thread uint v904 = 0u;
- ^
-program_source:909:13: error: program scope variable must reside in constant address space
-thread uint v905 = 0u;
- ^
-program_source:910:13: error: program scope variable must reside in constant address space
-thread uint v906 = 0u;
- ^
-program_source:911:13: error: program scope variable must reside in constant address space
-thread uint v907 = 0u;
- ^
-program_source:912:13: error: program scope variable must reside in constant address space
-thread uint v908 = 0u;
- ^
-program_source:913:13: error: program scope variable must reside in constant address space
-thread uint v909 = 0u;
- ^
-program_source:914:13: error: program scope variable must reside in constant address space
-thread uint v910 = 0u;
- ^
-program_source:915:13: error: program scope variable must reside in constant address space
-thread uint v911 = 0u;
- ^
-program_source:916:13: error: program scope variable must reside in constant address space
-thread uint v912 = 0u;
- ^
-program_source:917:13: error: program scope variable must reside in constant address space
-thread uint v913 = 0u;
- ^
-program_source:918:13: error: program scope variable must reside in constant address space
-thread uint v914 = 0u;
- ^
-program_source:919:13: error: program scope variable must reside in constant address space
-thread uint v915 = 0u;
- ^
-program_source:920:13: error: program scope variable must reside in constant address space
-thread uint v916 = 0u;
- ^
-program_source:921:13: error: program scope variable must reside in constant address space
-thread uint v917 = 0u;
- ^
-program_source:922:13: error: program scope variable must reside in constant address space
-thread uint v918 = 0u;
- ^
-program_source:923:13: error: program scope variable must reside in constant address space
-thread uint v919 = 0u;
- ^
-program_source:924:13: error: program scope variable must reside in constant address space
-thread uint v920 = 0u;
- ^
-program_source:925:13: error: program scope variable must reside in constant address space
-thread uint v921 = 0u;
- ^
-program_source:926:13: error: program scope variable must reside in constant address space
-thread uint v922 = 0u;
- ^
-program_source:927:13: error: program scope variable must reside in constant address space
-thread uint v923 = 0u;
- ^
-program_source:928:13: error: program scope variable must reside in constant address space
-thread uint v924 = 0u;
- ^
-program_source:929:13: error: program scope variable must reside in constant address space
-thread uint v925 = 0u;
- ^
-program_source:930:13: error: program scope variable must reside in constant address space
-thread uint v926 = 0u;
- ^
-program_source:931:13: error: program scope variable must reside in constant address space
-thread uint v927 = 0u;
- ^
-program_source:932:13: error: program scope variable must reside in constant address space
-thread uint v928 = 0u;
- ^
-program_source:933:13: error: program scope variable must reside in constant address space
-thread uint v929 = 0u;
- ^
-program_source:934:13: error: program scope variable must reside in constant address space
-thread uint v930 = 0u;
- ^
-program_source:935:13: error: program scope variable must reside in constant address space
-thread uint v931 = 0u;
- ^
-program_source:936:13: error: program scope variable must reside in constant address space
-thread uint v932 = 0u;
- ^
-program_source:937:13: error: program scope variable must reside in constant address space
-thread uint v933 = 0u;
- ^
-program_source:938:13: error: program scope variable must reside in constant address space
-thread uint v934 = 0u;
- ^
-program_source:939:13: error: program scope variable must reside in constant address space
-thread uint v935 = 0u;
- ^
-program_source:940:13: error: program scope variable must reside in constant address space
-thread uint v936 = 0u;
- ^
-program_source:941:13: error: program scope variable must reside in constant address space
-thread uint v937 = 0u;
- ^
-program_source:942:13: error: program scope variable must reside in constant address space
-thread uint v938 = 0u;
- ^
-program_source:943:13: error: program scope variable must reside in constant address space
-thread uint v939 = 0u;
- ^
-program_source:944:13: error: program scope variable must reside in constant address space
-thread uint v940 = 0u;
- ^
-program_source:945:13: error: program scope variable must reside in constant address space
-thread uint v941 = 0u;
- ^
-program_source:946:13: error: program scope variable must reside in constant address space
-thread uint v942 = 0u;
- ^
-program_source:947:13: error: program scope variable must reside in constant address space
-thread uint v943 = 0u;
- ^
-program_source:948:13: error: program scope variable must reside in constant address space
-thread uint v944 = 0u;
- ^
-program_source:949:13: error: program scope variable must reside in constant address space
-thread uint v945 = 0u;
- ^
-program_source:950:13: error: program scope variable must reside in constant address space
-thread uint v946 = 0u;
- ^
-program_source:951:13: error: program scope variable must reside in constant address space
-thread uint v947 = 0u;
- ^
-program_source:952:13: error: program scope variable must reside in constant address space
-thread uint v948 = 0u;
- ^
-program_source:953:13: error: program scope variable must reside in constant address space
-thread uint v949 = 0u;
- ^
-program_source:954:13: error: program scope variable must reside in constant address space
-thread uint v950 = 0u;
- ^
-program_source:955:13: error: program scope variable must reside in constant address space
-thread uint v951 = 0u;
- ^
-program_source:956:13: error: program scope variable must reside in constant address space
-thread uint v952 = 0u;
- ^
-program_source:957:13: error: program scope variable must reside in constant address space
-thread uint v953 = 0u;
- ^
-program_source:958:13: error: program scope variable must reside in constant address space
-thread uint v954 = 0u;
- ^
-program_source:959:13: error: program scope variable must reside in constant address space
-thread uint v955 = 0u;
- ^
-program_source:960:13: error: program scope variable must reside in constant address space
-thread uint v956 = 0u;
- ^
-program_source:961:13: error: program scope variable must reside in constant address space
-thread uint v957 = 0u;
- ^
-program_source:962:13: error: program scope variable must reside in constant address space
-thread uint v958 = 0u;
- ^
-program_source:963:13: error: program scope variable must reside in constant address space
-thread uint v959 = 0u;
- ^
-program_source:964:13: error: program scope variable must reside in constant address space
-thread uint v960 = 0u;
- ^
-program_source:965:13: error: program scope variable must reside in constant address space
-thread uint v961 = 0u;
- ^
-program_source:966:13: error: program scope variable must reside in constant address space
-thread uint v962 = 0u;
- ^
-program_source:967:13: error: program scope variable must reside in constant address space
-thread uint v963 = 0u;
- ^
-program_source:968:13: error: program scope variable must reside in constant address space
-thread uint v964 = 0u;
- ^
-program_source:969:13: error: program scope variable must reside in constant address space
-thread uint v965 = 0u;
- ^
-program_source:970:13: error: program scope variable must reside in constant address space
-thread uint v966 = 0u;
- ^
-program_source:971:13: error: program scope variable must reside in constant address space
-thread uint v967 = 0u;
- ^
-program_source:972:13: error: program scope variable must reside in constant address space
-thread uint v968 = 0u;
- ^
-program_source:973:13: error: program scope variable must reside in constant address space
-thread uint v969 = 0u;
- ^
-program_source:974:13: error: program scope variable must reside in constant address space
-thread uint v970 = 0u;
- ^
-program_source:975:13: error: program scope variable must reside in constant address space
-thread uint v971 = 0u;
- ^
-program_source:976:13: error: program scope variable must reside in constant address space
-thread uint v972 = 0u;
- ^
-program_source:977:13: error: program scope variable must reside in constant address space
-thread uint v973 = 0u;
- ^
-program_source:978:13: error: program scope variable must reside in constant address space
-thread uint v974 = 0u;
- ^
-program_source:979:13: error: program scope variable must reside in constant address space
-thread uint v975 = 0u;
- ^
-program_source:980:13: error: program scope variable must reside in constant address space
-thread uint v976 = 0u;
- ^
-program_source:981:13: error: program scope variable must reside in constant address space
-thread uint v977 = 0u;
- ^
-program_source:982:13: error: program scope variable must reside in constant address space
-thread uint v978 = 0u;
- ^
-program_source:983:13: error: program scope variable must reside in constant address space
-thread uint v979 = 0u;
- ^
-program_source:984:13: error: program scope variable must reside in constant address space
-thread uint v980 = 0u;
- ^
-program_source:985:13: error: program scope variable must reside in constant address space
-thread uint v981 = 0u;
- ^
-program_source:986:13: error: program scope variable must reside in constant address space
-thread uint v982 = 0u;
- ^
-program_source:987:13: error: program scope variable must reside in constant address space
-thread uint v983 = 0u;
- ^
-program_source:988:13: error: program scope variable must reside in constant address space
-thread uint v984 = 0u;
- ^
-program_source:989:13: error: program scope variable must reside in constant address space
-thread uint v985 = 0u;
- ^
-program_source:990:13: error: program scope variable must reside in constant address space
-thread uint v986 = 0u;
- ^
-program_source:991:13: error: program scope variable must reside in constant address space
-thread uint v987 = 0u;
- ^
-program_source:992:13: error: program scope variable must reside in constant address space
-thread uint v988 = 0u;
- ^
-program_source:993:13: error: program scope variable must reside in constant address space
-thread uint v989 = 0u;
- ^
-program_source:994:13: error: program scope variable must reside in constant address space
-thread uint v990 = 0u;
- ^
-program_source:995:13: error: program scope variable must reside in constant address space
-thread uint v991 = 0u;
- ^
-program_source:996:13: error: program scope variable must reside in constant address space
-thread uint v992 = 0u;
- ^
-program_source:997:13: error: program scope variable must reside in constant address space
-thread uint v993 = 0u;
- ^
-program_source:998:13: error: program scope variable must reside in constant address space
-thread uint v994 = 0u;
- ^
-program_source:999:13: error: program scope variable must reside in constant address space
-thread uint v995 = 0u;
- ^
-program_source:1000:13: error: program scope variable must reside in constant address space
-thread uint v996 = 0u;
- ^
-program_source:1001:13: error: program scope variable must reside in constant address space
-thread uint v997 = 0u;
- ^
-program_source:1002:13: error: program scope variable must reside in constant address space
-thread uint v998 = 0u;
- ^
-program_source:1003:13: error: program scope variable must reside in constant address space
-thread uint v999 = 0u;
- ^
-
diff --git a/test/tint/bug/tint/1538.wgsl.expected.ir.msl b/test/tint/bug/tint/1538.wgsl.expected.ir.msl
index ffbff32..78cff54 100644
--- a/test/tint/bug/tint/1538.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1538.wgsl.expected.ir.msl
@@ -1,57 +1,44 @@
-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: $B1: { # root
- %buf:ptr<storage, array<u32, 1>, read_write> = var @binding_point(0, 1)
-}
+struct tint_module_vars_struct {
+ device tint_array<uint, 1>* buf;
+};
-%g = func():i32 {
- $B2: {
- ret 0i
- }
+int g() {
+ return 0;
}
-%f = func():i32 {
- $B3: {
- loop [b: $B4] { # loop_1
- $B4: { # body
- %4:i32 = call %g
- exit_loop # loop_1
- }
+int f() {
+ {
+ while(true) {
+ g();
+ break;
}
- %5:i32 = call %g
- %o:i32 = let %5
- ret 0i
}
+ int const o = g();
+ return 0;
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- loop [b: $B6, c: $B7] { # loop_2
- $B6: { # body
- %8:ptr<storage, u32, read_write> = access %buf, 0i
- %9:u32 = load %8
- %10:bool = eq %9, 0u
- if %10 [t: $B8] { # if_1
- $B8: { # true
- exit_loop # loop_2
- }
- }
- %11:i32 = call %f
- %s:ptr<function, i32, read_write> = var, %11
- %13:ptr<storage, u32, read_write> = access %buf, 0i
- store %13, 0u
- continue # -> $B7
+kernel void tint_symbol(device tint_array<uint, 1>* buf [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.buf=buf};
+ {
+ while(true) {
+ if (((*tint_module_vars.buf)[0] == 0u)) {
+ break;
}
- $B7: { # continuing
- next_iteration # -> $B6
- }
+ int s = f();
+ (*tint_module_vars.buf)[0] = 0u;
+ 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/bug/tint/1542.wgsl.expected.ir.msl b/test/tint/bug/tint/1542.wgsl.expected.ir.msl
index d403947..36b8b6b 100644
--- a/test/tint/bug/tint/1542.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1542.wgsl.expected.ir.msl
@@ -1,28 +1,13 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct UniformBuffer {
+ int3 d;
+};
+struct tint_module_vars_struct {
+ const constant UniformBuffer* u_input;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: UniformBuffer = struct @align(16) {
- d:vec3<i32> @offset(0)
+kernel void tint_symbol(const constant UniformBuffer* u_input [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u_input=u_input};
+ int3 const temp = ((*tint_module_vars.u_input).d << (uint3(0u) & uint3(31u)));
}
-
-$B1: { # root
- %u_input:ptr<uniform, UniformBuffer, read> = var @binding_point(0, 0)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %3:ptr<uniform, vec3<i32>, read> = access %u_input, 0u
- %4:vec3<i32> = load %3
- %5:vec3<u32> = and vec3<u32>(0u), vec3<u32>(31u)
- %6:vec3<i32> = shl %4, %5
- %temp:vec3<i32> = let %6
- 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/1557.wgsl.expected.ir.msl b/test/tint/bug/tint/1557.wgsl.expected.ir.msl
index 8598d3b..34026b7 100644
--- a/test/tint/bug/tint/1557.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1557.wgsl.expected.ir.msl
@@ -1,69 +1,46 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant int* u;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %u:ptr<uniform, i32, read> = var @binding_point(0, 0)
+int f() {
+ return 0;
}
-
-%f = func():i32 {
- $B2: {
- ret 0i
- }
-}
-%g = func():void {
- $B3: {
- %j:ptr<function, i32, read_write> = var, 0i
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %5:i32 = load %j
- %6:bool = gte %5, 1i
- if %6 [t: $B6] { # if_1
- $B6: { # true
- exit_loop # loop_1
- }
- }
- %7:i32 = load %j
- %8:i32 = add %7, 1i
- store %j, %8
- %9:i32 = call %f
- %k:ptr<function, i32, read_write> = var, %9
- continue # -> $B5
+void g() {
+ int j = 0;
+ {
+ while(true) {
+ if ((j >= 1)) {
+ break;
}
- $B5: { # continuing
- next_iteration # -> $B4
- }
+ j = (j + 1);
+ int k = f();
+ continue;
}
- ret
}
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B7: {
- %12:i32 = load %u
- switch %12 [c: (0i, $B8), c: (default, $B9)] { # switch_1
- $B8: { # case
- %13:i32 = load %u
- switch %13 [c: (0i, $B10), c: (default, $B11)] { # switch_2
- $B10: { # case
- exit_switch # switch_2
- }
- $B11: { # case
- %14:void = call %g
- exit_switch # switch_2
- }
+kernel void tint_symbol(const constant int* u [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.u=u};
+ switch((*tint_module_vars.u)) {
+ case 0:
+ {
+ switch((*tint_module_vars.u)) {
+ case 0:
+ {
+ break;
}
- exit_switch # switch_1
+ default:
+ {
+ g();
+ break;
+ }
}
- $B9: { # case
- exit_switch # switch_1
- }
+ break;
}
- ret
+ default:
+ {
+ break;
+ }
}
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/1604.wgsl.expected.ir.msl b/test/tint/bug/tint/1604.wgsl.expected.ir.msl
index 51679e2..7f99c5f 100644
--- a/test/tint/bug/tint/1604.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1604.wgsl.expected.ir.msl
@@ -1,33 +1,24 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant int* x;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %x:ptr<uniform, i32, read> = var @binding_point(0, 0)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %3:i32 = load %x
- switch %3 [c: (0i, $B3), c: (default, $B4)] { # switch_1
- $B3: { # case
- loop [b: $B5] { # loop_1
- $B5: { # body
- ret
- }
+kernel void tint_symbol(const constant int* x [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.x=x};
+ switch((*tint_module_vars.x)) {
+ case 0:
+ {
+ {
+ while(true) {
+ return;
}
- exit_switch # switch_1
}
- $B4: { # case
- exit_switch # switch_1
- }
+ break;
}
- ret
+ default:
+ {
+ break;
+ }
}
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/1605.wgsl.expected.ir.msl b/test/tint/bug/tint/1605.wgsl.expected.ir.msl
index 5eee2e1..6120df1 100644
--- a/test/tint/bug/tint/1605.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1605.wgsl.expected.ir.msl
@@ -1,76 +1,34 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant int* b;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %b:ptr<uniform, i32, read> = var @binding_point(0, 0)
-}
-
-%func_3 = func():bool {
- $B2: {
- loop [i: $B3, b: $B4, c: $B5] { # loop_1
- $B3: { # initializer
- %i:ptr<function, i32, read_write> = var, 0i
- next_iteration # -> $B4
+bool func_3(tint_module_vars_struct tint_module_vars) {
+ {
+ int i = 0;
+ while(true) {
+ if ((i < (*tint_module_vars.b))) {
+ } else {
+ break;
}
- $B4: { # body
- %4:i32 = load %i
- %5:i32 = load %b
- %6:bool = lt %4, %5
- if %6 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
+ {
+ int j = -1;
+ while(true) {
+ if ((j == 1)) {
+ } else {
+ break;
}
- $B7: { # false
- exit_loop # loop_1
- }
+ return false;
}
- loop [i: $B8, b: $B9, c: $B10] { # loop_2
- $B8: { # initializer
- %j:ptr<function, i32, read_write> = var, -1i
- next_iteration # -> $B9
- }
- $B9: { # body
- %8:i32 = load %j
- %9:bool = eq %8, 1i
- if %9 [t: $B11, f: $B12] { # if_2
- $B11: { # true
- exit_if # if_2
- }
- $B12: { # false
- exit_loop # loop_2
- }
- }
- ret false
- }
- $B10: { # continuing
- %10:i32 = load %j
- %11:i32 = add %10, 1i
- store %j, %11
- next_iteration # -> $B9
- }
- }
- continue # -> $B5
}
- $B5: { # continuing
- %12:i32 = load %i
- %13:i32 = add %12, 1i
- store %i, %13
- next_iteration # -> $B4
- }
+ i = (i + 1);
+ continue;
}
- ret false
}
+ return false;
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B13: {
- %15:bool = call %func_3
- ret
- }
+kernel void tint_symbol(const constant int* b [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.b=b};
+ func_3(tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/1666.wgsl.expected.ir.msl b/test/tint/bug/tint/1666.wgsl.expected.ir.msl
index 854c912..33fa57f 100644
--- a/test/tint/bug/tint/1666.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1666.wgsl.expected.ir.msl
@@ -1,57 +1,42 @@
-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: $B1: { # root
- %rarr:ptr<storage, array<f32>, read> = var @binding_point(0, 0)
-}
+struct tint_module_vars_struct {
+ const device tint_array<float, 1>* rarr;
+};
-%vector = func():void {
- $B2: {
- %idx:i32 = let 3i
- %4:i32 = access vec2<i32>(1i, 2i), %idx
- %x:i32 = let %4
- ret
- }
+void vector() {
+ int const idx = 3;
+ int const x = int2(1, 2)[idx];
}
-%tint_symbol = func():void {
- $B3: {
- %idx_1:i32 = let 4i # %idx_1: 'idx'
- %8:vec2<f32> = access mat2x2<f32>(vec2<f32>(1.0f, 2.0f), vec2<f32>(3.0f, 4.0f)), %idx_1
- %x_1:vec2<f32> = let %8 # %x_1: 'x'
- ret
- }
+void tint_symbol() {
+ int const idx = 4;
+ float2 const x = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f))[idx];
}
-%fixed_size_array = func():void {
- $B4: {
- %arr:array<i32, 2> = let array<i32, 2>(1i, 2i)
- %idx_2:i32 = let 3i # %idx_2: 'idx'
- %13:i32 = access %arr, %idx_2
- %x_2:i32 = let %13 # %x_2: 'x'
- ret
- }
+void fixed_size_array() {
+ tint_array<int, 2> const arr = tint_array<int, 2>{1, 2};
+ int const idx = 3;
+ int const x = arr[idx];
}
-%runtime_size_array = func():void {
- $B5: {
- %idx_3:i32 = let -1i # %idx_3: 'idx'
- %17:ptr<storage, f32, read> = access %rarr, %idx_3
- %18:f32 = load %17
- %x_3:f32 = let %18 # %x_3: 'x'
- ret
- }
+void runtime_size_array(tint_module_vars_struct tint_module_vars) {
+ int const idx = -1;
+ float const x = (*tint_module_vars.rarr)[idx];
}
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B6: {
- %21:void = call %vector
- %22:void = call %tint_symbol
- %23:void = call %fixed_size_array
- %24:void = call %runtime_size_array
- ret
- }
+kernel void f(const device tint_array<float, 1>* rarr [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.rarr=rarr};
+ vector();
+ tint_symbol();
+ fixed_size_array();
+ runtime_size_array(tint_module_vars);
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/1677.wgsl.expected.ir.msl b/test/tint/bug/tint/1677.wgsl.expected.ir.msl
index 78e17ab..4b3e94e 100644
--- a/test/tint/bug/tint/1677.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1677.wgsl.expected.ir.msl
@@ -1,27 +1,13 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct Input {
+ int3 position;
+};
+struct tint_module_vars_struct {
+ const device Input* input;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Input = struct @align(16) {
- position:vec3<i32> @offset(0)
+kernel void tint_symbol(uint3 id [[thread_position_in_grid]], const device Input* input [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.input=input};
+ int3 const pos = ((*tint_module_vars.input).position - int3(0));
}
-
-$B1: { # root
- %input:ptr<storage, Input, read> = var @binding_point(0, 0)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func(%id:vec3<u32> [@global_invocation_id]):void {
- $B2: {
- %4:ptr<storage, vec3<i32>, read> = access %input, 0u
- %5:vec3<i32> = load %4
- %6:vec3<i32> = sub %5, vec3<i32>(0i)
- %pos:vec3<i32> = let %6
- 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/1735.wgsl.expected.ir.msl b/test/tint/bug/tint/1735.wgsl.expected.ir.msl
index d776463..d4c9822 100644
--- a/test/tint/bug/tint/1735.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1735.wgsl.expected.ir.msl
@@ -1,26 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ float f;
+};
+struct tint_module_vars_struct {
+ const device S* in;
+ device S* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- f:f32 @offset(0)
+kernel void tint_symbol(const device S* in [[buffer(0)]], device S* out [[buffer(1)]]) {
+ tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.in);
}
-
-$B1: { # root
- %in:ptr<storage, S, read> = var @binding_point(0, 0)
- %out:ptr<storage, S, read_write> = var @binding_point(0, 1)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:S = load %in
- store %out, %4
- 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/1737.wgsl.expected.ir.msl b/test/tint/bug/tint/1737.wgsl.expected.ir.msl
index 7f0bf1c..374afda 100644
--- a/test/tint/bug/tint/1737.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1737.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,23 +12,12 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ threadgroup tint_array<float, 10>* a;
+ threadgroup tint_array<float, 20>* b;
+};
-threadgroup tint_array<float, 10> a;
-threadgroup tint_array<float, 20> b;
-void f() {
- float const x = a[0];
- float const y = b[0];
+void f(tint_module_vars_struct tint_module_vars) {
+ float const x = (*tint_module_vars.a)[0];
+ float const y = (*tint_module_vars.b)[0];
}
-program_source:16:35: error: program scope variable must reside in constant address space
-threadgroup tint_array<float, 10> a;
- ^
-program_source:17:35: error: program scope variable must reside in constant address space
-threadgroup tint_array<float, 20> b;
- ^
-program_source:19:15: warning: unused variable 'x' [-Wunused-variable]
- float const x = a[0];
- ^
-program_source:20:15: warning: unused variable 'y' [-Wunused-variable]
- float const y = b[0];
- ^
-
diff --git a/test/tint/bug/tint/1776.spvasm.expected.ir.msl b/test/tint/bug/tint/1776.spvasm.expected.ir.msl
index 1c97029..bb7ca68 100644
--- a/test/tint/bug/tint/1776.spvasm.expected.ir.msl
+++ b/test/tint/bug/tint/1776.spvasm.expected.ir.msl
@@ -1,37 +1,32 @@
-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: S = struct @align(16) {
- a:vec4<f32> @offset(0)
- b:i32 @offset(16)
-}
+struct S {
+ float4 a;
+ int b;
+};
+struct sb_block {
+ tint_array<S, 1> inner;
+};
+struct tint_module_vars_struct {
+ device sb_block* sb;
+};
-sb_block = struct @align(16) {
- inner:array<S> @offset(0)
+void main_1(tint_module_vars_struct tint_module_vars) {
+ S const x_18 = (*tint_module_vars.sb).inner[1];
}
-
-$B1: { # root
- %sb:ptr<storage, sb_block, read_write> = var @binding_point(0, 0)
+kernel void tint_symbol(device sb_block* sb [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.sb=sb};
+ main_1(tint_module_vars);
}
-
-%main_1 = func():void {
- $B2: {
- %3:ptr<storage, S, read_write> = access %sb, 0u, 1i
- %4:S = load %3
- %x_18:S = let %4
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %7:void = call %main_1
- 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/1776.wgsl.expected.ir.msl b/test/tint/bug/tint/1776.wgsl.expected.ir.msl
index 684cd82..81cfe35 100644
--- a/test/tint/bug/tint/1776.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1776.wgsl.expected.ir.msl
@@ -1,27 +1,26 @@
-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: S = struct @align(16) {
- a:vec4<f32> @offset(0)
- b:i32 @offset(16)
+struct S {
+ float4 a;
+ int b;
+};
+struct tint_module_vars_struct {
+ const device tint_array<S, 1>* sb;
+};
+
+kernel void tint_symbol(const device tint_array<S, 1>* sb [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.sb=sb};
+ S const x = (*tint_module_vars.sb)[1];
}
-
-$B1: { # root
- %sb:ptr<storage, array<S>, read> = var @binding_point(0, 0)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %3:ptr<storage, S, read> = access %sb, 1i
- %4:S = load %3
- %x:S = let %4
- 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/1820.wgsl.expected.ir.msl b/test/tint/bug/tint/1820.wgsl.expected.ir.msl
index 330d80a..a9c72ac 100644
--- a/test/tint/bug/tint/1820.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1820.wgsl.expected.ir.msl
@@ -1,9 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* global;
+};
-thread int global = 0;
+int tint_f32_to_i32(float value) {
+ return select(2147483647, select((-2147483647 - 1), int(value), (value >= -2147483648.0f)), (value <= 2147483520.0f));
+}
void foo(float x) {
switch(tint_f32_to_i32(x)) {
default:
@@ -12,12 +15,12 @@
}
}
}
-int baz(int x) {
- global = 42;
+int baz(int x, tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.global) = 42;
return x;
}
-void bar(float x) {
- switch(baz(tint_f32_to_i32(x))) {
+void bar(float x, tint_module_vars_struct tint_module_vars) {
+ switch(baz(tint_f32_to_i32(x), tint_module_vars)) {
default:
{
break;
@@ -26,16 +29,3 @@
}
void tint_symbol() {
}
-int tint_f32_to_i32(float value) {
- return select(2147483647, select((-2147483647 - 1), int(value), (value >= -2147483648.0f)), (value <= 2147483520.0f));
-}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int global = 0;
- ^
-program_source:6:10: error: use of undeclared identifier 'tint_f32_to_i32'
- switch(tint_f32_to_i32(x)) {
- ^
-program_source:18:14: error: use of undeclared identifier 'tint_f32_to_i32'
- switch(baz(tint_f32_to_i32(x))) {
- ^
-
diff --git a/test/tint/bug/tint/1860.wgsl.expected.ir.msl b/test/tint/bug/tint/1860.wgsl.expected.ir.msl
index d6faf5c..050d7bb 100644
--- a/test/tint/bug/tint/1860.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1860.wgsl.expected.ir.msl
@@ -1,26 +1,13 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct DeclaredAfterUsage {
+ float f;
+};
+struct tint_module_vars_struct {
+ const constant DeclaredAfterUsage* declared_after_usage;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: DeclaredAfterUsage = struct @align(4) {
- f:f32 @offset(0)
+vertex float4 tint_symbol(const constant DeclaredAfterUsage* declared_after_usage [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.declared_after_usage=declared_after_usage};
+ return float4((*tint_module_vars.declared_after_usage).f);
}
-
-$B1: { # root
- %declared_after_usage:ptr<uniform, DeclaredAfterUsage, read> = var @binding_point(0, 0)
-}
-
-%tint_symbol = @vertex func():vec4<f32> [@position] {
- $B2: {
- %3:ptr<uniform, f32, read> = access %declared_after_usage, 0u
- %4:f32 = load %3
- %5:vec4<f32> = construct %4
- ret %5
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/1875.wgsl.expected.ir.msl b/test/tint/bug/tint/1875.wgsl.expected.ir.msl
index 7e094a4..dcb4d6e 100644
--- a/test/tint/bug/tint/1875.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1875.wgsl.expected.ir.msl
@@ -1,53 +1,39 @@
-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: Outputs = struct @align(4) {
- data:array<u32> @offset(0)
-}
+struct Outputs {
+ tint_array<uint, 1> data;
+};
+struct tint_module_vars_struct {
+ thread uint* count;
+ device Outputs* outputs;
+};
-$B1: { # root
- %count:ptr<private, u32, read_write> = var, 0u
- %outputs:ptr<storage, Outputs, read_write> = var @binding_point(0, 1)
+void push_output(uint value, tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.outputs).data[(*tint_module_vars.count)] = value;
+ (*tint_module_vars.count) = ((*tint_module_vars.count) + 1u);
}
-
-%push_output = func(%value:u32):void {
- $B2: {
- %5:u32 = load %count
- %6:ptr<storage, u32, read_write> = access %outputs, 0u, %5
- store %6, %value
- %7:u32 = load %count
- %8:u32 = add %7, 1u
- store %count, %8
- ret
- }
+kernel void tint_symbol(device Outputs* outputs [[buffer(1)]]) {
+ thread uint count = 0u;
+ tint_module_vars_struct const tint_module_vars = {.count=(&count), .outputs=outputs};
+ uint a = 0u;
+ uint b = 10u;
+ uint c = 4294967294u;
+ a = (a + 1u);
+ b = (b + 1u);
+ c = (c + 1u);
+ push_output(a, tint_module_vars);
+ push_output(b, tint_module_vars);
+ push_output(c, tint_module_vars);
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %a:ptr<function, u32, read_write> = var, 0u
- %b:ptr<function, u32, read_write> = var, 10u
- %c:ptr<function, u32, read_write> = var, 4294967294u
- %13:u32 = load %a
- %14:u32 = add %13, 1u
- store %a, %14
- %15:u32 = load %b
- %16:u32 = add %15, 1u
- store %b, %16
- %17:u32 = load %c
- %18:u32 = add %17, 1u
- store %c, %18
- %19:u32 = load %a
- %20:void = call %push_output, %19
- %21:u32 = load %b
- %22:void = call %push_output, %21
- %23:u32 = load %c
- %24:void = call %push_output, %23
- 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/2029.wgsl.expected.ir.msl b/test/tint/bug/tint/2029.wgsl.expected.ir.msl
index 13ca518..c5abccc 100644
--- a/test/tint/bug/tint/2029.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/2029.wgsl.expected.ir.msl
@@ -1,20 +1,10 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %s:ptr<storage, vec3<i32>, read_write> = var @binding_point(0, 0)
+kernel void tint_symbol(device int3* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ (*tint_module_vars.s) = int3(1);
}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- store %s, vec3<i32>(1i)
- 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/2038.wgsl.expected.ir.msl b/test/tint/bug/tint/2038.wgsl.expected.ir.msl
index 3d6a133..d6e1651 100644
--- a/test/tint/bug/tint/2038.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/2038.wgsl.expected.ir.msl
@@ -1,33 +1,27 @@
-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: $B1: { # root
- %output:ptr<storage, array<u32, 2>, read_write> = var @binding_point(0, 0)
-}
+struct tint_module_vars_struct {
+ device tint_array<uint, 2>* output;
+};
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- if false [t: $B3] { # if_1
- $B3: { # true
- %3:ptr<storage, u32, read_write> = access %output, 0i
- store %3, 1u
- exit_if # if_1
- }
- }
- if false [t: $B4] { # if_2
- $B4: { # true
- %4:ptr<storage, u32, read_write> = access %output, 1i
- store %4, 1u
- exit_if # if_2
- }
- }
- ret
+kernel void tint_symbol(device tint_array<uint, 2>* output [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.output=output};
+ if (false) {
+ (*tint_module_vars.output)[0] = 1u;
+ }
+ if (false) {
+ (*tint_module_vars.output)[1] = 1u;
}
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/2052.wgsl.expected.ir.msl b/test/tint/bug/tint/2052.wgsl.expected.ir.msl
index 2e04a91..68df997 100644
--- a/test/tint/bug/tint/2052.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/2052.wgsl.expected.ir.msl
@@ -1,13 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* continue_execution;
+};
-thread bool continue_execution = true;
-void f() {
- continue_execution = false;
+void f(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.continue_execution) = false;
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool continue_execution = true;
- ^
-
diff --git a/test/tint/bug/tint/2069.wgsl.expected.ir.msl b/test/tint/bug/tint/2069.wgsl.expected.ir.msl
index a59c5ee..55df230 100644
--- a/test/tint/bug/tint/2069.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/2069.wgsl.expected.ir.msl
@@ -4,7 +4,11 @@
float fract;
float whole;
};
+struct tint_module_vars_struct {
+ thread modf_result_f32* v;
+};
kernel void tint_symbol() {
thread modf_result_f32 v = modf_result_f32{.fract=0.0f, .whole=1.0f};
+ tint_module_vars_struct const tint_module_vars = {.v=(&v)};
}
diff --git a/test/tint/bug/tint/2100.wgsl.expected.ir.msl b/test/tint/bug/tint/2100.wgsl.expected.ir.msl
index 9c390b3..7b04bc0 100644
--- a/test/tint/bug/tint/2100.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/2100.wgsl.expected.ir.msl
@@ -1,28 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ float4x4 matrix_view;
+ float3x3 matrix_normal;
+};
+struct tint_module_vars_struct {
+ const constant S* tint_symbol;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- matrix_view:mat4x4<f32> @offset(0)
- matrix_normal:mat3x3<f32> @offset(64)
+vertex float4 tint_symbol_1(const constant S* tint_symbol [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.tint_symbol=tint_symbol};
+ float const x = (*tint_module_vars.tint_symbol).matrix_view[0][2u];
+ return float4(x, 0.0f, 0.0f, 1.0f);
}
-
-$B1: { # root
- %tint_symbol:ptr<uniform, S, read> = var @binding_point(0, 0)
-}
-
-%tint_symbol_1 = @vertex func():vec4<f32> [@position] {
- $B2: {
- %3:ptr<uniform, vec4<f32>, read> = access %tint_symbol, 0u, 0i
- %4:f32 = load_vector_element %3, 2u
- %x:f32 = let %4
- %6:vec4<f32> = construct %x, 0.0f, 0.0f, 1.0f
- ret %6
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/2121.wgsl.expected.ir.msl b/test/tint/bug/tint/2121.wgsl.expected.ir.msl
index 4604f10..97ccd81 100644
--- a/test/tint/bug/tint/2121.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/2121.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct VSOut {
@@ -8,21 +6,10 @@
void foo(thread VSOut* const out) {
float4 pos = float4(1.0f, 2.0f, 3.0f, 4.0f);
- out.pos = pos;
+ (*out).pos = pos;
}
vertex VSOut tint_symbol() {
VSOut out = {};
- foo(out);
+ foo((&out));
return out;
}
-program_source:9:6: error: member reference type 'VSOut *const' is a pointer; did you mean to use '->'?
- out.pos = pos;
- ~~~^
- ->
-program_source:13:3: error: no matching function for call to 'foo'
- foo(out);
- ^~~
-program_source:7:6: note: candidate function not viable: no known conversion from 'VSOut' to 'VSOut *const' for 1st argument; take the address of the argument with &
-void foo(thread VSOut* const out) {
- ^
-
diff --git a/test/tint/bug/tint/2146.wgsl.expected.ir.msl b/test/tint/bug/tint/2146.wgsl.expected.ir.msl
index 0adff61..4f81f14 100644
--- a/test/tint/bug/tint/2146.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/2146.wgsl.expected.ir.msl
@@ -1,34 +1,18 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint3* localId;
+ thread uint* localIndex;
+ thread uint3* globalId;
+ thread uint3* numWorkgroups;
+ thread uint3* workgroupId;
+};
-thread uint3 localId = 0u;
-thread uint localIndex = 0u;
-thread uint3 globalId = 0u;
-thread uint3 numWorkgroups = 0u;
-thread uint3 workgroupId = 0u;
-uint globalId2Index() {
- return globalId[0u];
+uint globalId2Index(tint_module_vars_struct tint_module_vars) {
+ return (*tint_module_vars.globalId)[0u];
}
kernel void tint_symbol() {
half4 a = half4(0.0h);
half const b = 1.0h;
a[0] = (a[0] + b);
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint3 localId = 0u;
- ^
-program_source:5:13: error: program scope variable must reside in constant address space
-thread uint localIndex = 0u;
- ^
-program_source:6:14: error: program scope variable must reside in constant address space
-thread uint3 globalId = 0u;
- ^
-program_source:7:14: error: program scope variable must reside in constant address space
-thread uint3 numWorkgroups = 0u;
- ^
-program_source:8:14: error: program scope variable must reside in constant address space
-thread uint3 workgroupId = 0u;
- ^
-
diff --git a/test/tint/bug/tint/2175.wgsl.expected.ir.msl b/test/tint/bug/tint/2175.wgsl.expected.ir.msl
index c2eec40..9fda4f9 100644
--- a/test/tint/bug/tint/2175.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/2175.wgsl.expected.ir.msl
@@ -1,20 +1,10 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* tint_symbol_2;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %tint_symbol_2:ptr<storage, u32, read_write> = var @binding_point(0, 0)
+kernel void tint_symbol_3(device uint* tint_symbol_2 [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.tint_symbol_2=tint_symbol_2};
+ (*tint_module_vars.tint_symbol_2) = 0u;
}
-
-%tint_symbol_3 = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- store %tint_symbol_2, 0u
- 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/219.spvasm.expected.ir.msl b/test/tint/bug/tint/219.spvasm.expected.ir.msl
index a2c96a5..3e2ca1e 100644
--- a/test/tint/bug/tint/219.spvasm.expected.ir.msl
+++ b/test/tint/bug/tint/219.spvasm.expected.ir.msl
@@ -1,26 +1,14 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
float x_200(thread float2* const x_201) {
- float const x_212 = x_201[0u];
+ float const x_212 = (*x_201)[0u];
return x_212;
}
void main_1() {
float2 x_11 = 0.0f;
- float const x_12 = x_200(x_11);
+ float const x_12 = x_200((&x_11));
}
kernel void tint_symbol() {
main_1();
}
-program_source:5:15: error: cannot initialize a variable of type 'const float' with an lvalue of type 'float2' (vector of 2 'float' values)
- float const x_212 = x_201[0u];
- ^ ~~~~~~~~~
-program_source:10:22: error: no matching function for call to 'x_200'
- float const x_12 = x_200(x_11);
- ^~~~~
-program_source:4:7: note: candidate function not viable: no known conversion from 'float2' (vector of 2 'float' values) to 'float2 *const' for 1st argument; take the address of the argument with &
-float x_200(thread float2* const x_201) {
- ^
-
diff --git a/test/tint/bug/tint/221.wgsl.expected.ir.msl b/test/tint/bug/tint/221.wgsl.expected.ir.msl
index f430f2b..295f9e2 100644
--- a/test/tint/bug/tint/221.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/221.wgsl.expected.ir.msl
@@ -1,71 +1,47 @@
-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: Buf = struct @align(4) {
- count:u32 @offset(0)
- data:array<u32, 50> @offset(4)
+struct Buf {
+ uint count;
+ tint_array<uint, 50> data;
+};
+struct tint_module_vars_struct {
+ device Buf* b;
+};
+
+uint tint_mod_u32(uint lhs, uint rhs) {
+ uint const v = select(rhs, 1u, (rhs == 0u));
+ return (lhs - ((lhs / v) * v));
}
-
-$B1: { # root
- %b:ptr<storage, Buf, read_write> = var @binding_point(0, 0)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %i:ptr<function, u32, read_write> = var, 0u
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %4:u32 = load %i
- %5:ptr<storage, u32, read_write> = access %b, 0u
- %6:u32 = load %5
- %7:bool = gte %4, %6
- if %7 [t: $B5] { # if_1
- $B5: { # true
- exit_loop # loop_1
- }
- }
- %8:u32 = load %i
- %9:ptr<storage, u32, read_write> = access %b, 1u, %8
- %p:ptr<storage, u32, read_write> = let %9
- %11:u32 = load %i
- %12:u32 = call %tint_mod_u32, %11, 2u
- %14:bool = eq %12, 0u
- if %14 [t: $B6] { # if_2
- $B6: { # true
- continue # -> $B4
- }
- }
- store %p, 0u
- continue # -> $B4
+kernel void tint_symbol(device Buf* b [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.b=b};
+ uint i = 0u;
+ {
+ while(true) {
+ if ((i >= (*tint_module_vars.b).count)) {
+ break;
}
- $B4: { # continuing
- %15:u32 = load %p
- %16:u32 = mul %15, 2u
- store %p, %16
- %17:u32 = load %i
- %18:u32 = add %17, 1u
- store %i, %18
- next_iteration # -> $B3
+ device uint* const p = (&(*tint_module_vars.b).data[i]);
+ if ((tint_mod_u32(i, 2u) == 0u)) {
+ (*p) = ((*p) * 2u);
+ i = (i + 1u);
+ continue;
}
+ (*p) = 0u;
+ (*p) = ((*p) * 2u);
+ i = (i + 1u);
+ continue;
}
- ret
}
}
-%tint_mod_u32 = func(%lhs:u32, %rhs:u32):u32 {
- $B7: {
- %21:bool = eq %rhs, 0u
- %22:u32 = select %rhs, 1u, %21
- %23:u32 = let %22
- %24:u32 = div %lhs, %23
- %25:u32 = mul %24, %23
- %26:u32 = sub %lhs, %25
- ret %26
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/2237.wgsl.expected.ir.msl b/test/tint/bug/tint/2237.wgsl.expected.ir.msl
index bcc5b55..6e87f18 100644
--- a/test/tint/bug/tint/2237.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/2237.wgsl.expected.ir.msl
@@ -1,32 +1,26 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* tint_symbol;
+};
+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: $B1: { # root
- %tint_symbol:ptr<storage, u32, read_write> = var @binding_point(0, 0)
-}
-%foo = func():u32 {
- $B2: {
- %3:u32 = load %tint_symbol
- %4:u32 = access array<u32, 4>(0u, 1u, 2u, 4u), %3
- ret %4
- }
+uint foo(tint_module_vars_struct tint_module_vars) {
+ return tint_array<uint, 4>{0u, 1u, 2u, 4u}[(*tint_module_vars.tint_symbol)];
}
-%tint_symbol_1 = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:u32 = load %tint_symbol
- %7:u32 = access array<u32, 4>(0u, 1u, 2u, 4u), %6
- %v:u32 = let %7
- %9:u32 = call %foo
- %10:u32 = add %v, %9
- store %tint_symbol, %10
- ret
- }
+kernel void tint_symbol_1(device uint* tint_symbol [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.tint_symbol=tint_symbol};
+ uint const v = tint_array<uint, 4>{0u, 1u, 2u, 4u}[(*tint_module_vars.tint_symbol)];
+ (*tint_module_vars.tint_symbol) = (v + foo(tint_module_vars));
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/492.wgsl.expected.ir.msl b/test/tint/bug/tint/492.wgsl.expected.ir.msl
index 9891160..182a41a 100644
--- a/test/tint/bug/tint/492.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/492.wgsl.expected.ir.msl
@@ -1,26 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int a;
+};
+struct tint_module_vars_struct {
+ device S* buf;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- a:i32 @offset(0)
+kernel void tint_symbol(device S* buf [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.buf=buf};
+ device int* const p = (&(*tint_module_vars.buf).a);
+ (*p) = 12;
}
-
-$B1: { # root
- %buf:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %3:ptr<storage, i32, read_write> = access %buf, 0u
- %p:ptr<storage, i32, read_write> = let %3
- store %p, 12i
- 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/744.wgsl.expected.ir.msl b/test/tint/bug/tint/744.wgsl.expected.ir.msl
index 5989a20..bae927f 100644
--- a/test/tint/bug/tint/744.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/744.wgsl.expected.ir.msl
@@ -1,94 +1,52 @@
-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: Matrix = struct @align(4) {
- numbers:array<u32> @offset(0)
-}
+struct Matrix {
+ tint_array<uint, 1> numbers;
+};
+struct Uniforms {
+ uint2 aShape;
+ uint2 bShape;
+ uint2 outShape;
+};
+struct tint_module_vars_struct {
+ const device Matrix* firstMatrix;
+ const device Matrix* secondMatrix;
+ device Matrix* resultMatrix;
+ const constant Uniforms* uniforms;
+};
-Uniforms = struct @align(8) {
- aShape:vec2<u32> @offset(0)
- bShape:vec2<u32> @offset(8)
- outShape:vec2<u32> @offset(16)
-}
-
-$B1: { # root
- %firstMatrix:ptr<storage, Matrix, read> = var @binding_point(0, 0)
- %secondMatrix:ptr<storage, Matrix, read> = var @binding_point(0, 1)
- %resultMatrix:ptr<storage, Matrix, read_write> = var @binding_point(0, 2)
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(0, 3)
-}
-
-%tint_symbol = @compute @workgroup_size(2, 2, 1) func(%global_id:vec3<u32> [@global_invocation_id]):void {
- $B2: {
- %7:u32 = access %global_id, 1u
- %8:u32 = access %global_id, 0u
- %9:vec2<u32> = construct %7, %8
- %resultCell:vec2<u32> = let %9
- %11:ptr<uniform, vec2<u32>, read> = access %uniforms, 0u
- %12:u32 = load_vector_element %11, 1u
- %dimInner:u32 = let %12
- %14:ptr<uniform, vec2<u32>, read> = access %uniforms, 2u
- %15:u32 = load_vector_element %14, 1u
- %dimOutter:u32 = let %15
- %result:ptr<function, u32, read_write> = var, 0u
- loop [i: $B3, b: $B4, c: $B5] { # loop_1
- $B3: { # initializer
- %i:ptr<function, u32, read_write> = var, 0u
- next_iteration # -> $B4
+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)]]) {
+ tint_module_vars_struct const tint_module_vars = {.firstMatrix=firstMatrix, .secondMatrix=secondMatrix, .resultMatrix=resultMatrix, .uniforms=uniforms};
+ uint2 const resultCell = uint2(global_id[1u], global_id[0u]);
+ uint const dimInner = (*tint_module_vars.uniforms).aShape[1u];
+ uint const dimOutter = (*tint_module_vars.uniforms).outShape[1u];
+ uint result = 0u;
+ {
+ uint i = 0u;
+ while(true) {
+ if ((i < dimInner)) {
+ } else {
+ break;
}
- $B4: { # body
- %19:u32 = load %i
- %20:bool = lt %19, %dimInner
- if %20 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %21:u32 = load %i
- %22:u32 = access %resultCell, 0u
- %23:u32 = mul %22, %dimInner
- %24:u32 = add %21, %23
- %a:u32 = let %24
- %26:u32 = access %resultCell, 1u
- %27:u32 = load %i
- %28:u32 = mul %27, %dimOutter
- %29:u32 = add %26, %28
- %b:u32 = let %29
- %31:u32 = load %result
- %32:ptr<storage, u32, read> = access %firstMatrix, 0u, %a
- %33:u32 = load %32
- %34:ptr<storage, u32, read> = access %secondMatrix, 0u, %b
- %35:u32 = load %34
- %36:u32 = mul %33, %35
- %37:u32 = add %31, %36
- store %result, %37
- continue # -> $B5
- }
- $B5: { # continuing
- %38:u32 = load %i
- %39:u32 = add %38, 1u
- store %i, %39
- next_iteration # -> $B4
- }
+ uint const a = (i + (resultCell[0u] * dimInner));
+ uint const b = (resultCell[1u] + (i * dimOutter));
+ result = (result + ((*tint_module_vars.firstMatrix).numbers[a] * (*tint_module_vars.secondMatrix).numbers[b]));
+ i = (i + 1u);
+ continue;
}
- %40:u32 = access %resultCell, 1u
- %41:u32 = access %resultCell, 0u
- %42:u32 = mul %41, %dimOutter
- %43:u32 = add %40, %42
- %index:u32 = let %43
- %45:ptr<storage, u32, read_write> = access %resultMatrix, 0u, %index
- %46:u32 = load %result
- store %45, %46
- ret
}
+ uint const index = (resultCell[1u] + (resultCell[0u] * dimOutter));
+ (*tint_module_vars.resultMatrix).numbers[index] = result;
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/870.spvasm.expected.ir.msl b/test/tint/bug/tint/870.spvasm.expected.ir.msl
index 230f41d..5b030ea 100644
--- a/test/tint/bug/tint/870.spvasm.expected.ir.msl
+++ b/test/tint/bug/tint/870.spvasm.expected.ir.msl
@@ -1,58 +1,41 @@
-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: sspp962805860buildInformationS = struct @align(16) {
- footprint:vec4<f32> @offset(0)
- offset:vec4<f32> @offset(16)
- essence:i32 @offset(32)
- orientation:array<i32, 6> @offset(36)
-}
+struct sspp962805860buildInformationS {
+ float4 footprint;
+ float4 offset;
+ int essence;
+ tint_array<int, 6> orientation;
+};
+struct x_B4_BuildInformation {
+ sspp962805860buildInformationS passthru;
+};
+struct tint_module_vars_struct {
+ const device x_B4_BuildInformation* sspp962805860buildInformation;
+};
-x_B4_BuildInformation = struct @align(16) {
- passthru:sspp962805860buildInformationS @offset(0)
+void main_1(tint_module_vars_struct tint_module_vars) {
+ tint_array<int, 6> orientation = {};
+ tint_array<int, 6> const x_23 = (*tint_module_vars.sspp962805860buildInformation).passthru.orientation;
+ orientation[0] = x_23[0u];
+ orientation[1] = x_23[1u];
+ orientation[2] = x_23[2u];
+ orientation[3] = x_23[3u];
+ orientation[4] = x_23[4u];
+ orientation[5] = x_23[5u];
}
-
-$B1: { # root
- %sspp962805860buildInformation:ptr<storage, x_B4_BuildInformation, read> = var @binding_point(0, 2)
+fragment void tint_symbol(const device x_B4_BuildInformation* sspp962805860buildInformation [[buffer(2)]]) {
+ tint_module_vars_struct const tint_module_vars = {.sspp962805860buildInformation=sspp962805860buildInformation};
+ main_1(tint_module_vars);
}
-
-%main_1 = func():void {
- $B2: {
- %orientation:ptr<function, array<i32, 6>, read_write> = var
- %4:ptr<storage, array<i32, 6>, read> = access %sspp962805860buildInformation, 0u, 3u
- %5:array<i32, 6> = load %4
- %x_23:array<i32, 6> = let %5
- %7:ptr<function, i32, read_write> = access %orientation, 0i
- %8:i32 = access %x_23, 0u
- store %7, %8
- %9:ptr<function, i32, read_write> = access %orientation, 1i
- %10:i32 = access %x_23, 1u
- store %9, %10
- %11:ptr<function, i32, read_write> = access %orientation, 2i
- %12:i32 = access %x_23, 2u
- store %11, %12
- %13:ptr<function, i32, read_write> = access %orientation, 3i
- %14:i32 = access %x_23, 3u
- store %13, %14
- %15:ptr<function, i32, read_write> = access %orientation, 4i
- %16:i32 = access %x_23, 4u
- store %15, %16
- %17:ptr<function, i32, read_write> = access %orientation, 5i
- %18:i32 = access %x_23, 5u
- store %17, %18
- ret
- }
-}
-%tint_symbol = @fragment func():void {
- $B3: {
- %20:void = call %main_1
- 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/980.wgsl.expected.ir.msl b/test/tint/bug/tint/980.wgsl.expected.ir.msl
index 1ead1ce..cd2fbf9 100644
--- a/test/tint/bug/tint/980.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/980.wgsl.expected.ir.msl
@@ -1,43 +1,19 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ float3 v;
+ uint i;
+};
+struct tint_module_vars_struct {
+ device S* io;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- v:vec3<f32> @offset(0)
- i:u32 @offset(12)
+float3 Bad(uint index, float3 rd) {
+ float3 normal = float3(0.0f);
+ normal[index] = -(sign(rd[index]));
+ return normalize(normal);
}
-
-$B1: { # root
- %io:ptr<storage, S, read_write> = var @binding_point(0, 0)
+kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], device S* io [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.io=io};
+ (*tint_module_vars.io).v = Bad((*tint_module_vars.io).i, (*tint_module_vars.io).v);
}
-
-%Bad = func(%index:u32, %rd:vec3<f32>):vec3<f32> {
- $B2: {
- %normal:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(0.0f)
- %6:f32 = access %rd, %index
- %7:f32 = sign %6
- %8:f32 = negation %7
- store_vector_element %normal, %index, %8
- %9:vec3<f32> = load %normal
- %10:vec3<f32> = normalize %9
- ret %10
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func(%idx:u32 [@local_invocation_index]):void {
- $B3: {
- %13:ptr<storage, vec3<f32>, read_write> = access %io, 0u
- %14:ptr<storage, u32, read_write> = access %io, 1u
- %15:u32 = load %14
- %16:ptr<storage, vec3<f32>, read_write> = access %io, 0u
- %17:vec3<f32> = load %16
- %18:vec3<f32> = call %Bad, %15, %17
- store %13, %18
- 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/990.wgsl.expected.ir.msl b/test/tint/bug/tint/990.wgsl.expected.ir.msl
index 5c3a247..aa031c2 100644
--- a/test/tint/bug/tint/990.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/990.wgsl.expected.ir.msl
@@ -1,12 +1,10 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
void f() {
int i = 0;
{
- thread int* const p = i;
+ thread int* const p = (&i);
while(true) {
if (false) {
} else {
@@ -16,7 +14,3 @@
}
}
}
-program_source:7:23: error: cannot initialize a variable of type 'int *const' with an lvalue of type 'int'
- thread int* const p = i;
- ^ ~
-
diff --git a/test/tint/builtins/workgroupUniformLoad/array.wgsl.expected.ir.msl b/test/tint/builtins/workgroupUniformLoad/array.wgsl.expected.ir.msl
index a1f0594..d3186cf 100644
--- a/test/tint/builtins/workgroupUniformLoad/array.wgsl.expected.ir.msl
+++ b/test/tint/builtins/workgroupUniformLoad/array.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,13 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ threadgroup tint_array<int, 4>* v;
+};
-threadgroup tint_array<int, 4> v;
-tint_array<int, 4> foo() {
+tint_array<int, 4> foo(tint_module_vars_struct tint_module_vars) {
threadgroup_barrier(mem_flags::mem_threadgroup);
- tint_array<int, 4> const v_1 = v;
+ tint_array<int, 4> const v_1 = (*tint_module_vars.v);
threadgroup_barrier(mem_flags::mem_threadgroup);
return v_1;
}
-program_source:16:32: error: program scope variable must reside in constant address space
-threadgroup tint_array<int, 4> v;
- ^
-
diff --git a/test/tint/builtins/workgroupUniformLoad/array_overridable_count.wgsl.expected.ir.msl b/test/tint/builtins/workgroupUniformLoad/array_overridable_count.wgsl.expected.ir.msl
index bdcbf5f..f17071a 100644
--- a/test/tint/builtins/workgroupUniformLoad/array_overridable_count.wgsl.expected.ir.msl
+++ b/test/tint/builtins/workgroupUniformLoad/array_overridable_count.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,13 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ threadgroup tint_array<int, 128>* v;
+};
-threadgroup tint_array<int, 128> v;
-int foo() {
+int foo(tint_module_vars_struct tint_module_vars) {
threadgroup_barrier(mem_flags::mem_threadgroup);
- tint_array<int, 128> const v_1 = v;
+ tint_array<int, 128> const v_1 = (*tint_module_vars.v);
threadgroup_barrier(mem_flags::mem_threadgroup);
return v_1[0];
}
-program_source:16:34: error: program scope variable must reside in constant address space
-threadgroup tint_array<int, 128> v;
- ^
-
diff --git a/test/tint/builtins/workgroupUniformLoad/array_overridable_count_aliased.wgsl.expected.ir.msl b/test/tint/builtins/workgroupUniformLoad/array_overridable_count_aliased.wgsl.expected.ir.msl
index bdcbf5f..f17071a 100644
--- a/test/tint/builtins/workgroupUniformLoad/array_overridable_count_aliased.wgsl.expected.ir.msl
+++ b/test/tint/builtins/workgroupUniformLoad/array_overridable_count_aliased.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,13 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ threadgroup tint_array<int, 128>* v;
+};
-threadgroup tint_array<int, 128> v;
-int foo() {
+int foo(tint_module_vars_struct tint_module_vars) {
threadgroup_barrier(mem_flags::mem_threadgroup);
- tint_array<int, 128> const v_1 = v;
+ tint_array<int, 128> const v_1 = (*tint_module_vars.v);
threadgroup_barrier(mem_flags::mem_threadgroup);
return v_1[0];
}
-program_source:16:34: error: program scope variable must reside in constant address space
-threadgroup tint_array<int, 128> v;
- ^
-
diff --git a/test/tint/builtins/workgroupUniformLoad/bool.wgsl.expected.ir.msl b/test/tint/builtins/workgroupUniformLoad/bool.wgsl.expected.ir.msl
index 18a3c5d..1f5702b 100644
--- a/test/tint/builtins/workgroupUniformLoad/bool.wgsl.expected.ir.msl
+++ b/test/tint/builtins/workgroupUniformLoad/bool.wgsl.expected.ir.msl
@@ -6,7 +6,7 @@
bool foo(tint_module_vars_struct tint_module_vars) {
threadgroup_barrier(mem_flags::mem_threadgroup);
- bool const v_1 = tint_module_vars.v;
+ bool const v_1 = (*tint_module_vars.v);
threadgroup_barrier(mem_flags::mem_threadgroup);
return v_1;
}
diff --git a/test/tint/builtins/workgroupUniformLoad/for_loop.wgsl.expected.ir.msl b/test/tint/builtins/workgroupUniformLoad/for_loop.wgsl.expected.ir.msl
index 644f07b..d39052c 100644
--- a/test/tint/builtins/workgroupUniformLoad/for_loop.wgsl.expected.ir.msl
+++ b/test/tint/builtins/workgroupUniformLoad/for_loop.wgsl.expected.ir.msl
@@ -1,34 +1,27 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup int* a;
+ threadgroup int* b;
+};
-threadgroup int a;
-threadgroup int b;
-void foo() {
+void foo(tint_module_vars_struct tint_module_vars) {
{
int i = 0;
while(true) {
int const v = i;
threadgroup_barrier(mem_flags::mem_threadgroup);
- int const v_1 = a;
+ int const v_1 = (*tint_module_vars.a);
threadgroup_barrier(mem_flags::mem_threadgroup);
if ((v < v_1)) {
} else {
break;
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- int const v_2 = b;
+ int const v_2 = (*tint_module_vars.b);
threadgroup_barrier(mem_flags::mem_threadgroup);
i = (i + v_2);
continue;
}
}
}
-program_source:4:17: error: program scope variable must reside in constant address space
-threadgroup int a;
- ^
-program_source:5:17: error: program scope variable must reside in constant address space
-threadgroup int b;
- ^
-
diff --git a/test/tint/builtins/workgroupUniformLoad/if_condition.wgsl.expected.ir.msl b/test/tint/builtins/workgroupUniformLoad/if_condition.wgsl.expected.ir.msl
index 96fad06..c226646 100644
--- a/test/tint/builtins/workgroupUniformLoad/if_condition.wgsl.expected.ir.msl
+++ b/test/tint/builtins/workgroupUniformLoad/if_condition.wgsl.expected.ir.msl
@@ -6,7 +6,7 @@
int foo(tint_module_vars_struct tint_module_vars) {
threadgroup_barrier(mem_flags::mem_threadgroup);
- bool const v_1 = tint_module_vars.v;
+ bool const v_1 = (*tint_module_vars.v);
threadgroup_barrier(mem_flags::mem_threadgroup);
if (v_1) {
return 42;
diff --git a/test/tint/builtins/workgroupUniformLoad/matrix.wgsl.expected.ir.msl b/test/tint/builtins/workgroupUniformLoad/matrix.wgsl.expected.ir.msl
index a0c6ee9..97cb21c 100644
--- a/test/tint/builtins/workgroupUniformLoad/matrix.wgsl.expected.ir.msl
+++ b/test/tint/builtins/workgroupUniformLoad/matrix.wgsl.expected.ir.msl
@@ -1,16 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup float3x3* v;
+};
-threadgroup float3x3 v;
-float3x3 foo() {
+float3x3 foo(tint_module_vars_struct tint_module_vars) {
threadgroup_barrier(mem_flags::mem_threadgroup);
- float3x3 const v_1 = v;
+ float3x3 const v_1 = (*tint_module_vars.v);
threadgroup_barrier(mem_flags::mem_threadgroup);
return v_1;
}
-program_source:4:22: error: program scope variable must reside in constant address space
-threadgroup float3x3 v;
- ^
-
diff --git a/test/tint/builtins/workgroupUniformLoad/structures.wgsl.expected.ir.msl b/test/tint/builtins/workgroupUniformLoad/structures.wgsl.expected.ir.msl
index 4366a3a..cb6d218 100644
--- a/test/tint/builtins/workgroupUniformLoad/structures.wgsl.expected.ir.msl
+++ b/test/tint/builtins/workgroupUniformLoad/structures.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -22,15 +20,13 @@
struct Outer {
tint_array<Inner, 4> a;
};
+struct tint_module_vars_struct {
+ threadgroup Outer* v;
+};
-threadgroup Outer v;
-Outer foo() {
+Outer foo(tint_module_vars_struct tint_module_vars) {
threadgroup_barrier(mem_flags::mem_threadgroup);
- Outer const v_1 = v;
+ Outer const v_1 = (*tint_module_vars.v);
threadgroup_barrier(mem_flags::mem_threadgroup);
return v_1;
}
-program_source:24:19: error: program scope variable must reside in constant address space
-threadgroup Outer v;
- ^
-
diff --git a/test/tint/builtins/workgroupUniformLoad/vec.wgsl.expected.ir.msl b/test/tint/builtins/workgroupUniformLoad/vec.wgsl.expected.ir.msl
index f1ea9ea..8d06efa 100644
--- a/test/tint/builtins/workgroupUniformLoad/vec.wgsl.expected.ir.msl
+++ b/test/tint/builtins/workgroupUniformLoad/vec.wgsl.expected.ir.msl
@@ -1,16 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup float4* v;
+};
-threadgroup float4 v;
-float4 foo() {
+float4 foo(tint_module_vars_struct tint_module_vars) {
threadgroup_barrier(mem_flags::mem_threadgroup);
- float4 const v_1 = v;
+ float4 const v_1 = (*tint_module_vars.v);
threadgroup_barrier(mem_flags::mem_threadgroup);
return v_1;
}
-program_source:4:20: error: program scope variable must reside in constant address space
-threadgroup float4 v;
- ^
-
diff --git a/test/tint/builtins/workgroupUniformLoad/via_param.wgsl.expected.ir.msl b/test/tint/builtins/workgroupUniformLoad/via_param.wgsl.expected.ir.msl
index 849f561..326a9f5 100644
--- a/test/tint/builtins/workgroupUniformLoad/via_param.wgsl.expected.ir.msl
+++ b/test/tint/builtins/workgroupUniformLoad/via_param.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,21 +12,16 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ threadgroup tint_array<int, 4>* v;
+};
-threadgroup tint_array<int, 4> v;
int foo(threadgroup int* const p) {
threadgroup_barrier(mem_flags::mem_threadgroup);
- int const v_1 = p;
+ int const v_1 = (*p);
threadgroup_barrier(mem_flags::mem_threadgroup);
return v_1;
}
-int bar() {
- return foo(v[0]);
+int bar(tint_module_vars_struct tint_module_vars) {
+ return foo((&(*tint_module_vars.v)[0]));
}
-program_source:16:32: error: program scope variable must reside in constant address space
-threadgroup tint_array<int, 4> v;
- ^
-program_source:19:13: error: cannot initialize a variable of type 'const int' with an lvalue of type 'threadgroup int *const'
- int const v_1 = p;
- ^ ~
-
diff --git a/test/tint/expressions/binary/mul/mat3x2-vec3/f16.wgsl.expected.ir.msl b/test/tint/expressions/binary/mul/mat3x2-vec3/f16.wgsl.expected.ir.msl
index cc9d7eb..9fbd613 100644
--- a/test/tint/expressions/binary/mul/mat3x2-vec3/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mul/mat3x2-vec3/f16.wgsl.expected.ir.msl
@@ -1,30 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ half3x2 tint_symbol;
+ half3 vector;
+};
+struct tint_module_vars_struct {
+ const constant S* data;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(8) {
- tint_symbol:mat3x2<f16> @offset(0)
- vector:vec3<f16> @offset(16)
+fragment void tint_symbol_1(const constant S* data [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.data=data};
+ half2 const x = ((*tint_module_vars.data).tint_symbol * (*tint_module_vars.data).vector);
}
-
-$B1: { # root
- %data:ptr<uniform, S, read> = var @binding_point(0, 0)
-}
-
-%tint_symbol_1 = @fragment func():void {
- $B2: {
- %3:ptr<uniform, mat3x2<f16>, read> = access %data, 0u
- %4:mat3x2<f16> = load %3
- %5:ptr<uniform, vec3<f16>, read> = access %data, 1u
- %6:vec3<f16> = load %5
- %7:vec2<f16> = mul %4, %6
- %x:vec2<f16> = let %7
- 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/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.ir.msl
index d076ee9..4ad47b1 100644
--- a/test/tint/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.ir.msl
@@ -1,30 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ float3x2 tint_symbol;
+ float3 vector;
+};
+struct tint_module_vars_struct {
+ const constant S* data;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- tint_symbol:mat3x2<f32> @offset(0)
- vector:vec3<f32> @offset(32)
+fragment void tint_symbol_1(const constant S* data [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.data=data};
+ float2 const x = ((*tint_module_vars.data).tint_symbol * (*tint_module_vars.data).vector);
}
-
-$B1: { # root
- %data:ptr<uniform, S, read> = var @binding_point(0, 0)
-}
-
-%tint_symbol_1 = @fragment func():void {
- $B2: {
- %3:ptr<uniform, mat3x2<f32>, read> = access %data, 0u
- %4:mat3x2<f32> = load %3
- %5:ptr<uniform, vec3<f32>, read> = access %data, 1u
- %6:vec3<f32> = load %5
- %7:vec2<f32> = mul %4, %6
- %x:vec2<f32> = let %7
- 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/expressions/binary/mul/mat3x3-vec3/f16.wgsl.expected.ir.msl b/test/tint/expressions/binary/mul/mat3x3-vec3/f16.wgsl.expected.ir.msl
index 63113e5..e45d133 100644
--- a/test/tint/expressions/binary/mul/mat3x3-vec3/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mul/mat3x3-vec3/f16.wgsl.expected.ir.msl
@@ -1,30 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ half3x3 tint_symbol;
+ half3 vector;
+};
+struct tint_module_vars_struct {
+ const constant S* data;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(8) {
- tint_symbol:mat3x3<f16> @offset(0)
- vector:vec3<f16> @offset(24)
+fragment void tint_symbol_1(const constant S* data [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.data=data};
+ half3 const x = ((*tint_module_vars.data).tint_symbol * (*tint_module_vars.data).vector);
}
-
-$B1: { # root
- %data:ptr<uniform, S, read> = var @binding_point(0, 0)
-}
-
-%tint_symbol_1 = @fragment func():void {
- $B2: {
- %3:ptr<uniform, mat3x3<f16>, read> = access %data, 0u
- %4:mat3x3<f16> = load %3
- %5:ptr<uniform, vec3<f16>, read> = access %data, 1u
- %6:vec3<f16> = load %5
- %7:vec3<f16> = mul %4, %6
- %x:vec3<f16> = let %7
- 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/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.ir.msl
index bfc5a7a..90da387 100644
--- a/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.ir.msl
@@ -1,30 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ float3x3 tint_symbol;
+ float3 vector;
+};
+struct tint_module_vars_struct {
+ const constant S* data;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- tint_symbol:mat3x3<f32> @offset(0)
- vector:vec3<f32> @offset(48)
+fragment void tint_symbol_1(const constant S* data [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.data=data};
+ float3 const x = ((*tint_module_vars.data).tint_symbol * (*tint_module_vars.data).vector);
}
-
-$B1: { # root
- %data:ptr<uniform, S, read> = var @binding_point(0, 0)
-}
-
-%tint_symbol_1 = @fragment func():void {
- $B2: {
- %3:ptr<uniform, mat3x3<f32>, read> = access %data, 0u
- %4:mat3x3<f32> = load %3
- %5:ptr<uniform, vec3<f32>, read> = access %data, 1u
- %6:vec3<f32> = load %5
- %7:vec3<f32> = mul %4, %6
- %x:vec3<f32> = let %7
- 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/expressions/binary/mul/vec3-mat3x3/f16.wgsl.expected.ir.msl b/test/tint/expressions/binary/mul/vec3-mat3x3/f16.wgsl.expected.ir.msl
index 860bcf5..daa1907 100644
--- a/test/tint/expressions/binary/mul/vec3-mat3x3/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mul/vec3-mat3x3/f16.wgsl.expected.ir.msl
@@ -1,30 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ half3x3 tint_symbol;
+ half3 vector;
+};
+struct tint_module_vars_struct {
+ const constant S* data;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(8) {
- tint_symbol:mat3x3<f16> @offset(0)
- vector:vec3<f16> @offset(24)
+fragment void tint_symbol_1(const constant S* data [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.data=data};
+ half3 const x = ((*tint_module_vars.data).vector * (*tint_module_vars.data).tint_symbol);
}
-
-$B1: { # root
- %data:ptr<uniform, S, read> = var @binding_point(0, 0)
-}
-
-%tint_symbol_1 = @fragment func():void {
- $B2: {
- %3:ptr<uniform, vec3<f16>, read> = access %data, 1u
- %4:vec3<f16> = load %3
- %5:ptr<uniform, mat3x3<f16>, read> = access %data, 0u
- %6:mat3x3<f16> = load %5
- %7:vec3<f16> = mul %4, %6
- %x:vec3<f16> = let %7
- 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/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.ir.msl
index 7f4cc24..19163b7 100644
--- a/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.ir.msl
@@ -1,30 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ float3x3 tint_symbol;
+ float3 vector;
+};
+struct tint_module_vars_struct {
+ const constant S* data;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- tint_symbol:mat3x3<f32> @offset(0)
- vector:vec3<f32> @offset(48)
+fragment void tint_symbol_1(const constant S* data [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.data=data};
+ float3 const x = ((*tint_module_vars.data).vector * (*tint_module_vars.data).tint_symbol);
}
-
-$B1: { # root
- %data:ptr<uniform, S, read> = var @binding_point(0, 0)
-}
-
-%tint_symbol_1 = @fragment func():void {
- $B2: {
- %3:ptr<uniform, vec3<f32>, read> = access %data, 1u
- %4:vec3<f32> = load %3
- %5:ptr<uniform, mat3x3<f32>, read> = access %data, 0u
- %6:mat3x3<f32> = load %5
- %7:vec3<f32> = mul %4, %6
- %x:vec3<f32> = let %7
- 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/expressions/binary/mul/vec3-mat4x3/f16.wgsl.expected.ir.msl b/test/tint/expressions/binary/mul/vec3-mat4x3/f16.wgsl.expected.ir.msl
index 8af14af..cafdcab 100644
--- a/test/tint/expressions/binary/mul/vec3-mat4x3/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mul/vec3-mat4x3/f16.wgsl.expected.ir.msl
@@ -1,30 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ half4x3 tint_symbol;
+ half3 vector;
+};
+struct tint_module_vars_struct {
+ const constant S* data;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(8) {
- tint_symbol:mat4x3<f16> @offset(0)
- vector:vec3<f16> @offset(32)
+fragment void tint_symbol_1(const constant S* data [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.data=data};
+ half4 const x = ((*tint_module_vars.data).vector * (*tint_module_vars.data).tint_symbol);
}
-
-$B1: { # root
- %data:ptr<uniform, S, read> = var @binding_point(0, 0)
-}
-
-%tint_symbol_1 = @fragment func():void {
- $B2: {
- %3:ptr<uniform, vec3<f16>, read> = access %data, 1u
- %4:vec3<f16> = load %3
- %5:ptr<uniform, mat4x3<f16>, read> = access %data, 0u
- %6:mat4x3<f16> = load %5
- %7:vec4<f16> = mul %4, %6
- %x:vec4<f16> = let %7
- 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/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.ir.msl
index 09ac2b9..3f298d1 100644
--- a/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.ir.msl
@@ -1,30 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ float4x3 tint_symbol;
+ float3 vector;
+};
+struct tint_module_vars_struct {
+ const constant S* data;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- tint_symbol:mat4x3<f32> @offset(0)
- vector:vec3<f32> @offset(64)
+fragment void tint_symbol_1(const constant S* data [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.data=data};
+ float4 const x = ((*tint_module_vars.data).vector * (*tint_module_vars.data).tint_symbol);
}
-
-$B1: { # root
- %data:ptr<uniform, S, read> = var @binding_point(0, 0)
-}
-
-%tint_symbol_1 = @fragment func():void {
- $B2: {
- %3:ptr<uniform, vec3<f32>, read> = access %data, 1u
- %4:vec3<f32> = load %3
- %5:ptr<uniform, mat4x3<f32>, read> = access %data, 0u
- %6:mat4x3<f32> = load %5
- %7:vec4<f32> = mul %4, %6
- %x:vec4<f32> = let %7
- 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/expressions/swizzle/read/packed_vec3/f16.wgsl.expected.ir.msl b/test/tint/expressions/swizzle/read/packed_vec3/f16.wgsl.expected.ir.msl
index 06e17d1..13b4385 100644
--- a/test/tint/expressions/swizzle/read/packed_vec3/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/swizzle/read/packed_vec3/f16.wgsl.expected.ir.msl
@@ -1,503 +1,132 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ half3 v;
+};
+struct tint_module_vars_struct {
+ const constant S* U;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(8) {
- v:vec3<f16> @offset(0)
+void f(tint_module_vars_struct tint_module_vars) {
+ half3 v = (*tint_module_vars.U).v;
+ half x = (*tint_module_vars.U).v[0u];
+ half y = (*tint_module_vars.U).v[1u];
+ half z = (*tint_module_vars.U).v[2u];
+ half2 xx = (*tint_module_vars.U).v.xx;
+ half2 xy = (*tint_module_vars.U).v.xy;
+ half2 xz = (*tint_module_vars.U).v.xz;
+ half2 yx = (*tint_module_vars.U).v.yx;
+ half2 yy = (*tint_module_vars.U).v.yy;
+ half2 yz = (*tint_module_vars.U).v.yz;
+ half2 zx = (*tint_module_vars.U).v.zx;
+ half2 zy = (*tint_module_vars.U).v.zy;
+ half2 zz = (*tint_module_vars.U).v.zz;
+ half3 xxx = (*tint_module_vars.U).v.xxx;
+ half3 xxy = (*tint_module_vars.U).v.xxy;
+ half3 xxz = (*tint_module_vars.U).v.xxz;
+ half3 xyx = (*tint_module_vars.U).v.xyx;
+ half3 xyy = (*tint_module_vars.U).v.xyy;
+ half3 xyz = (*tint_module_vars.U).v.xyz;
+ half3 xzx = (*tint_module_vars.U).v.xzx;
+ half3 xzy = (*tint_module_vars.U).v.xzy;
+ half3 xzz = (*tint_module_vars.U).v.xzz;
+ half3 yxx = (*tint_module_vars.U).v.yxx;
+ half3 yxy = (*tint_module_vars.U).v.yxy;
+ half3 yxz = (*tint_module_vars.U).v.yxz;
+ half3 yyx = (*tint_module_vars.U).v.yyx;
+ half3 yyy = (*tint_module_vars.U).v.yyy;
+ half3 yyz = (*tint_module_vars.U).v.yyz;
+ half3 yzx = (*tint_module_vars.U).v.yzx;
+ half3 yzy = (*tint_module_vars.U).v.yzy;
+ half3 yzz = (*tint_module_vars.U).v.yzz;
+ half3 zxx = (*tint_module_vars.U).v.zxx;
+ half3 zxy = (*tint_module_vars.U).v.zxy;
+ half3 zxz = (*tint_module_vars.U).v.zxz;
+ half3 zyx = (*tint_module_vars.U).v.zyx;
+ half3 zyy = (*tint_module_vars.U).v.zyy;
+ half3 zyz = (*tint_module_vars.U).v.zyz;
+ half3 zzx = (*tint_module_vars.U).v.zzx;
+ half3 zzy = (*tint_module_vars.U).v.zzy;
+ half3 zzz = (*tint_module_vars.U).v.zzz;
+ half4 xxxx = (*tint_module_vars.U).v.xxxx;
+ half4 xxxy = (*tint_module_vars.U).v.xxxy;
+ half4 xxxz = (*tint_module_vars.U).v.xxxz;
+ half4 xxyx = (*tint_module_vars.U).v.xxyx;
+ half4 xxyy = (*tint_module_vars.U).v.xxyy;
+ half4 xxyz = (*tint_module_vars.U).v.xxyz;
+ half4 xxzx = (*tint_module_vars.U).v.xxzx;
+ half4 xxzy = (*tint_module_vars.U).v.xxzy;
+ half4 xxzz = (*tint_module_vars.U).v.xxzz;
+ half4 xyxx = (*tint_module_vars.U).v.xyxx;
+ half4 xyxy = (*tint_module_vars.U).v.xyxy;
+ half4 xyxz = (*tint_module_vars.U).v.xyxz;
+ half4 xyyx = (*tint_module_vars.U).v.xyyx;
+ half4 xyyy = (*tint_module_vars.U).v.xyyy;
+ half4 xyyz = (*tint_module_vars.U).v.xyyz;
+ half4 xyzx = (*tint_module_vars.U).v.xyzx;
+ half4 xyzy = (*tint_module_vars.U).v.xyzy;
+ half4 xyzz = (*tint_module_vars.U).v.xyzz;
+ half4 xzxx = (*tint_module_vars.U).v.xzxx;
+ half4 xzxy = (*tint_module_vars.U).v.xzxy;
+ half4 xzxz = (*tint_module_vars.U).v.xzxz;
+ half4 xzyx = (*tint_module_vars.U).v.xzyx;
+ half4 xzyy = (*tint_module_vars.U).v.xzyy;
+ half4 xzyz = (*tint_module_vars.U).v.xzyz;
+ half4 xzzx = (*tint_module_vars.U).v.xzzx;
+ half4 xzzy = (*tint_module_vars.U).v.xzzy;
+ half4 xzzz = (*tint_module_vars.U).v.xzzz;
+ half4 yxxx = (*tint_module_vars.U).v.yxxx;
+ half4 yxxy = (*tint_module_vars.U).v.yxxy;
+ half4 yxxz = (*tint_module_vars.U).v.yxxz;
+ half4 yxyx = (*tint_module_vars.U).v.yxyx;
+ half4 yxyy = (*tint_module_vars.U).v.yxyy;
+ half4 yxyz = (*tint_module_vars.U).v.yxyz;
+ half4 yxzx = (*tint_module_vars.U).v.yxzx;
+ half4 yxzy = (*tint_module_vars.U).v.yxzy;
+ half4 yxzz = (*tint_module_vars.U).v.yxzz;
+ half4 yyxx = (*tint_module_vars.U).v.yyxx;
+ half4 yyxy = (*tint_module_vars.U).v.yyxy;
+ half4 yyxz = (*tint_module_vars.U).v.yyxz;
+ half4 yyyx = (*tint_module_vars.U).v.yyyx;
+ half4 yyyy = (*tint_module_vars.U).v.yyyy;
+ half4 yyyz = (*tint_module_vars.U).v.yyyz;
+ half4 yyzx = (*tint_module_vars.U).v.yyzx;
+ half4 yyzy = (*tint_module_vars.U).v.yyzy;
+ half4 yyzz = (*tint_module_vars.U).v.yyzz;
+ half4 yzxx = (*tint_module_vars.U).v.yzxx;
+ half4 yzxy = (*tint_module_vars.U).v.yzxy;
+ half4 yzxz = (*tint_module_vars.U).v.yzxz;
+ half4 yzyx = (*tint_module_vars.U).v.yzyx;
+ half4 yzyy = (*tint_module_vars.U).v.yzyy;
+ half4 yzyz = (*tint_module_vars.U).v.yzyz;
+ half4 yzzx = (*tint_module_vars.U).v.yzzx;
+ half4 yzzy = (*tint_module_vars.U).v.yzzy;
+ half4 yzzz = (*tint_module_vars.U).v.yzzz;
+ half4 zxxx = (*tint_module_vars.U).v.zxxx;
+ half4 zxxy = (*tint_module_vars.U).v.zxxy;
+ half4 zxxz = (*tint_module_vars.U).v.zxxz;
+ half4 zxyx = (*tint_module_vars.U).v.zxyx;
+ half4 zxyy = (*tint_module_vars.U).v.zxyy;
+ half4 zxyz = (*tint_module_vars.U).v.zxyz;
+ half4 zxzx = (*tint_module_vars.U).v.zxzx;
+ half4 zxzy = (*tint_module_vars.U).v.zxzy;
+ half4 zxzz = (*tint_module_vars.U).v.zxzz;
+ half4 zyxx = (*tint_module_vars.U).v.zyxx;
+ half4 zyxy = (*tint_module_vars.U).v.zyxy;
+ half4 zyxz = (*tint_module_vars.U).v.zyxz;
+ half4 zyyx = (*tint_module_vars.U).v.zyyx;
+ half4 zyyy = (*tint_module_vars.U).v.zyyy;
+ half4 zyyz = (*tint_module_vars.U).v.zyyz;
+ half4 zyzx = (*tint_module_vars.U).v.zyzx;
+ half4 zyzy = (*tint_module_vars.U).v.zyzy;
+ half4 zyzz = (*tint_module_vars.U).v.zyzz;
+ half4 zzxx = (*tint_module_vars.U).v.zzxx;
+ half4 zzxy = (*tint_module_vars.U).v.zzxy;
+ half4 zzxz = (*tint_module_vars.U).v.zzxz;
+ half4 zzyx = (*tint_module_vars.U).v.zzyx;
+ half4 zzyy = (*tint_module_vars.U).v.zzyy;
+ half4 zzyz = (*tint_module_vars.U).v.zzyz;
+ half4 zzzx = (*tint_module_vars.U).v.zzzx;
+ half4 zzzy = (*tint_module_vars.U).v.zzzy;
+ half4 zzzz = (*tint_module_vars.U).v.zzzz;
}
-
-$B1: { # root
- %U:ptr<uniform, S, read> = var @binding_point(0, 0)
-}
-
-%f = func():void {
- $B2: {
- %3:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %4:vec3<f16> = load %3
- %v:ptr<function, vec3<f16>, read_write> = var, %4
- %6:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %7:f16 = load_vector_element %6, 0u
- %x:ptr<function, f16, read_write> = var, %7
- %9:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %10:f16 = load_vector_element %9, 1u
- %y:ptr<function, f16, read_write> = var, %10
- %12:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %13:f16 = load_vector_element %12, 2u
- %z:ptr<function, f16, read_write> = var, %13
- %15:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %16:vec3<f16> = load %15
- %17:vec2<f16> = swizzle %16, xx
- %xx:ptr<function, vec2<f16>, read_write> = var, %17
- %19:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %20:vec3<f16> = load %19
- %21:vec2<f16> = swizzle %20, xy
- %xy:ptr<function, vec2<f16>, read_write> = var, %21
- %23:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %24:vec3<f16> = load %23
- %25:vec2<f16> = swizzle %24, xz
- %xz:ptr<function, vec2<f16>, read_write> = var, %25
- %27:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %28:vec3<f16> = load %27
- %29:vec2<f16> = swizzle %28, yx
- %yx:ptr<function, vec2<f16>, read_write> = var, %29
- %31:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %32:vec3<f16> = load %31
- %33:vec2<f16> = swizzle %32, yy
- %yy:ptr<function, vec2<f16>, read_write> = var, %33
- %35:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %36:vec3<f16> = load %35
- %37:vec2<f16> = swizzle %36, yz
- %yz:ptr<function, vec2<f16>, read_write> = var, %37
- %39:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %40:vec3<f16> = load %39
- %41:vec2<f16> = swizzle %40, zx
- %zx:ptr<function, vec2<f16>, read_write> = var, %41
- %43:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %44:vec3<f16> = load %43
- %45:vec2<f16> = swizzle %44, zy
- %zy:ptr<function, vec2<f16>, read_write> = var, %45
- %47:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %48:vec3<f16> = load %47
- %49:vec2<f16> = swizzle %48, zz
- %zz:ptr<function, vec2<f16>, read_write> = var, %49
- %51:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %52:vec3<f16> = load %51
- %53:vec3<f16> = swizzle %52, xxx
- %xxx:ptr<function, vec3<f16>, read_write> = var, %53
- %55:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %56:vec3<f16> = load %55
- %57:vec3<f16> = swizzle %56, xxy
- %xxy:ptr<function, vec3<f16>, read_write> = var, %57
- %59:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %60:vec3<f16> = load %59
- %61:vec3<f16> = swizzle %60, xxz
- %xxz:ptr<function, vec3<f16>, read_write> = var, %61
- %63:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %64:vec3<f16> = load %63
- %65:vec3<f16> = swizzle %64, xyx
- %xyx:ptr<function, vec3<f16>, read_write> = var, %65
- %67:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %68:vec3<f16> = load %67
- %69:vec3<f16> = swizzle %68, xyy
- %xyy:ptr<function, vec3<f16>, read_write> = var, %69
- %71:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %72:vec3<f16> = load %71
- %73:vec3<f16> = swizzle %72, xyz
- %xyz:ptr<function, vec3<f16>, read_write> = var, %73
- %75:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %76:vec3<f16> = load %75
- %77:vec3<f16> = swizzle %76, xzx
- %xzx:ptr<function, vec3<f16>, read_write> = var, %77
- %79:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %80:vec3<f16> = load %79
- %81:vec3<f16> = swizzle %80, xzy
- %xzy:ptr<function, vec3<f16>, read_write> = var, %81
- %83:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %84:vec3<f16> = load %83
- %85:vec3<f16> = swizzle %84, xzz
- %xzz:ptr<function, vec3<f16>, read_write> = var, %85
- %87:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %88:vec3<f16> = load %87
- %89:vec3<f16> = swizzle %88, yxx
- %yxx:ptr<function, vec3<f16>, read_write> = var, %89
- %91:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %92:vec3<f16> = load %91
- %93:vec3<f16> = swizzle %92, yxy
- %yxy:ptr<function, vec3<f16>, read_write> = var, %93
- %95:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %96:vec3<f16> = load %95
- %97:vec3<f16> = swizzle %96, yxz
- %yxz:ptr<function, vec3<f16>, read_write> = var, %97
- %99:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %100:vec3<f16> = load %99
- %101:vec3<f16> = swizzle %100, yyx
- %yyx:ptr<function, vec3<f16>, read_write> = var, %101
- %103:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %104:vec3<f16> = load %103
- %105:vec3<f16> = swizzle %104, yyy
- %yyy:ptr<function, vec3<f16>, read_write> = var, %105
- %107:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %108:vec3<f16> = load %107
- %109:vec3<f16> = swizzle %108, yyz
- %yyz:ptr<function, vec3<f16>, read_write> = var, %109
- %111:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %112:vec3<f16> = load %111
- %113:vec3<f16> = swizzle %112, yzx
- %yzx:ptr<function, vec3<f16>, read_write> = var, %113
- %115:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %116:vec3<f16> = load %115
- %117:vec3<f16> = swizzle %116, yzy
- %yzy:ptr<function, vec3<f16>, read_write> = var, %117
- %119:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %120:vec3<f16> = load %119
- %121:vec3<f16> = swizzle %120, yzz
- %yzz:ptr<function, vec3<f16>, read_write> = var, %121
- %123:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %124:vec3<f16> = load %123
- %125:vec3<f16> = swizzle %124, zxx
- %zxx:ptr<function, vec3<f16>, read_write> = var, %125
- %127:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %128:vec3<f16> = load %127
- %129:vec3<f16> = swizzle %128, zxy
- %zxy:ptr<function, vec3<f16>, read_write> = var, %129
- %131:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %132:vec3<f16> = load %131
- %133:vec3<f16> = swizzle %132, zxz
- %zxz:ptr<function, vec3<f16>, read_write> = var, %133
- %135:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %136:vec3<f16> = load %135
- %137:vec3<f16> = swizzle %136, zyx
- %zyx:ptr<function, vec3<f16>, read_write> = var, %137
- %139:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %140:vec3<f16> = load %139
- %141:vec3<f16> = swizzle %140, zyy
- %zyy:ptr<function, vec3<f16>, read_write> = var, %141
- %143:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %144:vec3<f16> = load %143
- %145:vec3<f16> = swizzle %144, zyz
- %zyz:ptr<function, vec3<f16>, read_write> = var, %145
- %147:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %148:vec3<f16> = load %147
- %149:vec3<f16> = swizzle %148, zzx
- %zzx:ptr<function, vec3<f16>, read_write> = var, %149
- %151:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %152:vec3<f16> = load %151
- %153:vec3<f16> = swizzle %152, zzy
- %zzy:ptr<function, vec3<f16>, read_write> = var, %153
- %155:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %156:vec3<f16> = load %155
- %157:vec3<f16> = swizzle %156, zzz
- %zzz:ptr<function, vec3<f16>, read_write> = var, %157
- %159:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %160:vec3<f16> = load %159
- %161:vec4<f16> = swizzle %160, xxxx
- %xxxx:ptr<function, vec4<f16>, read_write> = var, %161
- %163:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %164:vec3<f16> = load %163
- %165:vec4<f16> = swizzle %164, xxxy
- %xxxy:ptr<function, vec4<f16>, read_write> = var, %165
- %167:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %168:vec3<f16> = load %167
- %169:vec4<f16> = swizzle %168, xxxz
- %xxxz:ptr<function, vec4<f16>, read_write> = var, %169
- %171:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %172:vec3<f16> = load %171
- %173:vec4<f16> = swizzle %172, xxyx
- %xxyx:ptr<function, vec4<f16>, read_write> = var, %173
- %175:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %176:vec3<f16> = load %175
- %177:vec4<f16> = swizzle %176, xxyy
- %xxyy:ptr<function, vec4<f16>, read_write> = var, %177
- %179:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %180:vec3<f16> = load %179
- %181:vec4<f16> = swizzle %180, xxyz
- %xxyz:ptr<function, vec4<f16>, read_write> = var, %181
- %183:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %184:vec3<f16> = load %183
- %185:vec4<f16> = swizzle %184, xxzx
- %xxzx:ptr<function, vec4<f16>, read_write> = var, %185
- %187:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %188:vec3<f16> = load %187
- %189:vec4<f16> = swizzle %188, xxzy
- %xxzy:ptr<function, vec4<f16>, read_write> = var, %189
- %191:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %192:vec3<f16> = load %191
- %193:vec4<f16> = swizzle %192, xxzz
- %xxzz:ptr<function, vec4<f16>, read_write> = var, %193
- %195:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %196:vec3<f16> = load %195
- %197:vec4<f16> = swizzle %196, xyxx
- %xyxx:ptr<function, vec4<f16>, read_write> = var, %197
- %199:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %200:vec3<f16> = load %199
- %201:vec4<f16> = swizzle %200, xyxy
- %xyxy:ptr<function, vec4<f16>, read_write> = var, %201
- %203:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %204:vec3<f16> = load %203
- %205:vec4<f16> = swizzle %204, xyxz
- %xyxz:ptr<function, vec4<f16>, read_write> = var, %205
- %207:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %208:vec3<f16> = load %207
- %209:vec4<f16> = swizzle %208, xyyx
- %xyyx:ptr<function, vec4<f16>, read_write> = var, %209
- %211:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %212:vec3<f16> = load %211
- %213:vec4<f16> = swizzle %212, xyyy
- %xyyy:ptr<function, vec4<f16>, read_write> = var, %213
- %215:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %216:vec3<f16> = load %215
- %217:vec4<f16> = swizzle %216, xyyz
- %xyyz:ptr<function, vec4<f16>, read_write> = var, %217
- %219:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %220:vec3<f16> = load %219
- %221:vec4<f16> = swizzle %220, xyzx
- %xyzx:ptr<function, vec4<f16>, read_write> = var, %221
- %223:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %224:vec3<f16> = load %223
- %225:vec4<f16> = swizzle %224, xyzy
- %xyzy:ptr<function, vec4<f16>, read_write> = var, %225
- %227:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %228:vec3<f16> = load %227
- %229:vec4<f16> = swizzle %228, xyzz
- %xyzz:ptr<function, vec4<f16>, read_write> = var, %229
- %231:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %232:vec3<f16> = load %231
- %233:vec4<f16> = swizzle %232, xzxx
- %xzxx:ptr<function, vec4<f16>, read_write> = var, %233
- %235:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %236:vec3<f16> = load %235
- %237:vec4<f16> = swizzle %236, xzxy
- %xzxy:ptr<function, vec4<f16>, read_write> = var, %237
- %239:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %240:vec3<f16> = load %239
- %241:vec4<f16> = swizzle %240, xzxz
- %xzxz:ptr<function, vec4<f16>, read_write> = var, %241
- %243:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %244:vec3<f16> = load %243
- %245:vec4<f16> = swizzle %244, xzyx
- %xzyx:ptr<function, vec4<f16>, read_write> = var, %245
- %247:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %248:vec3<f16> = load %247
- %249:vec4<f16> = swizzle %248, xzyy
- %xzyy:ptr<function, vec4<f16>, read_write> = var, %249
- %251:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %252:vec3<f16> = load %251
- %253:vec4<f16> = swizzle %252, xzyz
- %xzyz:ptr<function, vec4<f16>, read_write> = var, %253
- %255:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %256:vec3<f16> = load %255
- %257:vec4<f16> = swizzle %256, xzzx
- %xzzx:ptr<function, vec4<f16>, read_write> = var, %257
- %259:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %260:vec3<f16> = load %259
- %261:vec4<f16> = swizzle %260, xzzy
- %xzzy:ptr<function, vec4<f16>, read_write> = var, %261
- %263:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %264:vec3<f16> = load %263
- %265:vec4<f16> = swizzle %264, xzzz
- %xzzz:ptr<function, vec4<f16>, read_write> = var, %265
- %267:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %268:vec3<f16> = load %267
- %269:vec4<f16> = swizzle %268, yxxx
- %yxxx:ptr<function, vec4<f16>, read_write> = var, %269
- %271:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %272:vec3<f16> = load %271
- %273:vec4<f16> = swizzle %272, yxxy
- %yxxy:ptr<function, vec4<f16>, read_write> = var, %273
- %275:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %276:vec3<f16> = load %275
- %277:vec4<f16> = swizzle %276, yxxz
- %yxxz:ptr<function, vec4<f16>, read_write> = var, %277
- %279:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %280:vec3<f16> = load %279
- %281:vec4<f16> = swizzle %280, yxyx
- %yxyx:ptr<function, vec4<f16>, read_write> = var, %281
- %283:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %284:vec3<f16> = load %283
- %285:vec4<f16> = swizzle %284, yxyy
- %yxyy:ptr<function, vec4<f16>, read_write> = var, %285
- %287:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %288:vec3<f16> = load %287
- %289:vec4<f16> = swizzle %288, yxyz
- %yxyz:ptr<function, vec4<f16>, read_write> = var, %289
- %291:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %292:vec3<f16> = load %291
- %293:vec4<f16> = swizzle %292, yxzx
- %yxzx:ptr<function, vec4<f16>, read_write> = var, %293
- %295:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %296:vec3<f16> = load %295
- %297:vec4<f16> = swizzle %296, yxzy
- %yxzy:ptr<function, vec4<f16>, read_write> = var, %297
- %299:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %300:vec3<f16> = load %299
- %301:vec4<f16> = swizzle %300, yxzz
- %yxzz:ptr<function, vec4<f16>, read_write> = var, %301
- %303:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %304:vec3<f16> = load %303
- %305:vec4<f16> = swizzle %304, yyxx
- %yyxx:ptr<function, vec4<f16>, read_write> = var, %305
- %307:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %308:vec3<f16> = load %307
- %309:vec4<f16> = swizzle %308, yyxy
- %yyxy:ptr<function, vec4<f16>, read_write> = var, %309
- %311:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %312:vec3<f16> = load %311
- %313:vec4<f16> = swizzle %312, yyxz
- %yyxz:ptr<function, vec4<f16>, read_write> = var, %313
- %315:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %316:vec3<f16> = load %315
- %317:vec4<f16> = swizzle %316, yyyx
- %yyyx:ptr<function, vec4<f16>, read_write> = var, %317
- %319:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %320:vec3<f16> = load %319
- %321:vec4<f16> = swizzle %320, yyyy
- %yyyy:ptr<function, vec4<f16>, read_write> = var, %321
- %323:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %324:vec3<f16> = load %323
- %325:vec4<f16> = swizzle %324, yyyz
- %yyyz:ptr<function, vec4<f16>, read_write> = var, %325
- %327:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %328:vec3<f16> = load %327
- %329:vec4<f16> = swizzle %328, yyzx
- %yyzx:ptr<function, vec4<f16>, read_write> = var, %329
- %331:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %332:vec3<f16> = load %331
- %333:vec4<f16> = swizzle %332, yyzy
- %yyzy:ptr<function, vec4<f16>, read_write> = var, %333
- %335:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %336:vec3<f16> = load %335
- %337:vec4<f16> = swizzle %336, yyzz
- %yyzz:ptr<function, vec4<f16>, read_write> = var, %337
- %339:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %340:vec3<f16> = load %339
- %341:vec4<f16> = swizzle %340, yzxx
- %yzxx:ptr<function, vec4<f16>, read_write> = var, %341
- %343:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %344:vec3<f16> = load %343
- %345:vec4<f16> = swizzle %344, yzxy
- %yzxy:ptr<function, vec4<f16>, read_write> = var, %345
- %347:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %348:vec3<f16> = load %347
- %349:vec4<f16> = swizzle %348, yzxz
- %yzxz:ptr<function, vec4<f16>, read_write> = var, %349
- %351:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %352:vec3<f16> = load %351
- %353:vec4<f16> = swizzle %352, yzyx
- %yzyx:ptr<function, vec4<f16>, read_write> = var, %353
- %355:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %356:vec3<f16> = load %355
- %357:vec4<f16> = swizzle %356, yzyy
- %yzyy:ptr<function, vec4<f16>, read_write> = var, %357
- %359:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %360:vec3<f16> = load %359
- %361:vec4<f16> = swizzle %360, yzyz
- %yzyz:ptr<function, vec4<f16>, read_write> = var, %361
- %363:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %364:vec3<f16> = load %363
- %365:vec4<f16> = swizzle %364, yzzx
- %yzzx:ptr<function, vec4<f16>, read_write> = var, %365
- %367:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %368:vec3<f16> = load %367
- %369:vec4<f16> = swizzle %368, yzzy
- %yzzy:ptr<function, vec4<f16>, read_write> = var, %369
- %371:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %372:vec3<f16> = load %371
- %373:vec4<f16> = swizzle %372, yzzz
- %yzzz:ptr<function, vec4<f16>, read_write> = var, %373
- %375:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %376:vec3<f16> = load %375
- %377:vec4<f16> = swizzle %376, zxxx
- %zxxx:ptr<function, vec4<f16>, read_write> = var, %377
- %379:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %380:vec3<f16> = load %379
- %381:vec4<f16> = swizzle %380, zxxy
- %zxxy:ptr<function, vec4<f16>, read_write> = var, %381
- %383:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %384:vec3<f16> = load %383
- %385:vec4<f16> = swizzle %384, zxxz
- %zxxz:ptr<function, vec4<f16>, read_write> = var, %385
- %387:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %388:vec3<f16> = load %387
- %389:vec4<f16> = swizzle %388, zxyx
- %zxyx:ptr<function, vec4<f16>, read_write> = var, %389
- %391:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %392:vec3<f16> = load %391
- %393:vec4<f16> = swizzle %392, zxyy
- %zxyy:ptr<function, vec4<f16>, read_write> = var, %393
- %395:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %396:vec3<f16> = load %395
- %397:vec4<f16> = swizzle %396, zxyz
- %zxyz:ptr<function, vec4<f16>, read_write> = var, %397
- %399:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %400:vec3<f16> = load %399
- %401:vec4<f16> = swizzle %400, zxzx
- %zxzx:ptr<function, vec4<f16>, read_write> = var, %401
- %403:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %404:vec3<f16> = load %403
- %405:vec4<f16> = swizzle %404, zxzy
- %zxzy:ptr<function, vec4<f16>, read_write> = var, %405
- %407:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %408:vec3<f16> = load %407
- %409:vec4<f16> = swizzle %408, zxzz
- %zxzz:ptr<function, vec4<f16>, read_write> = var, %409
- %411:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %412:vec3<f16> = load %411
- %413:vec4<f16> = swizzle %412, zyxx
- %zyxx:ptr<function, vec4<f16>, read_write> = var, %413
- %415:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %416:vec3<f16> = load %415
- %417:vec4<f16> = swizzle %416, zyxy
- %zyxy:ptr<function, vec4<f16>, read_write> = var, %417
- %419:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %420:vec3<f16> = load %419
- %421:vec4<f16> = swizzle %420, zyxz
- %zyxz:ptr<function, vec4<f16>, read_write> = var, %421
- %423:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %424:vec3<f16> = load %423
- %425:vec4<f16> = swizzle %424, zyyx
- %zyyx:ptr<function, vec4<f16>, read_write> = var, %425
- %427:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %428:vec3<f16> = load %427
- %429:vec4<f16> = swizzle %428, zyyy
- %zyyy:ptr<function, vec4<f16>, read_write> = var, %429
- %431:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %432:vec3<f16> = load %431
- %433:vec4<f16> = swizzle %432, zyyz
- %zyyz:ptr<function, vec4<f16>, read_write> = var, %433
- %435:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %436:vec3<f16> = load %435
- %437:vec4<f16> = swizzle %436, zyzx
- %zyzx:ptr<function, vec4<f16>, read_write> = var, %437
- %439:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %440:vec3<f16> = load %439
- %441:vec4<f16> = swizzle %440, zyzy
- %zyzy:ptr<function, vec4<f16>, read_write> = var, %441
- %443:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %444:vec3<f16> = load %443
- %445:vec4<f16> = swizzle %444, zyzz
- %zyzz:ptr<function, vec4<f16>, read_write> = var, %445
- %447:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %448:vec3<f16> = load %447
- %449:vec4<f16> = swizzle %448, zzxx
- %zzxx:ptr<function, vec4<f16>, read_write> = var, %449
- %451:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %452:vec3<f16> = load %451
- %453:vec4<f16> = swizzle %452, zzxy
- %zzxy:ptr<function, vec4<f16>, read_write> = var, %453
- %455:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %456:vec3<f16> = load %455
- %457:vec4<f16> = swizzle %456, zzxz
- %zzxz:ptr<function, vec4<f16>, read_write> = var, %457
- %459:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %460:vec3<f16> = load %459
- %461:vec4<f16> = swizzle %460, zzyx
- %zzyx:ptr<function, vec4<f16>, read_write> = var, %461
- %463:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %464:vec3<f16> = load %463
- %465:vec4<f16> = swizzle %464, zzyy
- %zzyy:ptr<function, vec4<f16>, read_write> = var, %465
- %467:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %468:vec3<f16> = load %467
- %469:vec4<f16> = swizzle %468, zzyz
- %zzyz:ptr<function, vec4<f16>, read_write> = var, %469
- %471:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %472:vec3<f16> = load %471
- %473:vec4<f16> = swizzle %472, zzzx
- %zzzx:ptr<function, vec4<f16>, read_write> = var, %473
- %475:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %476:vec3<f16> = load %475
- %477:vec4<f16> = swizzle %476, zzzy
- %zzzy:ptr<function, vec4<f16>, read_write> = var, %477
- %479:ptr<uniform, vec3<f16>, read> = access %U, 0u
- %480:vec3<f16> = load %479
- %481:vec4<f16> = swizzle %480, zzzz
- %zzzz:ptr<function, vec4<f16>, read_write> = var, %481
- 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/expressions/swizzle/read/packed_vec3/f32.wgsl.expected.ir.msl b/test/tint/expressions/swizzle/read/packed_vec3/f32.wgsl.expected.ir.msl
index b5bdd28..805cc3c 100644
--- a/test/tint/expressions/swizzle/read/packed_vec3/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/swizzle/read/packed_vec3/f32.wgsl.expected.ir.msl
@@ -1,503 +1,132 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ float3 v;
+};
+struct tint_module_vars_struct {
+ const constant S* U;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- v:vec3<f32> @offset(0)
+void f(tint_module_vars_struct tint_module_vars) {
+ float3 v = (*tint_module_vars.U).v;
+ float x = (*tint_module_vars.U).v[0u];
+ float y = (*tint_module_vars.U).v[1u];
+ float z = (*tint_module_vars.U).v[2u];
+ float2 xx = (*tint_module_vars.U).v.xx;
+ float2 xy = (*tint_module_vars.U).v.xy;
+ float2 xz = (*tint_module_vars.U).v.xz;
+ float2 yx = (*tint_module_vars.U).v.yx;
+ float2 yy = (*tint_module_vars.U).v.yy;
+ float2 yz = (*tint_module_vars.U).v.yz;
+ float2 zx = (*tint_module_vars.U).v.zx;
+ float2 zy = (*tint_module_vars.U).v.zy;
+ float2 zz = (*tint_module_vars.U).v.zz;
+ float3 xxx = (*tint_module_vars.U).v.xxx;
+ float3 xxy = (*tint_module_vars.U).v.xxy;
+ float3 xxz = (*tint_module_vars.U).v.xxz;
+ float3 xyx = (*tint_module_vars.U).v.xyx;
+ float3 xyy = (*tint_module_vars.U).v.xyy;
+ float3 xyz = (*tint_module_vars.U).v.xyz;
+ float3 xzx = (*tint_module_vars.U).v.xzx;
+ float3 xzy = (*tint_module_vars.U).v.xzy;
+ float3 xzz = (*tint_module_vars.U).v.xzz;
+ float3 yxx = (*tint_module_vars.U).v.yxx;
+ float3 yxy = (*tint_module_vars.U).v.yxy;
+ float3 yxz = (*tint_module_vars.U).v.yxz;
+ float3 yyx = (*tint_module_vars.U).v.yyx;
+ float3 yyy = (*tint_module_vars.U).v.yyy;
+ float3 yyz = (*tint_module_vars.U).v.yyz;
+ float3 yzx = (*tint_module_vars.U).v.yzx;
+ float3 yzy = (*tint_module_vars.U).v.yzy;
+ float3 yzz = (*tint_module_vars.U).v.yzz;
+ float3 zxx = (*tint_module_vars.U).v.zxx;
+ float3 zxy = (*tint_module_vars.U).v.zxy;
+ float3 zxz = (*tint_module_vars.U).v.zxz;
+ float3 zyx = (*tint_module_vars.U).v.zyx;
+ float3 zyy = (*tint_module_vars.U).v.zyy;
+ float3 zyz = (*tint_module_vars.U).v.zyz;
+ float3 zzx = (*tint_module_vars.U).v.zzx;
+ float3 zzy = (*tint_module_vars.U).v.zzy;
+ float3 zzz = (*tint_module_vars.U).v.zzz;
+ float4 xxxx = (*tint_module_vars.U).v.xxxx;
+ float4 xxxy = (*tint_module_vars.U).v.xxxy;
+ float4 xxxz = (*tint_module_vars.U).v.xxxz;
+ float4 xxyx = (*tint_module_vars.U).v.xxyx;
+ float4 xxyy = (*tint_module_vars.U).v.xxyy;
+ float4 xxyz = (*tint_module_vars.U).v.xxyz;
+ float4 xxzx = (*tint_module_vars.U).v.xxzx;
+ float4 xxzy = (*tint_module_vars.U).v.xxzy;
+ float4 xxzz = (*tint_module_vars.U).v.xxzz;
+ float4 xyxx = (*tint_module_vars.U).v.xyxx;
+ float4 xyxy = (*tint_module_vars.U).v.xyxy;
+ float4 xyxz = (*tint_module_vars.U).v.xyxz;
+ float4 xyyx = (*tint_module_vars.U).v.xyyx;
+ float4 xyyy = (*tint_module_vars.U).v.xyyy;
+ float4 xyyz = (*tint_module_vars.U).v.xyyz;
+ float4 xyzx = (*tint_module_vars.U).v.xyzx;
+ float4 xyzy = (*tint_module_vars.U).v.xyzy;
+ float4 xyzz = (*tint_module_vars.U).v.xyzz;
+ float4 xzxx = (*tint_module_vars.U).v.xzxx;
+ float4 xzxy = (*tint_module_vars.U).v.xzxy;
+ float4 xzxz = (*tint_module_vars.U).v.xzxz;
+ float4 xzyx = (*tint_module_vars.U).v.xzyx;
+ float4 xzyy = (*tint_module_vars.U).v.xzyy;
+ float4 xzyz = (*tint_module_vars.U).v.xzyz;
+ float4 xzzx = (*tint_module_vars.U).v.xzzx;
+ float4 xzzy = (*tint_module_vars.U).v.xzzy;
+ float4 xzzz = (*tint_module_vars.U).v.xzzz;
+ float4 yxxx = (*tint_module_vars.U).v.yxxx;
+ float4 yxxy = (*tint_module_vars.U).v.yxxy;
+ float4 yxxz = (*tint_module_vars.U).v.yxxz;
+ float4 yxyx = (*tint_module_vars.U).v.yxyx;
+ float4 yxyy = (*tint_module_vars.U).v.yxyy;
+ float4 yxyz = (*tint_module_vars.U).v.yxyz;
+ float4 yxzx = (*tint_module_vars.U).v.yxzx;
+ float4 yxzy = (*tint_module_vars.U).v.yxzy;
+ float4 yxzz = (*tint_module_vars.U).v.yxzz;
+ float4 yyxx = (*tint_module_vars.U).v.yyxx;
+ float4 yyxy = (*tint_module_vars.U).v.yyxy;
+ float4 yyxz = (*tint_module_vars.U).v.yyxz;
+ float4 yyyx = (*tint_module_vars.U).v.yyyx;
+ float4 yyyy = (*tint_module_vars.U).v.yyyy;
+ float4 yyyz = (*tint_module_vars.U).v.yyyz;
+ float4 yyzx = (*tint_module_vars.U).v.yyzx;
+ float4 yyzy = (*tint_module_vars.U).v.yyzy;
+ float4 yyzz = (*tint_module_vars.U).v.yyzz;
+ float4 yzxx = (*tint_module_vars.U).v.yzxx;
+ float4 yzxy = (*tint_module_vars.U).v.yzxy;
+ float4 yzxz = (*tint_module_vars.U).v.yzxz;
+ float4 yzyx = (*tint_module_vars.U).v.yzyx;
+ float4 yzyy = (*tint_module_vars.U).v.yzyy;
+ float4 yzyz = (*tint_module_vars.U).v.yzyz;
+ float4 yzzx = (*tint_module_vars.U).v.yzzx;
+ float4 yzzy = (*tint_module_vars.U).v.yzzy;
+ float4 yzzz = (*tint_module_vars.U).v.yzzz;
+ float4 zxxx = (*tint_module_vars.U).v.zxxx;
+ float4 zxxy = (*tint_module_vars.U).v.zxxy;
+ float4 zxxz = (*tint_module_vars.U).v.zxxz;
+ float4 zxyx = (*tint_module_vars.U).v.zxyx;
+ float4 zxyy = (*tint_module_vars.U).v.zxyy;
+ float4 zxyz = (*tint_module_vars.U).v.zxyz;
+ float4 zxzx = (*tint_module_vars.U).v.zxzx;
+ float4 zxzy = (*tint_module_vars.U).v.zxzy;
+ float4 zxzz = (*tint_module_vars.U).v.zxzz;
+ float4 zyxx = (*tint_module_vars.U).v.zyxx;
+ float4 zyxy = (*tint_module_vars.U).v.zyxy;
+ float4 zyxz = (*tint_module_vars.U).v.zyxz;
+ float4 zyyx = (*tint_module_vars.U).v.zyyx;
+ float4 zyyy = (*tint_module_vars.U).v.zyyy;
+ float4 zyyz = (*tint_module_vars.U).v.zyyz;
+ float4 zyzx = (*tint_module_vars.U).v.zyzx;
+ float4 zyzy = (*tint_module_vars.U).v.zyzy;
+ float4 zyzz = (*tint_module_vars.U).v.zyzz;
+ float4 zzxx = (*tint_module_vars.U).v.zzxx;
+ float4 zzxy = (*tint_module_vars.U).v.zzxy;
+ float4 zzxz = (*tint_module_vars.U).v.zzxz;
+ float4 zzyx = (*tint_module_vars.U).v.zzyx;
+ float4 zzyy = (*tint_module_vars.U).v.zzyy;
+ float4 zzyz = (*tint_module_vars.U).v.zzyz;
+ float4 zzzx = (*tint_module_vars.U).v.zzzx;
+ float4 zzzy = (*tint_module_vars.U).v.zzzy;
+ float4 zzzz = (*tint_module_vars.U).v.zzzz;
}
-
-$B1: { # root
- %U:ptr<uniform, S, read> = var @binding_point(0, 0)
-}
-
-%f = func():void {
- $B2: {
- %3:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %4:vec3<f32> = load %3
- %v:ptr<function, vec3<f32>, read_write> = var, %4
- %6:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %7:f32 = load_vector_element %6, 0u
- %x:ptr<function, f32, read_write> = var, %7
- %9:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %10:f32 = load_vector_element %9, 1u
- %y:ptr<function, f32, read_write> = var, %10
- %12:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %13:f32 = load_vector_element %12, 2u
- %z:ptr<function, f32, read_write> = var, %13
- %15:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %16:vec3<f32> = load %15
- %17:vec2<f32> = swizzle %16, xx
- %xx:ptr<function, vec2<f32>, read_write> = var, %17
- %19:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %20:vec3<f32> = load %19
- %21:vec2<f32> = swizzle %20, xy
- %xy:ptr<function, vec2<f32>, read_write> = var, %21
- %23:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %24:vec3<f32> = load %23
- %25:vec2<f32> = swizzle %24, xz
- %xz:ptr<function, vec2<f32>, read_write> = var, %25
- %27:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %28:vec3<f32> = load %27
- %29:vec2<f32> = swizzle %28, yx
- %yx:ptr<function, vec2<f32>, read_write> = var, %29
- %31:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %32:vec3<f32> = load %31
- %33:vec2<f32> = swizzle %32, yy
- %yy:ptr<function, vec2<f32>, read_write> = var, %33
- %35:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %36:vec3<f32> = load %35
- %37:vec2<f32> = swizzle %36, yz
- %yz:ptr<function, vec2<f32>, read_write> = var, %37
- %39:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %40:vec3<f32> = load %39
- %41:vec2<f32> = swizzle %40, zx
- %zx:ptr<function, vec2<f32>, read_write> = var, %41
- %43:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %44:vec3<f32> = load %43
- %45:vec2<f32> = swizzle %44, zy
- %zy:ptr<function, vec2<f32>, read_write> = var, %45
- %47:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %48:vec3<f32> = load %47
- %49:vec2<f32> = swizzle %48, zz
- %zz:ptr<function, vec2<f32>, read_write> = var, %49
- %51:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %52:vec3<f32> = load %51
- %53:vec3<f32> = swizzle %52, xxx
- %xxx:ptr<function, vec3<f32>, read_write> = var, %53
- %55:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %56:vec3<f32> = load %55
- %57:vec3<f32> = swizzle %56, xxy
- %xxy:ptr<function, vec3<f32>, read_write> = var, %57
- %59:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %60:vec3<f32> = load %59
- %61:vec3<f32> = swizzle %60, xxz
- %xxz:ptr<function, vec3<f32>, read_write> = var, %61
- %63:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %64:vec3<f32> = load %63
- %65:vec3<f32> = swizzle %64, xyx
- %xyx:ptr<function, vec3<f32>, read_write> = var, %65
- %67:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %68:vec3<f32> = load %67
- %69:vec3<f32> = swizzle %68, xyy
- %xyy:ptr<function, vec3<f32>, read_write> = var, %69
- %71:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %72:vec3<f32> = load %71
- %73:vec3<f32> = swizzle %72, xyz
- %xyz:ptr<function, vec3<f32>, read_write> = var, %73
- %75:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %76:vec3<f32> = load %75
- %77:vec3<f32> = swizzle %76, xzx
- %xzx:ptr<function, vec3<f32>, read_write> = var, %77
- %79:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %80:vec3<f32> = load %79
- %81:vec3<f32> = swizzle %80, xzy
- %xzy:ptr<function, vec3<f32>, read_write> = var, %81
- %83:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %84:vec3<f32> = load %83
- %85:vec3<f32> = swizzle %84, xzz
- %xzz:ptr<function, vec3<f32>, read_write> = var, %85
- %87:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %88:vec3<f32> = load %87
- %89:vec3<f32> = swizzle %88, yxx
- %yxx:ptr<function, vec3<f32>, read_write> = var, %89
- %91:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %92:vec3<f32> = load %91
- %93:vec3<f32> = swizzle %92, yxy
- %yxy:ptr<function, vec3<f32>, read_write> = var, %93
- %95:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %96:vec3<f32> = load %95
- %97:vec3<f32> = swizzle %96, yxz
- %yxz:ptr<function, vec3<f32>, read_write> = var, %97
- %99:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %100:vec3<f32> = load %99
- %101:vec3<f32> = swizzle %100, yyx
- %yyx:ptr<function, vec3<f32>, read_write> = var, %101
- %103:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %104:vec3<f32> = load %103
- %105:vec3<f32> = swizzle %104, yyy
- %yyy:ptr<function, vec3<f32>, read_write> = var, %105
- %107:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %108:vec3<f32> = load %107
- %109:vec3<f32> = swizzle %108, yyz
- %yyz:ptr<function, vec3<f32>, read_write> = var, %109
- %111:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %112:vec3<f32> = load %111
- %113:vec3<f32> = swizzle %112, yzx
- %yzx:ptr<function, vec3<f32>, read_write> = var, %113
- %115:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %116:vec3<f32> = load %115
- %117:vec3<f32> = swizzle %116, yzy
- %yzy:ptr<function, vec3<f32>, read_write> = var, %117
- %119:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %120:vec3<f32> = load %119
- %121:vec3<f32> = swizzle %120, yzz
- %yzz:ptr<function, vec3<f32>, read_write> = var, %121
- %123:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %124:vec3<f32> = load %123
- %125:vec3<f32> = swizzle %124, zxx
- %zxx:ptr<function, vec3<f32>, read_write> = var, %125
- %127:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %128:vec3<f32> = load %127
- %129:vec3<f32> = swizzle %128, zxy
- %zxy:ptr<function, vec3<f32>, read_write> = var, %129
- %131:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %132:vec3<f32> = load %131
- %133:vec3<f32> = swizzle %132, zxz
- %zxz:ptr<function, vec3<f32>, read_write> = var, %133
- %135:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %136:vec3<f32> = load %135
- %137:vec3<f32> = swizzle %136, zyx
- %zyx:ptr<function, vec3<f32>, read_write> = var, %137
- %139:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %140:vec3<f32> = load %139
- %141:vec3<f32> = swizzle %140, zyy
- %zyy:ptr<function, vec3<f32>, read_write> = var, %141
- %143:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %144:vec3<f32> = load %143
- %145:vec3<f32> = swizzle %144, zyz
- %zyz:ptr<function, vec3<f32>, read_write> = var, %145
- %147:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %148:vec3<f32> = load %147
- %149:vec3<f32> = swizzle %148, zzx
- %zzx:ptr<function, vec3<f32>, read_write> = var, %149
- %151:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %152:vec3<f32> = load %151
- %153:vec3<f32> = swizzle %152, zzy
- %zzy:ptr<function, vec3<f32>, read_write> = var, %153
- %155:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %156:vec3<f32> = load %155
- %157:vec3<f32> = swizzle %156, zzz
- %zzz:ptr<function, vec3<f32>, read_write> = var, %157
- %159:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %160:vec3<f32> = load %159
- %161:vec4<f32> = swizzle %160, xxxx
- %xxxx:ptr<function, vec4<f32>, read_write> = var, %161
- %163:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %164:vec3<f32> = load %163
- %165:vec4<f32> = swizzle %164, xxxy
- %xxxy:ptr<function, vec4<f32>, read_write> = var, %165
- %167:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %168:vec3<f32> = load %167
- %169:vec4<f32> = swizzle %168, xxxz
- %xxxz:ptr<function, vec4<f32>, read_write> = var, %169
- %171:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %172:vec3<f32> = load %171
- %173:vec4<f32> = swizzle %172, xxyx
- %xxyx:ptr<function, vec4<f32>, read_write> = var, %173
- %175:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %176:vec3<f32> = load %175
- %177:vec4<f32> = swizzle %176, xxyy
- %xxyy:ptr<function, vec4<f32>, read_write> = var, %177
- %179:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %180:vec3<f32> = load %179
- %181:vec4<f32> = swizzle %180, xxyz
- %xxyz:ptr<function, vec4<f32>, read_write> = var, %181
- %183:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %184:vec3<f32> = load %183
- %185:vec4<f32> = swizzle %184, xxzx
- %xxzx:ptr<function, vec4<f32>, read_write> = var, %185
- %187:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %188:vec3<f32> = load %187
- %189:vec4<f32> = swizzle %188, xxzy
- %xxzy:ptr<function, vec4<f32>, read_write> = var, %189
- %191:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %192:vec3<f32> = load %191
- %193:vec4<f32> = swizzle %192, xxzz
- %xxzz:ptr<function, vec4<f32>, read_write> = var, %193
- %195:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %196:vec3<f32> = load %195
- %197:vec4<f32> = swizzle %196, xyxx
- %xyxx:ptr<function, vec4<f32>, read_write> = var, %197
- %199:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %200:vec3<f32> = load %199
- %201:vec4<f32> = swizzle %200, xyxy
- %xyxy:ptr<function, vec4<f32>, read_write> = var, %201
- %203:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %204:vec3<f32> = load %203
- %205:vec4<f32> = swizzle %204, xyxz
- %xyxz:ptr<function, vec4<f32>, read_write> = var, %205
- %207:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %208:vec3<f32> = load %207
- %209:vec4<f32> = swizzle %208, xyyx
- %xyyx:ptr<function, vec4<f32>, read_write> = var, %209
- %211:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %212:vec3<f32> = load %211
- %213:vec4<f32> = swizzle %212, xyyy
- %xyyy:ptr<function, vec4<f32>, read_write> = var, %213
- %215:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %216:vec3<f32> = load %215
- %217:vec4<f32> = swizzle %216, xyyz
- %xyyz:ptr<function, vec4<f32>, read_write> = var, %217
- %219:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %220:vec3<f32> = load %219
- %221:vec4<f32> = swizzle %220, xyzx
- %xyzx:ptr<function, vec4<f32>, read_write> = var, %221
- %223:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %224:vec3<f32> = load %223
- %225:vec4<f32> = swizzle %224, xyzy
- %xyzy:ptr<function, vec4<f32>, read_write> = var, %225
- %227:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %228:vec3<f32> = load %227
- %229:vec4<f32> = swizzle %228, xyzz
- %xyzz:ptr<function, vec4<f32>, read_write> = var, %229
- %231:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %232:vec3<f32> = load %231
- %233:vec4<f32> = swizzle %232, xzxx
- %xzxx:ptr<function, vec4<f32>, read_write> = var, %233
- %235:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %236:vec3<f32> = load %235
- %237:vec4<f32> = swizzle %236, xzxy
- %xzxy:ptr<function, vec4<f32>, read_write> = var, %237
- %239:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %240:vec3<f32> = load %239
- %241:vec4<f32> = swizzle %240, xzxz
- %xzxz:ptr<function, vec4<f32>, read_write> = var, %241
- %243:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %244:vec3<f32> = load %243
- %245:vec4<f32> = swizzle %244, xzyx
- %xzyx:ptr<function, vec4<f32>, read_write> = var, %245
- %247:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %248:vec3<f32> = load %247
- %249:vec4<f32> = swizzle %248, xzyy
- %xzyy:ptr<function, vec4<f32>, read_write> = var, %249
- %251:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %252:vec3<f32> = load %251
- %253:vec4<f32> = swizzle %252, xzyz
- %xzyz:ptr<function, vec4<f32>, read_write> = var, %253
- %255:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %256:vec3<f32> = load %255
- %257:vec4<f32> = swizzle %256, xzzx
- %xzzx:ptr<function, vec4<f32>, read_write> = var, %257
- %259:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %260:vec3<f32> = load %259
- %261:vec4<f32> = swizzle %260, xzzy
- %xzzy:ptr<function, vec4<f32>, read_write> = var, %261
- %263:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %264:vec3<f32> = load %263
- %265:vec4<f32> = swizzle %264, xzzz
- %xzzz:ptr<function, vec4<f32>, read_write> = var, %265
- %267:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %268:vec3<f32> = load %267
- %269:vec4<f32> = swizzle %268, yxxx
- %yxxx:ptr<function, vec4<f32>, read_write> = var, %269
- %271:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %272:vec3<f32> = load %271
- %273:vec4<f32> = swizzle %272, yxxy
- %yxxy:ptr<function, vec4<f32>, read_write> = var, %273
- %275:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %276:vec3<f32> = load %275
- %277:vec4<f32> = swizzle %276, yxxz
- %yxxz:ptr<function, vec4<f32>, read_write> = var, %277
- %279:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %280:vec3<f32> = load %279
- %281:vec4<f32> = swizzle %280, yxyx
- %yxyx:ptr<function, vec4<f32>, read_write> = var, %281
- %283:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %284:vec3<f32> = load %283
- %285:vec4<f32> = swizzle %284, yxyy
- %yxyy:ptr<function, vec4<f32>, read_write> = var, %285
- %287:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %288:vec3<f32> = load %287
- %289:vec4<f32> = swizzle %288, yxyz
- %yxyz:ptr<function, vec4<f32>, read_write> = var, %289
- %291:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %292:vec3<f32> = load %291
- %293:vec4<f32> = swizzle %292, yxzx
- %yxzx:ptr<function, vec4<f32>, read_write> = var, %293
- %295:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %296:vec3<f32> = load %295
- %297:vec4<f32> = swizzle %296, yxzy
- %yxzy:ptr<function, vec4<f32>, read_write> = var, %297
- %299:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %300:vec3<f32> = load %299
- %301:vec4<f32> = swizzle %300, yxzz
- %yxzz:ptr<function, vec4<f32>, read_write> = var, %301
- %303:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %304:vec3<f32> = load %303
- %305:vec4<f32> = swizzle %304, yyxx
- %yyxx:ptr<function, vec4<f32>, read_write> = var, %305
- %307:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %308:vec3<f32> = load %307
- %309:vec4<f32> = swizzle %308, yyxy
- %yyxy:ptr<function, vec4<f32>, read_write> = var, %309
- %311:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %312:vec3<f32> = load %311
- %313:vec4<f32> = swizzle %312, yyxz
- %yyxz:ptr<function, vec4<f32>, read_write> = var, %313
- %315:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %316:vec3<f32> = load %315
- %317:vec4<f32> = swizzle %316, yyyx
- %yyyx:ptr<function, vec4<f32>, read_write> = var, %317
- %319:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %320:vec3<f32> = load %319
- %321:vec4<f32> = swizzle %320, yyyy
- %yyyy:ptr<function, vec4<f32>, read_write> = var, %321
- %323:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %324:vec3<f32> = load %323
- %325:vec4<f32> = swizzle %324, yyyz
- %yyyz:ptr<function, vec4<f32>, read_write> = var, %325
- %327:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %328:vec3<f32> = load %327
- %329:vec4<f32> = swizzle %328, yyzx
- %yyzx:ptr<function, vec4<f32>, read_write> = var, %329
- %331:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %332:vec3<f32> = load %331
- %333:vec4<f32> = swizzle %332, yyzy
- %yyzy:ptr<function, vec4<f32>, read_write> = var, %333
- %335:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %336:vec3<f32> = load %335
- %337:vec4<f32> = swizzle %336, yyzz
- %yyzz:ptr<function, vec4<f32>, read_write> = var, %337
- %339:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %340:vec3<f32> = load %339
- %341:vec4<f32> = swizzle %340, yzxx
- %yzxx:ptr<function, vec4<f32>, read_write> = var, %341
- %343:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %344:vec3<f32> = load %343
- %345:vec4<f32> = swizzle %344, yzxy
- %yzxy:ptr<function, vec4<f32>, read_write> = var, %345
- %347:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %348:vec3<f32> = load %347
- %349:vec4<f32> = swizzle %348, yzxz
- %yzxz:ptr<function, vec4<f32>, read_write> = var, %349
- %351:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %352:vec3<f32> = load %351
- %353:vec4<f32> = swizzle %352, yzyx
- %yzyx:ptr<function, vec4<f32>, read_write> = var, %353
- %355:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %356:vec3<f32> = load %355
- %357:vec4<f32> = swizzle %356, yzyy
- %yzyy:ptr<function, vec4<f32>, read_write> = var, %357
- %359:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %360:vec3<f32> = load %359
- %361:vec4<f32> = swizzle %360, yzyz
- %yzyz:ptr<function, vec4<f32>, read_write> = var, %361
- %363:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %364:vec3<f32> = load %363
- %365:vec4<f32> = swizzle %364, yzzx
- %yzzx:ptr<function, vec4<f32>, read_write> = var, %365
- %367:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %368:vec3<f32> = load %367
- %369:vec4<f32> = swizzle %368, yzzy
- %yzzy:ptr<function, vec4<f32>, read_write> = var, %369
- %371:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %372:vec3<f32> = load %371
- %373:vec4<f32> = swizzle %372, yzzz
- %yzzz:ptr<function, vec4<f32>, read_write> = var, %373
- %375:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %376:vec3<f32> = load %375
- %377:vec4<f32> = swizzle %376, zxxx
- %zxxx:ptr<function, vec4<f32>, read_write> = var, %377
- %379:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %380:vec3<f32> = load %379
- %381:vec4<f32> = swizzle %380, zxxy
- %zxxy:ptr<function, vec4<f32>, read_write> = var, %381
- %383:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %384:vec3<f32> = load %383
- %385:vec4<f32> = swizzle %384, zxxz
- %zxxz:ptr<function, vec4<f32>, read_write> = var, %385
- %387:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %388:vec3<f32> = load %387
- %389:vec4<f32> = swizzle %388, zxyx
- %zxyx:ptr<function, vec4<f32>, read_write> = var, %389
- %391:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %392:vec3<f32> = load %391
- %393:vec4<f32> = swizzle %392, zxyy
- %zxyy:ptr<function, vec4<f32>, read_write> = var, %393
- %395:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %396:vec3<f32> = load %395
- %397:vec4<f32> = swizzle %396, zxyz
- %zxyz:ptr<function, vec4<f32>, read_write> = var, %397
- %399:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %400:vec3<f32> = load %399
- %401:vec4<f32> = swizzle %400, zxzx
- %zxzx:ptr<function, vec4<f32>, read_write> = var, %401
- %403:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %404:vec3<f32> = load %403
- %405:vec4<f32> = swizzle %404, zxzy
- %zxzy:ptr<function, vec4<f32>, read_write> = var, %405
- %407:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %408:vec3<f32> = load %407
- %409:vec4<f32> = swizzle %408, zxzz
- %zxzz:ptr<function, vec4<f32>, read_write> = var, %409
- %411:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %412:vec3<f32> = load %411
- %413:vec4<f32> = swizzle %412, zyxx
- %zyxx:ptr<function, vec4<f32>, read_write> = var, %413
- %415:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %416:vec3<f32> = load %415
- %417:vec4<f32> = swizzle %416, zyxy
- %zyxy:ptr<function, vec4<f32>, read_write> = var, %417
- %419:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %420:vec3<f32> = load %419
- %421:vec4<f32> = swizzle %420, zyxz
- %zyxz:ptr<function, vec4<f32>, read_write> = var, %421
- %423:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %424:vec3<f32> = load %423
- %425:vec4<f32> = swizzle %424, zyyx
- %zyyx:ptr<function, vec4<f32>, read_write> = var, %425
- %427:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %428:vec3<f32> = load %427
- %429:vec4<f32> = swizzle %428, zyyy
- %zyyy:ptr<function, vec4<f32>, read_write> = var, %429
- %431:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %432:vec3<f32> = load %431
- %433:vec4<f32> = swizzle %432, zyyz
- %zyyz:ptr<function, vec4<f32>, read_write> = var, %433
- %435:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %436:vec3<f32> = load %435
- %437:vec4<f32> = swizzle %436, zyzx
- %zyzx:ptr<function, vec4<f32>, read_write> = var, %437
- %439:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %440:vec3<f32> = load %439
- %441:vec4<f32> = swizzle %440, zyzy
- %zyzy:ptr<function, vec4<f32>, read_write> = var, %441
- %443:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %444:vec3<f32> = load %443
- %445:vec4<f32> = swizzle %444, zyzz
- %zyzz:ptr<function, vec4<f32>, read_write> = var, %445
- %447:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %448:vec3<f32> = load %447
- %449:vec4<f32> = swizzle %448, zzxx
- %zzxx:ptr<function, vec4<f32>, read_write> = var, %449
- %451:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %452:vec3<f32> = load %451
- %453:vec4<f32> = swizzle %452, zzxy
- %zzxy:ptr<function, vec4<f32>, read_write> = var, %453
- %455:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %456:vec3<f32> = load %455
- %457:vec4<f32> = swizzle %456, zzxz
- %zzxz:ptr<function, vec4<f32>, read_write> = var, %457
- %459:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %460:vec3<f32> = load %459
- %461:vec4<f32> = swizzle %460, zzyx
- %zzyx:ptr<function, vec4<f32>, read_write> = var, %461
- %463:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %464:vec3<f32> = load %463
- %465:vec4<f32> = swizzle %464, zzyy
- %zzyy:ptr<function, vec4<f32>, read_write> = var, %465
- %467:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %468:vec3<f32> = load %467
- %469:vec4<f32> = swizzle %468, zzyz
- %zzyz:ptr<function, vec4<f32>, read_write> = var, %469
- %471:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %472:vec3<f32> = load %471
- %473:vec4<f32> = swizzle %472, zzzx
- %zzzx:ptr<function, vec4<f32>, read_write> = var, %473
- %475:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %476:vec3<f32> = load %475
- %477:vec4<f32> = swizzle %476, zzzy
- %zzzy:ptr<function, vec4<f32>, read_write> = var, %477
- %479:ptr<uniform, vec3<f32>, read> = access %U, 0u
- %480:vec3<f32> = load %479
- %481:vec4<f32> = swizzle %480, zzzz
- %zzzz:ptr<function, vec4<f32>, read_write> = var, %481
- 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/expressions/swizzle/read/packed_vec3/i32.wgsl.expected.ir.msl b/test/tint/expressions/swizzle/read/packed_vec3/i32.wgsl.expected.ir.msl
index 37e6cd7..4bf3efe 100644
--- a/test/tint/expressions/swizzle/read/packed_vec3/i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/swizzle/read/packed_vec3/i32.wgsl.expected.ir.msl
@@ -1,503 +1,132 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int3 v;
+};
+struct tint_module_vars_struct {
+ const constant S* U;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- v:vec3<i32> @offset(0)
+void f(tint_module_vars_struct tint_module_vars) {
+ int3 v = (*tint_module_vars.U).v;
+ int x = (*tint_module_vars.U).v[0u];
+ int y = (*tint_module_vars.U).v[1u];
+ int z = (*tint_module_vars.U).v[2u];
+ int2 xx = (*tint_module_vars.U).v.xx;
+ int2 xy = (*tint_module_vars.U).v.xy;
+ int2 xz = (*tint_module_vars.U).v.xz;
+ int2 yx = (*tint_module_vars.U).v.yx;
+ int2 yy = (*tint_module_vars.U).v.yy;
+ int2 yz = (*tint_module_vars.U).v.yz;
+ int2 zx = (*tint_module_vars.U).v.zx;
+ int2 zy = (*tint_module_vars.U).v.zy;
+ int2 zz = (*tint_module_vars.U).v.zz;
+ int3 xxx = (*tint_module_vars.U).v.xxx;
+ int3 xxy = (*tint_module_vars.U).v.xxy;
+ int3 xxz = (*tint_module_vars.U).v.xxz;
+ int3 xyx = (*tint_module_vars.U).v.xyx;
+ int3 xyy = (*tint_module_vars.U).v.xyy;
+ int3 xyz = (*tint_module_vars.U).v.xyz;
+ int3 xzx = (*tint_module_vars.U).v.xzx;
+ int3 xzy = (*tint_module_vars.U).v.xzy;
+ int3 xzz = (*tint_module_vars.U).v.xzz;
+ int3 yxx = (*tint_module_vars.U).v.yxx;
+ int3 yxy = (*tint_module_vars.U).v.yxy;
+ int3 yxz = (*tint_module_vars.U).v.yxz;
+ int3 yyx = (*tint_module_vars.U).v.yyx;
+ int3 yyy = (*tint_module_vars.U).v.yyy;
+ int3 yyz = (*tint_module_vars.U).v.yyz;
+ int3 yzx = (*tint_module_vars.U).v.yzx;
+ int3 yzy = (*tint_module_vars.U).v.yzy;
+ int3 yzz = (*tint_module_vars.U).v.yzz;
+ int3 zxx = (*tint_module_vars.U).v.zxx;
+ int3 zxy = (*tint_module_vars.U).v.zxy;
+ int3 zxz = (*tint_module_vars.U).v.zxz;
+ int3 zyx = (*tint_module_vars.U).v.zyx;
+ int3 zyy = (*tint_module_vars.U).v.zyy;
+ int3 zyz = (*tint_module_vars.U).v.zyz;
+ int3 zzx = (*tint_module_vars.U).v.zzx;
+ int3 zzy = (*tint_module_vars.U).v.zzy;
+ int3 zzz = (*tint_module_vars.U).v.zzz;
+ int4 xxxx = (*tint_module_vars.U).v.xxxx;
+ int4 xxxy = (*tint_module_vars.U).v.xxxy;
+ int4 xxxz = (*tint_module_vars.U).v.xxxz;
+ int4 xxyx = (*tint_module_vars.U).v.xxyx;
+ int4 xxyy = (*tint_module_vars.U).v.xxyy;
+ int4 xxyz = (*tint_module_vars.U).v.xxyz;
+ int4 xxzx = (*tint_module_vars.U).v.xxzx;
+ int4 xxzy = (*tint_module_vars.U).v.xxzy;
+ int4 xxzz = (*tint_module_vars.U).v.xxzz;
+ int4 xyxx = (*tint_module_vars.U).v.xyxx;
+ int4 xyxy = (*tint_module_vars.U).v.xyxy;
+ int4 xyxz = (*tint_module_vars.U).v.xyxz;
+ int4 xyyx = (*tint_module_vars.U).v.xyyx;
+ int4 xyyy = (*tint_module_vars.U).v.xyyy;
+ int4 xyyz = (*tint_module_vars.U).v.xyyz;
+ int4 xyzx = (*tint_module_vars.U).v.xyzx;
+ int4 xyzy = (*tint_module_vars.U).v.xyzy;
+ int4 xyzz = (*tint_module_vars.U).v.xyzz;
+ int4 xzxx = (*tint_module_vars.U).v.xzxx;
+ int4 xzxy = (*tint_module_vars.U).v.xzxy;
+ int4 xzxz = (*tint_module_vars.U).v.xzxz;
+ int4 xzyx = (*tint_module_vars.U).v.xzyx;
+ int4 xzyy = (*tint_module_vars.U).v.xzyy;
+ int4 xzyz = (*tint_module_vars.U).v.xzyz;
+ int4 xzzx = (*tint_module_vars.U).v.xzzx;
+ int4 xzzy = (*tint_module_vars.U).v.xzzy;
+ int4 xzzz = (*tint_module_vars.U).v.xzzz;
+ int4 yxxx = (*tint_module_vars.U).v.yxxx;
+ int4 yxxy = (*tint_module_vars.U).v.yxxy;
+ int4 yxxz = (*tint_module_vars.U).v.yxxz;
+ int4 yxyx = (*tint_module_vars.U).v.yxyx;
+ int4 yxyy = (*tint_module_vars.U).v.yxyy;
+ int4 yxyz = (*tint_module_vars.U).v.yxyz;
+ int4 yxzx = (*tint_module_vars.U).v.yxzx;
+ int4 yxzy = (*tint_module_vars.U).v.yxzy;
+ int4 yxzz = (*tint_module_vars.U).v.yxzz;
+ int4 yyxx = (*tint_module_vars.U).v.yyxx;
+ int4 yyxy = (*tint_module_vars.U).v.yyxy;
+ int4 yyxz = (*tint_module_vars.U).v.yyxz;
+ int4 yyyx = (*tint_module_vars.U).v.yyyx;
+ int4 yyyy = (*tint_module_vars.U).v.yyyy;
+ int4 yyyz = (*tint_module_vars.U).v.yyyz;
+ int4 yyzx = (*tint_module_vars.U).v.yyzx;
+ int4 yyzy = (*tint_module_vars.U).v.yyzy;
+ int4 yyzz = (*tint_module_vars.U).v.yyzz;
+ int4 yzxx = (*tint_module_vars.U).v.yzxx;
+ int4 yzxy = (*tint_module_vars.U).v.yzxy;
+ int4 yzxz = (*tint_module_vars.U).v.yzxz;
+ int4 yzyx = (*tint_module_vars.U).v.yzyx;
+ int4 yzyy = (*tint_module_vars.U).v.yzyy;
+ int4 yzyz = (*tint_module_vars.U).v.yzyz;
+ int4 yzzx = (*tint_module_vars.U).v.yzzx;
+ int4 yzzy = (*tint_module_vars.U).v.yzzy;
+ int4 yzzz = (*tint_module_vars.U).v.yzzz;
+ int4 zxxx = (*tint_module_vars.U).v.zxxx;
+ int4 zxxy = (*tint_module_vars.U).v.zxxy;
+ int4 zxxz = (*tint_module_vars.U).v.zxxz;
+ int4 zxyx = (*tint_module_vars.U).v.zxyx;
+ int4 zxyy = (*tint_module_vars.U).v.zxyy;
+ int4 zxyz = (*tint_module_vars.U).v.zxyz;
+ int4 zxzx = (*tint_module_vars.U).v.zxzx;
+ int4 zxzy = (*tint_module_vars.U).v.zxzy;
+ int4 zxzz = (*tint_module_vars.U).v.zxzz;
+ int4 zyxx = (*tint_module_vars.U).v.zyxx;
+ int4 zyxy = (*tint_module_vars.U).v.zyxy;
+ int4 zyxz = (*tint_module_vars.U).v.zyxz;
+ int4 zyyx = (*tint_module_vars.U).v.zyyx;
+ int4 zyyy = (*tint_module_vars.U).v.zyyy;
+ int4 zyyz = (*tint_module_vars.U).v.zyyz;
+ int4 zyzx = (*tint_module_vars.U).v.zyzx;
+ int4 zyzy = (*tint_module_vars.U).v.zyzy;
+ int4 zyzz = (*tint_module_vars.U).v.zyzz;
+ int4 zzxx = (*tint_module_vars.U).v.zzxx;
+ int4 zzxy = (*tint_module_vars.U).v.zzxy;
+ int4 zzxz = (*tint_module_vars.U).v.zzxz;
+ int4 zzyx = (*tint_module_vars.U).v.zzyx;
+ int4 zzyy = (*tint_module_vars.U).v.zzyy;
+ int4 zzyz = (*tint_module_vars.U).v.zzyz;
+ int4 zzzx = (*tint_module_vars.U).v.zzzx;
+ int4 zzzy = (*tint_module_vars.U).v.zzzy;
+ int4 zzzz = (*tint_module_vars.U).v.zzzz;
}
-
-$B1: { # root
- %U:ptr<uniform, S, read> = var @binding_point(0, 0)
-}
-
-%f = func():void {
- $B2: {
- %3:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %4:vec3<i32> = load %3
- %v:ptr<function, vec3<i32>, read_write> = var, %4
- %6:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %7:i32 = load_vector_element %6, 0u
- %x:ptr<function, i32, read_write> = var, %7
- %9:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %10:i32 = load_vector_element %9, 1u
- %y:ptr<function, i32, read_write> = var, %10
- %12:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %13:i32 = load_vector_element %12, 2u
- %z:ptr<function, i32, read_write> = var, %13
- %15:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %16:vec3<i32> = load %15
- %17:vec2<i32> = swizzle %16, xx
- %xx:ptr<function, vec2<i32>, read_write> = var, %17
- %19:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %20:vec3<i32> = load %19
- %21:vec2<i32> = swizzle %20, xy
- %xy:ptr<function, vec2<i32>, read_write> = var, %21
- %23:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %24:vec3<i32> = load %23
- %25:vec2<i32> = swizzle %24, xz
- %xz:ptr<function, vec2<i32>, read_write> = var, %25
- %27:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %28:vec3<i32> = load %27
- %29:vec2<i32> = swizzle %28, yx
- %yx:ptr<function, vec2<i32>, read_write> = var, %29
- %31:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %32:vec3<i32> = load %31
- %33:vec2<i32> = swizzle %32, yy
- %yy:ptr<function, vec2<i32>, read_write> = var, %33
- %35:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %36:vec3<i32> = load %35
- %37:vec2<i32> = swizzle %36, yz
- %yz:ptr<function, vec2<i32>, read_write> = var, %37
- %39:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %40:vec3<i32> = load %39
- %41:vec2<i32> = swizzle %40, zx
- %zx:ptr<function, vec2<i32>, read_write> = var, %41
- %43:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %44:vec3<i32> = load %43
- %45:vec2<i32> = swizzle %44, zy
- %zy:ptr<function, vec2<i32>, read_write> = var, %45
- %47:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %48:vec3<i32> = load %47
- %49:vec2<i32> = swizzle %48, zz
- %zz:ptr<function, vec2<i32>, read_write> = var, %49
- %51:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %52:vec3<i32> = load %51
- %53:vec3<i32> = swizzle %52, xxx
- %xxx:ptr<function, vec3<i32>, read_write> = var, %53
- %55:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %56:vec3<i32> = load %55
- %57:vec3<i32> = swizzle %56, xxy
- %xxy:ptr<function, vec3<i32>, read_write> = var, %57
- %59:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %60:vec3<i32> = load %59
- %61:vec3<i32> = swizzle %60, xxz
- %xxz:ptr<function, vec3<i32>, read_write> = var, %61
- %63:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %64:vec3<i32> = load %63
- %65:vec3<i32> = swizzle %64, xyx
- %xyx:ptr<function, vec3<i32>, read_write> = var, %65
- %67:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %68:vec3<i32> = load %67
- %69:vec3<i32> = swizzle %68, xyy
- %xyy:ptr<function, vec3<i32>, read_write> = var, %69
- %71:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %72:vec3<i32> = load %71
- %73:vec3<i32> = swizzle %72, xyz
- %xyz:ptr<function, vec3<i32>, read_write> = var, %73
- %75:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %76:vec3<i32> = load %75
- %77:vec3<i32> = swizzle %76, xzx
- %xzx:ptr<function, vec3<i32>, read_write> = var, %77
- %79:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %80:vec3<i32> = load %79
- %81:vec3<i32> = swizzle %80, xzy
- %xzy:ptr<function, vec3<i32>, read_write> = var, %81
- %83:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %84:vec3<i32> = load %83
- %85:vec3<i32> = swizzle %84, xzz
- %xzz:ptr<function, vec3<i32>, read_write> = var, %85
- %87:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %88:vec3<i32> = load %87
- %89:vec3<i32> = swizzle %88, yxx
- %yxx:ptr<function, vec3<i32>, read_write> = var, %89
- %91:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %92:vec3<i32> = load %91
- %93:vec3<i32> = swizzle %92, yxy
- %yxy:ptr<function, vec3<i32>, read_write> = var, %93
- %95:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %96:vec3<i32> = load %95
- %97:vec3<i32> = swizzle %96, yxz
- %yxz:ptr<function, vec3<i32>, read_write> = var, %97
- %99:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %100:vec3<i32> = load %99
- %101:vec3<i32> = swizzle %100, yyx
- %yyx:ptr<function, vec3<i32>, read_write> = var, %101
- %103:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %104:vec3<i32> = load %103
- %105:vec3<i32> = swizzle %104, yyy
- %yyy:ptr<function, vec3<i32>, read_write> = var, %105
- %107:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %108:vec3<i32> = load %107
- %109:vec3<i32> = swizzle %108, yyz
- %yyz:ptr<function, vec3<i32>, read_write> = var, %109
- %111:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %112:vec3<i32> = load %111
- %113:vec3<i32> = swizzle %112, yzx
- %yzx:ptr<function, vec3<i32>, read_write> = var, %113
- %115:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %116:vec3<i32> = load %115
- %117:vec3<i32> = swizzle %116, yzy
- %yzy:ptr<function, vec3<i32>, read_write> = var, %117
- %119:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %120:vec3<i32> = load %119
- %121:vec3<i32> = swizzle %120, yzz
- %yzz:ptr<function, vec3<i32>, read_write> = var, %121
- %123:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %124:vec3<i32> = load %123
- %125:vec3<i32> = swizzle %124, zxx
- %zxx:ptr<function, vec3<i32>, read_write> = var, %125
- %127:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %128:vec3<i32> = load %127
- %129:vec3<i32> = swizzle %128, zxy
- %zxy:ptr<function, vec3<i32>, read_write> = var, %129
- %131:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %132:vec3<i32> = load %131
- %133:vec3<i32> = swizzle %132, zxz
- %zxz:ptr<function, vec3<i32>, read_write> = var, %133
- %135:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %136:vec3<i32> = load %135
- %137:vec3<i32> = swizzle %136, zyx
- %zyx:ptr<function, vec3<i32>, read_write> = var, %137
- %139:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %140:vec3<i32> = load %139
- %141:vec3<i32> = swizzle %140, zyy
- %zyy:ptr<function, vec3<i32>, read_write> = var, %141
- %143:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %144:vec3<i32> = load %143
- %145:vec3<i32> = swizzle %144, zyz
- %zyz:ptr<function, vec3<i32>, read_write> = var, %145
- %147:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %148:vec3<i32> = load %147
- %149:vec3<i32> = swizzle %148, zzx
- %zzx:ptr<function, vec3<i32>, read_write> = var, %149
- %151:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %152:vec3<i32> = load %151
- %153:vec3<i32> = swizzle %152, zzy
- %zzy:ptr<function, vec3<i32>, read_write> = var, %153
- %155:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %156:vec3<i32> = load %155
- %157:vec3<i32> = swizzle %156, zzz
- %zzz:ptr<function, vec3<i32>, read_write> = var, %157
- %159:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %160:vec3<i32> = load %159
- %161:vec4<i32> = swizzle %160, xxxx
- %xxxx:ptr<function, vec4<i32>, read_write> = var, %161
- %163:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %164:vec3<i32> = load %163
- %165:vec4<i32> = swizzle %164, xxxy
- %xxxy:ptr<function, vec4<i32>, read_write> = var, %165
- %167:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %168:vec3<i32> = load %167
- %169:vec4<i32> = swizzle %168, xxxz
- %xxxz:ptr<function, vec4<i32>, read_write> = var, %169
- %171:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %172:vec3<i32> = load %171
- %173:vec4<i32> = swizzle %172, xxyx
- %xxyx:ptr<function, vec4<i32>, read_write> = var, %173
- %175:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %176:vec3<i32> = load %175
- %177:vec4<i32> = swizzle %176, xxyy
- %xxyy:ptr<function, vec4<i32>, read_write> = var, %177
- %179:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %180:vec3<i32> = load %179
- %181:vec4<i32> = swizzle %180, xxyz
- %xxyz:ptr<function, vec4<i32>, read_write> = var, %181
- %183:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %184:vec3<i32> = load %183
- %185:vec4<i32> = swizzle %184, xxzx
- %xxzx:ptr<function, vec4<i32>, read_write> = var, %185
- %187:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %188:vec3<i32> = load %187
- %189:vec4<i32> = swizzle %188, xxzy
- %xxzy:ptr<function, vec4<i32>, read_write> = var, %189
- %191:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %192:vec3<i32> = load %191
- %193:vec4<i32> = swizzle %192, xxzz
- %xxzz:ptr<function, vec4<i32>, read_write> = var, %193
- %195:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %196:vec3<i32> = load %195
- %197:vec4<i32> = swizzle %196, xyxx
- %xyxx:ptr<function, vec4<i32>, read_write> = var, %197
- %199:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %200:vec3<i32> = load %199
- %201:vec4<i32> = swizzle %200, xyxy
- %xyxy:ptr<function, vec4<i32>, read_write> = var, %201
- %203:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %204:vec3<i32> = load %203
- %205:vec4<i32> = swizzle %204, xyxz
- %xyxz:ptr<function, vec4<i32>, read_write> = var, %205
- %207:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %208:vec3<i32> = load %207
- %209:vec4<i32> = swizzle %208, xyyx
- %xyyx:ptr<function, vec4<i32>, read_write> = var, %209
- %211:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %212:vec3<i32> = load %211
- %213:vec4<i32> = swizzle %212, xyyy
- %xyyy:ptr<function, vec4<i32>, read_write> = var, %213
- %215:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %216:vec3<i32> = load %215
- %217:vec4<i32> = swizzle %216, xyyz
- %xyyz:ptr<function, vec4<i32>, read_write> = var, %217
- %219:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %220:vec3<i32> = load %219
- %221:vec4<i32> = swizzle %220, xyzx
- %xyzx:ptr<function, vec4<i32>, read_write> = var, %221
- %223:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %224:vec3<i32> = load %223
- %225:vec4<i32> = swizzle %224, xyzy
- %xyzy:ptr<function, vec4<i32>, read_write> = var, %225
- %227:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %228:vec3<i32> = load %227
- %229:vec4<i32> = swizzle %228, xyzz
- %xyzz:ptr<function, vec4<i32>, read_write> = var, %229
- %231:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %232:vec3<i32> = load %231
- %233:vec4<i32> = swizzle %232, xzxx
- %xzxx:ptr<function, vec4<i32>, read_write> = var, %233
- %235:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %236:vec3<i32> = load %235
- %237:vec4<i32> = swizzle %236, xzxy
- %xzxy:ptr<function, vec4<i32>, read_write> = var, %237
- %239:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %240:vec3<i32> = load %239
- %241:vec4<i32> = swizzle %240, xzxz
- %xzxz:ptr<function, vec4<i32>, read_write> = var, %241
- %243:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %244:vec3<i32> = load %243
- %245:vec4<i32> = swizzle %244, xzyx
- %xzyx:ptr<function, vec4<i32>, read_write> = var, %245
- %247:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %248:vec3<i32> = load %247
- %249:vec4<i32> = swizzle %248, xzyy
- %xzyy:ptr<function, vec4<i32>, read_write> = var, %249
- %251:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %252:vec3<i32> = load %251
- %253:vec4<i32> = swizzle %252, xzyz
- %xzyz:ptr<function, vec4<i32>, read_write> = var, %253
- %255:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %256:vec3<i32> = load %255
- %257:vec4<i32> = swizzle %256, xzzx
- %xzzx:ptr<function, vec4<i32>, read_write> = var, %257
- %259:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %260:vec3<i32> = load %259
- %261:vec4<i32> = swizzle %260, xzzy
- %xzzy:ptr<function, vec4<i32>, read_write> = var, %261
- %263:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %264:vec3<i32> = load %263
- %265:vec4<i32> = swizzle %264, xzzz
- %xzzz:ptr<function, vec4<i32>, read_write> = var, %265
- %267:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %268:vec3<i32> = load %267
- %269:vec4<i32> = swizzle %268, yxxx
- %yxxx:ptr<function, vec4<i32>, read_write> = var, %269
- %271:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %272:vec3<i32> = load %271
- %273:vec4<i32> = swizzle %272, yxxy
- %yxxy:ptr<function, vec4<i32>, read_write> = var, %273
- %275:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %276:vec3<i32> = load %275
- %277:vec4<i32> = swizzle %276, yxxz
- %yxxz:ptr<function, vec4<i32>, read_write> = var, %277
- %279:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %280:vec3<i32> = load %279
- %281:vec4<i32> = swizzle %280, yxyx
- %yxyx:ptr<function, vec4<i32>, read_write> = var, %281
- %283:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %284:vec3<i32> = load %283
- %285:vec4<i32> = swizzle %284, yxyy
- %yxyy:ptr<function, vec4<i32>, read_write> = var, %285
- %287:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %288:vec3<i32> = load %287
- %289:vec4<i32> = swizzle %288, yxyz
- %yxyz:ptr<function, vec4<i32>, read_write> = var, %289
- %291:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %292:vec3<i32> = load %291
- %293:vec4<i32> = swizzle %292, yxzx
- %yxzx:ptr<function, vec4<i32>, read_write> = var, %293
- %295:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %296:vec3<i32> = load %295
- %297:vec4<i32> = swizzle %296, yxzy
- %yxzy:ptr<function, vec4<i32>, read_write> = var, %297
- %299:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %300:vec3<i32> = load %299
- %301:vec4<i32> = swizzle %300, yxzz
- %yxzz:ptr<function, vec4<i32>, read_write> = var, %301
- %303:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %304:vec3<i32> = load %303
- %305:vec4<i32> = swizzle %304, yyxx
- %yyxx:ptr<function, vec4<i32>, read_write> = var, %305
- %307:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %308:vec3<i32> = load %307
- %309:vec4<i32> = swizzle %308, yyxy
- %yyxy:ptr<function, vec4<i32>, read_write> = var, %309
- %311:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %312:vec3<i32> = load %311
- %313:vec4<i32> = swizzle %312, yyxz
- %yyxz:ptr<function, vec4<i32>, read_write> = var, %313
- %315:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %316:vec3<i32> = load %315
- %317:vec4<i32> = swizzle %316, yyyx
- %yyyx:ptr<function, vec4<i32>, read_write> = var, %317
- %319:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %320:vec3<i32> = load %319
- %321:vec4<i32> = swizzle %320, yyyy
- %yyyy:ptr<function, vec4<i32>, read_write> = var, %321
- %323:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %324:vec3<i32> = load %323
- %325:vec4<i32> = swizzle %324, yyyz
- %yyyz:ptr<function, vec4<i32>, read_write> = var, %325
- %327:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %328:vec3<i32> = load %327
- %329:vec4<i32> = swizzle %328, yyzx
- %yyzx:ptr<function, vec4<i32>, read_write> = var, %329
- %331:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %332:vec3<i32> = load %331
- %333:vec4<i32> = swizzle %332, yyzy
- %yyzy:ptr<function, vec4<i32>, read_write> = var, %333
- %335:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %336:vec3<i32> = load %335
- %337:vec4<i32> = swizzle %336, yyzz
- %yyzz:ptr<function, vec4<i32>, read_write> = var, %337
- %339:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %340:vec3<i32> = load %339
- %341:vec4<i32> = swizzle %340, yzxx
- %yzxx:ptr<function, vec4<i32>, read_write> = var, %341
- %343:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %344:vec3<i32> = load %343
- %345:vec4<i32> = swizzle %344, yzxy
- %yzxy:ptr<function, vec4<i32>, read_write> = var, %345
- %347:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %348:vec3<i32> = load %347
- %349:vec4<i32> = swizzle %348, yzxz
- %yzxz:ptr<function, vec4<i32>, read_write> = var, %349
- %351:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %352:vec3<i32> = load %351
- %353:vec4<i32> = swizzle %352, yzyx
- %yzyx:ptr<function, vec4<i32>, read_write> = var, %353
- %355:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %356:vec3<i32> = load %355
- %357:vec4<i32> = swizzle %356, yzyy
- %yzyy:ptr<function, vec4<i32>, read_write> = var, %357
- %359:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %360:vec3<i32> = load %359
- %361:vec4<i32> = swizzle %360, yzyz
- %yzyz:ptr<function, vec4<i32>, read_write> = var, %361
- %363:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %364:vec3<i32> = load %363
- %365:vec4<i32> = swizzle %364, yzzx
- %yzzx:ptr<function, vec4<i32>, read_write> = var, %365
- %367:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %368:vec3<i32> = load %367
- %369:vec4<i32> = swizzle %368, yzzy
- %yzzy:ptr<function, vec4<i32>, read_write> = var, %369
- %371:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %372:vec3<i32> = load %371
- %373:vec4<i32> = swizzle %372, yzzz
- %yzzz:ptr<function, vec4<i32>, read_write> = var, %373
- %375:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %376:vec3<i32> = load %375
- %377:vec4<i32> = swizzle %376, zxxx
- %zxxx:ptr<function, vec4<i32>, read_write> = var, %377
- %379:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %380:vec3<i32> = load %379
- %381:vec4<i32> = swizzle %380, zxxy
- %zxxy:ptr<function, vec4<i32>, read_write> = var, %381
- %383:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %384:vec3<i32> = load %383
- %385:vec4<i32> = swizzle %384, zxxz
- %zxxz:ptr<function, vec4<i32>, read_write> = var, %385
- %387:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %388:vec3<i32> = load %387
- %389:vec4<i32> = swizzle %388, zxyx
- %zxyx:ptr<function, vec4<i32>, read_write> = var, %389
- %391:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %392:vec3<i32> = load %391
- %393:vec4<i32> = swizzle %392, zxyy
- %zxyy:ptr<function, vec4<i32>, read_write> = var, %393
- %395:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %396:vec3<i32> = load %395
- %397:vec4<i32> = swizzle %396, zxyz
- %zxyz:ptr<function, vec4<i32>, read_write> = var, %397
- %399:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %400:vec3<i32> = load %399
- %401:vec4<i32> = swizzle %400, zxzx
- %zxzx:ptr<function, vec4<i32>, read_write> = var, %401
- %403:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %404:vec3<i32> = load %403
- %405:vec4<i32> = swizzle %404, zxzy
- %zxzy:ptr<function, vec4<i32>, read_write> = var, %405
- %407:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %408:vec3<i32> = load %407
- %409:vec4<i32> = swizzle %408, zxzz
- %zxzz:ptr<function, vec4<i32>, read_write> = var, %409
- %411:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %412:vec3<i32> = load %411
- %413:vec4<i32> = swizzle %412, zyxx
- %zyxx:ptr<function, vec4<i32>, read_write> = var, %413
- %415:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %416:vec3<i32> = load %415
- %417:vec4<i32> = swizzle %416, zyxy
- %zyxy:ptr<function, vec4<i32>, read_write> = var, %417
- %419:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %420:vec3<i32> = load %419
- %421:vec4<i32> = swizzle %420, zyxz
- %zyxz:ptr<function, vec4<i32>, read_write> = var, %421
- %423:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %424:vec3<i32> = load %423
- %425:vec4<i32> = swizzle %424, zyyx
- %zyyx:ptr<function, vec4<i32>, read_write> = var, %425
- %427:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %428:vec3<i32> = load %427
- %429:vec4<i32> = swizzle %428, zyyy
- %zyyy:ptr<function, vec4<i32>, read_write> = var, %429
- %431:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %432:vec3<i32> = load %431
- %433:vec4<i32> = swizzle %432, zyyz
- %zyyz:ptr<function, vec4<i32>, read_write> = var, %433
- %435:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %436:vec3<i32> = load %435
- %437:vec4<i32> = swizzle %436, zyzx
- %zyzx:ptr<function, vec4<i32>, read_write> = var, %437
- %439:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %440:vec3<i32> = load %439
- %441:vec4<i32> = swizzle %440, zyzy
- %zyzy:ptr<function, vec4<i32>, read_write> = var, %441
- %443:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %444:vec3<i32> = load %443
- %445:vec4<i32> = swizzle %444, zyzz
- %zyzz:ptr<function, vec4<i32>, read_write> = var, %445
- %447:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %448:vec3<i32> = load %447
- %449:vec4<i32> = swizzle %448, zzxx
- %zzxx:ptr<function, vec4<i32>, read_write> = var, %449
- %451:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %452:vec3<i32> = load %451
- %453:vec4<i32> = swizzle %452, zzxy
- %zzxy:ptr<function, vec4<i32>, read_write> = var, %453
- %455:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %456:vec3<i32> = load %455
- %457:vec4<i32> = swizzle %456, zzxz
- %zzxz:ptr<function, vec4<i32>, read_write> = var, %457
- %459:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %460:vec3<i32> = load %459
- %461:vec4<i32> = swizzle %460, zzyx
- %zzyx:ptr<function, vec4<i32>, read_write> = var, %461
- %463:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %464:vec3<i32> = load %463
- %465:vec4<i32> = swizzle %464, zzyy
- %zzyy:ptr<function, vec4<i32>, read_write> = var, %465
- %467:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %468:vec3<i32> = load %467
- %469:vec4<i32> = swizzle %468, zzyz
- %zzyz:ptr<function, vec4<i32>, read_write> = var, %469
- %471:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %472:vec3<i32> = load %471
- %473:vec4<i32> = swizzle %472, zzzx
- %zzzx:ptr<function, vec4<i32>, read_write> = var, %473
- %475:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %476:vec3<i32> = load %475
- %477:vec4<i32> = swizzle %476, zzzy
- %zzzy:ptr<function, vec4<i32>, read_write> = var, %477
- %479:ptr<uniform, vec3<i32>, read> = access %U, 0u
- %480:vec3<i32> = load %479
- %481:vec4<i32> = swizzle %480, zzzz
- %zzzz:ptr<function, vec4<i32>, read_write> = var, %481
- 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/expressions/swizzle/read/packed_vec3/u32.wgsl.expected.ir.msl b/test/tint/expressions/swizzle/read/packed_vec3/u32.wgsl.expected.ir.msl
index 5e60691..4f66376 100644
--- a/test/tint/expressions/swizzle/read/packed_vec3/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/swizzle/read/packed_vec3/u32.wgsl.expected.ir.msl
@@ -1,503 +1,132 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ uint3 v;
+};
+struct tint_module_vars_struct {
+ const constant S* U;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- v:vec3<u32> @offset(0)
+void f(tint_module_vars_struct tint_module_vars) {
+ uint3 v = (*tint_module_vars.U).v;
+ uint x = (*tint_module_vars.U).v[0u];
+ uint y = (*tint_module_vars.U).v[1u];
+ uint z = (*tint_module_vars.U).v[2u];
+ uint2 xx = (*tint_module_vars.U).v.xx;
+ uint2 xy = (*tint_module_vars.U).v.xy;
+ uint2 xz = (*tint_module_vars.U).v.xz;
+ uint2 yx = (*tint_module_vars.U).v.yx;
+ uint2 yy = (*tint_module_vars.U).v.yy;
+ uint2 yz = (*tint_module_vars.U).v.yz;
+ uint2 zx = (*tint_module_vars.U).v.zx;
+ uint2 zy = (*tint_module_vars.U).v.zy;
+ uint2 zz = (*tint_module_vars.U).v.zz;
+ uint3 xxx = (*tint_module_vars.U).v.xxx;
+ uint3 xxy = (*tint_module_vars.U).v.xxy;
+ uint3 xxz = (*tint_module_vars.U).v.xxz;
+ uint3 xyx = (*tint_module_vars.U).v.xyx;
+ uint3 xyy = (*tint_module_vars.U).v.xyy;
+ uint3 xyz = (*tint_module_vars.U).v.xyz;
+ uint3 xzx = (*tint_module_vars.U).v.xzx;
+ uint3 xzy = (*tint_module_vars.U).v.xzy;
+ uint3 xzz = (*tint_module_vars.U).v.xzz;
+ uint3 yxx = (*tint_module_vars.U).v.yxx;
+ uint3 yxy = (*tint_module_vars.U).v.yxy;
+ uint3 yxz = (*tint_module_vars.U).v.yxz;
+ uint3 yyx = (*tint_module_vars.U).v.yyx;
+ uint3 yyy = (*tint_module_vars.U).v.yyy;
+ uint3 yyz = (*tint_module_vars.U).v.yyz;
+ uint3 yzx = (*tint_module_vars.U).v.yzx;
+ uint3 yzy = (*tint_module_vars.U).v.yzy;
+ uint3 yzz = (*tint_module_vars.U).v.yzz;
+ uint3 zxx = (*tint_module_vars.U).v.zxx;
+ uint3 zxy = (*tint_module_vars.U).v.zxy;
+ uint3 zxz = (*tint_module_vars.U).v.zxz;
+ uint3 zyx = (*tint_module_vars.U).v.zyx;
+ uint3 zyy = (*tint_module_vars.U).v.zyy;
+ uint3 zyz = (*tint_module_vars.U).v.zyz;
+ uint3 zzx = (*tint_module_vars.U).v.zzx;
+ uint3 zzy = (*tint_module_vars.U).v.zzy;
+ uint3 zzz = (*tint_module_vars.U).v.zzz;
+ uint4 xxxx = (*tint_module_vars.U).v.xxxx;
+ uint4 xxxy = (*tint_module_vars.U).v.xxxy;
+ uint4 xxxz = (*tint_module_vars.U).v.xxxz;
+ uint4 xxyx = (*tint_module_vars.U).v.xxyx;
+ uint4 xxyy = (*tint_module_vars.U).v.xxyy;
+ uint4 xxyz = (*tint_module_vars.U).v.xxyz;
+ uint4 xxzx = (*tint_module_vars.U).v.xxzx;
+ uint4 xxzy = (*tint_module_vars.U).v.xxzy;
+ uint4 xxzz = (*tint_module_vars.U).v.xxzz;
+ uint4 xyxx = (*tint_module_vars.U).v.xyxx;
+ uint4 xyxy = (*tint_module_vars.U).v.xyxy;
+ uint4 xyxz = (*tint_module_vars.U).v.xyxz;
+ uint4 xyyx = (*tint_module_vars.U).v.xyyx;
+ uint4 xyyy = (*tint_module_vars.U).v.xyyy;
+ uint4 xyyz = (*tint_module_vars.U).v.xyyz;
+ uint4 xyzx = (*tint_module_vars.U).v.xyzx;
+ uint4 xyzy = (*tint_module_vars.U).v.xyzy;
+ uint4 xyzz = (*tint_module_vars.U).v.xyzz;
+ uint4 xzxx = (*tint_module_vars.U).v.xzxx;
+ uint4 xzxy = (*tint_module_vars.U).v.xzxy;
+ uint4 xzxz = (*tint_module_vars.U).v.xzxz;
+ uint4 xzyx = (*tint_module_vars.U).v.xzyx;
+ uint4 xzyy = (*tint_module_vars.U).v.xzyy;
+ uint4 xzyz = (*tint_module_vars.U).v.xzyz;
+ uint4 xzzx = (*tint_module_vars.U).v.xzzx;
+ uint4 xzzy = (*tint_module_vars.U).v.xzzy;
+ uint4 xzzz = (*tint_module_vars.U).v.xzzz;
+ uint4 yxxx = (*tint_module_vars.U).v.yxxx;
+ uint4 yxxy = (*tint_module_vars.U).v.yxxy;
+ uint4 yxxz = (*tint_module_vars.U).v.yxxz;
+ uint4 yxyx = (*tint_module_vars.U).v.yxyx;
+ uint4 yxyy = (*tint_module_vars.U).v.yxyy;
+ uint4 yxyz = (*tint_module_vars.U).v.yxyz;
+ uint4 yxzx = (*tint_module_vars.U).v.yxzx;
+ uint4 yxzy = (*tint_module_vars.U).v.yxzy;
+ uint4 yxzz = (*tint_module_vars.U).v.yxzz;
+ uint4 yyxx = (*tint_module_vars.U).v.yyxx;
+ uint4 yyxy = (*tint_module_vars.U).v.yyxy;
+ uint4 yyxz = (*tint_module_vars.U).v.yyxz;
+ uint4 yyyx = (*tint_module_vars.U).v.yyyx;
+ uint4 yyyy = (*tint_module_vars.U).v.yyyy;
+ uint4 yyyz = (*tint_module_vars.U).v.yyyz;
+ uint4 yyzx = (*tint_module_vars.U).v.yyzx;
+ uint4 yyzy = (*tint_module_vars.U).v.yyzy;
+ uint4 yyzz = (*tint_module_vars.U).v.yyzz;
+ uint4 yzxx = (*tint_module_vars.U).v.yzxx;
+ uint4 yzxy = (*tint_module_vars.U).v.yzxy;
+ uint4 yzxz = (*tint_module_vars.U).v.yzxz;
+ uint4 yzyx = (*tint_module_vars.U).v.yzyx;
+ uint4 yzyy = (*tint_module_vars.U).v.yzyy;
+ uint4 yzyz = (*tint_module_vars.U).v.yzyz;
+ uint4 yzzx = (*tint_module_vars.U).v.yzzx;
+ uint4 yzzy = (*tint_module_vars.U).v.yzzy;
+ uint4 yzzz = (*tint_module_vars.U).v.yzzz;
+ uint4 zxxx = (*tint_module_vars.U).v.zxxx;
+ uint4 zxxy = (*tint_module_vars.U).v.zxxy;
+ uint4 zxxz = (*tint_module_vars.U).v.zxxz;
+ uint4 zxyx = (*tint_module_vars.U).v.zxyx;
+ uint4 zxyy = (*tint_module_vars.U).v.zxyy;
+ uint4 zxyz = (*tint_module_vars.U).v.zxyz;
+ uint4 zxzx = (*tint_module_vars.U).v.zxzx;
+ uint4 zxzy = (*tint_module_vars.U).v.zxzy;
+ uint4 zxzz = (*tint_module_vars.U).v.zxzz;
+ uint4 zyxx = (*tint_module_vars.U).v.zyxx;
+ uint4 zyxy = (*tint_module_vars.U).v.zyxy;
+ uint4 zyxz = (*tint_module_vars.U).v.zyxz;
+ uint4 zyyx = (*tint_module_vars.U).v.zyyx;
+ uint4 zyyy = (*tint_module_vars.U).v.zyyy;
+ uint4 zyyz = (*tint_module_vars.U).v.zyyz;
+ uint4 zyzx = (*tint_module_vars.U).v.zyzx;
+ uint4 zyzy = (*tint_module_vars.U).v.zyzy;
+ uint4 zyzz = (*tint_module_vars.U).v.zyzz;
+ uint4 zzxx = (*tint_module_vars.U).v.zzxx;
+ uint4 zzxy = (*tint_module_vars.U).v.zzxy;
+ uint4 zzxz = (*tint_module_vars.U).v.zzxz;
+ uint4 zzyx = (*tint_module_vars.U).v.zzyx;
+ uint4 zzyy = (*tint_module_vars.U).v.zzyy;
+ uint4 zzyz = (*tint_module_vars.U).v.zzyz;
+ uint4 zzzx = (*tint_module_vars.U).v.zzzx;
+ uint4 zzzy = (*tint_module_vars.U).v.zzzy;
+ uint4 zzzz = (*tint_module_vars.U).v.zzzz;
}
-
-$B1: { # root
- %U:ptr<uniform, S, read> = var @binding_point(0, 0)
-}
-
-%f = func():void {
- $B2: {
- %3:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %4:vec3<u32> = load %3
- %v:ptr<function, vec3<u32>, read_write> = var, %4
- %6:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %7:u32 = load_vector_element %6, 0u
- %x:ptr<function, u32, read_write> = var, %7
- %9:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %10:u32 = load_vector_element %9, 1u
- %y:ptr<function, u32, read_write> = var, %10
- %12:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %13:u32 = load_vector_element %12, 2u
- %z:ptr<function, u32, read_write> = var, %13
- %15:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %16:vec3<u32> = load %15
- %17:vec2<u32> = swizzle %16, xx
- %xx:ptr<function, vec2<u32>, read_write> = var, %17
- %19:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %20:vec3<u32> = load %19
- %21:vec2<u32> = swizzle %20, xy
- %xy:ptr<function, vec2<u32>, read_write> = var, %21
- %23:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %24:vec3<u32> = load %23
- %25:vec2<u32> = swizzle %24, xz
- %xz:ptr<function, vec2<u32>, read_write> = var, %25
- %27:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %28:vec3<u32> = load %27
- %29:vec2<u32> = swizzle %28, yx
- %yx:ptr<function, vec2<u32>, read_write> = var, %29
- %31:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %32:vec3<u32> = load %31
- %33:vec2<u32> = swizzle %32, yy
- %yy:ptr<function, vec2<u32>, read_write> = var, %33
- %35:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %36:vec3<u32> = load %35
- %37:vec2<u32> = swizzle %36, yz
- %yz:ptr<function, vec2<u32>, read_write> = var, %37
- %39:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %40:vec3<u32> = load %39
- %41:vec2<u32> = swizzle %40, zx
- %zx:ptr<function, vec2<u32>, read_write> = var, %41
- %43:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %44:vec3<u32> = load %43
- %45:vec2<u32> = swizzle %44, zy
- %zy:ptr<function, vec2<u32>, read_write> = var, %45
- %47:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %48:vec3<u32> = load %47
- %49:vec2<u32> = swizzle %48, zz
- %zz:ptr<function, vec2<u32>, read_write> = var, %49
- %51:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %52:vec3<u32> = load %51
- %53:vec3<u32> = swizzle %52, xxx
- %xxx:ptr<function, vec3<u32>, read_write> = var, %53
- %55:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %56:vec3<u32> = load %55
- %57:vec3<u32> = swizzle %56, xxy
- %xxy:ptr<function, vec3<u32>, read_write> = var, %57
- %59:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %60:vec3<u32> = load %59
- %61:vec3<u32> = swizzle %60, xxz
- %xxz:ptr<function, vec3<u32>, read_write> = var, %61
- %63:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %64:vec3<u32> = load %63
- %65:vec3<u32> = swizzle %64, xyx
- %xyx:ptr<function, vec3<u32>, read_write> = var, %65
- %67:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %68:vec3<u32> = load %67
- %69:vec3<u32> = swizzle %68, xyy
- %xyy:ptr<function, vec3<u32>, read_write> = var, %69
- %71:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %72:vec3<u32> = load %71
- %73:vec3<u32> = swizzle %72, xyz
- %xyz:ptr<function, vec3<u32>, read_write> = var, %73
- %75:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %76:vec3<u32> = load %75
- %77:vec3<u32> = swizzle %76, xzx
- %xzx:ptr<function, vec3<u32>, read_write> = var, %77
- %79:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %80:vec3<u32> = load %79
- %81:vec3<u32> = swizzle %80, xzy
- %xzy:ptr<function, vec3<u32>, read_write> = var, %81
- %83:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %84:vec3<u32> = load %83
- %85:vec3<u32> = swizzle %84, xzz
- %xzz:ptr<function, vec3<u32>, read_write> = var, %85
- %87:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %88:vec3<u32> = load %87
- %89:vec3<u32> = swizzle %88, yxx
- %yxx:ptr<function, vec3<u32>, read_write> = var, %89
- %91:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %92:vec3<u32> = load %91
- %93:vec3<u32> = swizzle %92, yxy
- %yxy:ptr<function, vec3<u32>, read_write> = var, %93
- %95:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %96:vec3<u32> = load %95
- %97:vec3<u32> = swizzle %96, yxz
- %yxz:ptr<function, vec3<u32>, read_write> = var, %97
- %99:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %100:vec3<u32> = load %99
- %101:vec3<u32> = swizzle %100, yyx
- %yyx:ptr<function, vec3<u32>, read_write> = var, %101
- %103:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %104:vec3<u32> = load %103
- %105:vec3<u32> = swizzle %104, yyy
- %yyy:ptr<function, vec3<u32>, read_write> = var, %105
- %107:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %108:vec3<u32> = load %107
- %109:vec3<u32> = swizzle %108, yyz
- %yyz:ptr<function, vec3<u32>, read_write> = var, %109
- %111:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %112:vec3<u32> = load %111
- %113:vec3<u32> = swizzle %112, yzx
- %yzx:ptr<function, vec3<u32>, read_write> = var, %113
- %115:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %116:vec3<u32> = load %115
- %117:vec3<u32> = swizzle %116, yzy
- %yzy:ptr<function, vec3<u32>, read_write> = var, %117
- %119:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %120:vec3<u32> = load %119
- %121:vec3<u32> = swizzle %120, yzz
- %yzz:ptr<function, vec3<u32>, read_write> = var, %121
- %123:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %124:vec3<u32> = load %123
- %125:vec3<u32> = swizzle %124, zxx
- %zxx:ptr<function, vec3<u32>, read_write> = var, %125
- %127:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %128:vec3<u32> = load %127
- %129:vec3<u32> = swizzle %128, zxy
- %zxy:ptr<function, vec3<u32>, read_write> = var, %129
- %131:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %132:vec3<u32> = load %131
- %133:vec3<u32> = swizzle %132, zxz
- %zxz:ptr<function, vec3<u32>, read_write> = var, %133
- %135:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %136:vec3<u32> = load %135
- %137:vec3<u32> = swizzle %136, zyx
- %zyx:ptr<function, vec3<u32>, read_write> = var, %137
- %139:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %140:vec3<u32> = load %139
- %141:vec3<u32> = swizzle %140, zyy
- %zyy:ptr<function, vec3<u32>, read_write> = var, %141
- %143:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %144:vec3<u32> = load %143
- %145:vec3<u32> = swizzle %144, zyz
- %zyz:ptr<function, vec3<u32>, read_write> = var, %145
- %147:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %148:vec3<u32> = load %147
- %149:vec3<u32> = swizzle %148, zzx
- %zzx:ptr<function, vec3<u32>, read_write> = var, %149
- %151:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %152:vec3<u32> = load %151
- %153:vec3<u32> = swizzle %152, zzy
- %zzy:ptr<function, vec3<u32>, read_write> = var, %153
- %155:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %156:vec3<u32> = load %155
- %157:vec3<u32> = swizzle %156, zzz
- %zzz:ptr<function, vec3<u32>, read_write> = var, %157
- %159:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %160:vec3<u32> = load %159
- %161:vec4<u32> = swizzle %160, xxxx
- %xxxx:ptr<function, vec4<u32>, read_write> = var, %161
- %163:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %164:vec3<u32> = load %163
- %165:vec4<u32> = swizzle %164, xxxy
- %xxxy:ptr<function, vec4<u32>, read_write> = var, %165
- %167:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %168:vec3<u32> = load %167
- %169:vec4<u32> = swizzle %168, xxxz
- %xxxz:ptr<function, vec4<u32>, read_write> = var, %169
- %171:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %172:vec3<u32> = load %171
- %173:vec4<u32> = swizzle %172, xxyx
- %xxyx:ptr<function, vec4<u32>, read_write> = var, %173
- %175:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %176:vec3<u32> = load %175
- %177:vec4<u32> = swizzle %176, xxyy
- %xxyy:ptr<function, vec4<u32>, read_write> = var, %177
- %179:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %180:vec3<u32> = load %179
- %181:vec4<u32> = swizzle %180, xxyz
- %xxyz:ptr<function, vec4<u32>, read_write> = var, %181
- %183:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %184:vec3<u32> = load %183
- %185:vec4<u32> = swizzle %184, xxzx
- %xxzx:ptr<function, vec4<u32>, read_write> = var, %185
- %187:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %188:vec3<u32> = load %187
- %189:vec4<u32> = swizzle %188, xxzy
- %xxzy:ptr<function, vec4<u32>, read_write> = var, %189
- %191:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %192:vec3<u32> = load %191
- %193:vec4<u32> = swizzle %192, xxzz
- %xxzz:ptr<function, vec4<u32>, read_write> = var, %193
- %195:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %196:vec3<u32> = load %195
- %197:vec4<u32> = swizzle %196, xyxx
- %xyxx:ptr<function, vec4<u32>, read_write> = var, %197
- %199:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %200:vec3<u32> = load %199
- %201:vec4<u32> = swizzle %200, xyxy
- %xyxy:ptr<function, vec4<u32>, read_write> = var, %201
- %203:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %204:vec3<u32> = load %203
- %205:vec4<u32> = swizzle %204, xyxz
- %xyxz:ptr<function, vec4<u32>, read_write> = var, %205
- %207:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %208:vec3<u32> = load %207
- %209:vec4<u32> = swizzle %208, xyyx
- %xyyx:ptr<function, vec4<u32>, read_write> = var, %209
- %211:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %212:vec3<u32> = load %211
- %213:vec4<u32> = swizzle %212, xyyy
- %xyyy:ptr<function, vec4<u32>, read_write> = var, %213
- %215:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %216:vec3<u32> = load %215
- %217:vec4<u32> = swizzle %216, xyyz
- %xyyz:ptr<function, vec4<u32>, read_write> = var, %217
- %219:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %220:vec3<u32> = load %219
- %221:vec4<u32> = swizzle %220, xyzx
- %xyzx:ptr<function, vec4<u32>, read_write> = var, %221
- %223:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %224:vec3<u32> = load %223
- %225:vec4<u32> = swizzle %224, xyzy
- %xyzy:ptr<function, vec4<u32>, read_write> = var, %225
- %227:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %228:vec3<u32> = load %227
- %229:vec4<u32> = swizzle %228, xyzz
- %xyzz:ptr<function, vec4<u32>, read_write> = var, %229
- %231:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %232:vec3<u32> = load %231
- %233:vec4<u32> = swizzle %232, xzxx
- %xzxx:ptr<function, vec4<u32>, read_write> = var, %233
- %235:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %236:vec3<u32> = load %235
- %237:vec4<u32> = swizzle %236, xzxy
- %xzxy:ptr<function, vec4<u32>, read_write> = var, %237
- %239:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %240:vec3<u32> = load %239
- %241:vec4<u32> = swizzle %240, xzxz
- %xzxz:ptr<function, vec4<u32>, read_write> = var, %241
- %243:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %244:vec3<u32> = load %243
- %245:vec4<u32> = swizzle %244, xzyx
- %xzyx:ptr<function, vec4<u32>, read_write> = var, %245
- %247:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %248:vec3<u32> = load %247
- %249:vec4<u32> = swizzle %248, xzyy
- %xzyy:ptr<function, vec4<u32>, read_write> = var, %249
- %251:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %252:vec3<u32> = load %251
- %253:vec4<u32> = swizzle %252, xzyz
- %xzyz:ptr<function, vec4<u32>, read_write> = var, %253
- %255:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %256:vec3<u32> = load %255
- %257:vec4<u32> = swizzle %256, xzzx
- %xzzx:ptr<function, vec4<u32>, read_write> = var, %257
- %259:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %260:vec3<u32> = load %259
- %261:vec4<u32> = swizzle %260, xzzy
- %xzzy:ptr<function, vec4<u32>, read_write> = var, %261
- %263:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %264:vec3<u32> = load %263
- %265:vec4<u32> = swizzle %264, xzzz
- %xzzz:ptr<function, vec4<u32>, read_write> = var, %265
- %267:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %268:vec3<u32> = load %267
- %269:vec4<u32> = swizzle %268, yxxx
- %yxxx:ptr<function, vec4<u32>, read_write> = var, %269
- %271:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %272:vec3<u32> = load %271
- %273:vec4<u32> = swizzle %272, yxxy
- %yxxy:ptr<function, vec4<u32>, read_write> = var, %273
- %275:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %276:vec3<u32> = load %275
- %277:vec4<u32> = swizzle %276, yxxz
- %yxxz:ptr<function, vec4<u32>, read_write> = var, %277
- %279:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %280:vec3<u32> = load %279
- %281:vec4<u32> = swizzle %280, yxyx
- %yxyx:ptr<function, vec4<u32>, read_write> = var, %281
- %283:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %284:vec3<u32> = load %283
- %285:vec4<u32> = swizzle %284, yxyy
- %yxyy:ptr<function, vec4<u32>, read_write> = var, %285
- %287:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %288:vec3<u32> = load %287
- %289:vec4<u32> = swizzle %288, yxyz
- %yxyz:ptr<function, vec4<u32>, read_write> = var, %289
- %291:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %292:vec3<u32> = load %291
- %293:vec4<u32> = swizzle %292, yxzx
- %yxzx:ptr<function, vec4<u32>, read_write> = var, %293
- %295:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %296:vec3<u32> = load %295
- %297:vec4<u32> = swizzle %296, yxzy
- %yxzy:ptr<function, vec4<u32>, read_write> = var, %297
- %299:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %300:vec3<u32> = load %299
- %301:vec4<u32> = swizzle %300, yxzz
- %yxzz:ptr<function, vec4<u32>, read_write> = var, %301
- %303:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %304:vec3<u32> = load %303
- %305:vec4<u32> = swizzle %304, yyxx
- %yyxx:ptr<function, vec4<u32>, read_write> = var, %305
- %307:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %308:vec3<u32> = load %307
- %309:vec4<u32> = swizzle %308, yyxy
- %yyxy:ptr<function, vec4<u32>, read_write> = var, %309
- %311:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %312:vec3<u32> = load %311
- %313:vec4<u32> = swizzle %312, yyxz
- %yyxz:ptr<function, vec4<u32>, read_write> = var, %313
- %315:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %316:vec3<u32> = load %315
- %317:vec4<u32> = swizzle %316, yyyx
- %yyyx:ptr<function, vec4<u32>, read_write> = var, %317
- %319:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %320:vec3<u32> = load %319
- %321:vec4<u32> = swizzle %320, yyyy
- %yyyy:ptr<function, vec4<u32>, read_write> = var, %321
- %323:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %324:vec3<u32> = load %323
- %325:vec4<u32> = swizzle %324, yyyz
- %yyyz:ptr<function, vec4<u32>, read_write> = var, %325
- %327:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %328:vec3<u32> = load %327
- %329:vec4<u32> = swizzle %328, yyzx
- %yyzx:ptr<function, vec4<u32>, read_write> = var, %329
- %331:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %332:vec3<u32> = load %331
- %333:vec4<u32> = swizzle %332, yyzy
- %yyzy:ptr<function, vec4<u32>, read_write> = var, %333
- %335:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %336:vec3<u32> = load %335
- %337:vec4<u32> = swizzle %336, yyzz
- %yyzz:ptr<function, vec4<u32>, read_write> = var, %337
- %339:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %340:vec3<u32> = load %339
- %341:vec4<u32> = swizzle %340, yzxx
- %yzxx:ptr<function, vec4<u32>, read_write> = var, %341
- %343:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %344:vec3<u32> = load %343
- %345:vec4<u32> = swizzle %344, yzxy
- %yzxy:ptr<function, vec4<u32>, read_write> = var, %345
- %347:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %348:vec3<u32> = load %347
- %349:vec4<u32> = swizzle %348, yzxz
- %yzxz:ptr<function, vec4<u32>, read_write> = var, %349
- %351:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %352:vec3<u32> = load %351
- %353:vec4<u32> = swizzle %352, yzyx
- %yzyx:ptr<function, vec4<u32>, read_write> = var, %353
- %355:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %356:vec3<u32> = load %355
- %357:vec4<u32> = swizzle %356, yzyy
- %yzyy:ptr<function, vec4<u32>, read_write> = var, %357
- %359:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %360:vec3<u32> = load %359
- %361:vec4<u32> = swizzle %360, yzyz
- %yzyz:ptr<function, vec4<u32>, read_write> = var, %361
- %363:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %364:vec3<u32> = load %363
- %365:vec4<u32> = swizzle %364, yzzx
- %yzzx:ptr<function, vec4<u32>, read_write> = var, %365
- %367:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %368:vec3<u32> = load %367
- %369:vec4<u32> = swizzle %368, yzzy
- %yzzy:ptr<function, vec4<u32>, read_write> = var, %369
- %371:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %372:vec3<u32> = load %371
- %373:vec4<u32> = swizzle %372, yzzz
- %yzzz:ptr<function, vec4<u32>, read_write> = var, %373
- %375:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %376:vec3<u32> = load %375
- %377:vec4<u32> = swizzle %376, zxxx
- %zxxx:ptr<function, vec4<u32>, read_write> = var, %377
- %379:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %380:vec3<u32> = load %379
- %381:vec4<u32> = swizzle %380, zxxy
- %zxxy:ptr<function, vec4<u32>, read_write> = var, %381
- %383:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %384:vec3<u32> = load %383
- %385:vec4<u32> = swizzle %384, zxxz
- %zxxz:ptr<function, vec4<u32>, read_write> = var, %385
- %387:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %388:vec3<u32> = load %387
- %389:vec4<u32> = swizzle %388, zxyx
- %zxyx:ptr<function, vec4<u32>, read_write> = var, %389
- %391:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %392:vec3<u32> = load %391
- %393:vec4<u32> = swizzle %392, zxyy
- %zxyy:ptr<function, vec4<u32>, read_write> = var, %393
- %395:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %396:vec3<u32> = load %395
- %397:vec4<u32> = swizzle %396, zxyz
- %zxyz:ptr<function, vec4<u32>, read_write> = var, %397
- %399:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %400:vec3<u32> = load %399
- %401:vec4<u32> = swizzle %400, zxzx
- %zxzx:ptr<function, vec4<u32>, read_write> = var, %401
- %403:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %404:vec3<u32> = load %403
- %405:vec4<u32> = swizzle %404, zxzy
- %zxzy:ptr<function, vec4<u32>, read_write> = var, %405
- %407:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %408:vec3<u32> = load %407
- %409:vec4<u32> = swizzle %408, zxzz
- %zxzz:ptr<function, vec4<u32>, read_write> = var, %409
- %411:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %412:vec3<u32> = load %411
- %413:vec4<u32> = swizzle %412, zyxx
- %zyxx:ptr<function, vec4<u32>, read_write> = var, %413
- %415:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %416:vec3<u32> = load %415
- %417:vec4<u32> = swizzle %416, zyxy
- %zyxy:ptr<function, vec4<u32>, read_write> = var, %417
- %419:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %420:vec3<u32> = load %419
- %421:vec4<u32> = swizzle %420, zyxz
- %zyxz:ptr<function, vec4<u32>, read_write> = var, %421
- %423:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %424:vec3<u32> = load %423
- %425:vec4<u32> = swizzle %424, zyyx
- %zyyx:ptr<function, vec4<u32>, read_write> = var, %425
- %427:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %428:vec3<u32> = load %427
- %429:vec4<u32> = swizzle %428, zyyy
- %zyyy:ptr<function, vec4<u32>, read_write> = var, %429
- %431:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %432:vec3<u32> = load %431
- %433:vec4<u32> = swizzle %432, zyyz
- %zyyz:ptr<function, vec4<u32>, read_write> = var, %433
- %435:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %436:vec3<u32> = load %435
- %437:vec4<u32> = swizzle %436, zyzx
- %zyzx:ptr<function, vec4<u32>, read_write> = var, %437
- %439:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %440:vec3<u32> = load %439
- %441:vec4<u32> = swizzle %440, zyzy
- %zyzy:ptr<function, vec4<u32>, read_write> = var, %441
- %443:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %444:vec3<u32> = load %443
- %445:vec4<u32> = swizzle %444, zyzz
- %zyzz:ptr<function, vec4<u32>, read_write> = var, %445
- %447:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %448:vec3<u32> = load %447
- %449:vec4<u32> = swizzle %448, zzxx
- %zzxx:ptr<function, vec4<u32>, read_write> = var, %449
- %451:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %452:vec3<u32> = load %451
- %453:vec4<u32> = swizzle %452, zzxy
- %zzxy:ptr<function, vec4<u32>, read_write> = var, %453
- %455:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %456:vec3<u32> = load %455
- %457:vec4<u32> = swizzle %456, zzxz
- %zzxz:ptr<function, vec4<u32>, read_write> = var, %457
- %459:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %460:vec3<u32> = load %459
- %461:vec4<u32> = swizzle %460, zzyx
- %zzyx:ptr<function, vec4<u32>, read_write> = var, %461
- %463:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %464:vec3<u32> = load %463
- %465:vec4<u32> = swizzle %464, zzyy
- %zzyy:ptr<function, vec4<u32>, read_write> = var, %465
- %467:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %468:vec3<u32> = load %467
- %469:vec4<u32> = swizzle %468, zzyz
- %zzyz:ptr<function, vec4<u32>, read_write> = var, %469
- %471:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %472:vec3<u32> = load %471
- %473:vec4<u32> = swizzle %472, zzzx
- %zzzx:ptr<function, vec4<u32>, read_write> = var, %473
- %475:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %476:vec3<u32> = load %475
- %477:vec4<u32> = swizzle %476, zzzy
- %zzzy:ptr<function, vec4<u32>, read_write> = var, %477
- %479:ptr<uniform, vec3<u32>, read> = access %U, 0u
- %480:vec3<u32> = load %479
- %481:vec4<u32> = swizzle %480, zzzz
- %zzzz:ptr<function, vec4<u32>, read_write> = var, %481
- 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/expressions/swizzle/read/vec3/f16.wgsl.expected.ir.msl b/test/tint/expressions/swizzle/read/vec3/f16.wgsl.expected.ir.msl
index 3b4dce1..f0e0ee5 100644
--- a/test/tint/expressions/swizzle/read/vec3/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/swizzle/read/vec3/f16.wgsl.expected.ir.msl
@@ -1,499 +1,132 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct S {
half3 v;
};
+struct tint_module_vars_struct {
+ thread S* P;
+};
-thread S P = {};
-void f() {
- half3 v = P.v;
- half x = P.v[0u];
- half y = P.v[1u];
- half z = P.v[2u];
- half2 xx = P.v.xx;
- half2 xy = P.v.xy;
- half2 xz = P.v.xz;
- half2 yx = P.v.yx;
- half2 yy = P.v.yy;
- half2 yz = P.v.yz;
- half2 zx = P.v.zx;
- half2 zy = P.v.zy;
- half2 zz = P.v.zz;
- half3 xxx = P.v.xxx;
- half3 xxy = P.v.xxy;
- half3 xxz = P.v.xxz;
- half3 xyx = P.v.xyx;
- half3 xyy = P.v.xyy;
- half3 xyz = P.v.xyz;
- half3 xzx = P.v.xzx;
- half3 xzy = P.v.xzy;
- half3 xzz = P.v.xzz;
- half3 yxx = P.v.yxx;
- half3 yxy = P.v.yxy;
- half3 yxz = P.v.yxz;
- half3 yyx = P.v.yyx;
- half3 yyy = P.v.yyy;
- half3 yyz = P.v.yyz;
- half3 yzx = P.v.yzx;
- half3 yzy = P.v.yzy;
- half3 yzz = P.v.yzz;
- half3 zxx = P.v.zxx;
- half3 zxy = P.v.zxy;
- half3 zxz = P.v.zxz;
- half3 zyx = P.v.zyx;
- half3 zyy = P.v.zyy;
- half3 zyz = P.v.zyz;
- half3 zzx = P.v.zzx;
- half3 zzy = P.v.zzy;
- half3 zzz = P.v.zzz;
- half4 xxxx = P.v.xxxx;
- half4 xxxy = P.v.xxxy;
- half4 xxxz = P.v.xxxz;
- half4 xxyx = P.v.xxyx;
- half4 xxyy = P.v.xxyy;
- half4 xxyz = P.v.xxyz;
- half4 xxzx = P.v.xxzx;
- half4 xxzy = P.v.xxzy;
- half4 xxzz = P.v.xxzz;
- half4 xyxx = P.v.xyxx;
- half4 xyxy = P.v.xyxy;
- half4 xyxz = P.v.xyxz;
- half4 xyyx = P.v.xyyx;
- half4 xyyy = P.v.xyyy;
- half4 xyyz = P.v.xyyz;
- half4 xyzx = P.v.xyzx;
- half4 xyzy = P.v.xyzy;
- half4 xyzz = P.v.xyzz;
- half4 xzxx = P.v.xzxx;
- half4 xzxy = P.v.xzxy;
- half4 xzxz = P.v.xzxz;
- half4 xzyx = P.v.xzyx;
- half4 xzyy = P.v.xzyy;
- half4 xzyz = P.v.xzyz;
- half4 xzzx = P.v.xzzx;
- half4 xzzy = P.v.xzzy;
- half4 xzzz = P.v.xzzz;
- half4 yxxx = P.v.yxxx;
- half4 yxxy = P.v.yxxy;
- half4 yxxz = P.v.yxxz;
- half4 yxyx = P.v.yxyx;
- half4 yxyy = P.v.yxyy;
- half4 yxyz = P.v.yxyz;
- half4 yxzx = P.v.yxzx;
- half4 yxzy = P.v.yxzy;
- half4 yxzz = P.v.yxzz;
- half4 yyxx = P.v.yyxx;
- half4 yyxy = P.v.yyxy;
- half4 yyxz = P.v.yyxz;
- half4 yyyx = P.v.yyyx;
- half4 yyyy = P.v.yyyy;
- half4 yyyz = P.v.yyyz;
- half4 yyzx = P.v.yyzx;
- half4 yyzy = P.v.yyzy;
- half4 yyzz = P.v.yyzz;
- half4 yzxx = P.v.yzxx;
- half4 yzxy = P.v.yzxy;
- half4 yzxz = P.v.yzxz;
- half4 yzyx = P.v.yzyx;
- half4 yzyy = P.v.yzyy;
- half4 yzyz = P.v.yzyz;
- half4 yzzx = P.v.yzzx;
- half4 yzzy = P.v.yzzy;
- half4 yzzz = P.v.yzzz;
- half4 zxxx = P.v.zxxx;
- half4 zxxy = P.v.zxxy;
- half4 zxxz = P.v.zxxz;
- half4 zxyx = P.v.zxyx;
- half4 zxyy = P.v.zxyy;
- half4 zxyz = P.v.zxyz;
- half4 zxzx = P.v.zxzx;
- half4 zxzy = P.v.zxzy;
- half4 zxzz = P.v.zxzz;
- half4 zyxx = P.v.zyxx;
- half4 zyxy = P.v.zyxy;
- half4 zyxz = P.v.zyxz;
- half4 zyyx = P.v.zyyx;
- half4 zyyy = P.v.zyyy;
- half4 zyyz = P.v.zyyz;
- half4 zyzx = P.v.zyzx;
- half4 zyzy = P.v.zyzy;
- half4 zyzz = P.v.zyzz;
- half4 zzxx = P.v.zzxx;
- half4 zzxy = P.v.zzxy;
- half4 zzxz = P.v.zzxz;
- half4 zzyx = P.v.zzyx;
- half4 zzyy = P.v.zzyy;
- half4 zzyz = P.v.zzyz;
- half4 zzzx = P.v.zzzx;
- half4 zzzy = P.v.zzzy;
- half4 zzzz = P.v.zzzz;
+void f(tint_module_vars_struct tint_module_vars) {
+ half3 v = (*tint_module_vars.P).v;
+ half x = (*tint_module_vars.P).v[0u];
+ half y = (*tint_module_vars.P).v[1u];
+ half z = (*tint_module_vars.P).v[2u];
+ half2 xx = (*tint_module_vars.P).v.xx;
+ half2 xy = (*tint_module_vars.P).v.xy;
+ half2 xz = (*tint_module_vars.P).v.xz;
+ half2 yx = (*tint_module_vars.P).v.yx;
+ half2 yy = (*tint_module_vars.P).v.yy;
+ half2 yz = (*tint_module_vars.P).v.yz;
+ half2 zx = (*tint_module_vars.P).v.zx;
+ half2 zy = (*tint_module_vars.P).v.zy;
+ half2 zz = (*tint_module_vars.P).v.zz;
+ half3 xxx = (*tint_module_vars.P).v.xxx;
+ half3 xxy = (*tint_module_vars.P).v.xxy;
+ half3 xxz = (*tint_module_vars.P).v.xxz;
+ half3 xyx = (*tint_module_vars.P).v.xyx;
+ half3 xyy = (*tint_module_vars.P).v.xyy;
+ half3 xyz = (*tint_module_vars.P).v.xyz;
+ half3 xzx = (*tint_module_vars.P).v.xzx;
+ half3 xzy = (*tint_module_vars.P).v.xzy;
+ half3 xzz = (*tint_module_vars.P).v.xzz;
+ half3 yxx = (*tint_module_vars.P).v.yxx;
+ half3 yxy = (*tint_module_vars.P).v.yxy;
+ half3 yxz = (*tint_module_vars.P).v.yxz;
+ half3 yyx = (*tint_module_vars.P).v.yyx;
+ half3 yyy = (*tint_module_vars.P).v.yyy;
+ half3 yyz = (*tint_module_vars.P).v.yyz;
+ half3 yzx = (*tint_module_vars.P).v.yzx;
+ half3 yzy = (*tint_module_vars.P).v.yzy;
+ half3 yzz = (*tint_module_vars.P).v.yzz;
+ half3 zxx = (*tint_module_vars.P).v.zxx;
+ half3 zxy = (*tint_module_vars.P).v.zxy;
+ half3 zxz = (*tint_module_vars.P).v.zxz;
+ half3 zyx = (*tint_module_vars.P).v.zyx;
+ half3 zyy = (*tint_module_vars.P).v.zyy;
+ half3 zyz = (*tint_module_vars.P).v.zyz;
+ half3 zzx = (*tint_module_vars.P).v.zzx;
+ half3 zzy = (*tint_module_vars.P).v.zzy;
+ half3 zzz = (*tint_module_vars.P).v.zzz;
+ half4 xxxx = (*tint_module_vars.P).v.xxxx;
+ half4 xxxy = (*tint_module_vars.P).v.xxxy;
+ half4 xxxz = (*tint_module_vars.P).v.xxxz;
+ half4 xxyx = (*tint_module_vars.P).v.xxyx;
+ half4 xxyy = (*tint_module_vars.P).v.xxyy;
+ half4 xxyz = (*tint_module_vars.P).v.xxyz;
+ half4 xxzx = (*tint_module_vars.P).v.xxzx;
+ half4 xxzy = (*tint_module_vars.P).v.xxzy;
+ half4 xxzz = (*tint_module_vars.P).v.xxzz;
+ half4 xyxx = (*tint_module_vars.P).v.xyxx;
+ half4 xyxy = (*tint_module_vars.P).v.xyxy;
+ half4 xyxz = (*tint_module_vars.P).v.xyxz;
+ half4 xyyx = (*tint_module_vars.P).v.xyyx;
+ half4 xyyy = (*tint_module_vars.P).v.xyyy;
+ half4 xyyz = (*tint_module_vars.P).v.xyyz;
+ half4 xyzx = (*tint_module_vars.P).v.xyzx;
+ half4 xyzy = (*tint_module_vars.P).v.xyzy;
+ half4 xyzz = (*tint_module_vars.P).v.xyzz;
+ half4 xzxx = (*tint_module_vars.P).v.xzxx;
+ half4 xzxy = (*tint_module_vars.P).v.xzxy;
+ half4 xzxz = (*tint_module_vars.P).v.xzxz;
+ half4 xzyx = (*tint_module_vars.P).v.xzyx;
+ half4 xzyy = (*tint_module_vars.P).v.xzyy;
+ half4 xzyz = (*tint_module_vars.P).v.xzyz;
+ half4 xzzx = (*tint_module_vars.P).v.xzzx;
+ half4 xzzy = (*tint_module_vars.P).v.xzzy;
+ half4 xzzz = (*tint_module_vars.P).v.xzzz;
+ half4 yxxx = (*tint_module_vars.P).v.yxxx;
+ half4 yxxy = (*tint_module_vars.P).v.yxxy;
+ half4 yxxz = (*tint_module_vars.P).v.yxxz;
+ half4 yxyx = (*tint_module_vars.P).v.yxyx;
+ half4 yxyy = (*tint_module_vars.P).v.yxyy;
+ half4 yxyz = (*tint_module_vars.P).v.yxyz;
+ half4 yxzx = (*tint_module_vars.P).v.yxzx;
+ half4 yxzy = (*tint_module_vars.P).v.yxzy;
+ half4 yxzz = (*tint_module_vars.P).v.yxzz;
+ half4 yyxx = (*tint_module_vars.P).v.yyxx;
+ half4 yyxy = (*tint_module_vars.P).v.yyxy;
+ half4 yyxz = (*tint_module_vars.P).v.yyxz;
+ half4 yyyx = (*tint_module_vars.P).v.yyyx;
+ half4 yyyy = (*tint_module_vars.P).v.yyyy;
+ half4 yyyz = (*tint_module_vars.P).v.yyyz;
+ half4 yyzx = (*tint_module_vars.P).v.yyzx;
+ half4 yyzy = (*tint_module_vars.P).v.yyzy;
+ half4 yyzz = (*tint_module_vars.P).v.yyzz;
+ half4 yzxx = (*tint_module_vars.P).v.yzxx;
+ half4 yzxy = (*tint_module_vars.P).v.yzxy;
+ half4 yzxz = (*tint_module_vars.P).v.yzxz;
+ half4 yzyx = (*tint_module_vars.P).v.yzyx;
+ half4 yzyy = (*tint_module_vars.P).v.yzyy;
+ half4 yzyz = (*tint_module_vars.P).v.yzyz;
+ half4 yzzx = (*tint_module_vars.P).v.yzzx;
+ half4 yzzy = (*tint_module_vars.P).v.yzzy;
+ half4 yzzz = (*tint_module_vars.P).v.yzzz;
+ half4 zxxx = (*tint_module_vars.P).v.zxxx;
+ half4 zxxy = (*tint_module_vars.P).v.zxxy;
+ half4 zxxz = (*tint_module_vars.P).v.zxxz;
+ half4 zxyx = (*tint_module_vars.P).v.zxyx;
+ half4 zxyy = (*tint_module_vars.P).v.zxyy;
+ half4 zxyz = (*tint_module_vars.P).v.zxyz;
+ half4 zxzx = (*tint_module_vars.P).v.zxzx;
+ half4 zxzy = (*tint_module_vars.P).v.zxzy;
+ half4 zxzz = (*tint_module_vars.P).v.zxzz;
+ half4 zyxx = (*tint_module_vars.P).v.zyxx;
+ half4 zyxy = (*tint_module_vars.P).v.zyxy;
+ half4 zyxz = (*tint_module_vars.P).v.zyxz;
+ half4 zyyx = (*tint_module_vars.P).v.zyyx;
+ half4 zyyy = (*tint_module_vars.P).v.zyyy;
+ half4 zyyz = (*tint_module_vars.P).v.zyyz;
+ half4 zyzx = (*tint_module_vars.P).v.zyzx;
+ half4 zyzy = (*tint_module_vars.P).v.zyzy;
+ half4 zyzz = (*tint_module_vars.P).v.zyzz;
+ half4 zzxx = (*tint_module_vars.P).v.zzxx;
+ half4 zzxy = (*tint_module_vars.P).v.zzxy;
+ half4 zzxz = (*tint_module_vars.P).v.zzxz;
+ half4 zzyx = (*tint_module_vars.P).v.zzyx;
+ half4 zzyy = (*tint_module_vars.P).v.zzyy;
+ half4 zzyz = (*tint_module_vars.P).v.zzyz;
+ half4 zzzx = (*tint_module_vars.P).v.zzzx;
+ half4 zzzy = (*tint_module_vars.P).v.zzzy;
+ half4 zzzz = (*tint_module_vars.P).v.zzzz;
}
-program_source:7:10: error: program scope variable must reside in constant address space
-thread S P = {};
- ^
-program_source:9:9: warning: unused variable 'v' [-Wunused-variable]
- half3 v = P.v;
- ^
-program_source:10:8: warning: unused variable 'x' [-Wunused-variable]
- half x = P.v[0u];
- ^
-program_source:11:8: warning: unused variable 'y' [-Wunused-variable]
- half y = P.v[1u];
- ^
-program_source:12:8: warning: unused variable 'z' [-Wunused-variable]
- half z = P.v[2u];
- ^
-program_source:13:9: warning: unused variable 'xx' [-Wunused-variable]
- half2 xx = P.v.xx;
- ^
-program_source:14:9: warning: unused variable 'xy' [-Wunused-variable]
- half2 xy = P.v.xy;
- ^
-program_source:15:9: warning: unused variable 'xz' [-Wunused-variable]
- half2 xz = P.v.xz;
- ^
-program_source:16:9: warning: unused variable 'yx' [-Wunused-variable]
- half2 yx = P.v.yx;
- ^
-program_source:17:9: warning: unused variable 'yy' [-Wunused-variable]
- half2 yy = P.v.yy;
- ^
-program_source:18:9: warning: unused variable 'yz' [-Wunused-variable]
- half2 yz = P.v.yz;
- ^
-program_source:19:9: warning: unused variable 'zx' [-Wunused-variable]
- half2 zx = P.v.zx;
- ^
-program_source:20:9: warning: unused variable 'zy' [-Wunused-variable]
- half2 zy = P.v.zy;
- ^
-program_source:21:9: warning: unused variable 'zz' [-Wunused-variable]
- half2 zz = P.v.zz;
- ^
-program_source:22:9: warning: unused variable 'xxx' [-Wunused-variable]
- half3 xxx = P.v.xxx;
- ^
-program_source:23:9: warning: unused variable 'xxy' [-Wunused-variable]
- half3 xxy = P.v.xxy;
- ^
-program_source:24:9: warning: unused variable 'xxz' [-Wunused-variable]
- half3 xxz = P.v.xxz;
- ^
-program_source:25:9: warning: unused variable 'xyx' [-Wunused-variable]
- half3 xyx = P.v.xyx;
- ^
-program_source:26:9: warning: unused variable 'xyy' [-Wunused-variable]
- half3 xyy = P.v.xyy;
- ^
-program_source:27:9: warning: unused variable 'xyz' [-Wunused-variable]
- half3 xyz = P.v.xyz;
- ^
-program_source:28:9: warning: unused variable 'xzx' [-Wunused-variable]
- half3 xzx = P.v.xzx;
- ^
-program_source:29:9: warning: unused variable 'xzy' [-Wunused-variable]
- half3 xzy = P.v.xzy;
- ^
-program_source:30:9: warning: unused variable 'xzz' [-Wunused-variable]
- half3 xzz = P.v.xzz;
- ^
-program_source:31:9: warning: unused variable 'yxx' [-Wunused-variable]
- half3 yxx = P.v.yxx;
- ^
-program_source:32:9: warning: unused variable 'yxy' [-Wunused-variable]
- half3 yxy = P.v.yxy;
- ^
-program_source:33:9: warning: unused variable 'yxz' [-Wunused-variable]
- half3 yxz = P.v.yxz;
- ^
-program_source:34:9: warning: unused variable 'yyx' [-Wunused-variable]
- half3 yyx = P.v.yyx;
- ^
-program_source:35:9: warning: unused variable 'yyy' [-Wunused-variable]
- half3 yyy = P.v.yyy;
- ^
-program_source:36:9: warning: unused variable 'yyz' [-Wunused-variable]
- half3 yyz = P.v.yyz;
- ^
-program_source:37:9: warning: unused variable 'yzx' [-Wunused-variable]
- half3 yzx = P.v.yzx;
- ^
-program_source:38:9: warning: unused variable 'yzy' [-Wunused-variable]
- half3 yzy = P.v.yzy;
- ^
-program_source:39:9: warning: unused variable 'yzz' [-Wunused-variable]
- half3 yzz = P.v.yzz;
- ^
-program_source:40:9: warning: unused variable 'zxx' [-Wunused-variable]
- half3 zxx = P.v.zxx;
- ^
-program_source:41:9: warning: unused variable 'zxy' [-Wunused-variable]
- half3 zxy = P.v.zxy;
- ^
-program_source:42:9: warning: unused variable 'zxz' [-Wunused-variable]
- half3 zxz = P.v.zxz;
- ^
-program_source:43:9: warning: unused variable 'zyx' [-Wunused-variable]
- half3 zyx = P.v.zyx;
- ^
-program_source:44:9: warning: unused variable 'zyy' [-Wunused-variable]
- half3 zyy = P.v.zyy;
- ^
-program_source:45:9: warning: unused variable 'zyz' [-Wunused-variable]
- half3 zyz = P.v.zyz;
- ^
-program_source:46:9: warning: unused variable 'zzx' [-Wunused-variable]
- half3 zzx = P.v.zzx;
- ^
-program_source:47:9: warning: unused variable 'zzy' [-Wunused-variable]
- half3 zzy = P.v.zzy;
- ^
-program_source:48:9: warning: unused variable 'zzz' [-Wunused-variable]
- half3 zzz = P.v.zzz;
- ^
-program_source:49:9: warning: unused variable 'xxxx' [-Wunused-variable]
- half4 xxxx = P.v.xxxx;
- ^
-program_source:50:9: warning: unused variable 'xxxy' [-Wunused-variable]
- half4 xxxy = P.v.xxxy;
- ^
-program_source:51:9: warning: unused variable 'xxxz' [-Wunused-variable]
- half4 xxxz = P.v.xxxz;
- ^
-program_source:52:9: warning: unused variable 'xxyx' [-Wunused-variable]
- half4 xxyx = P.v.xxyx;
- ^
-program_source:53:9: warning: unused variable 'xxyy' [-Wunused-variable]
- half4 xxyy = P.v.xxyy;
- ^
-program_source:54:9: warning: unused variable 'xxyz' [-Wunused-variable]
- half4 xxyz = P.v.xxyz;
- ^
-program_source:55:9: warning: unused variable 'xxzx' [-Wunused-variable]
- half4 xxzx = P.v.xxzx;
- ^
-program_source:56:9: warning: unused variable 'xxzy' [-Wunused-variable]
- half4 xxzy = P.v.xxzy;
- ^
-program_source:57:9: warning: unused variable 'xxzz' [-Wunused-variable]
- half4 xxzz = P.v.xxzz;
- ^
-program_source:58:9: warning: unused variable 'xyxx' [-Wunused-variable]
- half4 xyxx = P.v.xyxx;
- ^
-program_source:59:9: warning: unused variable 'xyxy' [-Wunused-variable]
- half4 xyxy = P.v.xyxy;
- ^
-program_source:60:9: warning: unused variable 'xyxz' [-Wunused-variable]
- half4 xyxz = P.v.xyxz;
- ^
-program_source:61:9: warning: unused variable 'xyyx' [-Wunused-variable]
- half4 xyyx = P.v.xyyx;
- ^
-program_source:62:9: warning: unused variable 'xyyy' [-Wunused-variable]
- half4 xyyy = P.v.xyyy;
- ^
-program_source:63:9: warning: unused variable 'xyyz' [-Wunused-variable]
- half4 xyyz = P.v.xyyz;
- ^
-program_source:64:9: warning: unused variable 'xyzx' [-Wunused-variable]
- half4 xyzx = P.v.xyzx;
- ^
-program_source:65:9: warning: unused variable 'xyzy' [-Wunused-variable]
- half4 xyzy = P.v.xyzy;
- ^
-program_source:66:9: warning: unused variable 'xyzz' [-Wunused-variable]
- half4 xyzz = P.v.xyzz;
- ^
-program_source:67:9: warning: unused variable 'xzxx' [-Wunused-variable]
- half4 xzxx = P.v.xzxx;
- ^
-program_source:68:9: warning: unused variable 'xzxy' [-Wunused-variable]
- half4 xzxy = P.v.xzxy;
- ^
-program_source:69:9: warning: unused variable 'xzxz' [-Wunused-variable]
- half4 xzxz = P.v.xzxz;
- ^
-program_source:70:9: warning: unused variable 'xzyx' [-Wunused-variable]
- half4 xzyx = P.v.xzyx;
- ^
-program_source:71:9: warning: unused variable 'xzyy' [-Wunused-variable]
- half4 xzyy = P.v.xzyy;
- ^
-program_source:72:9: warning: unused variable 'xzyz' [-Wunused-variable]
- half4 xzyz = P.v.xzyz;
- ^
-program_source:73:9: warning: unused variable 'xzzx' [-Wunused-variable]
- half4 xzzx = P.v.xzzx;
- ^
-program_source:74:9: warning: unused variable 'xzzy' [-Wunused-variable]
- half4 xzzy = P.v.xzzy;
- ^
-program_source:75:9: warning: unused variable 'xzzz' [-Wunused-variable]
- half4 xzzz = P.v.xzzz;
- ^
-program_source:76:9: warning: unused variable 'yxxx' [-Wunused-variable]
- half4 yxxx = P.v.yxxx;
- ^
-program_source:77:9: warning: unused variable 'yxxy' [-Wunused-variable]
- half4 yxxy = P.v.yxxy;
- ^
-program_source:78:9: warning: unused variable 'yxxz' [-Wunused-variable]
- half4 yxxz = P.v.yxxz;
- ^
-program_source:79:9: warning: unused variable 'yxyx' [-Wunused-variable]
- half4 yxyx = P.v.yxyx;
- ^
-program_source:80:9: warning: unused variable 'yxyy' [-Wunused-variable]
- half4 yxyy = P.v.yxyy;
- ^
-program_source:81:9: warning: unused variable 'yxyz' [-Wunused-variable]
- half4 yxyz = P.v.yxyz;
- ^
-program_source:82:9: warning: unused variable 'yxzx' [-Wunused-variable]
- half4 yxzx = P.v.yxzx;
- ^
-program_source:83:9: warning: unused variable 'yxzy' [-Wunused-variable]
- half4 yxzy = P.v.yxzy;
- ^
-program_source:84:9: warning: unused variable 'yxzz' [-Wunused-variable]
- half4 yxzz = P.v.yxzz;
- ^
-program_source:85:9: warning: unused variable 'yyxx' [-Wunused-variable]
- half4 yyxx = P.v.yyxx;
- ^
-program_source:86:9: warning: unused variable 'yyxy' [-Wunused-variable]
- half4 yyxy = P.v.yyxy;
- ^
-program_source:87:9: warning: unused variable 'yyxz' [-Wunused-variable]
- half4 yyxz = P.v.yyxz;
- ^
-program_source:88:9: warning: unused variable 'yyyx' [-Wunused-variable]
- half4 yyyx = P.v.yyyx;
- ^
-program_source:89:9: warning: unused variable 'yyyy' [-Wunused-variable]
- half4 yyyy = P.v.yyyy;
- ^
-program_source:90:9: warning: unused variable 'yyyz' [-Wunused-variable]
- half4 yyyz = P.v.yyyz;
- ^
-program_source:91:9: warning: unused variable 'yyzx' [-Wunused-variable]
- half4 yyzx = P.v.yyzx;
- ^
-program_source:92:9: warning: unused variable 'yyzy' [-Wunused-variable]
- half4 yyzy = P.v.yyzy;
- ^
-program_source:93:9: warning: unused variable 'yyzz' [-Wunused-variable]
- half4 yyzz = P.v.yyzz;
- ^
-program_source:94:9: warning: unused variable 'yzxx' [-Wunused-variable]
- half4 yzxx = P.v.yzxx;
- ^
-program_source:95:9: warning: unused variable 'yzxy' [-Wunused-variable]
- half4 yzxy = P.v.yzxy;
- ^
-program_source:96:9: warning: unused variable 'yzxz' [-Wunused-variable]
- half4 yzxz = P.v.yzxz;
- ^
-program_source:97:9: warning: unused variable 'yzyx' [-Wunused-variable]
- half4 yzyx = P.v.yzyx;
- ^
-program_source:98:9: warning: unused variable 'yzyy' [-Wunused-variable]
- half4 yzyy = P.v.yzyy;
- ^
-program_source:99:9: warning: unused variable 'yzyz' [-Wunused-variable]
- half4 yzyz = P.v.yzyz;
- ^
-program_source:100:9: warning: unused variable 'yzzx' [-Wunused-variable]
- half4 yzzx = P.v.yzzx;
- ^
-program_source:101:9: warning: unused variable 'yzzy' [-Wunused-variable]
- half4 yzzy = P.v.yzzy;
- ^
-program_source:102:9: warning: unused variable 'yzzz' [-Wunused-variable]
- half4 yzzz = P.v.yzzz;
- ^
-program_source:103:9: warning: unused variable 'zxxx' [-Wunused-variable]
- half4 zxxx = P.v.zxxx;
- ^
-program_source:104:9: warning: unused variable 'zxxy' [-Wunused-variable]
- half4 zxxy = P.v.zxxy;
- ^
-program_source:105:9: warning: unused variable 'zxxz' [-Wunused-variable]
- half4 zxxz = P.v.zxxz;
- ^
-program_source:106:9: warning: unused variable 'zxyx' [-Wunused-variable]
- half4 zxyx = P.v.zxyx;
- ^
-program_source:107:9: warning: unused variable 'zxyy' [-Wunused-variable]
- half4 zxyy = P.v.zxyy;
- ^
-program_source:108:9: warning: unused variable 'zxyz' [-Wunused-variable]
- half4 zxyz = P.v.zxyz;
- ^
-program_source:109:9: warning: unused variable 'zxzx' [-Wunused-variable]
- half4 zxzx = P.v.zxzx;
- ^
-program_source:110:9: warning: unused variable 'zxzy' [-Wunused-variable]
- half4 zxzy = P.v.zxzy;
- ^
-program_source:111:9: warning: unused variable 'zxzz' [-Wunused-variable]
- half4 zxzz = P.v.zxzz;
- ^
-program_source:112:9: warning: unused variable 'zyxx' [-Wunused-variable]
- half4 zyxx = P.v.zyxx;
- ^
-program_source:113:9: warning: unused variable 'zyxy' [-Wunused-variable]
- half4 zyxy = P.v.zyxy;
- ^
-program_source:114:9: warning: unused variable 'zyxz' [-Wunused-variable]
- half4 zyxz = P.v.zyxz;
- ^
-program_source:115:9: warning: unused variable 'zyyx' [-Wunused-variable]
- half4 zyyx = P.v.zyyx;
- ^
-program_source:116:9: warning: unused variable 'zyyy' [-Wunused-variable]
- half4 zyyy = P.v.zyyy;
- ^
-program_source:117:9: warning: unused variable 'zyyz' [-Wunused-variable]
- half4 zyyz = P.v.zyyz;
- ^
-program_source:118:9: warning: unused variable 'zyzx' [-Wunused-variable]
- half4 zyzx = P.v.zyzx;
- ^
-program_source:119:9: warning: unused variable 'zyzy' [-Wunused-variable]
- half4 zyzy = P.v.zyzy;
- ^
-program_source:120:9: warning: unused variable 'zyzz' [-Wunused-variable]
- half4 zyzz = P.v.zyzz;
- ^
-program_source:121:9: warning: unused variable 'zzxx' [-Wunused-variable]
- half4 zzxx = P.v.zzxx;
- ^
-program_source:122:9: warning: unused variable 'zzxy' [-Wunused-variable]
- half4 zzxy = P.v.zzxy;
- ^
-program_source:123:9: warning: unused variable 'zzxz' [-Wunused-variable]
- half4 zzxz = P.v.zzxz;
- ^
-program_source:124:9: warning: unused variable 'zzyx' [-Wunused-variable]
- half4 zzyx = P.v.zzyx;
- ^
-program_source:125:9: warning: unused variable 'zzyy' [-Wunused-variable]
- half4 zzyy = P.v.zzyy;
- ^
-program_source:126:9: warning: unused variable 'zzyz' [-Wunused-variable]
- half4 zzyz = P.v.zzyz;
- ^
-program_source:127:9: warning: unused variable 'zzzx' [-Wunused-variable]
- half4 zzzx = P.v.zzzx;
- ^
-program_source:128:9: warning: unused variable 'zzzy' [-Wunused-variable]
- half4 zzzy = P.v.zzzy;
- ^
-program_source:129:9: warning: unused variable 'zzzz' [-Wunused-variable]
- half4 zzzz = P.v.zzzz;
- ^
-
diff --git a/test/tint/expressions/swizzle/read/vec3/f32.wgsl.expected.ir.msl b/test/tint/expressions/swizzle/read/vec3/f32.wgsl.expected.ir.msl
index 8bf573f..c199dc5 100644
--- a/test/tint/expressions/swizzle/read/vec3/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/swizzle/read/vec3/f32.wgsl.expected.ir.msl
@@ -1,499 +1,132 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct S {
float3 v;
};
+struct tint_module_vars_struct {
+ thread S* P;
+};
-thread S P = {};
-void f() {
- float3 v = P.v;
- float x = P.v[0u];
- float y = P.v[1u];
- float z = P.v[2u];
- float2 xx = P.v.xx;
- float2 xy = P.v.xy;
- float2 xz = P.v.xz;
- float2 yx = P.v.yx;
- float2 yy = P.v.yy;
- float2 yz = P.v.yz;
- float2 zx = P.v.zx;
- float2 zy = P.v.zy;
- float2 zz = P.v.zz;
- float3 xxx = P.v.xxx;
- float3 xxy = P.v.xxy;
- float3 xxz = P.v.xxz;
- float3 xyx = P.v.xyx;
- float3 xyy = P.v.xyy;
- float3 xyz = P.v.xyz;
- float3 xzx = P.v.xzx;
- float3 xzy = P.v.xzy;
- float3 xzz = P.v.xzz;
- float3 yxx = P.v.yxx;
- float3 yxy = P.v.yxy;
- float3 yxz = P.v.yxz;
- float3 yyx = P.v.yyx;
- float3 yyy = P.v.yyy;
- float3 yyz = P.v.yyz;
- float3 yzx = P.v.yzx;
- float3 yzy = P.v.yzy;
- float3 yzz = P.v.yzz;
- float3 zxx = P.v.zxx;
- float3 zxy = P.v.zxy;
- float3 zxz = P.v.zxz;
- float3 zyx = P.v.zyx;
- float3 zyy = P.v.zyy;
- float3 zyz = P.v.zyz;
- float3 zzx = P.v.zzx;
- float3 zzy = P.v.zzy;
- float3 zzz = P.v.zzz;
- float4 xxxx = P.v.xxxx;
- float4 xxxy = P.v.xxxy;
- float4 xxxz = P.v.xxxz;
- float4 xxyx = P.v.xxyx;
- float4 xxyy = P.v.xxyy;
- float4 xxyz = P.v.xxyz;
- float4 xxzx = P.v.xxzx;
- float4 xxzy = P.v.xxzy;
- float4 xxzz = P.v.xxzz;
- float4 xyxx = P.v.xyxx;
- float4 xyxy = P.v.xyxy;
- float4 xyxz = P.v.xyxz;
- float4 xyyx = P.v.xyyx;
- float4 xyyy = P.v.xyyy;
- float4 xyyz = P.v.xyyz;
- float4 xyzx = P.v.xyzx;
- float4 xyzy = P.v.xyzy;
- float4 xyzz = P.v.xyzz;
- float4 xzxx = P.v.xzxx;
- float4 xzxy = P.v.xzxy;
- float4 xzxz = P.v.xzxz;
- float4 xzyx = P.v.xzyx;
- float4 xzyy = P.v.xzyy;
- float4 xzyz = P.v.xzyz;
- float4 xzzx = P.v.xzzx;
- float4 xzzy = P.v.xzzy;
- float4 xzzz = P.v.xzzz;
- float4 yxxx = P.v.yxxx;
- float4 yxxy = P.v.yxxy;
- float4 yxxz = P.v.yxxz;
- float4 yxyx = P.v.yxyx;
- float4 yxyy = P.v.yxyy;
- float4 yxyz = P.v.yxyz;
- float4 yxzx = P.v.yxzx;
- float4 yxzy = P.v.yxzy;
- float4 yxzz = P.v.yxzz;
- float4 yyxx = P.v.yyxx;
- float4 yyxy = P.v.yyxy;
- float4 yyxz = P.v.yyxz;
- float4 yyyx = P.v.yyyx;
- float4 yyyy = P.v.yyyy;
- float4 yyyz = P.v.yyyz;
- float4 yyzx = P.v.yyzx;
- float4 yyzy = P.v.yyzy;
- float4 yyzz = P.v.yyzz;
- float4 yzxx = P.v.yzxx;
- float4 yzxy = P.v.yzxy;
- float4 yzxz = P.v.yzxz;
- float4 yzyx = P.v.yzyx;
- float4 yzyy = P.v.yzyy;
- float4 yzyz = P.v.yzyz;
- float4 yzzx = P.v.yzzx;
- float4 yzzy = P.v.yzzy;
- float4 yzzz = P.v.yzzz;
- float4 zxxx = P.v.zxxx;
- float4 zxxy = P.v.zxxy;
- float4 zxxz = P.v.zxxz;
- float4 zxyx = P.v.zxyx;
- float4 zxyy = P.v.zxyy;
- float4 zxyz = P.v.zxyz;
- float4 zxzx = P.v.zxzx;
- float4 zxzy = P.v.zxzy;
- float4 zxzz = P.v.zxzz;
- float4 zyxx = P.v.zyxx;
- float4 zyxy = P.v.zyxy;
- float4 zyxz = P.v.zyxz;
- float4 zyyx = P.v.zyyx;
- float4 zyyy = P.v.zyyy;
- float4 zyyz = P.v.zyyz;
- float4 zyzx = P.v.zyzx;
- float4 zyzy = P.v.zyzy;
- float4 zyzz = P.v.zyzz;
- float4 zzxx = P.v.zzxx;
- float4 zzxy = P.v.zzxy;
- float4 zzxz = P.v.zzxz;
- float4 zzyx = P.v.zzyx;
- float4 zzyy = P.v.zzyy;
- float4 zzyz = P.v.zzyz;
- float4 zzzx = P.v.zzzx;
- float4 zzzy = P.v.zzzy;
- float4 zzzz = P.v.zzzz;
+void f(tint_module_vars_struct tint_module_vars) {
+ float3 v = (*tint_module_vars.P).v;
+ float x = (*tint_module_vars.P).v[0u];
+ float y = (*tint_module_vars.P).v[1u];
+ float z = (*tint_module_vars.P).v[2u];
+ float2 xx = (*tint_module_vars.P).v.xx;
+ float2 xy = (*tint_module_vars.P).v.xy;
+ float2 xz = (*tint_module_vars.P).v.xz;
+ float2 yx = (*tint_module_vars.P).v.yx;
+ float2 yy = (*tint_module_vars.P).v.yy;
+ float2 yz = (*tint_module_vars.P).v.yz;
+ float2 zx = (*tint_module_vars.P).v.zx;
+ float2 zy = (*tint_module_vars.P).v.zy;
+ float2 zz = (*tint_module_vars.P).v.zz;
+ float3 xxx = (*tint_module_vars.P).v.xxx;
+ float3 xxy = (*tint_module_vars.P).v.xxy;
+ float3 xxz = (*tint_module_vars.P).v.xxz;
+ float3 xyx = (*tint_module_vars.P).v.xyx;
+ float3 xyy = (*tint_module_vars.P).v.xyy;
+ float3 xyz = (*tint_module_vars.P).v.xyz;
+ float3 xzx = (*tint_module_vars.P).v.xzx;
+ float3 xzy = (*tint_module_vars.P).v.xzy;
+ float3 xzz = (*tint_module_vars.P).v.xzz;
+ float3 yxx = (*tint_module_vars.P).v.yxx;
+ float3 yxy = (*tint_module_vars.P).v.yxy;
+ float3 yxz = (*tint_module_vars.P).v.yxz;
+ float3 yyx = (*tint_module_vars.P).v.yyx;
+ float3 yyy = (*tint_module_vars.P).v.yyy;
+ float3 yyz = (*tint_module_vars.P).v.yyz;
+ float3 yzx = (*tint_module_vars.P).v.yzx;
+ float3 yzy = (*tint_module_vars.P).v.yzy;
+ float3 yzz = (*tint_module_vars.P).v.yzz;
+ float3 zxx = (*tint_module_vars.P).v.zxx;
+ float3 zxy = (*tint_module_vars.P).v.zxy;
+ float3 zxz = (*tint_module_vars.P).v.zxz;
+ float3 zyx = (*tint_module_vars.P).v.zyx;
+ float3 zyy = (*tint_module_vars.P).v.zyy;
+ float3 zyz = (*tint_module_vars.P).v.zyz;
+ float3 zzx = (*tint_module_vars.P).v.zzx;
+ float3 zzy = (*tint_module_vars.P).v.zzy;
+ float3 zzz = (*tint_module_vars.P).v.zzz;
+ float4 xxxx = (*tint_module_vars.P).v.xxxx;
+ float4 xxxy = (*tint_module_vars.P).v.xxxy;
+ float4 xxxz = (*tint_module_vars.P).v.xxxz;
+ float4 xxyx = (*tint_module_vars.P).v.xxyx;
+ float4 xxyy = (*tint_module_vars.P).v.xxyy;
+ float4 xxyz = (*tint_module_vars.P).v.xxyz;
+ float4 xxzx = (*tint_module_vars.P).v.xxzx;
+ float4 xxzy = (*tint_module_vars.P).v.xxzy;
+ float4 xxzz = (*tint_module_vars.P).v.xxzz;
+ float4 xyxx = (*tint_module_vars.P).v.xyxx;
+ float4 xyxy = (*tint_module_vars.P).v.xyxy;
+ float4 xyxz = (*tint_module_vars.P).v.xyxz;
+ float4 xyyx = (*tint_module_vars.P).v.xyyx;
+ float4 xyyy = (*tint_module_vars.P).v.xyyy;
+ float4 xyyz = (*tint_module_vars.P).v.xyyz;
+ float4 xyzx = (*tint_module_vars.P).v.xyzx;
+ float4 xyzy = (*tint_module_vars.P).v.xyzy;
+ float4 xyzz = (*tint_module_vars.P).v.xyzz;
+ float4 xzxx = (*tint_module_vars.P).v.xzxx;
+ float4 xzxy = (*tint_module_vars.P).v.xzxy;
+ float4 xzxz = (*tint_module_vars.P).v.xzxz;
+ float4 xzyx = (*tint_module_vars.P).v.xzyx;
+ float4 xzyy = (*tint_module_vars.P).v.xzyy;
+ float4 xzyz = (*tint_module_vars.P).v.xzyz;
+ float4 xzzx = (*tint_module_vars.P).v.xzzx;
+ float4 xzzy = (*tint_module_vars.P).v.xzzy;
+ float4 xzzz = (*tint_module_vars.P).v.xzzz;
+ float4 yxxx = (*tint_module_vars.P).v.yxxx;
+ float4 yxxy = (*tint_module_vars.P).v.yxxy;
+ float4 yxxz = (*tint_module_vars.P).v.yxxz;
+ float4 yxyx = (*tint_module_vars.P).v.yxyx;
+ float4 yxyy = (*tint_module_vars.P).v.yxyy;
+ float4 yxyz = (*tint_module_vars.P).v.yxyz;
+ float4 yxzx = (*tint_module_vars.P).v.yxzx;
+ float4 yxzy = (*tint_module_vars.P).v.yxzy;
+ float4 yxzz = (*tint_module_vars.P).v.yxzz;
+ float4 yyxx = (*tint_module_vars.P).v.yyxx;
+ float4 yyxy = (*tint_module_vars.P).v.yyxy;
+ float4 yyxz = (*tint_module_vars.P).v.yyxz;
+ float4 yyyx = (*tint_module_vars.P).v.yyyx;
+ float4 yyyy = (*tint_module_vars.P).v.yyyy;
+ float4 yyyz = (*tint_module_vars.P).v.yyyz;
+ float4 yyzx = (*tint_module_vars.P).v.yyzx;
+ float4 yyzy = (*tint_module_vars.P).v.yyzy;
+ float4 yyzz = (*tint_module_vars.P).v.yyzz;
+ float4 yzxx = (*tint_module_vars.P).v.yzxx;
+ float4 yzxy = (*tint_module_vars.P).v.yzxy;
+ float4 yzxz = (*tint_module_vars.P).v.yzxz;
+ float4 yzyx = (*tint_module_vars.P).v.yzyx;
+ float4 yzyy = (*tint_module_vars.P).v.yzyy;
+ float4 yzyz = (*tint_module_vars.P).v.yzyz;
+ float4 yzzx = (*tint_module_vars.P).v.yzzx;
+ float4 yzzy = (*tint_module_vars.P).v.yzzy;
+ float4 yzzz = (*tint_module_vars.P).v.yzzz;
+ float4 zxxx = (*tint_module_vars.P).v.zxxx;
+ float4 zxxy = (*tint_module_vars.P).v.zxxy;
+ float4 zxxz = (*tint_module_vars.P).v.zxxz;
+ float4 zxyx = (*tint_module_vars.P).v.zxyx;
+ float4 zxyy = (*tint_module_vars.P).v.zxyy;
+ float4 zxyz = (*tint_module_vars.P).v.zxyz;
+ float4 zxzx = (*tint_module_vars.P).v.zxzx;
+ float4 zxzy = (*tint_module_vars.P).v.zxzy;
+ float4 zxzz = (*tint_module_vars.P).v.zxzz;
+ float4 zyxx = (*tint_module_vars.P).v.zyxx;
+ float4 zyxy = (*tint_module_vars.P).v.zyxy;
+ float4 zyxz = (*tint_module_vars.P).v.zyxz;
+ float4 zyyx = (*tint_module_vars.P).v.zyyx;
+ float4 zyyy = (*tint_module_vars.P).v.zyyy;
+ float4 zyyz = (*tint_module_vars.P).v.zyyz;
+ float4 zyzx = (*tint_module_vars.P).v.zyzx;
+ float4 zyzy = (*tint_module_vars.P).v.zyzy;
+ float4 zyzz = (*tint_module_vars.P).v.zyzz;
+ float4 zzxx = (*tint_module_vars.P).v.zzxx;
+ float4 zzxy = (*tint_module_vars.P).v.zzxy;
+ float4 zzxz = (*tint_module_vars.P).v.zzxz;
+ float4 zzyx = (*tint_module_vars.P).v.zzyx;
+ float4 zzyy = (*tint_module_vars.P).v.zzyy;
+ float4 zzyz = (*tint_module_vars.P).v.zzyz;
+ float4 zzzx = (*tint_module_vars.P).v.zzzx;
+ float4 zzzy = (*tint_module_vars.P).v.zzzy;
+ float4 zzzz = (*tint_module_vars.P).v.zzzz;
}
-program_source:7:10: error: program scope variable must reside in constant address space
-thread S P = {};
- ^
-program_source:9:10: warning: unused variable 'v' [-Wunused-variable]
- float3 v = P.v;
- ^
-program_source:10:9: warning: unused variable 'x' [-Wunused-variable]
- float x = P.v[0u];
- ^
-program_source:11:9: warning: unused variable 'y' [-Wunused-variable]
- float y = P.v[1u];
- ^
-program_source:12:9: warning: unused variable 'z' [-Wunused-variable]
- float z = P.v[2u];
- ^
-program_source:13:10: warning: unused variable 'xx' [-Wunused-variable]
- float2 xx = P.v.xx;
- ^
-program_source:14:10: warning: unused variable 'xy' [-Wunused-variable]
- float2 xy = P.v.xy;
- ^
-program_source:15:10: warning: unused variable 'xz' [-Wunused-variable]
- float2 xz = P.v.xz;
- ^
-program_source:16:10: warning: unused variable 'yx' [-Wunused-variable]
- float2 yx = P.v.yx;
- ^
-program_source:17:10: warning: unused variable 'yy' [-Wunused-variable]
- float2 yy = P.v.yy;
- ^
-program_source:18:10: warning: unused variable 'yz' [-Wunused-variable]
- float2 yz = P.v.yz;
- ^
-program_source:19:10: warning: unused variable 'zx' [-Wunused-variable]
- float2 zx = P.v.zx;
- ^
-program_source:20:10: warning: unused variable 'zy' [-Wunused-variable]
- float2 zy = P.v.zy;
- ^
-program_source:21:10: warning: unused variable 'zz' [-Wunused-variable]
- float2 zz = P.v.zz;
- ^
-program_source:22:10: warning: unused variable 'xxx' [-Wunused-variable]
- float3 xxx = P.v.xxx;
- ^
-program_source:23:10: warning: unused variable 'xxy' [-Wunused-variable]
- float3 xxy = P.v.xxy;
- ^
-program_source:24:10: warning: unused variable 'xxz' [-Wunused-variable]
- float3 xxz = P.v.xxz;
- ^
-program_source:25:10: warning: unused variable 'xyx' [-Wunused-variable]
- float3 xyx = P.v.xyx;
- ^
-program_source:26:10: warning: unused variable 'xyy' [-Wunused-variable]
- float3 xyy = P.v.xyy;
- ^
-program_source:27:10: warning: unused variable 'xyz' [-Wunused-variable]
- float3 xyz = P.v.xyz;
- ^
-program_source:28:10: warning: unused variable 'xzx' [-Wunused-variable]
- float3 xzx = P.v.xzx;
- ^
-program_source:29:10: warning: unused variable 'xzy' [-Wunused-variable]
- float3 xzy = P.v.xzy;
- ^
-program_source:30:10: warning: unused variable 'xzz' [-Wunused-variable]
- float3 xzz = P.v.xzz;
- ^
-program_source:31:10: warning: unused variable 'yxx' [-Wunused-variable]
- float3 yxx = P.v.yxx;
- ^
-program_source:32:10: warning: unused variable 'yxy' [-Wunused-variable]
- float3 yxy = P.v.yxy;
- ^
-program_source:33:10: warning: unused variable 'yxz' [-Wunused-variable]
- float3 yxz = P.v.yxz;
- ^
-program_source:34:10: warning: unused variable 'yyx' [-Wunused-variable]
- float3 yyx = P.v.yyx;
- ^
-program_source:35:10: warning: unused variable 'yyy' [-Wunused-variable]
- float3 yyy = P.v.yyy;
- ^
-program_source:36:10: warning: unused variable 'yyz' [-Wunused-variable]
- float3 yyz = P.v.yyz;
- ^
-program_source:37:10: warning: unused variable 'yzx' [-Wunused-variable]
- float3 yzx = P.v.yzx;
- ^
-program_source:38:10: warning: unused variable 'yzy' [-Wunused-variable]
- float3 yzy = P.v.yzy;
- ^
-program_source:39:10: warning: unused variable 'yzz' [-Wunused-variable]
- float3 yzz = P.v.yzz;
- ^
-program_source:40:10: warning: unused variable 'zxx' [-Wunused-variable]
- float3 zxx = P.v.zxx;
- ^
-program_source:41:10: warning: unused variable 'zxy' [-Wunused-variable]
- float3 zxy = P.v.zxy;
- ^
-program_source:42:10: warning: unused variable 'zxz' [-Wunused-variable]
- float3 zxz = P.v.zxz;
- ^
-program_source:43:10: warning: unused variable 'zyx' [-Wunused-variable]
- float3 zyx = P.v.zyx;
- ^
-program_source:44:10: warning: unused variable 'zyy' [-Wunused-variable]
- float3 zyy = P.v.zyy;
- ^
-program_source:45:10: warning: unused variable 'zyz' [-Wunused-variable]
- float3 zyz = P.v.zyz;
- ^
-program_source:46:10: warning: unused variable 'zzx' [-Wunused-variable]
- float3 zzx = P.v.zzx;
- ^
-program_source:47:10: warning: unused variable 'zzy' [-Wunused-variable]
- float3 zzy = P.v.zzy;
- ^
-program_source:48:10: warning: unused variable 'zzz' [-Wunused-variable]
- float3 zzz = P.v.zzz;
- ^
-program_source:49:10: warning: unused variable 'xxxx' [-Wunused-variable]
- float4 xxxx = P.v.xxxx;
- ^
-program_source:50:10: warning: unused variable 'xxxy' [-Wunused-variable]
- float4 xxxy = P.v.xxxy;
- ^
-program_source:51:10: warning: unused variable 'xxxz' [-Wunused-variable]
- float4 xxxz = P.v.xxxz;
- ^
-program_source:52:10: warning: unused variable 'xxyx' [-Wunused-variable]
- float4 xxyx = P.v.xxyx;
- ^
-program_source:53:10: warning: unused variable 'xxyy' [-Wunused-variable]
- float4 xxyy = P.v.xxyy;
- ^
-program_source:54:10: warning: unused variable 'xxyz' [-Wunused-variable]
- float4 xxyz = P.v.xxyz;
- ^
-program_source:55:10: warning: unused variable 'xxzx' [-Wunused-variable]
- float4 xxzx = P.v.xxzx;
- ^
-program_source:56:10: warning: unused variable 'xxzy' [-Wunused-variable]
- float4 xxzy = P.v.xxzy;
- ^
-program_source:57:10: warning: unused variable 'xxzz' [-Wunused-variable]
- float4 xxzz = P.v.xxzz;
- ^
-program_source:58:10: warning: unused variable 'xyxx' [-Wunused-variable]
- float4 xyxx = P.v.xyxx;
- ^
-program_source:59:10: warning: unused variable 'xyxy' [-Wunused-variable]
- float4 xyxy = P.v.xyxy;
- ^
-program_source:60:10: warning: unused variable 'xyxz' [-Wunused-variable]
- float4 xyxz = P.v.xyxz;
- ^
-program_source:61:10: warning: unused variable 'xyyx' [-Wunused-variable]
- float4 xyyx = P.v.xyyx;
- ^
-program_source:62:10: warning: unused variable 'xyyy' [-Wunused-variable]
- float4 xyyy = P.v.xyyy;
- ^
-program_source:63:10: warning: unused variable 'xyyz' [-Wunused-variable]
- float4 xyyz = P.v.xyyz;
- ^
-program_source:64:10: warning: unused variable 'xyzx' [-Wunused-variable]
- float4 xyzx = P.v.xyzx;
- ^
-program_source:65:10: warning: unused variable 'xyzy' [-Wunused-variable]
- float4 xyzy = P.v.xyzy;
- ^
-program_source:66:10: warning: unused variable 'xyzz' [-Wunused-variable]
- float4 xyzz = P.v.xyzz;
- ^
-program_source:67:10: warning: unused variable 'xzxx' [-Wunused-variable]
- float4 xzxx = P.v.xzxx;
- ^
-program_source:68:10: warning: unused variable 'xzxy' [-Wunused-variable]
- float4 xzxy = P.v.xzxy;
- ^
-program_source:69:10: warning: unused variable 'xzxz' [-Wunused-variable]
- float4 xzxz = P.v.xzxz;
- ^
-program_source:70:10: warning: unused variable 'xzyx' [-Wunused-variable]
- float4 xzyx = P.v.xzyx;
- ^
-program_source:71:10: warning: unused variable 'xzyy' [-Wunused-variable]
- float4 xzyy = P.v.xzyy;
- ^
-program_source:72:10: warning: unused variable 'xzyz' [-Wunused-variable]
- float4 xzyz = P.v.xzyz;
- ^
-program_source:73:10: warning: unused variable 'xzzx' [-Wunused-variable]
- float4 xzzx = P.v.xzzx;
- ^
-program_source:74:10: warning: unused variable 'xzzy' [-Wunused-variable]
- float4 xzzy = P.v.xzzy;
- ^
-program_source:75:10: warning: unused variable 'xzzz' [-Wunused-variable]
- float4 xzzz = P.v.xzzz;
- ^
-program_source:76:10: warning: unused variable 'yxxx' [-Wunused-variable]
- float4 yxxx = P.v.yxxx;
- ^
-program_source:77:10: warning: unused variable 'yxxy' [-Wunused-variable]
- float4 yxxy = P.v.yxxy;
- ^
-program_source:78:10: warning: unused variable 'yxxz' [-Wunused-variable]
- float4 yxxz = P.v.yxxz;
- ^
-program_source:79:10: warning: unused variable 'yxyx' [-Wunused-variable]
- float4 yxyx = P.v.yxyx;
- ^
-program_source:80:10: warning: unused variable 'yxyy' [-Wunused-variable]
- float4 yxyy = P.v.yxyy;
- ^
-program_source:81:10: warning: unused variable 'yxyz' [-Wunused-variable]
- float4 yxyz = P.v.yxyz;
- ^
-program_source:82:10: warning: unused variable 'yxzx' [-Wunused-variable]
- float4 yxzx = P.v.yxzx;
- ^
-program_source:83:10: warning: unused variable 'yxzy' [-Wunused-variable]
- float4 yxzy = P.v.yxzy;
- ^
-program_source:84:10: warning: unused variable 'yxzz' [-Wunused-variable]
- float4 yxzz = P.v.yxzz;
- ^
-program_source:85:10: warning: unused variable 'yyxx' [-Wunused-variable]
- float4 yyxx = P.v.yyxx;
- ^
-program_source:86:10: warning: unused variable 'yyxy' [-Wunused-variable]
- float4 yyxy = P.v.yyxy;
- ^
-program_source:87:10: warning: unused variable 'yyxz' [-Wunused-variable]
- float4 yyxz = P.v.yyxz;
- ^
-program_source:88:10: warning: unused variable 'yyyx' [-Wunused-variable]
- float4 yyyx = P.v.yyyx;
- ^
-program_source:89:10: warning: unused variable 'yyyy' [-Wunused-variable]
- float4 yyyy = P.v.yyyy;
- ^
-program_source:90:10: warning: unused variable 'yyyz' [-Wunused-variable]
- float4 yyyz = P.v.yyyz;
- ^
-program_source:91:10: warning: unused variable 'yyzx' [-Wunused-variable]
- float4 yyzx = P.v.yyzx;
- ^
-program_source:92:10: warning: unused variable 'yyzy' [-Wunused-variable]
- float4 yyzy = P.v.yyzy;
- ^
-program_source:93:10: warning: unused variable 'yyzz' [-Wunused-variable]
- float4 yyzz = P.v.yyzz;
- ^
-program_source:94:10: warning: unused variable 'yzxx' [-Wunused-variable]
- float4 yzxx = P.v.yzxx;
- ^
-program_source:95:10: warning: unused variable 'yzxy' [-Wunused-variable]
- float4 yzxy = P.v.yzxy;
- ^
-program_source:96:10: warning: unused variable 'yzxz' [-Wunused-variable]
- float4 yzxz = P.v.yzxz;
- ^
-program_source:97:10: warning: unused variable 'yzyx' [-Wunused-variable]
- float4 yzyx = P.v.yzyx;
- ^
-program_source:98:10: warning: unused variable 'yzyy' [-Wunused-variable]
- float4 yzyy = P.v.yzyy;
- ^
-program_source:99:10: warning: unused variable 'yzyz' [-Wunused-variable]
- float4 yzyz = P.v.yzyz;
- ^
-program_source:100:10: warning: unused variable 'yzzx' [-Wunused-variable]
- float4 yzzx = P.v.yzzx;
- ^
-program_source:101:10: warning: unused variable 'yzzy' [-Wunused-variable]
- float4 yzzy = P.v.yzzy;
- ^
-program_source:102:10: warning: unused variable 'yzzz' [-Wunused-variable]
- float4 yzzz = P.v.yzzz;
- ^
-program_source:103:10: warning: unused variable 'zxxx' [-Wunused-variable]
- float4 zxxx = P.v.zxxx;
- ^
-program_source:104:10: warning: unused variable 'zxxy' [-Wunused-variable]
- float4 zxxy = P.v.zxxy;
- ^
-program_source:105:10: warning: unused variable 'zxxz' [-Wunused-variable]
- float4 zxxz = P.v.zxxz;
- ^
-program_source:106:10: warning: unused variable 'zxyx' [-Wunused-variable]
- float4 zxyx = P.v.zxyx;
- ^
-program_source:107:10: warning: unused variable 'zxyy' [-Wunused-variable]
- float4 zxyy = P.v.zxyy;
- ^
-program_source:108:10: warning: unused variable 'zxyz' [-Wunused-variable]
- float4 zxyz = P.v.zxyz;
- ^
-program_source:109:10: warning: unused variable 'zxzx' [-Wunused-variable]
- float4 zxzx = P.v.zxzx;
- ^
-program_source:110:10: warning: unused variable 'zxzy' [-Wunused-variable]
- float4 zxzy = P.v.zxzy;
- ^
-program_source:111:10: warning: unused variable 'zxzz' [-Wunused-variable]
- float4 zxzz = P.v.zxzz;
- ^
-program_source:112:10: warning: unused variable 'zyxx' [-Wunused-variable]
- float4 zyxx = P.v.zyxx;
- ^
-program_source:113:10: warning: unused variable 'zyxy' [-Wunused-variable]
- float4 zyxy = P.v.zyxy;
- ^
-program_source:114:10: warning: unused variable 'zyxz' [-Wunused-variable]
- float4 zyxz = P.v.zyxz;
- ^
-program_source:115:10: warning: unused variable 'zyyx' [-Wunused-variable]
- float4 zyyx = P.v.zyyx;
- ^
-program_source:116:10: warning: unused variable 'zyyy' [-Wunused-variable]
- float4 zyyy = P.v.zyyy;
- ^
-program_source:117:10: warning: unused variable 'zyyz' [-Wunused-variable]
- float4 zyyz = P.v.zyyz;
- ^
-program_source:118:10: warning: unused variable 'zyzx' [-Wunused-variable]
- float4 zyzx = P.v.zyzx;
- ^
-program_source:119:10: warning: unused variable 'zyzy' [-Wunused-variable]
- float4 zyzy = P.v.zyzy;
- ^
-program_source:120:10: warning: unused variable 'zyzz' [-Wunused-variable]
- float4 zyzz = P.v.zyzz;
- ^
-program_source:121:10: warning: unused variable 'zzxx' [-Wunused-variable]
- float4 zzxx = P.v.zzxx;
- ^
-program_source:122:10: warning: unused variable 'zzxy' [-Wunused-variable]
- float4 zzxy = P.v.zzxy;
- ^
-program_source:123:10: warning: unused variable 'zzxz' [-Wunused-variable]
- float4 zzxz = P.v.zzxz;
- ^
-program_source:124:10: warning: unused variable 'zzyx' [-Wunused-variable]
- float4 zzyx = P.v.zzyx;
- ^
-program_source:125:10: warning: unused variable 'zzyy' [-Wunused-variable]
- float4 zzyy = P.v.zzyy;
- ^
-program_source:126:10: warning: unused variable 'zzyz' [-Wunused-variable]
- float4 zzyz = P.v.zzyz;
- ^
-program_source:127:10: warning: unused variable 'zzzx' [-Wunused-variable]
- float4 zzzx = P.v.zzzx;
- ^
-program_source:128:10: warning: unused variable 'zzzy' [-Wunused-variable]
- float4 zzzy = P.v.zzzy;
- ^
-program_source:129:10: warning: unused variable 'zzzz' [-Wunused-variable]
- float4 zzzz = P.v.zzzz;
- ^
-
diff --git a/test/tint/expressions/swizzle/read/vec3/i32.wgsl.expected.ir.msl b/test/tint/expressions/swizzle/read/vec3/i32.wgsl.expected.ir.msl
index f8f1803..c9f1cc0 100644
--- a/test/tint/expressions/swizzle/read/vec3/i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/swizzle/read/vec3/i32.wgsl.expected.ir.msl
@@ -1,499 +1,132 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct S {
int3 v;
};
+struct tint_module_vars_struct {
+ thread S* P;
+};
-thread S P = {};
-void f() {
- int3 v = P.v;
- int x = P.v[0u];
- int y = P.v[1u];
- int z = P.v[2u];
- int2 xx = P.v.xx;
- int2 xy = P.v.xy;
- int2 xz = P.v.xz;
- int2 yx = P.v.yx;
- int2 yy = P.v.yy;
- int2 yz = P.v.yz;
- int2 zx = P.v.zx;
- int2 zy = P.v.zy;
- int2 zz = P.v.zz;
- int3 xxx = P.v.xxx;
- int3 xxy = P.v.xxy;
- int3 xxz = P.v.xxz;
- int3 xyx = P.v.xyx;
- int3 xyy = P.v.xyy;
- int3 xyz = P.v.xyz;
- int3 xzx = P.v.xzx;
- int3 xzy = P.v.xzy;
- int3 xzz = P.v.xzz;
- int3 yxx = P.v.yxx;
- int3 yxy = P.v.yxy;
- int3 yxz = P.v.yxz;
- int3 yyx = P.v.yyx;
- int3 yyy = P.v.yyy;
- int3 yyz = P.v.yyz;
- int3 yzx = P.v.yzx;
- int3 yzy = P.v.yzy;
- int3 yzz = P.v.yzz;
- int3 zxx = P.v.zxx;
- int3 zxy = P.v.zxy;
- int3 zxz = P.v.zxz;
- int3 zyx = P.v.zyx;
- int3 zyy = P.v.zyy;
- int3 zyz = P.v.zyz;
- int3 zzx = P.v.zzx;
- int3 zzy = P.v.zzy;
- int3 zzz = P.v.zzz;
- int4 xxxx = P.v.xxxx;
- int4 xxxy = P.v.xxxy;
- int4 xxxz = P.v.xxxz;
- int4 xxyx = P.v.xxyx;
- int4 xxyy = P.v.xxyy;
- int4 xxyz = P.v.xxyz;
- int4 xxzx = P.v.xxzx;
- int4 xxzy = P.v.xxzy;
- int4 xxzz = P.v.xxzz;
- int4 xyxx = P.v.xyxx;
- int4 xyxy = P.v.xyxy;
- int4 xyxz = P.v.xyxz;
- int4 xyyx = P.v.xyyx;
- int4 xyyy = P.v.xyyy;
- int4 xyyz = P.v.xyyz;
- int4 xyzx = P.v.xyzx;
- int4 xyzy = P.v.xyzy;
- int4 xyzz = P.v.xyzz;
- int4 xzxx = P.v.xzxx;
- int4 xzxy = P.v.xzxy;
- int4 xzxz = P.v.xzxz;
- int4 xzyx = P.v.xzyx;
- int4 xzyy = P.v.xzyy;
- int4 xzyz = P.v.xzyz;
- int4 xzzx = P.v.xzzx;
- int4 xzzy = P.v.xzzy;
- int4 xzzz = P.v.xzzz;
- int4 yxxx = P.v.yxxx;
- int4 yxxy = P.v.yxxy;
- int4 yxxz = P.v.yxxz;
- int4 yxyx = P.v.yxyx;
- int4 yxyy = P.v.yxyy;
- int4 yxyz = P.v.yxyz;
- int4 yxzx = P.v.yxzx;
- int4 yxzy = P.v.yxzy;
- int4 yxzz = P.v.yxzz;
- int4 yyxx = P.v.yyxx;
- int4 yyxy = P.v.yyxy;
- int4 yyxz = P.v.yyxz;
- int4 yyyx = P.v.yyyx;
- int4 yyyy = P.v.yyyy;
- int4 yyyz = P.v.yyyz;
- int4 yyzx = P.v.yyzx;
- int4 yyzy = P.v.yyzy;
- int4 yyzz = P.v.yyzz;
- int4 yzxx = P.v.yzxx;
- int4 yzxy = P.v.yzxy;
- int4 yzxz = P.v.yzxz;
- int4 yzyx = P.v.yzyx;
- int4 yzyy = P.v.yzyy;
- int4 yzyz = P.v.yzyz;
- int4 yzzx = P.v.yzzx;
- int4 yzzy = P.v.yzzy;
- int4 yzzz = P.v.yzzz;
- int4 zxxx = P.v.zxxx;
- int4 zxxy = P.v.zxxy;
- int4 zxxz = P.v.zxxz;
- int4 zxyx = P.v.zxyx;
- int4 zxyy = P.v.zxyy;
- int4 zxyz = P.v.zxyz;
- int4 zxzx = P.v.zxzx;
- int4 zxzy = P.v.zxzy;
- int4 zxzz = P.v.zxzz;
- int4 zyxx = P.v.zyxx;
- int4 zyxy = P.v.zyxy;
- int4 zyxz = P.v.zyxz;
- int4 zyyx = P.v.zyyx;
- int4 zyyy = P.v.zyyy;
- int4 zyyz = P.v.zyyz;
- int4 zyzx = P.v.zyzx;
- int4 zyzy = P.v.zyzy;
- int4 zyzz = P.v.zyzz;
- int4 zzxx = P.v.zzxx;
- int4 zzxy = P.v.zzxy;
- int4 zzxz = P.v.zzxz;
- int4 zzyx = P.v.zzyx;
- int4 zzyy = P.v.zzyy;
- int4 zzyz = P.v.zzyz;
- int4 zzzx = P.v.zzzx;
- int4 zzzy = P.v.zzzy;
- int4 zzzz = P.v.zzzz;
+void f(tint_module_vars_struct tint_module_vars) {
+ int3 v = (*tint_module_vars.P).v;
+ int x = (*tint_module_vars.P).v[0u];
+ int y = (*tint_module_vars.P).v[1u];
+ int z = (*tint_module_vars.P).v[2u];
+ int2 xx = (*tint_module_vars.P).v.xx;
+ int2 xy = (*tint_module_vars.P).v.xy;
+ int2 xz = (*tint_module_vars.P).v.xz;
+ int2 yx = (*tint_module_vars.P).v.yx;
+ int2 yy = (*tint_module_vars.P).v.yy;
+ int2 yz = (*tint_module_vars.P).v.yz;
+ int2 zx = (*tint_module_vars.P).v.zx;
+ int2 zy = (*tint_module_vars.P).v.zy;
+ int2 zz = (*tint_module_vars.P).v.zz;
+ int3 xxx = (*tint_module_vars.P).v.xxx;
+ int3 xxy = (*tint_module_vars.P).v.xxy;
+ int3 xxz = (*tint_module_vars.P).v.xxz;
+ int3 xyx = (*tint_module_vars.P).v.xyx;
+ int3 xyy = (*tint_module_vars.P).v.xyy;
+ int3 xyz = (*tint_module_vars.P).v.xyz;
+ int3 xzx = (*tint_module_vars.P).v.xzx;
+ int3 xzy = (*tint_module_vars.P).v.xzy;
+ int3 xzz = (*tint_module_vars.P).v.xzz;
+ int3 yxx = (*tint_module_vars.P).v.yxx;
+ int3 yxy = (*tint_module_vars.P).v.yxy;
+ int3 yxz = (*tint_module_vars.P).v.yxz;
+ int3 yyx = (*tint_module_vars.P).v.yyx;
+ int3 yyy = (*tint_module_vars.P).v.yyy;
+ int3 yyz = (*tint_module_vars.P).v.yyz;
+ int3 yzx = (*tint_module_vars.P).v.yzx;
+ int3 yzy = (*tint_module_vars.P).v.yzy;
+ int3 yzz = (*tint_module_vars.P).v.yzz;
+ int3 zxx = (*tint_module_vars.P).v.zxx;
+ int3 zxy = (*tint_module_vars.P).v.zxy;
+ int3 zxz = (*tint_module_vars.P).v.zxz;
+ int3 zyx = (*tint_module_vars.P).v.zyx;
+ int3 zyy = (*tint_module_vars.P).v.zyy;
+ int3 zyz = (*tint_module_vars.P).v.zyz;
+ int3 zzx = (*tint_module_vars.P).v.zzx;
+ int3 zzy = (*tint_module_vars.P).v.zzy;
+ int3 zzz = (*tint_module_vars.P).v.zzz;
+ int4 xxxx = (*tint_module_vars.P).v.xxxx;
+ int4 xxxy = (*tint_module_vars.P).v.xxxy;
+ int4 xxxz = (*tint_module_vars.P).v.xxxz;
+ int4 xxyx = (*tint_module_vars.P).v.xxyx;
+ int4 xxyy = (*tint_module_vars.P).v.xxyy;
+ int4 xxyz = (*tint_module_vars.P).v.xxyz;
+ int4 xxzx = (*tint_module_vars.P).v.xxzx;
+ int4 xxzy = (*tint_module_vars.P).v.xxzy;
+ int4 xxzz = (*tint_module_vars.P).v.xxzz;
+ int4 xyxx = (*tint_module_vars.P).v.xyxx;
+ int4 xyxy = (*tint_module_vars.P).v.xyxy;
+ int4 xyxz = (*tint_module_vars.P).v.xyxz;
+ int4 xyyx = (*tint_module_vars.P).v.xyyx;
+ int4 xyyy = (*tint_module_vars.P).v.xyyy;
+ int4 xyyz = (*tint_module_vars.P).v.xyyz;
+ int4 xyzx = (*tint_module_vars.P).v.xyzx;
+ int4 xyzy = (*tint_module_vars.P).v.xyzy;
+ int4 xyzz = (*tint_module_vars.P).v.xyzz;
+ int4 xzxx = (*tint_module_vars.P).v.xzxx;
+ int4 xzxy = (*tint_module_vars.P).v.xzxy;
+ int4 xzxz = (*tint_module_vars.P).v.xzxz;
+ int4 xzyx = (*tint_module_vars.P).v.xzyx;
+ int4 xzyy = (*tint_module_vars.P).v.xzyy;
+ int4 xzyz = (*tint_module_vars.P).v.xzyz;
+ int4 xzzx = (*tint_module_vars.P).v.xzzx;
+ int4 xzzy = (*tint_module_vars.P).v.xzzy;
+ int4 xzzz = (*tint_module_vars.P).v.xzzz;
+ int4 yxxx = (*tint_module_vars.P).v.yxxx;
+ int4 yxxy = (*tint_module_vars.P).v.yxxy;
+ int4 yxxz = (*tint_module_vars.P).v.yxxz;
+ int4 yxyx = (*tint_module_vars.P).v.yxyx;
+ int4 yxyy = (*tint_module_vars.P).v.yxyy;
+ int4 yxyz = (*tint_module_vars.P).v.yxyz;
+ int4 yxzx = (*tint_module_vars.P).v.yxzx;
+ int4 yxzy = (*tint_module_vars.P).v.yxzy;
+ int4 yxzz = (*tint_module_vars.P).v.yxzz;
+ int4 yyxx = (*tint_module_vars.P).v.yyxx;
+ int4 yyxy = (*tint_module_vars.P).v.yyxy;
+ int4 yyxz = (*tint_module_vars.P).v.yyxz;
+ int4 yyyx = (*tint_module_vars.P).v.yyyx;
+ int4 yyyy = (*tint_module_vars.P).v.yyyy;
+ int4 yyyz = (*tint_module_vars.P).v.yyyz;
+ int4 yyzx = (*tint_module_vars.P).v.yyzx;
+ int4 yyzy = (*tint_module_vars.P).v.yyzy;
+ int4 yyzz = (*tint_module_vars.P).v.yyzz;
+ int4 yzxx = (*tint_module_vars.P).v.yzxx;
+ int4 yzxy = (*tint_module_vars.P).v.yzxy;
+ int4 yzxz = (*tint_module_vars.P).v.yzxz;
+ int4 yzyx = (*tint_module_vars.P).v.yzyx;
+ int4 yzyy = (*tint_module_vars.P).v.yzyy;
+ int4 yzyz = (*tint_module_vars.P).v.yzyz;
+ int4 yzzx = (*tint_module_vars.P).v.yzzx;
+ int4 yzzy = (*tint_module_vars.P).v.yzzy;
+ int4 yzzz = (*tint_module_vars.P).v.yzzz;
+ int4 zxxx = (*tint_module_vars.P).v.zxxx;
+ int4 zxxy = (*tint_module_vars.P).v.zxxy;
+ int4 zxxz = (*tint_module_vars.P).v.zxxz;
+ int4 zxyx = (*tint_module_vars.P).v.zxyx;
+ int4 zxyy = (*tint_module_vars.P).v.zxyy;
+ int4 zxyz = (*tint_module_vars.P).v.zxyz;
+ int4 zxzx = (*tint_module_vars.P).v.zxzx;
+ int4 zxzy = (*tint_module_vars.P).v.zxzy;
+ int4 zxzz = (*tint_module_vars.P).v.zxzz;
+ int4 zyxx = (*tint_module_vars.P).v.zyxx;
+ int4 zyxy = (*tint_module_vars.P).v.zyxy;
+ int4 zyxz = (*tint_module_vars.P).v.zyxz;
+ int4 zyyx = (*tint_module_vars.P).v.zyyx;
+ int4 zyyy = (*tint_module_vars.P).v.zyyy;
+ int4 zyyz = (*tint_module_vars.P).v.zyyz;
+ int4 zyzx = (*tint_module_vars.P).v.zyzx;
+ int4 zyzy = (*tint_module_vars.P).v.zyzy;
+ int4 zyzz = (*tint_module_vars.P).v.zyzz;
+ int4 zzxx = (*tint_module_vars.P).v.zzxx;
+ int4 zzxy = (*tint_module_vars.P).v.zzxy;
+ int4 zzxz = (*tint_module_vars.P).v.zzxz;
+ int4 zzyx = (*tint_module_vars.P).v.zzyx;
+ int4 zzyy = (*tint_module_vars.P).v.zzyy;
+ int4 zzyz = (*tint_module_vars.P).v.zzyz;
+ int4 zzzx = (*tint_module_vars.P).v.zzzx;
+ int4 zzzy = (*tint_module_vars.P).v.zzzy;
+ int4 zzzz = (*tint_module_vars.P).v.zzzz;
}
-program_source:7:10: error: program scope variable must reside in constant address space
-thread S P = {};
- ^
-program_source:9:8: warning: unused variable 'v' [-Wunused-variable]
- int3 v = P.v;
- ^
-program_source:10:7: warning: unused variable 'x' [-Wunused-variable]
- int x = P.v[0u];
- ^
-program_source:11:7: warning: unused variable 'y' [-Wunused-variable]
- int y = P.v[1u];
- ^
-program_source:12:7: warning: unused variable 'z' [-Wunused-variable]
- int z = P.v[2u];
- ^
-program_source:13:8: warning: unused variable 'xx' [-Wunused-variable]
- int2 xx = P.v.xx;
- ^
-program_source:14:8: warning: unused variable 'xy' [-Wunused-variable]
- int2 xy = P.v.xy;
- ^
-program_source:15:8: warning: unused variable 'xz' [-Wunused-variable]
- int2 xz = P.v.xz;
- ^
-program_source:16:8: warning: unused variable 'yx' [-Wunused-variable]
- int2 yx = P.v.yx;
- ^
-program_source:17:8: warning: unused variable 'yy' [-Wunused-variable]
- int2 yy = P.v.yy;
- ^
-program_source:18:8: warning: unused variable 'yz' [-Wunused-variable]
- int2 yz = P.v.yz;
- ^
-program_source:19:8: warning: unused variable 'zx' [-Wunused-variable]
- int2 zx = P.v.zx;
- ^
-program_source:20:8: warning: unused variable 'zy' [-Wunused-variable]
- int2 zy = P.v.zy;
- ^
-program_source:21:8: warning: unused variable 'zz' [-Wunused-variable]
- int2 zz = P.v.zz;
- ^
-program_source:22:8: warning: unused variable 'xxx' [-Wunused-variable]
- int3 xxx = P.v.xxx;
- ^
-program_source:23:8: warning: unused variable 'xxy' [-Wunused-variable]
- int3 xxy = P.v.xxy;
- ^
-program_source:24:8: warning: unused variable 'xxz' [-Wunused-variable]
- int3 xxz = P.v.xxz;
- ^
-program_source:25:8: warning: unused variable 'xyx' [-Wunused-variable]
- int3 xyx = P.v.xyx;
- ^
-program_source:26:8: warning: unused variable 'xyy' [-Wunused-variable]
- int3 xyy = P.v.xyy;
- ^
-program_source:27:8: warning: unused variable 'xyz' [-Wunused-variable]
- int3 xyz = P.v.xyz;
- ^
-program_source:28:8: warning: unused variable 'xzx' [-Wunused-variable]
- int3 xzx = P.v.xzx;
- ^
-program_source:29:8: warning: unused variable 'xzy' [-Wunused-variable]
- int3 xzy = P.v.xzy;
- ^
-program_source:30:8: warning: unused variable 'xzz' [-Wunused-variable]
- int3 xzz = P.v.xzz;
- ^
-program_source:31:8: warning: unused variable 'yxx' [-Wunused-variable]
- int3 yxx = P.v.yxx;
- ^
-program_source:32:8: warning: unused variable 'yxy' [-Wunused-variable]
- int3 yxy = P.v.yxy;
- ^
-program_source:33:8: warning: unused variable 'yxz' [-Wunused-variable]
- int3 yxz = P.v.yxz;
- ^
-program_source:34:8: warning: unused variable 'yyx' [-Wunused-variable]
- int3 yyx = P.v.yyx;
- ^
-program_source:35:8: warning: unused variable 'yyy' [-Wunused-variable]
- int3 yyy = P.v.yyy;
- ^
-program_source:36:8: warning: unused variable 'yyz' [-Wunused-variable]
- int3 yyz = P.v.yyz;
- ^
-program_source:37:8: warning: unused variable 'yzx' [-Wunused-variable]
- int3 yzx = P.v.yzx;
- ^
-program_source:38:8: warning: unused variable 'yzy' [-Wunused-variable]
- int3 yzy = P.v.yzy;
- ^
-program_source:39:8: warning: unused variable 'yzz' [-Wunused-variable]
- int3 yzz = P.v.yzz;
- ^
-program_source:40:8: warning: unused variable 'zxx' [-Wunused-variable]
- int3 zxx = P.v.zxx;
- ^
-program_source:41:8: warning: unused variable 'zxy' [-Wunused-variable]
- int3 zxy = P.v.zxy;
- ^
-program_source:42:8: warning: unused variable 'zxz' [-Wunused-variable]
- int3 zxz = P.v.zxz;
- ^
-program_source:43:8: warning: unused variable 'zyx' [-Wunused-variable]
- int3 zyx = P.v.zyx;
- ^
-program_source:44:8: warning: unused variable 'zyy' [-Wunused-variable]
- int3 zyy = P.v.zyy;
- ^
-program_source:45:8: warning: unused variable 'zyz' [-Wunused-variable]
- int3 zyz = P.v.zyz;
- ^
-program_source:46:8: warning: unused variable 'zzx' [-Wunused-variable]
- int3 zzx = P.v.zzx;
- ^
-program_source:47:8: warning: unused variable 'zzy' [-Wunused-variable]
- int3 zzy = P.v.zzy;
- ^
-program_source:48:8: warning: unused variable 'zzz' [-Wunused-variable]
- int3 zzz = P.v.zzz;
- ^
-program_source:49:8: warning: unused variable 'xxxx' [-Wunused-variable]
- int4 xxxx = P.v.xxxx;
- ^
-program_source:50:8: warning: unused variable 'xxxy' [-Wunused-variable]
- int4 xxxy = P.v.xxxy;
- ^
-program_source:51:8: warning: unused variable 'xxxz' [-Wunused-variable]
- int4 xxxz = P.v.xxxz;
- ^
-program_source:52:8: warning: unused variable 'xxyx' [-Wunused-variable]
- int4 xxyx = P.v.xxyx;
- ^
-program_source:53:8: warning: unused variable 'xxyy' [-Wunused-variable]
- int4 xxyy = P.v.xxyy;
- ^
-program_source:54:8: warning: unused variable 'xxyz' [-Wunused-variable]
- int4 xxyz = P.v.xxyz;
- ^
-program_source:55:8: warning: unused variable 'xxzx' [-Wunused-variable]
- int4 xxzx = P.v.xxzx;
- ^
-program_source:56:8: warning: unused variable 'xxzy' [-Wunused-variable]
- int4 xxzy = P.v.xxzy;
- ^
-program_source:57:8: warning: unused variable 'xxzz' [-Wunused-variable]
- int4 xxzz = P.v.xxzz;
- ^
-program_source:58:8: warning: unused variable 'xyxx' [-Wunused-variable]
- int4 xyxx = P.v.xyxx;
- ^
-program_source:59:8: warning: unused variable 'xyxy' [-Wunused-variable]
- int4 xyxy = P.v.xyxy;
- ^
-program_source:60:8: warning: unused variable 'xyxz' [-Wunused-variable]
- int4 xyxz = P.v.xyxz;
- ^
-program_source:61:8: warning: unused variable 'xyyx' [-Wunused-variable]
- int4 xyyx = P.v.xyyx;
- ^
-program_source:62:8: warning: unused variable 'xyyy' [-Wunused-variable]
- int4 xyyy = P.v.xyyy;
- ^
-program_source:63:8: warning: unused variable 'xyyz' [-Wunused-variable]
- int4 xyyz = P.v.xyyz;
- ^
-program_source:64:8: warning: unused variable 'xyzx' [-Wunused-variable]
- int4 xyzx = P.v.xyzx;
- ^
-program_source:65:8: warning: unused variable 'xyzy' [-Wunused-variable]
- int4 xyzy = P.v.xyzy;
- ^
-program_source:66:8: warning: unused variable 'xyzz' [-Wunused-variable]
- int4 xyzz = P.v.xyzz;
- ^
-program_source:67:8: warning: unused variable 'xzxx' [-Wunused-variable]
- int4 xzxx = P.v.xzxx;
- ^
-program_source:68:8: warning: unused variable 'xzxy' [-Wunused-variable]
- int4 xzxy = P.v.xzxy;
- ^
-program_source:69:8: warning: unused variable 'xzxz' [-Wunused-variable]
- int4 xzxz = P.v.xzxz;
- ^
-program_source:70:8: warning: unused variable 'xzyx' [-Wunused-variable]
- int4 xzyx = P.v.xzyx;
- ^
-program_source:71:8: warning: unused variable 'xzyy' [-Wunused-variable]
- int4 xzyy = P.v.xzyy;
- ^
-program_source:72:8: warning: unused variable 'xzyz' [-Wunused-variable]
- int4 xzyz = P.v.xzyz;
- ^
-program_source:73:8: warning: unused variable 'xzzx' [-Wunused-variable]
- int4 xzzx = P.v.xzzx;
- ^
-program_source:74:8: warning: unused variable 'xzzy' [-Wunused-variable]
- int4 xzzy = P.v.xzzy;
- ^
-program_source:75:8: warning: unused variable 'xzzz' [-Wunused-variable]
- int4 xzzz = P.v.xzzz;
- ^
-program_source:76:8: warning: unused variable 'yxxx' [-Wunused-variable]
- int4 yxxx = P.v.yxxx;
- ^
-program_source:77:8: warning: unused variable 'yxxy' [-Wunused-variable]
- int4 yxxy = P.v.yxxy;
- ^
-program_source:78:8: warning: unused variable 'yxxz' [-Wunused-variable]
- int4 yxxz = P.v.yxxz;
- ^
-program_source:79:8: warning: unused variable 'yxyx' [-Wunused-variable]
- int4 yxyx = P.v.yxyx;
- ^
-program_source:80:8: warning: unused variable 'yxyy' [-Wunused-variable]
- int4 yxyy = P.v.yxyy;
- ^
-program_source:81:8: warning: unused variable 'yxyz' [-Wunused-variable]
- int4 yxyz = P.v.yxyz;
- ^
-program_source:82:8: warning: unused variable 'yxzx' [-Wunused-variable]
- int4 yxzx = P.v.yxzx;
- ^
-program_source:83:8: warning: unused variable 'yxzy' [-Wunused-variable]
- int4 yxzy = P.v.yxzy;
- ^
-program_source:84:8: warning: unused variable 'yxzz' [-Wunused-variable]
- int4 yxzz = P.v.yxzz;
- ^
-program_source:85:8: warning: unused variable 'yyxx' [-Wunused-variable]
- int4 yyxx = P.v.yyxx;
- ^
-program_source:86:8: warning: unused variable 'yyxy' [-Wunused-variable]
- int4 yyxy = P.v.yyxy;
- ^
-program_source:87:8: warning: unused variable 'yyxz' [-Wunused-variable]
- int4 yyxz = P.v.yyxz;
- ^
-program_source:88:8: warning: unused variable 'yyyx' [-Wunused-variable]
- int4 yyyx = P.v.yyyx;
- ^
-program_source:89:8: warning: unused variable 'yyyy' [-Wunused-variable]
- int4 yyyy = P.v.yyyy;
- ^
-program_source:90:8: warning: unused variable 'yyyz' [-Wunused-variable]
- int4 yyyz = P.v.yyyz;
- ^
-program_source:91:8: warning: unused variable 'yyzx' [-Wunused-variable]
- int4 yyzx = P.v.yyzx;
- ^
-program_source:92:8: warning: unused variable 'yyzy' [-Wunused-variable]
- int4 yyzy = P.v.yyzy;
- ^
-program_source:93:8: warning: unused variable 'yyzz' [-Wunused-variable]
- int4 yyzz = P.v.yyzz;
- ^
-program_source:94:8: warning: unused variable 'yzxx' [-Wunused-variable]
- int4 yzxx = P.v.yzxx;
- ^
-program_source:95:8: warning: unused variable 'yzxy' [-Wunused-variable]
- int4 yzxy = P.v.yzxy;
- ^
-program_source:96:8: warning: unused variable 'yzxz' [-Wunused-variable]
- int4 yzxz = P.v.yzxz;
- ^
-program_source:97:8: warning: unused variable 'yzyx' [-Wunused-variable]
- int4 yzyx = P.v.yzyx;
- ^
-program_source:98:8: warning: unused variable 'yzyy' [-Wunused-variable]
- int4 yzyy = P.v.yzyy;
- ^
-program_source:99:8: warning: unused variable 'yzyz' [-Wunused-variable]
- int4 yzyz = P.v.yzyz;
- ^
-program_source:100:8: warning: unused variable 'yzzx' [-Wunused-variable]
- int4 yzzx = P.v.yzzx;
- ^
-program_source:101:8: warning: unused variable 'yzzy' [-Wunused-variable]
- int4 yzzy = P.v.yzzy;
- ^
-program_source:102:8: warning: unused variable 'yzzz' [-Wunused-variable]
- int4 yzzz = P.v.yzzz;
- ^
-program_source:103:8: warning: unused variable 'zxxx' [-Wunused-variable]
- int4 zxxx = P.v.zxxx;
- ^
-program_source:104:8: warning: unused variable 'zxxy' [-Wunused-variable]
- int4 zxxy = P.v.zxxy;
- ^
-program_source:105:8: warning: unused variable 'zxxz' [-Wunused-variable]
- int4 zxxz = P.v.zxxz;
- ^
-program_source:106:8: warning: unused variable 'zxyx' [-Wunused-variable]
- int4 zxyx = P.v.zxyx;
- ^
-program_source:107:8: warning: unused variable 'zxyy' [-Wunused-variable]
- int4 zxyy = P.v.zxyy;
- ^
-program_source:108:8: warning: unused variable 'zxyz' [-Wunused-variable]
- int4 zxyz = P.v.zxyz;
- ^
-program_source:109:8: warning: unused variable 'zxzx' [-Wunused-variable]
- int4 zxzx = P.v.zxzx;
- ^
-program_source:110:8: warning: unused variable 'zxzy' [-Wunused-variable]
- int4 zxzy = P.v.zxzy;
- ^
-program_source:111:8: warning: unused variable 'zxzz' [-Wunused-variable]
- int4 zxzz = P.v.zxzz;
- ^
-program_source:112:8: warning: unused variable 'zyxx' [-Wunused-variable]
- int4 zyxx = P.v.zyxx;
- ^
-program_source:113:8: warning: unused variable 'zyxy' [-Wunused-variable]
- int4 zyxy = P.v.zyxy;
- ^
-program_source:114:8: warning: unused variable 'zyxz' [-Wunused-variable]
- int4 zyxz = P.v.zyxz;
- ^
-program_source:115:8: warning: unused variable 'zyyx' [-Wunused-variable]
- int4 zyyx = P.v.zyyx;
- ^
-program_source:116:8: warning: unused variable 'zyyy' [-Wunused-variable]
- int4 zyyy = P.v.zyyy;
- ^
-program_source:117:8: warning: unused variable 'zyyz' [-Wunused-variable]
- int4 zyyz = P.v.zyyz;
- ^
-program_source:118:8: warning: unused variable 'zyzx' [-Wunused-variable]
- int4 zyzx = P.v.zyzx;
- ^
-program_source:119:8: warning: unused variable 'zyzy' [-Wunused-variable]
- int4 zyzy = P.v.zyzy;
- ^
-program_source:120:8: warning: unused variable 'zyzz' [-Wunused-variable]
- int4 zyzz = P.v.zyzz;
- ^
-program_source:121:8: warning: unused variable 'zzxx' [-Wunused-variable]
- int4 zzxx = P.v.zzxx;
- ^
-program_source:122:8: warning: unused variable 'zzxy' [-Wunused-variable]
- int4 zzxy = P.v.zzxy;
- ^
-program_source:123:8: warning: unused variable 'zzxz' [-Wunused-variable]
- int4 zzxz = P.v.zzxz;
- ^
-program_source:124:8: warning: unused variable 'zzyx' [-Wunused-variable]
- int4 zzyx = P.v.zzyx;
- ^
-program_source:125:8: warning: unused variable 'zzyy' [-Wunused-variable]
- int4 zzyy = P.v.zzyy;
- ^
-program_source:126:8: warning: unused variable 'zzyz' [-Wunused-variable]
- int4 zzyz = P.v.zzyz;
- ^
-program_source:127:8: warning: unused variable 'zzzx' [-Wunused-variable]
- int4 zzzx = P.v.zzzx;
- ^
-program_source:128:8: warning: unused variable 'zzzy' [-Wunused-variable]
- int4 zzzy = P.v.zzzy;
- ^
-program_source:129:8: warning: unused variable 'zzzz' [-Wunused-variable]
- int4 zzzz = P.v.zzzz;
- ^
-
diff --git a/test/tint/expressions/swizzle/read/vec3/u32.wgsl.expected.ir.msl b/test/tint/expressions/swizzle/read/vec3/u32.wgsl.expected.ir.msl
index 399f5f3..28c7ac3 100644
--- a/test/tint/expressions/swizzle/read/vec3/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/swizzle/read/vec3/u32.wgsl.expected.ir.msl
@@ -1,499 +1,132 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct S {
uint3 v;
};
+struct tint_module_vars_struct {
+ thread S* P;
+};
-thread S P = {};
-void f() {
- uint3 v = P.v;
- uint x = P.v[0u];
- uint y = P.v[1u];
- uint z = P.v[2u];
- uint2 xx = P.v.xx;
- uint2 xy = P.v.xy;
- uint2 xz = P.v.xz;
- uint2 yx = P.v.yx;
- uint2 yy = P.v.yy;
- uint2 yz = P.v.yz;
- uint2 zx = P.v.zx;
- uint2 zy = P.v.zy;
- uint2 zz = P.v.zz;
- uint3 xxx = P.v.xxx;
- uint3 xxy = P.v.xxy;
- uint3 xxz = P.v.xxz;
- uint3 xyx = P.v.xyx;
- uint3 xyy = P.v.xyy;
- uint3 xyz = P.v.xyz;
- uint3 xzx = P.v.xzx;
- uint3 xzy = P.v.xzy;
- uint3 xzz = P.v.xzz;
- uint3 yxx = P.v.yxx;
- uint3 yxy = P.v.yxy;
- uint3 yxz = P.v.yxz;
- uint3 yyx = P.v.yyx;
- uint3 yyy = P.v.yyy;
- uint3 yyz = P.v.yyz;
- uint3 yzx = P.v.yzx;
- uint3 yzy = P.v.yzy;
- uint3 yzz = P.v.yzz;
- uint3 zxx = P.v.zxx;
- uint3 zxy = P.v.zxy;
- uint3 zxz = P.v.zxz;
- uint3 zyx = P.v.zyx;
- uint3 zyy = P.v.zyy;
- uint3 zyz = P.v.zyz;
- uint3 zzx = P.v.zzx;
- uint3 zzy = P.v.zzy;
- uint3 zzz = P.v.zzz;
- uint4 xxxx = P.v.xxxx;
- uint4 xxxy = P.v.xxxy;
- uint4 xxxz = P.v.xxxz;
- uint4 xxyx = P.v.xxyx;
- uint4 xxyy = P.v.xxyy;
- uint4 xxyz = P.v.xxyz;
- uint4 xxzx = P.v.xxzx;
- uint4 xxzy = P.v.xxzy;
- uint4 xxzz = P.v.xxzz;
- uint4 xyxx = P.v.xyxx;
- uint4 xyxy = P.v.xyxy;
- uint4 xyxz = P.v.xyxz;
- uint4 xyyx = P.v.xyyx;
- uint4 xyyy = P.v.xyyy;
- uint4 xyyz = P.v.xyyz;
- uint4 xyzx = P.v.xyzx;
- uint4 xyzy = P.v.xyzy;
- uint4 xyzz = P.v.xyzz;
- uint4 xzxx = P.v.xzxx;
- uint4 xzxy = P.v.xzxy;
- uint4 xzxz = P.v.xzxz;
- uint4 xzyx = P.v.xzyx;
- uint4 xzyy = P.v.xzyy;
- uint4 xzyz = P.v.xzyz;
- uint4 xzzx = P.v.xzzx;
- uint4 xzzy = P.v.xzzy;
- uint4 xzzz = P.v.xzzz;
- uint4 yxxx = P.v.yxxx;
- uint4 yxxy = P.v.yxxy;
- uint4 yxxz = P.v.yxxz;
- uint4 yxyx = P.v.yxyx;
- uint4 yxyy = P.v.yxyy;
- uint4 yxyz = P.v.yxyz;
- uint4 yxzx = P.v.yxzx;
- uint4 yxzy = P.v.yxzy;
- uint4 yxzz = P.v.yxzz;
- uint4 yyxx = P.v.yyxx;
- uint4 yyxy = P.v.yyxy;
- uint4 yyxz = P.v.yyxz;
- uint4 yyyx = P.v.yyyx;
- uint4 yyyy = P.v.yyyy;
- uint4 yyyz = P.v.yyyz;
- uint4 yyzx = P.v.yyzx;
- uint4 yyzy = P.v.yyzy;
- uint4 yyzz = P.v.yyzz;
- uint4 yzxx = P.v.yzxx;
- uint4 yzxy = P.v.yzxy;
- uint4 yzxz = P.v.yzxz;
- uint4 yzyx = P.v.yzyx;
- uint4 yzyy = P.v.yzyy;
- uint4 yzyz = P.v.yzyz;
- uint4 yzzx = P.v.yzzx;
- uint4 yzzy = P.v.yzzy;
- uint4 yzzz = P.v.yzzz;
- uint4 zxxx = P.v.zxxx;
- uint4 zxxy = P.v.zxxy;
- uint4 zxxz = P.v.zxxz;
- uint4 zxyx = P.v.zxyx;
- uint4 zxyy = P.v.zxyy;
- uint4 zxyz = P.v.zxyz;
- uint4 zxzx = P.v.zxzx;
- uint4 zxzy = P.v.zxzy;
- uint4 zxzz = P.v.zxzz;
- uint4 zyxx = P.v.zyxx;
- uint4 zyxy = P.v.zyxy;
- uint4 zyxz = P.v.zyxz;
- uint4 zyyx = P.v.zyyx;
- uint4 zyyy = P.v.zyyy;
- uint4 zyyz = P.v.zyyz;
- uint4 zyzx = P.v.zyzx;
- uint4 zyzy = P.v.zyzy;
- uint4 zyzz = P.v.zyzz;
- uint4 zzxx = P.v.zzxx;
- uint4 zzxy = P.v.zzxy;
- uint4 zzxz = P.v.zzxz;
- uint4 zzyx = P.v.zzyx;
- uint4 zzyy = P.v.zzyy;
- uint4 zzyz = P.v.zzyz;
- uint4 zzzx = P.v.zzzx;
- uint4 zzzy = P.v.zzzy;
- uint4 zzzz = P.v.zzzz;
+void f(tint_module_vars_struct tint_module_vars) {
+ uint3 v = (*tint_module_vars.P).v;
+ uint x = (*tint_module_vars.P).v[0u];
+ uint y = (*tint_module_vars.P).v[1u];
+ uint z = (*tint_module_vars.P).v[2u];
+ uint2 xx = (*tint_module_vars.P).v.xx;
+ uint2 xy = (*tint_module_vars.P).v.xy;
+ uint2 xz = (*tint_module_vars.P).v.xz;
+ uint2 yx = (*tint_module_vars.P).v.yx;
+ uint2 yy = (*tint_module_vars.P).v.yy;
+ uint2 yz = (*tint_module_vars.P).v.yz;
+ uint2 zx = (*tint_module_vars.P).v.zx;
+ uint2 zy = (*tint_module_vars.P).v.zy;
+ uint2 zz = (*tint_module_vars.P).v.zz;
+ uint3 xxx = (*tint_module_vars.P).v.xxx;
+ uint3 xxy = (*tint_module_vars.P).v.xxy;
+ uint3 xxz = (*tint_module_vars.P).v.xxz;
+ uint3 xyx = (*tint_module_vars.P).v.xyx;
+ uint3 xyy = (*tint_module_vars.P).v.xyy;
+ uint3 xyz = (*tint_module_vars.P).v.xyz;
+ uint3 xzx = (*tint_module_vars.P).v.xzx;
+ uint3 xzy = (*tint_module_vars.P).v.xzy;
+ uint3 xzz = (*tint_module_vars.P).v.xzz;
+ uint3 yxx = (*tint_module_vars.P).v.yxx;
+ uint3 yxy = (*tint_module_vars.P).v.yxy;
+ uint3 yxz = (*tint_module_vars.P).v.yxz;
+ uint3 yyx = (*tint_module_vars.P).v.yyx;
+ uint3 yyy = (*tint_module_vars.P).v.yyy;
+ uint3 yyz = (*tint_module_vars.P).v.yyz;
+ uint3 yzx = (*tint_module_vars.P).v.yzx;
+ uint3 yzy = (*tint_module_vars.P).v.yzy;
+ uint3 yzz = (*tint_module_vars.P).v.yzz;
+ uint3 zxx = (*tint_module_vars.P).v.zxx;
+ uint3 zxy = (*tint_module_vars.P).v.zxy;
+ uint3 zxz = (*tint_module_vars.P).v.zxz;
+ uint3 zyx = (*tint_module_vars.P).v.zyx;
+ uint3 zyy = (*tint_module_vars.P).v.zyy;
+ uint3 zyz = (*tint_module_vars.P).v.zyz;
+ uint3 zzx = (*tint_module_vars.P).v.zzx;
+ uint3 zzy = (*tint_module_vars.P).v.zzy;
+ uint3 zzz = (*tint_module_vars.P).v.zzz;
+ uint4 xxxx = (*tint_module_vars.P).v.xxxx;
+ uint4 xxxy = (*tint_module_vars.P).v.xxxy;
+ uint4 xxxz = (*tint_module_vars.P).v.xxxz;
+ uint4 xxyx = (*tint_module_vars.P).v.xxyx;
+ uint4 xxyy = (*tint_module_vars.P).v.xxyy;
+ uint4 xxyz = (*tint_module_vars.P).v.xxyz;
+ uint4 xxzx = (*tint_module_vars.P).v.xxzx;
+ uint4 xxzy = (*tint_module_vars.P).v.xxzy;
+ uint4 xxzz = (*tint_module_vars.P).v.xxzz;
+ uint4 xyxx = (*tint_module_vars.P).v.xyxx;
+ uint4 xyxy = (*tint_module_vars.P).v.xyxy;
+ uint4 xyxz = (*tint_module_vars.P).v.xyxz;
+ uint4 xyyx = (*tint_module_vars.P).v.xyyx;
+ uint4 xyyy = (*tint_module_vars.P).v.xyyy;
+ uint4 xyyz = (*tint_module_vars.P).v.xyyz;
+ uint4 xyzx = (*tint_module_vars.P).v.xyzx;
+ uint4 xyzy = (*tint_module_vars.P).v.xyzy;
+ uint4 xyzz = (*tint_module_vars.P).v.xyzz;
+ uint4 xzxx = (*tint_module_vars.P).v.xzxx;
+ uint4 xzxy = (*tint_module_vars.P).v.xzxy;
+ uint4 xzxz = (*tint_module_vars.P).v.xzxz;
+ uint4 xzyx = (*tint_module_vars.P).v.xzyx;
+ uint4 xzyy = (*tint_module_vars.P).v.xzyy;
+ uint4 xzyz = (*tint_module_vars.P).v.xzyz;
+ uint4 xzzx = (*tint_module_vars.P).v.xzzx;
+ uint4 xzzy = (*tint_module_vars.P).v.xzzy;
+ uint4 xzzz = (*tint_module_vars.P).v.xzzz;
+ uint4 yxxx = (*tint_module_vars.P).v.yxxx;
+ uint4 yxxy = (*tint_module_vars.P).v.yxxy;
+ uint4 yxxz = (*tint_module_vars.P).v.yxxz;
+ uint4 yxyx = (*tint_module_vars.P).v.yxyx;
+ uint4 yxyy = (*tint_module_vars.P).v.yxyy;
+ uint4 yxyz = (*tint_module_vars.P).v.yxyz;
+ uint4 yxzx = (*tint_module_vars.P).v.yxzx;
+ uint4 yxzy = (*tint_module_vars.P).v.yxzy;
+ uint4 yxzz = (*tint_module_vars.P).v.yxzz;
+ uint4 yyxx = (*tint_module_vars.P).v.yyxx;
+ uint4 yyxy = (*tint_module_vars.P).v.yyxy;
+ uint4 yyxz = (*tint_module_vars.P).v.yyxz;
+ uint4 yyyx = (*tint_module_vars.P).v.yyyx;
+ uint4 yyyy = (*tint_module_vars.P).v.yyyy;
+ uint4 yyyz = (*tint_module_vars.P).v.yyyz;
+ uint4 yyzx = (*tint_module_vars.P).v.yyzx;
+ uint4 yyzy = (*tint_module_vars.P).v.yyzy;
+ uint4 yyzz = (*tint_module_vars.P).v.yyzz;
+ uint4 yzxx = (*tint_module_vars.P).v.yzxx;
+ uint4 yzxy = (*tint_module_vars.P).v.yzxy;
+ uint4 yzxz = (*tint_module_vars.P).v.yzxz;
+ uint4 yzyx = (*tint_module_vars.P).v.yzyx;
+ uint4 yzyy = (*tint_module_vars.P).v.yzyy;
+ uint4 yzyz = (*tint_module_vars.P).v.yzyz;
+ uint4 yzzx = (*tint_module_vars.P).v.yzzx;
+ uint4 yzzy = (*tint_module_vars.P).v.yzzy;
+ uint4 yzzz = (*tint_module_vars.P).v.yzzz;
+ uint4 zxxx = (*tint_module_vars.P).v.zxxx;
+ uint4 zxxy = (*tint_module_vars.P).v.zxxy;
+ uint4 zxxz = (*tint_module_vars.P).v.zxxz;
+ uint4 zxyx = (*tint_module_vars.P).v.zxyx;
+ uint4 zxyy = (*tint_module_vars.P).v.zxyy;
+ uint4 zxyz = (*tint_module_vars.P).v.zxyz;
+ uint4 zxzx = (*tint_module_vars.P).v.zxzx;
+ uint4 zxzy = (*tint_module_vars.P).v.zxzy;
+ uint4 zxzz = (*tint_module_vars.P).v.zxzz;
+ uint4 zyxx = (*tint_module_vars.P).v.zyxx;
+ uint4 zyxy = (*tint_module_vars.P).v.zyxy;
+ uint4 zyxz = (*tint_module_vars.P).v.zyxz;
+ uint4 zyyx = (*tint_module_vars.P).v.zyyx;
+ uint4 zyyy = (*tint_module_vars.P).v.zyyy;
+ uint4 zyyz = (*tint_module_vars.P).v.zyyz;
+ uint4 zyzx = (*tint_module_vars.P).v.zyzx;
+ uint4 zyzy = (*tint_module_vars.P).v.zyzy;
+ uint4 zyzz = (*tint_module_vars.P).v.zyzz;
+ uint4 zzxx = (*tint_module_vars.P).v.zzxx;
+ uint4 zzxy = (*tint_module_vars.P).v.zzxy;
+ uint4 zzxz = (*tint_module_vars.P).v.zzxz;
+ uint4 zzyx = (*tint_module_vars.P).v.zzyx;
+ uint4 zzyy = (*tint_module_vars.P).v.zzyy;
+ uint4 zzyz = (*tint_module_vars.P).v.zzyz;
+ uint4 zzzx = (*tint_module_vars.P).v.zzzx;
+ uint4 zzzy = (*tint_module_vars.P).v.zzzy;
+ uint4 zzzz = (*tint_module_vars.P).v.zzzz;
}
-program_source:7:10: error: program scope variable must reside in constant address space
-thread S P = {};
- ^
-program_source:9:9: warning: unused variable 'v' [-Wunused-variable]
- uint3 v = P.v;
- ^
-program_source:10:8: warning: unused variable 'x' [-Wunused-variable]
- uint x = P.v[0u];
- ^
-program_source:11:8: warning: unused variable 'y' [-Wunused-variable]
- uint y = P.v[1u];
- ^
-program_source:12:8: warning: unused variable 'z' [-Wunused-variable]
- uint z = P.v[2u];
- ^
-program_source:13:9: warning: unused variable 'xx' [-Wunused-variable]
- uint2 xx = P.v.xx;
- ^
-program_source:14:9: warning: unused variable 'xy' [-Wunused-variable]
- uint2 xy = P.v.xy;
- ^
-program_source:15:9: warning: unused variable 'xz' [-Wunused-variable]
- uint2 xz = P.v.xz;
- ^
-program_source:16:9: warning: unused variable 'yx' [-Wunused-variable]
- uint2 yx = P.v.yx;
- ^
-program_source:17:9: warning: unused variable 'yy' [-Wunused-variable]
- uint2 yy = P.v.yy;
- ^
-program_source:18:9: warning: unused variable 'yz' [-Wunused-variable]
- uint2 yz = P.v.yz;
- ^
-program_source:19:9: warning: unused variable 'zx' [-Wunused-variable]
- uint2 zx = P.v.zx;
- ^
-program_source:20:9: warning: unused variable 'zy' [-Wunused-variable]
- uint2 zy = P.v.zy;
- ^
-program_source:21:9: warning: unused variable 'zz' [-Wunused-variable]
- uint2 zz = P.v.zz;
- ^
-program_source:22:9: warning: unused variable 'xxx' [-Wunused-variable]
- uint3 xxx = P.v.xxx;
- ^
-program_source:23:9: warning: unused variable 'xxy' [-Wunused-variable]
- uint3 xxy = P.v.xxy;
- ^
-program_source:24:9: warning: unused variable 'xxz' [-Wunused-variable]
- uint3 xxz = P.v.xxz;
- ^
-program_source:25:9: warning: unused variable 'xyx' [-Wunused-variable]
- uint3 xyx = P.v.xyx;
- ^
-program_source:26:9: warning: unused variable 'xyy' [-Wunused-variable]
- uint3 xyy = P.v.xyy;
- ^
-program_source:27:9: warning: unused variable 'xyz' [-Wunused-variable]
- uint3 xyz = P.v.xyz;
- ^
-program_source:28:9: warning: unused variable 'xzx' [-Wunused-variable]
- uint3 xzx = P.v.xzx;
- ^
-program_source:29:9: warning: unused variable 'xzy' [-Wunused-variable]
- uint3 xzy = P.v.xzy;
- ^
-program_source:30:9: warning: unused variable 'xzz' [-Wunused-variable]
- uint3 xzz = P.v.xzz;
- ^
-program_source:31:9: warning: unused variable 'yxx' [-Wunused-variable]
- uint3 yxx = P.v.yxx;
- ^
-program_source:32:9: warning: unused variable 'yxy' [-Wunused-variable]
- uint3 yxy = P.v.yxy;
- ^
-program_source:33:9: warning: unused variable 'yxz' [-Wunused-variable]
- uint3 yxz = P.v.yxz;
- ^
-program_source:34:9: warning: unused variable 'yyx' [-Wunused-variable]
- uint3 yyx = P.v.yyx;
- ^
-program_source:35:9: warning: unused variable 'yyy' [-Wunused-variable]
- uint3 yyy = P.v.yyy;
- ^
-program_source:36:9: warning: unused variable 'yyz' [-Wunused-variable]
- uint3 yyz = P.v.yyz;
- ^
-program_source:37:9: warning: unused variable 'yzx' [-Wunused-variable]
- uint3 yzx = P.v.yzx;
- ^
-program_source:38:9: warning: unused variable 'yzy' [-Wunused-variable]
- uint3 yzy = P.v.yzy;
- ^
-program_source:39:9: warning: unused variable 'yzz' [-Wunused-variable]
- uint3 yzz = P.v.yzz;
- ^
-program_source:40:9: warning: unused variable 'zxx' [-Wunused-variable]
- uint3 zxx = P.v.zxx;
- ^
-program_source:41:9: warning: unused variable 'zxy' [-Wunused-variable]
- uint3 zxy = P.v.zxy;
- ^
-program_source:42:9: warning: unused variable 'zxz' [-Wunused-variable]
- uint3 zxz = P.v.zxz;
- ^
-program_source:43:9: warning: unused variable 'zyx' [-Wunused-variable]
- uint3 zyx = P.v.zyx;
- ^
-program_source:44:9: warning: unused variable 'zyy' [-Wunused-variable]
- uint3 zyy = P.v.zyy;
- ^
-program_source:45:9: warning: unused variable 'zyz' [-Wunused-variable]
- uint3 zyz = P.v.zyz;
- ^
-program_source:46:9: warning: unused variable 'zzx' [-Wunused-variable]
- uint3 zzx = P.v.zzx;
- ^
-program_source:47:9: warning: unused variable 'zzy' [-Wunused-variable]
- uint3 zzy = P.v.zzy;
- ^
-program_source:48:9: warning: unused variable 'zzz' [-Wunused-variable]
- uint3 zzz = P.v.zzz;
- ^
-program_source:49:9: warning: unused variable 'xxxx' [-Wunused-variable]
- uint4 xxxx = P.v.xxxx;
- ^
-program_source:50:9: warning: unused variable 'xxxy' [-Wunused-variable]
- uint4 xxxy = P.v.xxxy;
- ^
-program_source:51:9: warning: unused variable 'xxxz' [-Wunused-variable]
- uint4 xxxz = P.v.xxxz;
- ^
-program_source:52:9: warning: unused variable 'xxyx' [-Wunused-variable]
- uint4 xxyx = P.v.xxyx;
- ^
-program_source:53:9: warning: unused variable 'xxyy' [-Wunused-variable]
- uint4 xxyy = P.v.xxyy;
- ^
-program_source:54:9: warning: unused variable 'xxyz' [-Wunused-variable]
- uint4 xxyz = P.v.xxyz;
- ^
-program_source:55:9: warning: unused variable 'xxzx' [-Wunused-variable]
- uint4 xxzx = P.v.xxzx;
- ^
-program_source:56:9: warning: unused variable 'xxzy' [-Wunused-variable]
- uint4 xxzy = P.v.xxzy;
- ^
-program_source:57:9: warning: unused variable 'xxzz' [-Wunused-variable]
- uint4 xxzz = P.v.xxzz;
- ^
-program_source:58:9: warning: unused variable 'xyxx' [-Wunused-variable]
- uint4 xyxx = P.v.xyxx;
- ^
-program_source:59:9: warning: unused variable 'xyxy' [-Wunused-variable]
- uint4 xyxy = P.v.xyxy;
- ^
-program_source:60:9: warning: unused variable 'xyxz' [-Wunused-variable]
- uint4 xyxz = P.v.xyxz;
- ^
-program_source:61:9: warning: unused variable 'xyyx' [-Wunused-variable]
- uint4 xyyx = P.v.xyyx;
- ^
-program_source:62:9: warning: unused variable 'xyyy' [-Wunused-variable]
- uint4 xyyy = P.v.xyyy;
- ^
-program_source:63:9: warning: unused variable 'xyyz' [-Wunused-variable]
- uint4 xyyz = P.v.xyyz;
- ^
-program_source:64:9: warning: unused variable 'xyzx' [-Wunused-variable]
- uint4 xyzx = P.v.xyzx;
- ^
-program_source:65:9: warning: unused variable 'xyzy' [-Wunused-variable]
- uint4 xyzy = P.v.xyzy;
- ^
-program_source:66:9: warning: unused variable 'xyzz' [-Wunused-variable]
- uint4 xyzz = P.v.xyzz;
- ^
-program_source:67:9: warning: unused variable 'xzxx' [-Wunused-variable]
- uint4 xzxx = P.v.xzxx;
- ^
-program_source:68:9: warning: unused variable 'xzxy' [-Wunused-variable]
- uint4 xzxy = P.v.xzxy;
- ^
-program_source:69:9: warning: unused variable 'xzxz' [-Wunused-variable]
- uint4 xzxz = P.v.xzxz;
- ^
-program_source:70:9: warning: unused variable 'xzyx' [-Wunused-variable]
- uint4 xzyx = P.v.xzyx;
- ^
-program_source:71:9: warning: unused variable 'xzyy' [-Wunused-variable]
- uint4 xzyy = P.v.xzyy;
- ^
-program_source:72:9: warning: unused variable 'xzyz' [-Wunused-variable]
- uint4 xzyz = P.v.xzyz;
- ^
-program_source:73:9: warning: unused variable 'xzzx' [-Wunused-variable]
- uint4 xzzx = P.v.xzzx;
- ^
-program_source:74:9: warning: unused variable 'xzzy' [-Wunused-variable]
- uint4 xzzy = P.v.xzzy;
- ^
-program_source:75:9: warning: unused variable 'xzzz' [-Wunused-variable]
- uint4 xzzz = P.v.xzzz;
- ^
-program_source:76:9: warning: unused variable 'yxxx' [-Wunused-variable]
- uint4 yxxx = P.v.yxxx;
- ^
-program_source:77:9: warning: unused variable 'yxxy' [-Wunused-variable]
- uint4 yxxy = P.v.yxxy;
- ^
-program_source:78:9: warning: unused variable 'yxxz' [-Wunused-variable]
- uint4 yxxz = P.v.yxxz;
- ^
-program_source:79:9: warning: unused variable 'yxyx' [-Wunused-variable]
- uint4 yxyx = P.v.yxyx;
- ^
-program_source:80:9: warning: unused variable 'yxyy' [-Wunused-variable]
- uint4 yxyy = P.v.yxyy;
- ^
-program_source:81:9: warning: unused variable 'yxyz' [-Wunused-variable]
- uint4 yxyz = P.v.yxyz;
- ^
-program_source:82:9: warning: unused variable 'yxzx' [-Wunused-variable]
- uint4 yxzx = P.v.yxzx;
- ^
-program_source:83:9: warning: unused variable 'yxzy' [-Wunused-variable]
- uint4 yxzy = P.v.yxzy;
- ^
-program_source:84:9: warning: unused variable 'yxzz' [-Wunused-variable]
- uint4 yxzz = P.v.yxzz;
- ^
-program_source:85:9: warning: unused variable 'yyxx' [-Wunused-variable]
- uint4 yyxx = P.v.yyxx;
- ^
-program_source:86:9: warning: unused variable 'yyxy' [-Wunused-variable]
- uint4 yyxy = P.v.yyxy;
- ^
-program_source:87:9: warning: unused variable 'yyxz' [-Wunused-variable]
- uint4 yyxz = P.v.yyxz;
- ^
-program_source:88:9: warning: unused variable 'yyyx' [-Wunused-variable]
- uint4 yyyx = P.v.yyyx;
- ^
-program_source:89:9: warning: unused variable 'yyyy' [-Wunused-variable]
- uint4 yyyy = P.v.yyyy;
- ^
-program_source:90:9: warning: unused variable 'yyyz' [-Wunused-variable]
- uint4 yyyz = P.v.yyyz;
- ^
-program_source:91:9: warning: unused variable 'yyzx' [-Wunused-variable]
- uint4 yyzx = P.v.yyzx;
- ^
-program_source:92:9: warning: unused variable 'yyzy' [-Wunused-variable]
- uint4 yyzy = P.v.yyzy;
- ^
-program_source:93:9: warning: unused variable 'yyzz' [-Wunused-variable]
- uint4 yyzz = P.v.yyzz;
- ^
-program_source:94:9: warning: unused variable 'yzxx' [-Wunused-variable]
- uint4 yzxx = P.v.yzxx;
- ^
-program_source:95:9: warning: unused variable 'yzxy' [-Wunused-variable]
- uint4 yzxy = P.v.yzxy;
- ^
-program_source:96:9: warning: unused variable 'yzxz' [-Wunused-variable]
- uint4 yzxz = P.v.yzxz;
- ^
-program_source:97:9: warning: unused variable 'yzyx' [-Wunused-variable]
- uint4 yzyx = P.v.yzyx;
- ^
-program_source:98:9: warning: unused variable 'yzyy' [-Wunused-variable]
- uint4 yzyy = P.v.yzyy;
- ^
-program_source:99:9: warning: unused variable 'yzyz' [-Wunused-variable]
- uint4 yzyz = P.v.yzyz;
- ^
-program_source:100:9: warning: unused variable 'yzzx' [-Wunused-variable]
- uint4 yzzx = P.v.yzzx;
- ^
-program_source:101:9: warning: unused variable 'yzzy' [-Wunused-variable]
- uint4 yzzy = P.v.yzzy;
- ^
-program_source:102:9: warning: unused variable 'yzzz' [-Wunused-variable]
- uint4 yzzz = P.v.yzzz;
- ^
-program_source:103:9: warning: unused variable 'zxxx' [-Wunused-variable]
- uint4 zxxx = P.v.zxxx;
- ^
-program_source:104:9: warning: unused variable 'zxxy' [-Wunused-variable]
- uint4 zxxy = P.v.zxxy;
- ^
-program_source:105:9: warning: unused variable 'zxxz' [-Wunused-variable]
- uint4 zxxz = P.v.zxxz;
- ^
-program_source:106:9: warning: unused variable 'zxyx' [-Wunused-variable]
- uint4 zxyx = P.v.zxyx;
- ^
-program_source:107:9: warning: unused variable 'zxyy' [-Wunused-variable]
- uint4 zxyy = P.v.zxyy;
- ^
-program_source:108:9: warning: unused variable 'zxyz' [-Wunused-variable]
- uint4 zxyz = P.v.zxyz;
- ^
-program_source:109:9: warning: unused variable 'zxzx' [-Wunused-variable]
- uint4 zxzx = P.v.zxzx;
- ^
-program_source:110:9: warning: unused variable 'zxzy' [-Wunused-variable]
- uint4 zxzy = P.v.zxzy;
- ^
-program_source:111:9: warning: unused variable 'zxzz' [-Wunused-variable]
- uint4 zxzz = P.v.zxzz;
- ^
-program_source:112:9: warning: unused variable 'zyxx' [-Wunused-variable]
- uint4 zyxx = P.v.zyxx;
- ^
-program_source:113:9: warning: unused variable 'zyxy' [-Wunused-variable]
- uint4 zyxy = P.v.zyxy;
- ^
-program_source:114:9: warning: unused variable 'zyxz' [-Wunused-variable]
- uint4 zyxz = P.v.zyxz;
- ^
-program_source:115:9: warning: unused variable 'zyyx' [-Wunused-variable]
- uint4 zyyx = P.v.zyyx;
- ^
-program_source:116:9: warning: unused variable 'zyyy' [-Wunused-variable]
- uint4 zyyy = P.v.zyyy;
- ^
-program_source:117:9: warning: unused variable 'zyyz' [-Wunused-variable]
- uint4 zyyz = P.v.zyyz;
- ^
-program_source:118:9: warning: unused variable 'zyzx' [-Wunused-variable]
- uint4 zyzx = P.v.zyzx;
- ^
-program_source:119:9: warning: unused variable 'zyzy' [-Wunused-variable]
- uint4 zyzy = P.v.zyzy;
- ^
-program_source:120:9: warning: unused variable 'zyzz' [-Wunused-variable]
- uint4 zyzz = P.v.zyzz;
- ^
-program_source:121:9: warning: unused variable 'zzxx' [-Wunused-variable]
- uint4 zzxx = P.v.zzxx;
- ^
-program_source:122:9: warning: unused variable 'zzxy' [-Wunused-variable]
- uint4 zzxy = P.v.zzxy;
- ^
-program_source:123:9: warning: unused variable 'zzxz' [-Wunused-variable]
- uint4 zzxz = P.v.zzxz;
- ^
-program_source:124:9: warning: unused variable 'zzyx' [-Wunused-variable]
- uint4 zzyx = P.v.zzyx;
- ^
-program_source:125:9: warning: unused variable 'zzyy' [-Wunused-variable]
- uint4 zzyy = P.v.zzyy;
- ^
-program_source:126:9: warning: unused variable 'zzyz' [-Wunused-variable]
- uint4 zzyz = P.v.zzyz;
- ^
-program_source:127:9: warning: unused variable 'zzzx' [-Wunused-variable]
- uint4 zzzx = P.v.zzzx;
- ^
-program_source:128:9: warning: unused variable 'zzzy' [-Wunused-variable]
- uint4 zzzy = P.v.zzzy;
- ^
-program_source:129:9: warning: unused variable 'zzzz' [-Wunused-variable]
- uint4 zzzz = P.v.zzzz;
- ^
-
diff --git a/test/tint/expressions/swizzle/write/packed_vec3/f16.wgsl.expected.ir.msl b/test/tint/expressions/swizzle/write/packed_vec3/f16.wgsl.expected.ir.msl
index d020c19..5c64adc 100644
--- a/test/tint/expressions/swizzle/write/packed_vec3/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/swizzle/write/packed_vec3/f16.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ half3 v;
+};
+struct tint_module_vars_struct {
+ device S* U;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(8) {
- v:vec3<f16> @offset(0)
+void f(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.U).v = half3(1.0h, 2.0h, 3.0h);
+ (*tint_module_vars.U).v[0u] = 1.0h;
+ (*tint_module_vars.U).v[1u] = 2.0h;
+ (*tint_module_vars.U).v[2u] = 3.0h;
}
-
-$B1: { # root
- %U:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%f = func():void {
- $B2: {
- %3:ptr<storage, vec3<f16>, read_write> = access %U, 0u
- store %3, vec3<f16>(1.0h, 2.0h, 3.0h)
- %4:ptr<storage, vec3<f16>, read_write> = access %U, 0u
- store_vector_element %4, 0u, 1.0h
- %5:ptr<storage, vec3<f16>, read_write> = access %U, 0u
- store_vector_element %5, 1u, 2.0h
- %6:ptr<storage, vec3<f16>, read_write> = access %U, 0u
- store_vector_element %6, 2u, 3.0h
- 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/expressions/swizzle/write/packed_vec3/f32.wgsl.expected.ir.msl b/test/tint/expressions/swizzle/write/packed_vec3/f32.wgsl.expected.ir.msl
index aec9b83..5bedd67 100644
--- a/test/tint/expressions/swizzle/write/packed_vec3/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/swizzle/write/packed_vec3/f32.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ float3 v;
+};
+struct tint_module_vars_struct {
+ device S* U;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- v:vec3<f32> @offset(0)
+void f(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.U).v = float3(1.0f, 2.0f, 3.0f);
+ (*tint_module_vars.U).v[0u] = 1.0f;
+ (*tint_module_vars.U).v[1u] = 2.0f;
+ (*tint_module_vars.U).v[2u] = 3.0f;
}
-
-$B1: { # root
- %U:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%f = func():void {
- $B2: {
- %3:ptr<storage, vec3<f32>, read_write> = access %U, 0u
- store %3, vec3<f32>(1.0f, 2.0f, 3.0f)
- %4:ptr<storage, vec3<f32>, read_write> = access %U, 0u
- store_vector_element %4, 0u, 1.0f
- %5:ptr<storage, vec3<f32>, read_write> = access %U, 0u
- store_vector_element %5, 1u, 2.0f
- %6:ptr<storage, vec3<f32>, read_write> = access %U, 0u
- store_vector_element %6, 2u, 3.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/expressions/swizzle/write/packed_vec3/i32.wgsl.expected.ir.msl b/test/tint/expressions/swizzle/write/packed_vec3/i32.wgsl.expected.ir.msl
index 8384aa5..3dfdfc5 100644
--- a/test/tint/expressions/swizzle/write/packed_vec3/i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/swizzle/write/packed_vec3/i32.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int3 v;
+};
+struct tint_module_vars_struct {
+ device S* U;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- v:vec3<i32> @offset(0)
+void f(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.U).v = int3(1, 2, 3);
+ (*tint_module_vars.U).v[0u] = 1;
+ (*tint_module_vars.U).v[1u] = 2;
+ (*tint_module_vars.U).v[2u] = 3;
}
-
-$B1: { # root
- %U:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%f = func():void {
- $B2: {
- %3:ptr<storage, vec3<i32>, read_write> = access %U, 0u
- store %3, vec3<i32>(1i, 2i, 3i)
- %4:ptr<storage, vec3<i32>, read_write> = access %U, 0u
- store_vector_element %4, 0u, 1i
- %5:ptr<storage, vec3<i32>, read_write> = access %U, 0u
- store_vector_element %5, 1u, 2i
- %6:ptr<storage, vec3<i32>, read_write> = access %U, 0u
- store_vector_element %6, 2u, 3i
- 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/expressions/swizzle/write/packed_vec3/u32.wgsl.expected.ir.msl b/test/tint/expressions/swizzle/write/packed_vec3/u32.wgsl.expected.ir.msl
index eb26cf5..dc0c515 100644
--- a/test/tint/expressions/swizzle/write/packed_vec3/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/swizzle/write/packed_vec3/u32.wgsl.expected.ir.msl
@@ -1,31 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ uint3 v;
+};
+struct tint_module_vars_struct {
+ device S* U;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- v:vec3<u32> @offset(0)
+void f(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.U).v = uint3(1u, 2u, 3u);
+ (*tint_module_vars.U).v[0u] = 1u;
+ (*tint_module_vars.U).v[1u] = 2u;
+ (*tint_module_vars.U).v[2u] = 3u;
}
-
-$B1: { # root
- %U:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%f = func():void {
- $B2: {
- %3:ptr<storage, vec3<u32>, read_write> = access %U, 0u
- store %3, vec3<u32>(1u, 2u, 3u)
- %4:ptr<storage, vec3<u32>, read_write> = access %U, 0u
- store_vector_element %4, 0u, 1u
- %5:ptr<storage, vec3<u32>, read_write> = access %U, 0u
- store_vector_element %5, 1u, 2u
- %6:ptr<storage, vec3<u32>, read_write> = access %U, 0u
- store_vector_element %6, 2u, 3u
- 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/expressions/swizzle/write/vec3/f16.wgsl.expected.ir.msl b/test/tint/expressions/swizzle/write/vec3/f16.wgsl.expected.ir.msl
index 1fa363e..e3af1f7 100644
--- a/test/tint/expressions/swizzle/write/vec3/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/swizzle/write/vec3/f16.wgsl.expected.ir.msl
@@ -1,19 +1,15 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct S {
half3 v;
};
+struct tint_module_vars_struct {
+ thread S* P;
+};
-thread S P = {};
-void f() {
- P.v = half3(1.0h, 2.0h, 3.0h);
- P.v[0u] = 1.0h;
- P.v[1u] = 2.0h;
- P.v[2u] = 3.0h;
+void f(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.P).v = half3(1.0h, 2.0h, 3.0h);
+ (*tint_module_vars.P).v[0u] = 1.0h;
+ (*tint_module_vars.P).v[1u] = 2.0h;
+ (*tint_module_vars.P).v[2u] = 3.0h;
}
-program_source:7:10: error: program scope variable must reside in constant address space
-thread S P = {};
- ^
-
diff --git a/test/tint/expressions/swizzle/write/vec3/f32.wgsl.expected.ir.msl b/test/tint/expressions/swizzle/write/vec3/f32.wgsl.expected.ir.msl
index d883ba5..c48421e 100644
--- a/test/tint/expressions/swizzle/write/vec3/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/swizzle/write/vec3/f32.wgsl.expected.ir.msl
@@ -1,19 +1,15 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct S {
float3 v;
};
+struct tint_module_vars_struct {
+ thread S* P;
+};
-thread S P = {};
-void f() {
- P.v = float3(1.0f, 2.0f, 3.0f);
- P.v[0u] = 1.0f;
- P.v[1u] = 2.0f;
- P.v[2u] = 3.0f;
+void f(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.P).v = float3(1.0f, 2.0f, 3.0f);
+ (*tint_module_vars.P).v[0u] = 1.0f;
+ (*tint_module_vars.P).v[1u] = 2.0f;
+ (*tint_module_vars.P).v[2u] = 3.0f;
}
-program_source:7:10: error: program scope variable must reside in constant address space
-thread S P = {};
- ^
-
diff --git a/test/tint/expressions/swizzle/write/vec3/i32.wgsl.expected.ir.msl b/test/tint/expressions/swizzle/write/vec3/i32.wgsl.expected.ir.msl
index 882337f..970c96e 100644
--- a/test/tint/expressions/swizzle/write/vec3/i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/swizzle/write/vec3/i32.wgsl.expected.ir.msl
@@ -1,19 +1,15 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct S {
int3 v;
};
+struct tint_module_vars_struct {
+ thread S* P;
+};
-thread S P = {};
-void f() {
- P.v = int3(1, 2, 3);
- P.v[0u] = 1;
- P.v[1u] = 2;
- P.v[2u] = 3;
+void f(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.P).v = int3(1, 2, 3);
+ (*tint_module_vars.P).v[0u] = 1;
+ (*tint_module_vars.P).v[1u] = 2;
+ (*tint_module_vars.P).v[2u] = 3;
}
-program_source:7:10: error: program scope variable must reside in constant address space
-thread S P = {};
- ^
-
diff --git a/test/tint/expressions/swizzle/write/vec3/u32.wgsl.expected.ir.msl b/test/tint/expressions/swizzle/write/vec3/u32.wgsl.expected.ir.msl
index c82764c..c8f3d08 100644
--- a/test/tint/expressions/swizzle/write/vec3/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/swizzle/write/vec3/u32.wgsl.expected.ir.msl
@@ -1,19 +1,15 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct S {
uint3 v;
};
+struct tint_module_vars_struct {
+ thread S* P;
+};
-thread S P = {};
-void f() {
- P.v = uint3(1u, 2u, 3u);
- P.v[0u] = 1u;
- P.v[1u] = 2u;
- P.v[2u] = 3u;
+void f(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.P).v = uint3(1u, 2u, 3u);
+ (*tint_module_vars.P).v[0u] = 1u;
+ (*tint_module_vars.P).v[1u] = 2u;
+ (*tint_module_vars.P).v[2u] = 3u;
}
-program_source:7:10: error: program scope variable must reside in constant address space
-thread S P = {};
- ^
-
diff --git a/test/tint/expressions/type_conv/mat2x2/function/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat2x2/function/f16-f32.wgsl.expected.ir.msl
index 6c452e1..1b5951f 100644
--- a/test/tint/expressions/type_conv/mat2x2/function/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat2x2/function/f16-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half2x2 m() {
- t = (t + 1.0h);
+half2x2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = ((*tint_module_vars.t) + 1.0h);
return half2x2(half2(1.0h, 2.0h), half2(3.0h, 4.0h));
}
-void f() {
- float2x2 v = float2x2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float2x2 v = float2x2(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:12: warning: unused variable 'v' [-Wunused-variable]
- float2x2 v = float2x2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/mat2x2/function/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat2x2/function/f32-f16.wgsl.expected.ir.msl
index 6db60e1..7aad2c0 100644
--- a/test/tint/expressions/type_conv/mat2x2/function/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat2x2/function/f32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float2x2 m() {
- t = (t + 1.0f);
+float2x2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = ((*tint_module_vars.t) + 1.0f);
return float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f));
}
-void f() {
- half2x2 v = half2x2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half2x2 v = half2x2(m(tint_module_vars));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:11: warning: unused variable 'v' [-Wunused-variable]
- half2x2 v = half2x2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/mat2x2/var/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat2x2/var/f16-f32.wgsl.expected.ir.msl
index 8c6dba6..7e29908 100644
--- a/test/tint/expressions/type_conv/mat2x2/var/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat2x2/var/f16-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x2* u;
+};
-thread half2x2 u = half2x2(half2(1.0h, 2.0h), half2(3.0h, 4.0h));
-void f() {
- float2x2 v = float2x2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float2x2 v = float2x2((*tint_module_vars.u));
}
-program_source:4:16: error: program scope variable must reside in constant address space
-thread half2x2 u = half2x2(half2(1.0h, 2.0h), half2(3.0h, 4.0h));
- ^
-program_source:6:12: warning: unused variable 'v' [-Wunused-variable]
- float2x2 v = float2x2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/mat2x2/var/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat2x2/var/f32-f16.wgsl.expected.ir.msl
index a8a49ff..8267a52 100644
--- a/test/tint/expressions/type_conv/mat2x2/var/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat2x2/var/f32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x2* u;
+};
-thread float2x2 u = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f));
-void f() {
- half2x2 v = half2x2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half2x2 v = half2x2((*tint_module_vars.u));
}
-program_source:4:17: error: program scope variable must reside in constant address space
-thread float2x2 u = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f));
- ^
-program_source:6:11: warning: unused variable 'v' [-Wunused-variable]
- half2x2 v = half2x2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/mat2x3/function/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat2x3/function/f16-f32.wgsl.expected.ir.msl
index 23033dd..53878b4 100644
--- a/test/tint/expressions/type_conv/mat2x3/function/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat2x3/function/f16-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half2x3 m() {
- t = (t + 1.0h);
+half2x3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = ((*tint_module_vars.t) + 1.0h);
return half2x3(half3(1.0h, 2.0h, 3.0h), half3(4.0h, 5.0h, 6.0h));
}
-void f() {
- float2x3 v = float2x3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float2x3 v = float2x3(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:12: warning: unused variable 'v' [-Wunused-variable]
- float2x3 v = float2x3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/mat2x3/function/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat2x3/function/f32-f16.wgsl.expected.ir.msl
index 6920b55..de30d27 100644
--- a/test/tint/expressions/type_conv/mat2x3/function/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat2x3/function/f32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float2x3 m() {
- t = (t + 1.0f);
+float2x3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = ((*tint_module_vars.t) + 1.0f);
return float2x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f));
}
-void f() {
- half2x3 v = half2x3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half2x3 v = half2x3(m(tint_module_vars));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:11: warning: unused variable 'v' [-Wunused-variable]
- half2x3 v = half2x3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/mat2x3/var/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat2x3/var/f16-f32.wgsl.expected.ir.msl
index d2ce968..67a61ca 100644
--- a/test/tint/expressions/type_conv/mat2x3/var/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat2x3/var/f16-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x3* u;
+};
-thread half2x3 u = half2x3(half3(1.0h, 2.0h, 3.0h), half3(4.0h, 5.0h, 6.0h));
-void f() {
- float2x3 v = float2x3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float2x3 v = float2x3((*tint_module_vars.u));
}
-program_source:4:16: error: program scope variable must reside in constant address space
-thread half2x3 u = half2x3(half3(1.0h, 2.0h, 3.0h), half3(4.0h, 5.0h, 6.0h));
- ^
-program_source:6:12: warning: unused variable 'v' [-Wunused-variable]
- float2x3 v = float2x3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/mat2x3/var/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat2x3/var/f32-f16.wgsl.expected.ir.msl
index d214a8a..3f52f8b 100644
--- a/test/tint/expressions/type_conv/mat2x3/var/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat2x3/var/f32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x3* u;
+};
-thread float2x3 u = float2x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f));
-void f() {
- half2x3 v = half2x3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half2x3 v = half2x3((*tint_module_vars.u));
}
-program_source:4:17: error: program scope variable must reside in constant address space
-thread float2x3 u = float2x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f));
- ^
-program_source:6:11: warning: unused variable 'v' [-Wunused-variable]
- half2x3 v = half2x3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/mat2x4/function/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat2x4/function/f16-f32.wgsl.expected.ir.msl
index 7932d8f..88eb046 100644
--- a/test/tint/expressions/type_conv/mat2x4/function/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat2x4/function/f16-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half2x4 m() {
- t = (t + 1.0h);
+half2x4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = ((*tint_module_vars.t) + 1.0h);
return half2x4(half4(1.0h, 2.0h, 3.0h, 4.0h), half4(5.0h, 6.0h, 7.0h, 8.0h));
}
-void f() {
- float2x4 v = float2x4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float2x4 v = float2x4(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:12: warning: unused variable 'v' [-Wunused-variable]
- float2x4 v = float2x4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/mat2x4/function/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat2x4/function/f32-f16.wgsl.expected.ir.msl
index 90ec16c..b4abf37 100644
--- a/test/tint/expressions/type_conv/mat2x4/function/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat2x4/function/f32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float2x4 m() {
- t = (t + 1.0f);
+float2x4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = ((*tint_module_vars.t) + 1.0f);
return float2x4(float4(1.0f, 2.0f, 3.0f, 4.0f), float4(5.0f, 6.0f, 7.0f, 8.0f));
}
-void f() {
- half2x4 v = half2x4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half2x4 v = half2x4(m(tint_module_vars));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:11: warning: unused variable 'v' [-Wunused-variable]
- half2x4 v = half2x4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/mat2x4/var/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat2x4/var/f16-f32.wgsl.expected.ir.msl
index e32b520..801f215 100644
--- a/test/tint/expressions/type_conv/mat2x4/var/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat2x4/var/f16-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x4* u;
+};
-thread half2x4 u = half2x4(half4(1.0h, 2.0h, 3.0h, 4.0h), half4(5.0h, 6.0h, 7.0h, 8.0h));
-void f() {
- float2x4 v = float2x4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float2x4 v = float2x4((*tint_module_vars.u));
}
-program_source:4:16: error: program scope variable must reside in constant address space
-thread half2x4 u = half2x4(half4(1.0h, 2.0h, 3.0h, 4.0h), half4(5.0h, 6.0h, 7.0h, 8.0h));
- ^
-program_source:6:12: warning: unused variable 'v' [-Wunused-variable]
- float2x4 v = float2x4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/mat2x4/var/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat2x4/var/f32-f16.wgsl.expected.ir.msl
index 7808a05..820db89 100644
--- a/test/tint/expressions/type_conv/mat2x4/var/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat2x4/var/f32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x4* u;
+};
-thread float2x4 u = float2x4(float4(1.0f, 2.0f, 3.0f, 4.0f), float4(5.0f, 6.0f, 7.0f, 8.0f));
-void f() {
- half2x4 v = half2x4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half2x4 v = half2x4((*tint_module_vars.u));
}
-program_source:4:17: error: program scope variable must reside in constant address space
-thread float2x4 u = float2x4(float4(1.0f, 2.0f, 3.0f, 4.0f), float4(5.0f, 6.0f, 7.0f, 8.0f));
- ^
-program_source:6:11: warning: unused variable 'v' [-Wunused-variable]
- half2x4 v = half2x4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/mat3x2/function/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat3x2/function/f16-f32.wgsl.expected.ir.msl
index 190aac7..904136b 100644
--- a/test/tint/expressions/type_conv/mat3x2/function/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat3x2/function/f16-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half3x2 m() {
- t = (t + 1.0h);
+half3x2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = ((*tint_module_vars.t) + 1.0h);
return half3x2(half2(1.0h, 2.0h), half2(3.0h, 4.0h), half2(5.0h, 6.0h));
}
-void f() {
- float3x2 v = float3x2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float3x2 v = float3x2(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:12: warning: unused variable 'v' [-Wunused-variable]
- float3x2 v = float3x2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/mat3x2/function/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat3x2/function/f32-f16.wgsl.expected.ir.msl
index 86f0ba9..8a27dae 100644
--- a/test/tint/expressions/type_conv/mat3x2/function/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat3x2/function/f32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float3x2 m() {
- t = (t + 1.0f);
+float3x2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = ((*tint_module_vars.t) + 1.0f);
return float3x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f), float2(5.0f, 6.0f));
}
-void f() {
- half3x2 v = half3x2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half3x2 v = half3x2(m(tint_module_vars));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:11: warning: unused variable 'v' [-Wunused-variable]
- half3x2 v = half3x2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/mat3x2/var/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat3x2/var/f16-f32.wgsl.expected.ir.msl
index 3c8fe4f..052ecd2 100644
--- a/test/tint/expressions/type_conv/mat3x2/var/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat3x2/var/f16-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x2* u;
+};
-thread half3x2 u = half3x2(half2(1.0h, 2.0h), half2(3.0h, 4.0h), half2(5.0h, 6.0h));
-void f() {
- float3x2 v = float3x2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float3x2 v = float3x2((*tint_module_vars.u));
}
-program_source:4:16: error: program scope variable must reside in constant address space
-thread half3x2 u = half3x2(half2(1.0h, 2.0h), half2(3.0h, 4.0h), half2(5.0h, 6.0h));
- ^
-program_source:6:12: warning: unused variable 'v' [-Wunused-variable]
- float3x2 v = float3x2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/mat3x2/var/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat3x2/var/f32-f16.wgsl.expected.ir.msl
index 9d715d3..23c3313 100644
--- a/test/tint/expressions/type_conv/mat3x2/var/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat3x2/var/f32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x2* u;
+};
-thread float3x2 u = float3x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f), float2(5.0f, 6.0f));
-void f() {
- half3x2 v = half3x2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half3x2 v = half3x2((*tint_module_vars.u));
}
-program_source:4:17: error: program scope variable must reside in constant address space
-thread float3x2 u = float3x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f), float2(5.0f, 6.0f));
- ^
-program_source:6:11: warning: unused variable 'v' [-Wunused-variable]
- half3x2 v = half3x2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/mat3x3/function/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat3x3/function/f16-f32.wgsl.expected.ir.msl
index 3e4edfc..00e2254 100644
--- a/test/tint/expressions/type_conv/mat3x3/function/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat3x3/function/f16-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half3x3 m() {
- t = (t + 1.0h);
+half3x3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = ((*tint_module_vars.t) + 1.0h);
return half3x3(half3(1.0h, 2.0h, 3.0h), half3(4.0h, 5.0h, 6.0h), half3(7.0h, 8.0h, 9.0h));
}
-void f() {
- float3x3 v = float3x3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float3x3 v = float3x3(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:12: warning: unused variable 'v' [-Wunused-variable]
- float3x3 v = float3x3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/mat3x3/function/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat3x3/function/f32-f16.wgsl.expected.ir.msl
index 05ec66a..67225ec 100644
--- a/test/tint/expressions/type_conv/mat3x3/function/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat3x3/function/f32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float3x3 m() {
- t = (t + 1.0f);
+float3x3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = ((*tint_module_vars.t) + 1.0f);
return float3x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f));
}
-void f() {
- half3x3 v = half3x3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half3x3 v = half3x3(m(tint_module_vars));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:11: warning: unused variable 'v' [-Wunused-variable]
- half3x3 v = half3x3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/mat3x3/var/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat3x3/var/f16-f32.wgsl.expected.ir.msl
index 28b1b91..0edabb1 100644
--- a/test/tint/expressions/type_conv/mat3x3/var/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat3x3/var/f16-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x3* u;
+};
-thread half3x3 u = half3x3(half3(1.0h, 2.0h, 3.0h), half3(4.0h, 5.0h, 6.0h), half3(7.0h, 8.0h, 9.0h));
-void f() {
- float3x3 v = float3x3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float3x3 v = float3x3((*tint_module_vars.u));
}
-program_source:4:16: error: program scope variable must reside in constant address space
-thread half3x3 u = half3x3(half3(1.0h, 2.0h, 3.0h), half3(4.0h, 5.0h, 6.0h), half3(7.0h, 8.0h, 9.0h));
- ^
-program_source:6:12: warning: unused variable 'v' [-Wunused-variable]
- float3x3 v = float3x3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/mat3x3/var/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat3x3/var/f32-f16.wgsl.expected.ir.msl
index 67868da..701e718 100644
--- a/test/tint/expressions/type_conv/mat3x3/var/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat3x3/var/f32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x3* u;
+};
-thread float3x3 u = float3x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f));
-void f() {
- half3x3 v = half3x3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half3x3 v = half3x3((*tint_module_vars.u));
}
-program_source:4:17: error: program scope variable must reside in constant address space
-thread float3x3 u = float3x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f));
- ^
-program_source:6:11: warning: unused variable 'v' [-Wunused-variable]
- half3x3 v = half3x3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/mat3x4/function/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat3x4/function/f16-f32.wgsl.expected.ir.msl
index 334d887..f4448b1 100644
--- a/test/tint/expressions/type_conv/mat3x4/function/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat3x4/function/f16-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half3x4 m() {
- t = (t + 1.0h);
+half3x4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = ((*tint_module_vars.t) + 1.0h);
return half3x4(half4(1.0h, 2.0h, 3.0h, 4.0h), half4(5.0h, 6.0h, 7.0h, 8.0h), half4(9.0h, 10.0h, 11.0h, 12.0h));
}
-void f() {
- float3x4 v = float3x4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float3x4 v = float3x4(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:12: warning: unused variable 'v' [-Wunused-variable]
- float3x4 v = float3x4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/mat3x4/function/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat3x4/function/f32-f16.wgsl.expected.ir.msl
index 8d8625c..026f2c4 100644
--- a/test/tint/expressions/type_conv/mat3x4/function/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat3x4/function/f32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float3x4 m() {
- t = (t + 1.0f);
+float3x4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = ((*tint_module_vars.t) + 1.0f);
return float3x4(float4(1.0f, 2.0f, 3.0f, 4.0f), float4(5.0f, 6.0f, 7.0f, 8.0f), float4(9.0f, 10.0f, 11.0f, 12.0f));
}
-void f() {
- half3x4 v = half3x4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half3x4 v = half3x4(m(tint_module_vars));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:11: warning: unused variable 'v' [-Wunused-variable]
- half3x4 v = half3x4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/mat3x4/var/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat3x4/var/f16-f32.wgsl.expected.ir.msl
index d043073..a1256ba 100644
--- a/test/tint/expressions/type_conv/mat3x4/var/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat3x4/var/f16-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x4* u;
+};
-thread half3x4 u = half3x4(half4(1.0h, 2.0h, 3.0h, 4.0h), half4(5.0h, 6.0h, 7.0h, 8.0h), half4(9.0h, 10.0h, 11.0h, 12.0h));
-void f() {
- float3x4 v = float3x4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float3x4 v = float3x4((*tint_module_vars.u));
}
-program_source:4:16: error: program scope variable must reside in constant address space
-thread half3x4 u = half3x4(half4(1.0h, 2.0h, 3.0h, 4.0h), half4(5.0h, 6.0h, 7.0h, 8.0h), half4(9.0h, 10.0h, 11.0h, 12.0h));
- ^
-program_source:6:12: warning: unused variable 'v' [-Wunused-variable]
- float3x4 v = float3x4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/mat3x4/var/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat3x4/var/f32-f16.wgsl.expected.ir.msl
index 8b3da37..73b202d 100644
--- a/test/tint/expressions/type_conv/mat3x4/var/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat3x4/var/f32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x4* u;
+};
-thread float3x4 u = float3x4(float4(1.0f, 2.0f, 3.0f, 4.0f), float4(5.0f, 6.0f, 7.0f, 8.0f), float4(9.0f, 10.0f, 11.0f, 12.0f));
-void f() {
- half3x4 v = half3x4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half3x4 v = half3x4((*tint_module_vars.u));
}
-program_source:4:17: error: program scope variable must reside in constant address space
-thread float3x4 u = float3x4(float4(1.0f, 2.0f, 3.0f, 4.0f), float4(5.0f, 6.0f, 7.0f, 8.0f), float4(9.0f, 10.0f, 11.0f, 12.0f));
- ^
-program_source:6:11: warning: unused variable 'v' [-Wunused-variable]
- half3x4 v = half3x4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/mat4x2/function/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat4x2/function/f16-f32.wgsl.expected.ir.msl
index f25d56b..2e3a689 100644
--- a/test/tint/expressions/type_conv/mat4x2/function/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat4x2/function/f16-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half4x2 m() {
- t = (t + 1.0h);
+half4x2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = ((*tint_module_vars.t) + 1.0h);
return half4x2(half2(1.0h, 2.0h), half2(3.0h, 4.0h), half2(5.0h, 6.0h), half2(7.0h, 8.0h));
}
-void f() {
- float4x2 v = float4x2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float4x2 v = float4x2(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:12: warning: unused variable 'v' [-Wunused-variable]
- float4x2 v = float4x2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/mat4x2/function/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat4x2/function/f32-f16.wgsl.expected.ir.msl
index 88b0d2c..c099bd4 100644
--- a/test/tint/expressions/type_conv/mat4x2/function/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat4x2/function/f32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float4x2 m() {
- t = (t + 1.0f);
+float4x2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = ((*tint_module_vars.t) + 1.0f);
return float4x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f), float2(5.0f, 6.0f), float2(7.0f, 8.0f));
}
-void f() {
- half4x2 v = half4x2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half4x2 v = half4x2(m(tint_module_vars));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:11: warning: unused variable 'v' [-Wunused-variable]
- half4x2 v = half4x2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/mat4x2/var/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat4x2/var/f16-f32.wgsl.expected.ir.msl
index 1f0f180..b35cc52 100644
--- a/test/tint/expressions/type_conv/mat4x2/var/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat4x2/var/f16-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x2* u;
+};
-thread half4x2 u = half4x2(half2(1.0h, 2.0h), half2(3.0h, 4.0h), half2(5.0h, 6.0h), half2(7.0h, 8.0h));
-void f() {
- float4x2 v = float4x2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float4x2 v = float4x2((*tint_module_vars.u));
}
-program_source:4:16: error: program scope variable must reside in constant address space
-thread half4x2 u = half4x2(half2(1.0h, 2.0h), half2(3.0h, 4.0h), half2(5.0h, 6.0h), half2(7.0h, 8.0h));
- ^
-program_source:6:12: warning: unused variable 'v' [-Wunused-variable]
- float4x2 v = float4x2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/mat4x2/var/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat4x2/var/f32-f16.wgsl.expected.ir.msl
index 71a5408..c6fb993 100644
--- a/test/tint/expressions/type_conv/mat4x2/var/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat4x2/var/f32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x2* u;
+};
-thread float4x2 u = float4x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f), float2(5.0f, 6.0f), float2(7.0f, 8.0f));
-void f() {
- half4x2 v = half4x2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half4x2 v = half4x2((*tint_module_vars.u));
}
-program_source:4:17: error: program scope variable must reside in constant address space
-thread float4x2 u = float4x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f), float2(5.0f, 6.0f), float2(7.0f, 8.0f));
- ^
-program_source:6:11: warning: unused variable 'v' [-Wunused-variable]
- half4x2 v = half4x2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/mat4x3/function/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat4x3/function/f16-f32.wgsl.expected.ir.msl
index 73a9b26..3077905 100644
--- a/test/tint/expressions/type_conv/mat4x3/function/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat4x3/function/f16-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half4x3 m() {
- t = (t + 1.0h);
+half4x3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = ((*tint_module_vars.t) + 1.0h);
return half4x3(half3(1.0h, 2.0h, 3.0h), half3(4.0h, 5.0h, 6.0h), half3(7.0h, 8.0h, 9.0h), half3(10.0h, 11.0h, 12.0h));
}
-void f() {
- float4x3 v = float4x3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float4x3 v = float4x3(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:12: warning: unused variable 'v' [-Wunused-variable]
- float4x3 v = float4x3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/mat4x3/function/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat4x3/function/f32-f16.wgsl.expected.ir.msl
index d114c7e..ad8e282 100644
--- a/test/tint/expressions/type_conv/mat4x3/function/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat4x3/function/f32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float4x3 m() {
- t = (t + 1.0f);
+float4x3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = ((*tint_module_vars.t) + 1.0f);
return float4x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f), float3(10.0f, 11.0f, 12.0f));
}
-void f() {
- half4x3 v = half4x3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half4x3 v = half4x3(m(tint_module_vars));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:11: warning: unused variable 'v' [-Wunused-variable]
- half4x3 v = half4x3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/mat4x3/var/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat4x3/var/f16-f32.wgsl.expected.ir.msl
index 194b990..a391938 100644
--- a/test/tint/expressions/type_conv/mat4x3/var/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat4x3/var/f16-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x3* u;
+};
-thread half4x3 u = half4x3(half3(1.0h, 2.0h, 3.0h), half3(4.0h, 5.0h, 6.0h), half3(7.0h, 8.0h, 9.0h), half3(10.0h, 11.0h, 12.0h));
-void f() {
- float4x3 v = float4x3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float4x3 v = float4x3((*tint_module_vars.u));
}
-program_source:4:16: error: program scope variable must reside in constant address space
-thread half4x3 u = half4x3(half3(1.0h, 2.0h, 3.0h), half3(4.0h, 5.0h, 6.0h), half3(7.0h, 8.0h, 9.0h), half3(10.0h, 11.0h, 12.0h));
- ^
-program_source:6:12: warning: unused variable 'v' [-Wunused-variable]
- float4x3 v = float4x3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/mat4x3/var/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat4x3/var/f32-f16.wgsl.expected.ir.msl
index 14eb949..9ced453 100644
--- a/test/tint/expressions/type_conv/mat4x3/var/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat4x3/var/f32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x3* u;
+};
-thread float4x3 u = float4x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f), float3(10.0f, 11.0f, 12.0f));
-void f() {
- half4x3 v = half4x3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half4x3 v = half4x3((*tint_module_vars.u));
}
-program_source:4:17: error: program scope variable must reside in constant address space
-thread float4x3 u = float4x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f), float3(10.0f, 11.0f, 12.0f));
- ^
-program_source:6:11: warning: unused variable 'v' [-Wunused-variable]
- half4x3 v = half4x3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/mat4x4/function/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat4x4/function/f16-f32.wgsl.expected.ir.msl
index 3a778cc..5b95243 100644
--- a/test/tint/expressions/type_conv/mat4x4/function/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat4x4/function/f16-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half4x4 m() {
- t = (t + 1.0h);
+half4x4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = ((*tint_module_vars.t) + 1.0h);
return half4x4(half4(1.0h, 2.0h, 3.0h, 4.0h), half4(5.0h, 6.0h, 7.0h, 8.0h), half4(9.0h, 10.0h, 11.0h, 12.0h), half4(13.0h, 14.0h, 15.0h, 16.0h));
}
-void f() {
- float4x4 v = float4x4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float4x4 v = float4x4(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:12: warning: unused variable 'v' [-Wunused-variable]
- float4x4 v = float4x4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/mat4x4/function/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat4x4/function/f32-f16.wgsl.expected.ir.msl
index 7a1413d..b840e75 100644
--- a/test/tint/expressions/type_conv/mat4x4/function/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat4x4/function/f32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float4x4 m() {
- t = (t + 1.0f);
+float4x4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = ((*tint_module_vars.t) + 1.0f);
return float4x4(float4(1.0f, 2.0f, 3.0f, 4.0f), float4(5.0f, 6.0f, 7.0f, 8.0f), float4(9.0f, 10.0f, 11.0f, 12.0f), float4(13.0f, 14.0f, 15.0f, 16.0f));
}
-void f() {
- half4x4 v = half4x4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half4x4 v = half4x4(m(tint_module_vars));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:11: warning: unused variable 'v' [-Wunused-variable]
- half4x4 v = half4x4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/mat4x4/var/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat4x4/var/f16-f32.wgsl.expected.ir.msl
index b61f23a..a3676b5 100644
--- a/test/tint/expressions/type_conv/mat4x4/var/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat4x4/var/f16-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x4* u;
+};
-thread half4x4 u = half4x4(half4(1.0h, 2.0h, 3.0h, 4.0h), half4(5.0h, 6.0h, 7.0h, 8.0h), half4(9.0h, 10.0h, 11.0h, 12.0h), half4(13.0h, 14.0h, 15.0h, 16.0h));
-void f() {
- float4x4 v = float4x4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float4x4 v = float4x4((*tint_module_vars.u));
}
-program_source:4:16: error: program scope variable must reside in constant address space
-thread half4x4 u = half4x4(half4(1.0h, 2.0h, 3.0h, 4.0h), half4(5.0h, 6.0h, 7.0h, 8.0h), half4(9.0h, 10.0h, 11.0h, 12.0h), half4(13.0h, 14.0h, 15.0h, 16.0h));
- ^
-program_source:6:12: warning: unused variable 'v' [-Wunused-variable]
- float4x4 v = float4x4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/mat4x4/var/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/mat4x4/var/f32-f16.wgsl.expected.ir.msl
index c7875aa3..62f1f60 100644
--- a/test/tint/expressions/type_conv/mat4x4/var/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/mat4x4/var/f32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x4* u;
+};
-thread float4x4 u = float4x4(float4(1.0f, 2.0f, 3.0f, 4.0f), float4(5.0f, 6.0f, 7.0f, 8.0f), float4(9.0f, 10.0f, 11.0f, 12.0f), float4(13.0f, 14.0f, 15.0f, 16.0f));
-void f() {
- half4x4 v = half4x4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half4x4 v = half4x4((*tint_module_vars.u));
}
-program_source:4:17: error: program scope variable must reside in constant address space
-thread float4x4 u = float4x4(float4(1.0f, 2.0f, 3.0f, 4.0f), float4(5.0f, 6.0f, 7.0f, 8.0f), float4(9.0f, 10.0f, 11.0f, 12.0f), float4(13.0f, 14.0f, 15.0f, 16.0f));
- ^
-program_source:6:11: warning: unused variable 'v' [-Wunused-variable]
- half4x4 v = half4x4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/function/bool-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/bool-f16.wgsl.expected.ir.msl
index 78dcb64..ea968ae 100644
--- a/test/tint/expressions/type_conv/scalar/function/bool-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/bool-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* t;
+};
-thread bool t = false;
-bool m() {
- t = true;
- return bool(t);
+bool m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = true;
+ return bool((*tint_module_vars.t));
}
-void f() {
- half v = half(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half v = half(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool t = false;
- ^
-program_source:10:8: warning: unused variable 'v' [-Wunused-variable]
- half v = half(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/function/bool-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/bool-f32.wgsl.expected.ir.msl
index 24c12d2..43ead61 100644
--- a/test/tint/expressions/type_conv/scalar/function/bool-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/bool-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* t;
+};
-thread bool t = false;
-bool m() {
- t = true;
- return bool(t);
+bool m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = true;
+ return bool((*tint_module_vars.t));
}
-void f() {
- float v = float(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float v = float(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool t = false;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- float v = float(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/function/bool-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/bool-i32.wgsl.expected.ir.msl
index d514d77..87f134a 100644
--- a/test/tint/expressions/type_conv/scalar/function/bool-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/bool-i32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* t;
+};
-thread bool t = false;
-bool m() {
- t = true;
- return bool(t);
+bool m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = true;
+ return bool((*tint_module_vars.t));
}
-void f() {
- int v = int(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ int v = int(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool t = false;
- ^
-program_source:10:7: warning: unused variable 'v' [-Wunused-variable]
- int v = int(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/function/bool-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/bool-u32.wgsl.expected.ir.msl
index 96dea8f..9f774ee 100644
--- a/test/tint/expressions/type_conv/scalar/function/bool-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/bool-u32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* t;
+};
-thread bool t = false;
-bool m() {
- t = true;
- return bool(t);
+bool m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = true;
+ return bool((*tint_module_vars.t));
}
-void f() {
- uint v = uint(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ uint v = uint(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool t = false;
- ^
-program_source:10:8: warning: unused variable 'v' [-Wunused-variable]
- uint v = uint(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/function/f16-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/f16-bool.wgsl.expected.ir.msl
index d3ee187..64e2fae 100644
--- a/test/tint/expressions/type_conv/scalar/function/f16-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/f16-bool.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half m() {
- t = 1.0h;
- return half(t);
+half m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0h;
+ return half((*tint_module_vars.t));
}
-void f() {
- bool v = bool(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ bool v = bool(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:8: warning: unused variable 'v' [-Wunused-variable]
- bool v = bool(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/function/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/f16-f32.wgsl.expected.ir.msl
index 564ef4d..18585e2 100644
--- a/test/tint/expressions/type_conv/scalar/function/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/f16-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half m() {
- t = 1.0h;
- return half(t);
+half m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0h;
+ return half((*tint_module_vars.t));
}
-void f() {
- float v = float(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float v = float(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- float v = float(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/function/f16-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/f16-i32.wgsl.expected.ir.msl
index e68341c..710bfb0 100644
--- a/test/tint/expressions/type_conv/scalar/function/f16-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/f16-i32.wgsl.expected.ir.msl
@@ -1,23 +1,16 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half m() {
- t = 1.0h;
- return half(t);
-}
-void f() {
- int v = tint_f16_to_i32(m());
+half m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0h;
+ return half((*tint_module_vars.t));
}
int tint_f16_to_i32(half value) {
return select(2147483647, select((-2147483647 - 1), int(value), (value >= -65504.0h)), (value <= 65504.0h));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:11: error: use of undeclared identifier 'tint_f16_to_i32'
- int v = tint_f16_to_i32(m());
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ int v = tint_f16_to_i32(m(tint_module_vars));
+}
diff --git a/test/tint/expressions/type_conv/scalar/function/f16-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/f16-u32.wgsl.expected.ir.msl
index 68eb209..8199af1 100644
--- a/test/tint/expressions/type_conv/scalar/function/f16-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/f16-u32.wgsl.expected.ir.msl
@@ -1,23 +1,16 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half m() {
- t = 1.0h;
- return half(t);
-}
-void f() {
- uint v = tint_f16_to_u32(m());
+half m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0h;
+ return half((*tint_module_vars.t));
}
uint tint_f16_to_u32(half value) {
return select(4294967295u, select(0u, uint(value), (value >= 0.0h)), (value <= 65504.0h));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:12: error: use of undeclared identifier 'tint_f16_to_u32'
- uint v = tint_f16_to_u32(m());
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ uint v = tint_f16_to_u32(m(tint_module_vars));
+}
diff --git a/test/tint/expressions/type_conv/scalar/function/f32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/f32-bool.wgsl.expected.ir.msl
index ad3f327..e207b16 100644
--- a/test/tint/expressions/type_conv/scalar/function/f32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/f32-bool.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float m() {
- t = 1.0f;
- return float(t);
+float m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0f;
+ return float((*tint_module_vars.t));
}
-void f() {
- bool v = bool(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ bool v = bool(m(tint_module_vars));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:8: warning: unused variable 'v' [-Wunused-variable]
- bool v = bool(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/function/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/f32-f16.wgsl.expected.ir.msl
index aa75a86..1112458 100644
--- a/test/tint/expressions/type_conv/scalar/function/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/f32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float m() {
- t = 1.0f;
- return float(t);
+float m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0f;
+ return float((*tint_module_vars.t));
}
-void f() {
- half v = half(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half v = half(m(tint_module_vars));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:8: warning: unused variable 'v' [-Wunused-variable]
- half v = half(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/function/f32-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/f32-i32.wgsl.expected.ir.msl
index adb9d94..30bf127 100644
--- a/test/tint/expressions/type_conv/scalar/function/f32-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/f32-i32.wgsl.expected.ir.msl
@@ -1,23 +1,16 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float m() {
- t = 1.0f;
- return float(t);
-}
-void f() {
- int v = tint_f32_to_i32(m());
+float m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0f;
+ return float((*tint_module_vars.t));
}
int tint_f32_to_i32(float value) {
return select(2147483647, select((-2147483647 - 1), int(value), (value >= -2147483648.0f)), (value <= 2147483520.0f));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:11: error: use of undeclared identifier 'tint_f32_to_i32'
- int v = tint_f32_to_i32(m());
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ int v = tint_f32_to_i32(m(tint_module_vars));
+}
diff --git a/test/tint/expressions/type_conv/scalar/function/f32-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/f32-u32.wgsl.expected.ir.msl
index 39a5e78..4617609 100644
--- a/test/tint/expressions/type_conv/scalar/function/f32-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/f32-u32.wgsl.expected.ir.msl
@@ -1,23 +1,16 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float m() {
- t = 1.0f;
- return float(t);
-}
-void f() {
- uint v = tint_f32_to_u32(m());
+float m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0f;
+ return float((*tint_module_vars.t));
}
uint tint_f32_to_u32(float value) {
return select(4294967295u, select(0u, uint(value), (value >= 0.0f)), (value <= 4294967040.0f));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:12: error: use of undeclared identifier 'tint_f32_to_u32'
- uint v = tint_f32_to_u32(m());
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ uint v = tint_f32_to_u32(m(tint_module_vars));
+}
diff --git a/test/tint/expressions/type_conv/scalar/function/i32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/i32-bool.wgsl.expected.ir.msl
index 5612162..287ccf1 100644
--- a/test/tint/expressions/type_conv/scalar/function/i32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/i32-bool.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* t;
+};
-thread int t = 0;
-int m() {
- t = 1;
- return int(t);
+int m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1;
+ return int((*tint_module_vars.t));
}
-void f() {
- bool v = bool(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ bool v = bool(m(tint_module_vars));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int t = 0;
- ^
-program_source:10:8: warning: unused variable 'v' [-Wunused-variable]
- bool v = bool(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/function/i32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/i32-f16.wgsl.expected.ir.msl
index 5fd4bbe..39c5c68 100644
--- a/test/tint/expressions/type_conv/scalar/function/i32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/i32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* t;
+};
-thread int t = 0;
-int m() {
- t = 1;
- return int(t);
+int m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1;
+ return int((*tint_module_vars.t));
}
-void f() {
- half v = half(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half v = half(m(tint_module_vars));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int t = 0;
- ^
-program_source:10:8: warning: unused variable 'v' [-Wunused-variable]
- half v = half(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/function/i32-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/i32-f32.wgsl.expected.ir.msl
index ee12374..f0a891c 100644
--- a/test/tint/expressions/type_conv/scalar/function/i32-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/i32-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* t;
+};
-thread int t = 0;
-int m() {
- t = 1;
- return int(t);
+int m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1;
+ return int((*tint_module_vars.t));
}
-void f() {
- float v = float(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float v = float(m(tint_module_vars));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int t = 0;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- float v = float(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/function/i32-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/i32-u32.wgsl.expected.ir.msl
index 02f7b22..6dd5bb7 100644
--- a/test/tint/expressions/type_conv/scalar/function/i32-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/i32-u32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* t;
+};
-thread int t = 0;
-int m() {
- t = 1;
- return int(t);
+int m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1;
+ return int((*tint_module_vars.t));
}
-void f() {
- uint v = uint(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ uint v = uint(m(tint_module_vars));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int t = 0;
- ^
-program_source:10:8: warning: unused variable 'v' [-Wunused-variable]
- uint v = uint(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/function/u32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/u32-bool.wgsl.expected.ir.msl
index 1d846fd..df9ebeb 100644
--- a/test/tint/expressions/type_conv/scalar/function/u32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/u32-bool.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* t;
+};
-thread uint t = 0u;
-uint m() {
- t = 1u;
- return uint(t);
+uint m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1u;
+ return uint((*tint_module_vars.t));
}
-void f() {
- bool v = bool(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ bool v = bool(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint t = 0u;
- ^
-program_source:10:8: warning: unused variable 'v' [-Wunused-variable]
- bool v = bool(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/function/u32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/u32-f16.wgsl.expected.ir.msl
index fc7c978..26ee4e1 100644
--- a/test/tint/expressions/type_conv/scalar/function/u32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/u32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* t;
+};
-thread uint t = 0u;
-uint m() {
- t = 1u;
- return uint(t);
+uint m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1u;
+ return uint((*tint_module_vars.t));
}
-void f() {
- half v = half(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half v = half(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint t = 0u;
- ^
-program_source:10:8: warning: unused variable 'v' [-Wunused-variable]
- half v = half(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/function/u32-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/u32-f32.wgsl.expected.ir.msl
index 3e47710..368b830 100644
--- a/test/tint/expressions/type_conv/scalar/function/u32-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/u32-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* t;
+};
-thread uint t = 0u;
-uint m() {
- t = 1u;
- return uint(t);
+uint m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1u;
+ return uint((*tint_module_vars.t));
}
-void f() {
- float v = float(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float v = float(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint t = 0u;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- float v = float(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/function/u32-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/function/u32-i32.wgsl.expected.ir.msl
index 17d1d2d..48d6421 100644
--- a/test/tint/expressions/type_conv/scalar/function/u32-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/function/u32-i32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* t;
+};
-thread uint t = 0u;
-uint m() {
- t = 1u;
- return uint(t);
+uint m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1u;
+ return uint((*tint_module_vars.t));
}
-void f() {
- int v = int(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ int v = int(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint t = 0u;
- ^
-program_source:10:7: warning: unused variable 'v' [-Wunused-variable]
- int v = int(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/var/bool-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/bool-f16.wgsl.expected.ir.msl
index 9a7c7a3..2a3cb49 100644
--- a/test/tint/expressions/type_conv/scalar/var/bool-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/bool-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* u;
+};
-thread bool u = true;
-void f() {
- half const v = half(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half const v = half((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool u = true;
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- half const v = half(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/var/bool-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/bool-f32.wgsl.expected.ir.msl
index 7a39c4e..6faf18a 100644
--- a/test/tint/expressions/type_conv/scalar/var/bool-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/bool-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* u;
+};
-thread bool u = true;
-void f() {
- float const v = float(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float const v = float((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool u = true;
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- float const v = float(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/var/bool-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/bool-i32.wgsl.expected.ir.msl
index a1bd4a1..32cef3a 100644
--- a/test/tint/expressions/type_conv/scalar/var/bool-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/bool-i32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* u;
+};
-thread bool u = true;
-void f() {
- int const v = int(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ int const v = int((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool u = true;
- ^
-program_source:6:13: warning: unused variable 'v' [-Wunused-variable]
- int const v = int(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/var/bool-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/bool-u32.wgsl.expected.ir.msl
index 6ac5d0b..33e425f 100644
--- a/test/tint/expressions/type_conv/scalar/var/bool-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/bool-u32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* u;
+};
-thread bool u = true;
-void f() {
- uint const v = uint(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ uint const v = uint((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool u = true;
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- uint const v = uint(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/var/f16-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/f16-bool.wgsl.expected.ir.msl
index d8c8d05..bcb46ed 100644
--- a/test/tint/expressions/type_conv/scalar/var/f16-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/f16-bool.wgsl.expected.ir.msl
@@ -5,5 +5,5 @@
};
void f(tint_module_vars_struct tint_module_vars) {
- bool const v = bool(tint_module_vars.u);
+ bool const v = bool((*tint_module_vars.u));
}
diff --git a/test/tint/expressions/type_conv/scalar/var/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/f16-f32.wgsl.expected.ir.msl
index 5cae5f8..4531216 100644
--- a/test/tint/expressions/type_conv/scalar/var/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/f16-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* u;
+};
-thread half u = 1.0h;
-void f() {
- float const v = float(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float const v = float((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half u = 1.0h;
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- float const v = float(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/var/f16-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/f16-i32.wgsl.expected.ir.msl
index 1ac2537..79967eb 100644
--- a/test/tint/expressions/type_conv/scalar/var/f16-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/f16-i32.wgsl.expected.ir.msl
@@ -1,19 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* u;
+};
-thread half u = 1.0h;
-void f() {
- int const v = tint_f16_to_i32(u);
-}
int tint_f16_to_i32(half value) {
return select(2147483647, select((-2147483647 - 1), int(value), (value >= -65504.0h)), (value <= 65504.0h));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half u = 1.0h;
- ^
-program_source:6:13: warning: unused variable 'v' [-Wunused-variable]
- int const v = tint_f16_to_i32(u);
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ int const v = tint_f16_to_i32((*tint_module_vars.u));
+}
diff --git a/test/tint/expressions/type_conv/scalar/var/f16-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/f16-u32.wgsl.expected.ir.msl
index 15500f0..eb20c3b 100644
--- a/test/tint/expressions/type_conv/scalar/var/f16-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/f16-u32.wgsl.expected.ir.msl
@@ -1,19 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* u;
+};
-thread half u = 1.0h;
-void f() {
- uint const v = tint_f16_to_u32(u);
-}
uint tint_f16_to_u32(half value) {
return select(4294967295u, select(0u, uint(value), (value >= 0.0h)), (value <= 65504.0h));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half u = 1.0h;
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- uint const v = tint_f16_to_u32(u);
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ uint const v = tint_f16_to_u32((*tint_module_vars.u));
+}
diff --git a/test/tint/expressions/type_conv/scalar/var/f32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/f32-bool.wgsl.expected.ir.msl
index 9a5de22..99e3171 100644
--- a/test/tint/expressions/type_conv/scalar/var/f32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/f32-bool.wgsl.expected.ir.msl
@@ -5,5 +5,5 @@
};
void f(tint_module_vars_struct tint_module_vars) {
- bool const v = bool(tint_module_vars.u);
+ bool const v = bool((*tint_module_vars.u));
}
diff --git a/test/tint/expressions/type_conv/scalar/var/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/f32-f16.wgsl.expected.ir.msl
index 416fc94..86c5eba 100644
--- a/test/tint/expressions/type_conv/scalar/var/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/f32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* u;
+};
-thread float u = 1.0f;
-void f() {
- half const v = half(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half const v = half((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float u = 1.0f;
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- half const v = half(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/var/f32-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/f32-i32.wgsl.expected.ir.msl
index 0b8ec9b..cae04b2 100644
--- a/test/tint/expressions/type_conv/scalar/var/f32-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/f32-i32.wgsl.expected.ir.msl
@@ -1,19 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* u;
+};
-thread float u = 1.0f;
-void f() {
- int const v = tint_f32_to_i32(u);
-}
int tint_f32_to_i32(float value) {
return select(2147483647, select((-2147483647 - 1), int(value), (value >= -2147483648.0f)), (value <= 2147483520.0f));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float u = 1.0f;
- ^
-program_source:6:13: warning: unused variable 'v' [-Wunused-variable]
- int const v = tint_f32_to_i32(u);
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ int const v = tint_f32_to_i32((*tint_module_vars.u));
+}
diff --git a/test/tint/expressions/type_conv/scalar/var/f32-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/f32-u32.wgsl.expected.ir.msl
index 63e7c30..226bac9 100644
--- a/test/tint/expressions/type_conv/scalar/var/f32-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/f32-u32.wgsl.expected.ir.msl
@@ -1,19 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* u;
+};
-thread float u = 1.0f;
-void f() {
- uint const v = tint_f32_to_u32(u);
-}
uint tint_f32_to_u32(float value) {
return select(4294967295u, select(0u, uint(value), (value >= 0.0f)), (value <= 4294967040.0f));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float u = 1.0f;
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- uint const v = tint_f32_to_u32(u);
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ uint const v = tint_f32_to_u32((*tint_module_vars.u));
+}
diff --git a/test/tint/expressions/type_conv/scalar/var/i32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/i32-bool.wgsl.expected.ir.msl
index 0c06b00..b2bd7f2 100644
--- a/test/tint/expressions/type_conv/scalar/var/i32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/i32-bool.wgsl.expected.ir.msl
@@ -5,5 +5,5 @@
};
void f(tint_module_vars_struct tint_module_vars) {
- bool const v = bool(tint_module_vars.u);
+ bool const v = bool((*tint_module_vars.u));
}
diff --git a/test/tint/expressions/type_conv/scalar/var/i32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/i32-f16.wgsl.expected.ir.msl
index c3c8bd3..3bf9a52 100644
--- a/test/tint/expressions/type_conv/scalar/var/i32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/i32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* u;
+};
-thread int u = 1;
-void f() {
- half const v = half(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half const v = half((*tint_module_vars.u));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int u = 1;
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- half const v = half(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/var/i32-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/i32-f32.wgsl.expected.ir.msl
index 2ed4a9f..dddba83 100644
--- a/test/tint/expressions/type_conv/scalar/var/i32-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/i32-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* u;
+};
-thread int u = 1;
-void f() {
- float const v = float(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float const v = float((*tint_module_vars.u));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int u = 1;
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- float const v = float(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/var/i32-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/i32-u32.wgsl.expected.ir.msl
index 60d815a..a359ac9 100644
--- a/test/tint/expressions/type_conv/scalar/var/i32-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/i32-u32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* u;
+};
-thread int u = 1;
-void f() {
- uint const v = uint(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ uint const v = uint((*tint_module_vars.u));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int u = 1;
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- uint const v = uint(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/var/u32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/u32-bool.wgsl.expected.ir.msl
index 8fbccf1..cbdeeed 100644
--- a/test/tint/expressions/type_conv/scalar/var/u32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/u32-bool.wgsl.expected.ir.msl
@@ -5,5 +5,5 @@
};
void f(tint_module_vars_struct tint_module_vars) {
- bool const v = bool(tint_module_vars.u);
+ bool const v = bool((*tint_module_vars.u));
}
diff --git a/test/tint/expressions/type_conv/scalar/var/u32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/u32-f16.wgsl.expected.ir.msl
index a78cc38..131ac6b 100644
--- a/test/tint/expressions/type_conv/scalar/var/u32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/u32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* u;
+};
-thread uint u = 1u;
-void f() {
- half const v = half(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half const v = half((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint u = 1u;
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- half const v = half(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/var/u32-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/u32-f32.wgsl.expected.ir.msl
index 4c78dc5..d2cfd2b 100644
--- a/test/tint/expressions/type_conv/scalar/var/u32-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/u32-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* u;
+};
-thread uint u = 1u;
-void f() {
- float const v = float(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float const v = float((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint u = 1u;
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- float const v = float(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/scalar/var/u32-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/scalar/var/u32-i32.wgsl.expected.ir.msl
index 64fe8bd..c58215e 100644
--- a/test/tint/expressions/type_conv/scalar/var/u32-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/scalar/var/u32-i32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* u;
+};
-thread uint u = 1u;
-void f() {
- int const v = int(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ int const v = int((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint u = 1u;
- ^
-program_source:6:13: warning: unused variable 'v' [-Wunused-variable]
- int const v = int(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/function/bool-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/bool-f16.wgsl.expected.ir.msl
index c262dd1..47f7225 100644
--- a/test/tint/expressions/type_conv/vec2/function/bool-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/bool-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* t;
+};
-thread bool t = false;
-bool2 m() {
- t = true;
- return bool2(t);
+bool2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = true;
+ return bool2((*tint_module_vars.t));
}
-void f() {
- half2 v = half2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half2 v = half2(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool t = false;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- half2 v = half2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/function/bool-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/bool-f32.wgsl.expected.ir.msl
index ca2cdfd..9000223 100644
--- a/test/tint/expressions/type_conv/vec2/function/bool-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/bool-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* t;
+};
-thread bool t = false;
-bool2 m() {
- t = true;
- return bool2(t);
+bool2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = true;
+ return bool2((*tint_module_vars.t));
}
-void f() {
- float2 v = float2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float2 v = float2(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool t = false;
- ^
-program_source:10:10: warning: unused variable 'v' [-Wunused-variable]
- float2 v = float2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/function/bool-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/bool-i32.wgsl.expected.ir.msl
index 3e19b0d..7e17be1 100644
--- a/test/tint/expressions/type_conv/vec2/function/bool-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/bool-i32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* t;
+};
-thread bool t = false;
-bool2 m() {
- t = true;
- return bool2(t);
+bool2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = true;
+ return bool2((*tint_module_vars.t));
}
-void f() {
- int2 v = int2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ int2 v = int2(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool t = false;
- ^
-program_source:10:8: warning: unused variable 'v' [-Wunused-variable]
- int2 v = int2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/function/bool-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/bool-u32.wgsl.expected.ir.msl
index 43dba17..8c1eabd 100644
--- a/test/tint/expressions/type_conv/vec2/function/bool-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/bool-u32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* t;
+};
-thread bool t = false;
-bool2 m() {
- t = true;
- return bool2(t);
+bool2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = true;
+ return bool2((*tint_module_vars.t));
}
-void f() {
- uint2 v = uint2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ uint2 v = uint2(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool t = false;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- uint2 v = uint2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/function/f16-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/f16-bool.wgsl.expected.ir.msl
index f8b94b4..3cd239c 100644
--- a/test/tint/expressions/type_conv/vec2/function/f16-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/f16-bool.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half2 m() {
- t = 1.0h;
- return half2(t);
+half2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0h;
+ return half2((*tint_module_vars.t));
}
-void f() {
- bool2 v = bool2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ bool2 v = bool2(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- bool2 v = bool2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/function/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/f16-f32.wgsl.expected.ir.msl
index fece1f4..aa10c25 100644
--- a/test/tint/expressions/type_conv/vec2/function/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/f16-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half2 m() {
- t = 1.0h;
- return half2(t);
+half2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0h;
+ return half2((*tint_module_vars.t));
}
-void f() {
- float2 v = float2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float2 v = float2(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:10: warning: unused variable 'v' [-Wunused-variable]
- float2 v = float2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/function/f16-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/f16-i32.wgsl.expected.ir.msl
index c0e0044..5ec16e6 100644
--- a/test/tint/expressions/type_conv/vec2/function/f16-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/f16-i32.wgsl.expected.ir.msl
@@ -1,23 +1,16 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half2 m() {
- t = 1.0h;
- return half2(t);
-}
-void f() {
- int2 v = tint_v2f16_to_v2i32(m());
+half2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0h;
+ return half2((*tint_module_vars.t));
}
int2 tint_v2f16_to_v2i32(half2 value) {
return select(int2(2147483647), select(int2((-2147483647 - 1)), int2(value), (value >= half2(-65504.0h))), (value <= half2(65504.0h)));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:12: error: use of undeclared identifier 'tint_v2f16_to_v2i32'
- int2 v = tint_v2f16_to_v2i32(m());
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ int2 v = tint_v2f16_to_v2i32(m(tint_module_vars));
+}
diff --git a/test/tint/expressions/type_conv/vec2/function/f16-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/f16-u32.wgsl.expected.ir.msl
index cbb012e..fde1980 100644
--- a/test/tint/expressions/type_conv/vec2/function/f16-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/f16-u32.wgsl.expected.ir.msl
@@ -1,23 +1,16 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half2 m() {
- t = 1.0h;
- return half2(t);
-}
-void f() {
- uint2 v = tint_v2f16_to_v2u32(m());
+half2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0h;
+ return half2((*tint_module_vars.t));
}
uint2 tint_v2f16_to_v2u32(half2 value) {
return select(uint2(4294967295u), select(uint2(0u), uint2(value), (value >= half2(0.0h))), (value <= half2(65504.0h)));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:13: error: use of undeclared identifier 'tint_v2f16_to_v2u32'
- uint2 v = tint_v2f16_to_v2u32(m());
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ uint2 v = tint_v2f16_to_v2u32(m(tint_module_vars));
+}
diff --git a/test/tint/expressions/type_conv/vec2/function/f32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/f32-bool.wgsl.expected.ir.msl
index 04cd450..c86f1fc 100644
--- a/test/tint/expressions/type_conv/vec2/function/f32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/f32-bool.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float2 m() {
- t = 1.0f;
- return float2(t);
+float2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0f;
+ return float2((*tint_module_vars.t));
}
-void f() {
- bool2 v = bool2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ bool2 v = bool2(m(tint_module_vars));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- bool2 v = bool2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/function/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/f32-f16.wgsl.expected.ir.msl
index 0facd6b..9b780cf 100644
--- a/test/tint/expressions/type_conv/vec2/function/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/f32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float2 m() {
- t = 1.0f;
- return float2(t);
+float2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0f;
+ return float2((*tint_module_vars.t));
}
-void f() {
- half2 v = half2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half2 v = half2(m(tint_module_vars));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- half2 v = half2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/function/f32-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/f32-i32.wgsl.expected.ir.msl
index dfc7adb..8baf26f 100644
--- a/test/tint/expressions/type_conv/vec2/function/f32-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/f32-i32.wgsl.expected.ir.msl
@@ -1,23 +1,16 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float2 m() {
- t = 1.0f;
- return float2(t);
-}
-void f() {
- int2 v = tint_v2f32_to_v2i32(m());
+float2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0f;
+ return float2((*tint_module_vars.t));
}
int2 tint_v2f32_to_v2i32(float2 value) {
return select(int2(2147483647), select(int2((-2147483647 - 1)), int2(value), (value >= float2(-2147483648.0f))), (value <= float2(2147483520.0f)));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:12: error: use of undeclared identifier 'tint_v2f32_to_v2i32'
- int2 v = tint_v2f32_to_v2i32(m());
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ int2 v = tint_v2f32_to_v2i32(m(tint_module_vars));
+}
diff --git a/test/tint/expressions/type_conv/vec2/function/f32-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/f32-u32.wgsl.expected.ir.msl
index 3d47e8d..54207ba 100644
--- a/test/tint/expressions/type_conv/vec2/function/f32-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/f32-u32.wgsl.expected.ir.msl
@@ -1,23 +1,16 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float2 m() {
- t = 1.0f;
- return float2(t);
-}
-void f() {
- uint2 v = tint_v2f32_to_v2u32(m());
+float2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0f;
+ return float2((*tint_module_vars.t));
}
uint2 tint_v2f32_to_v2u32(float2 value) {
return select(uint2(4294967295u), select(uint2(0u), uint2(value), (value >= float2(0.0f))), (value <= float2(4294967040.0f)));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:13: error: use of undeclared identifier 'tint_v2f32_to_v2u32'
- uint2 v = tint_v2f32_to_v2u32(m());
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ uint2 v = tint_v2f32_to_v2u32(m(tint_module_vars));
+}
diff --git a/test/tint/expressions/type_conv/vec2/function/i32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/i32-bool.wgsl.expected.ir.msl
index a9f5542..034bb5c 100644
--- a/test/tint/expressions/type_conv/vec2/function/i32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/i32-bool.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* t;
+};
-thread int t = 0;
-int2 m() {
- t = 1;
- return int2(t);
+int2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1;
+ return int2((*tint_module_vars.t));
}
-void f() {
- bool2 v = bool2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ bool2 v = bool2(m(tint_module_vars));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int t = 0;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- bool2 v = bool2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/function/i32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/i32-f16.wgsl.expected.ir.msl
index efb482f..ad6e58a 100644
--- a/test/tint/expressions/type_conv/vec2/function/i32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/i32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* t;
+};
-thread int t = 0;
-int2 m() {
- t = 1;
- return int2(t);
+int2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1;
+ return int2((*tint_module_vars.t));
}
-void f() {
- half2 v = half2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half2 v = half2(m(tint_module_vars));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int t = 0;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- half2 v = half2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/function/i32-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/i32-f32.wgsl.expected.ir.msl
index 6c9a42f..fe84b0d 100644
--- a/test/tint/expressions/type_conv/vec2/function/i32-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/i32-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* t;
+};
-thread int t = 0;
-int2 m() {
- t = 1;
- return int2(t);
+int2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1;
+ return int2((*tint_module_vars.t));
}
-void f() {
- float2 v = float2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float2 v = float2(m(tint_module_vars));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int t = 0;
- ^
-program_source:10:10: warning: unused variable 'v' [-Wunused-variable]
- float2 v = float2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/function/i32-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/i32-u32.wgsl.expected.ir.msl
index b5a1283..cf4b7f7 100644
--- a/test/tint/expressions/type_conv/vec2/function/i32-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/i32-u32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* t;
+};
-thread int t = 0;
-int2 m() {
- t = 1;
- return int2(t);
+int2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1;
+ return int2((*tint_module_vars.t));
}
-void f() {
- uint2 v = uint2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ uint2 v = uint2(m(tint_module_vars));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int t = 0;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- uint2 v = uint2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/function/u32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/u32-bool.wgsl.expected.ir.msl
index e986a96..2633e1b 100644
--- a/test/tint/expressions/type_conv/vec2/function/u32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/u32-bool.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* t;
+};
-thread uint t = 0u;
-uint2 m() {
- t = 1u;
- return uint2(t);
+uint2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1u;
+ return uint2((*tint_module_vars.t));
}
-void f() {
- bool2 v = bool2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ bool2 v = bool2(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint t = 0u;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- bool2 v = bool2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/function/u32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/u32-f16.wgsl.expected.ir.msl
index 8ca1118..74bb6c4 100644
--- a/test/tint/expressions/type_conv/vec2/function/u32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/u32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* t;
+};
-thread uint t = 0u;
-uint2 m() {
- t = 1u;
- return uint2(t);
+uint2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1u;
+ return uint2((*tint_module_vars.t));
}
-void f() {
- half2 v = half2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half2 v = half2(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint t = 0u;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- half2 v = half2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/function/u32-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/u32-f32.wgsl.expected.ir.msl
index 25abd48..680e7f2 100644
--- a/test/tint/expressions/type_conv/vec2/function/u32-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/u32-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* t;
+};
-thread uint t = 0u;
-uint2 m() {
- t = 1u;
- return uint2(t);
+uint2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1u;
+ return uint2((*tint_module_vars.t));
}
-void f() {
- float2 v = float2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float2 v = float2(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint t = 0u;
- ^
-program_source:10:10: warning: unused variable 'v' [-Wunused-variable]
- float2 v = float2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/function/u32-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/function/u32-i32.wgsl.expected.ir.msl
index 57e6e8d..489b7cb 100644
--- a/test/tint/expressions/type_conv/vec2/function/u32-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/function/u32-i32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* t;
+};
-thread uint t = 0u;
-uint2 m() {
- t = 1u;
- return uint2(t);
+uint2 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1u;
+ return uint2((*tint_module_vars.t));
}
-void f() {
- int2 v = int2(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ int2 v = int2(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint t = 0u;
- ^
-program_source:10:8: warning: unused variable 'v' [-Wunused-variable]
- int2 v = int2(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/var/bool-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/bool-f16.wgsl.expected.ir.msl
index 1a5995a..2542c75 100644
--- a/test/tint/expressions/type_conv/vec2/var/bool-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/bool-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool2* u;
+};
-thread bool2 u = bool2(true);
-void f() {
- half2 const v = half2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half2 const v = half2((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread bool2 u = bool2(true);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- half2 const v = half2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/var/bool-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/bool-f32.wgsl.expected.ir.msl
index e706de1..9876be7 100644
--- a/test/tint/expressions/type_conv/vec2/var/bool-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/bool-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool2* u;
+};
-thread bool2 u = bool2(true);
-void f() {
- float2 const v = float2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float2 const v = float2((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread bool2 u = bool2(true);
- ^
-program_source:6:16: warning: unused variable 'v' [-Wunused-variable]
- float2 const v = float2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/var/bool-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/bool-i32.wgsl.expected.ir.msl
index 5fc4c3a..635468b 100644
--- a/test/tint/expressions/type_conv/vec2/var/bool-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/bool-i32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool2* u;
+};
-thread bool2 u = bool2(true);
-void f() {
- int2 const v = int2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ int2 const v = int2((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread bool2 u = bool2(true);
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- int2 const v = int2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/var/bool-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/bool-u32.wgsl.expected.ir.msl
index 109a7aa..47d1315 100644
--- a/test/tint/expressions/type_conv/vec2/var/bool-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/bool-u32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool2* u;
+};
-thread bool2 u = bool2(true);
-void f() {
- uint2 const v = uint2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ uint2 const v = uint2((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread bool2 u = bool2(true);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- uint2 const v = uint2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/var/f16-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/f16-bool.wgsl.expected.ir.msl
index 9201bc2..8daf19b 100644
--- a/test/tint/expressions/type_conv/vec2/var/f16-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/f16-bool.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half2* u;
+};
-thread half2 u = half2(1.0h);
-void f() {
- bool2 const v = bool2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ bool2 const v = bool2((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread half2 u = half2(1.0h);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- bool2 const v = bool2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/var/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/f16-f32.wgsl.expected.ir.msl
index 87084ed..633e572 100644
--- a/test/tint/expressions/type_conv/vec2/var/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/f16-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half2* u;
+};
-thread half2 u = half2(1.0h);
-void f() {
- float2 const v = float2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float2 const v = float2((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread half2 u = half2(1.0h);
- ^
-program_source:6:16: warning: unused variable 'v' [-Wunused-variable]
- float2 const v = float2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/var/f16-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/f16-i32.wgsl.expected.ir.msl
index 5b84480..98dda5c 100644
--- a/test/tint/expressions/type_conv/vec2/var/f16-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/f16-i32.wgsl.expected.ir.msl
@@ -1,19 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half2* u;
+};
-thread half2 u = half2(1.0h);
-void f() {
- int2 const v = tint_v2f16_to_v2i32(u);
-}
int2 tint_v2f16_to_v2i32(half2 value) {
return select(int2(2147483647), select(int2((-2147483647 - 1)), int2(value), (value >= half2(-65504.0h))), (value <= half2(65504.0h)));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread half2 u = half2(1.0h);
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- int2 const v = tint_v2f16_to_v2i32(u);
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ int2 const v = tint_v2f16_to_v2i32((*tint_module_vars.u));
+}
diff --git a/test/tint/expressions/type_conv/vec2/var/f16-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/f16-u32.wgsl.expected.ir.msl
index e95e7b0..8cb59b8 100644
--- a/test/tint/expressions/type_conv/vec2/var/f16-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/f16-u32.wgsl.expected.ir.msl
@@ -1,19 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half2* u;
+};
-thread half2 u = half2(1.0h);
-void f() {
- uint2 const v = tint_v2f16_to_v2u32(u);
-}
uint2 tint_v2f16_to_v2u32(half2 value) {
return select(uint2(4294967295u), select(uint2(0u), uint2(value), (value >= half2(0.0h))), (value <= half2(65504.0h)));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread half2 u = half2(1.0h);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- uint2 const v = tint_v2f16_to_v2u32(u);
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ uint2 const v = tint_v2f16_to_v2u32((*tint_module_vars.u));
+}
diff --git a/test/tint/expressions/type_conv/vec2/var/f32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/f32-bool.wgsl.expected.ir.msl
index ed83e61..411f1fc 100644
--- a/test/tint/expressions/type_conv/vec2/var/f32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/f32-bool.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float2* u;
+};
-thread float2 u = float2(1.0f);
-void f() {
- bool2 const v = bool2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ bool2 const v = bool2((*tint_module_vars.u));
}
-program_source:4:15: error: program scope variable must reside in constant address space
-thread float2 u = float2(1.0f);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- bool2 const v = bool2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/var/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/f32-f16.wgsl.expected.ir.msl
index 8c74b04..b532bc5 100644
--- a/test/tint/expressions/type_conv/vec2/var/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/f32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float2* u;
+};
-thread float2 u = float2(1.0f);
-void f() {
- half2 const v = half2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half2 const v = half2((*tint_module_vars.u));
}
-program_source:4:15: error: program scope variable must reside in constant address space
-thread float2 u = float2(1.0f);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- half2 const v = half2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/var/f32-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/f32-i32.wgsl.expected.ir.msl
index 9a98687..acea322 100644
--- a/test/tint/expressions/type_conv/vec2/var/f32-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/f32-i32.wgsl.expected.ir.msl
@@ -1,19 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float2* u;
+};
-thread float2 u = float2(1.0f);
-void f() {
- int2 const v = tint_v2f32_to_v2i32(u);
-}
int2 tint_v2f32_to_v2i32(float2 value) {
return select(int2(2147483647), select(int2((-2147483647 - 1)), int2(value), (value >= float2(-2147483648.0f))), (value <= float2(2147483520.0f)));
}
-program_source:4:15: error: program scope variable must reside in constant address space
-thread float2 u = float2(1.0f);
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- int2 const v = tint_v2f32_to_v2i32(u);
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ int2 const v = tint_v2f32_to_v2i32((*tint_module_vars.u));
+}
diff --git a/test/tint/expressions/type_conv/vec2/var/f32-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/f32-u32.wgsl.expected.ir.msl
index 5b30270..cf0d225 100644
--- a/test/tint/expressions/type_conv/vec2/var/f32-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/f32-u32.wgsl.expected.ir.msl
@@ -1,19 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float2* u;
+};
-thread float2 u = float2(1.0f);
-void f() {
- uint2 const v = tint_v2f32_to_v2u32(u);
-}
uint2 tint_v2f32_to_v2u32(float2 value) {
return select(uint2(4294967295u), select(uint2(0u), uint2(value), (value >= float2(0.0f))), (value <= float2(4294967040.0f)));
}
-program_source:4:15: error: program scope variable must reside in constant address space
-thread float2 u = float2(1.0f);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- uint2 const v = tint_v2f32_to_v2u32(u);
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ uint2 const v = tint_v2f32_to_v2u32((*tint_module_vars.u));
+}
diff --git a/test/tint/expressions/type_conv/vec2/var/i32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/i32-bool.wgsl.expected.ir.msl
index 30d4554..aad8722 100644
--- a/test/tint/expressions/type_conv/vec2/var/i32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/i32-bool.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int2* u;
+};
-thread int2 u = int2(1);
-void f() {
- bool2 const v = bool2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ bool2 const v = bool2((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread int2 u = int2(1);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- bool2 const v = bool2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/var/i32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/i32-f16.wgsl.expected.ir.msl
index e24f750..36cb827 100644
--- a/test/tint/expressions/type_conv/vec2/var/i32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/i32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int2* u;
+};
-thread int2 u = int2(1);
-void f() {
- half2 const v = half2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half2 const v = half2((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread int2 u = int2(1);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- half2 const v = half2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/var/i32-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/i32-f32.wgsl.expected.ir.msl
index ef6c69a..5611f80 100644
--- a/test/tint/expressions/type_conv/vec2/var/i32-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/i32-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int2* u;
+};
-thread int2 u = int2(1);
-void f() {
- float2 const v = float2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float2 const v = float2((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread int2 u = int2(1);
- ^
-program_source:6:16: warning: unused variable 'v' [-Wunused-variable]
- float2 const v = float2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/var/i32-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/i32-u32.wgsl.expected.ir.msl
index 7ece230..1eef08c 100644
--- a/test/tint/expressions/type_conv/vec2/var/i32-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/i32-u32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int2* u;
+};
-thread int2 u = int2(1);
-void f() {
- uint2 const v = uint2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ uint2 const v = uint2((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread int2 u = int2(1);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- uint2 const v = uint2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/var/u32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/u32-bool.wgsl.expected.ir.msl
index 80d56d6..3524d21 100644
--- a/test/tint/expressions/type_conv/vec2/var/u32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/u32-bool.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint2* u;
+};
-thread uint2 u = uint2(1u);
-void f() {
- bool2 const v = bool2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ bool2 const v = bool2((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint2 u = uint2(1u);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- bool2 const v = bool2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/var/u32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/u32-f16.wgsl.expected.ir.msl
index 8f4df73..27ff77d 100644
--- a/test/tint/expressions/type_conv/vec2/var/u32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/u32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint2* u;
+};
-thread uint2 u = uint2(1u);
-void f() {
- half2 const v = half2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half2 const v = half2((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint2 u = uint2(1u);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- half2 const v = half2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/var/u32-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/u32-f32.wgsl.expected.ir.msl
index 9f13f4f..e32b6d9 100644
--- a/test/tint/expressions/type_conv/vec2/var/u32-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/u32-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint2* u;
+};
-thread uint2 u = uint2(1u);
-void f() {
- float2 const v = float2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float2 const v = float2((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint2 u = uint2(1u);
- ^
-program_source:6:16: warning: unused variable 'v' [-Wunused-variable]
- float2 const v = float2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec2/var/u32-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec2/var/u32-i32.wgsl.expected.ir.msl
index ae43f15..5c03dec 100644
--- a/test/tint/expressions/type_conv/vec2/var/u32-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec2/var/u32-i32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint2* u;
+};
-thread uint2 u = uint2(1u);
-void f() {
- int2 const v = int2(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ int2 const v = int2((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint2 u = uint2(1u);
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- int2 const v = int2(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/function/bool-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/bool-f16.wgsl.expected.ir.msl
index bf54750..4a4514c 100644
--- a/test/tint/expressions/type_conv/vec3/function/bool-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/bool-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* t;
+};
-thread bool t = false;
-bool3 m() {
- t = true;
- return bool3(t);
+bool3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = true;
+ return bool3((*tint_module_vars.t));
}
-void f() {
- half3 v = half3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half3 v = half3(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool t = false;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- half3 v = half3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/function/bool-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/bool-f32.wgsl.expected.ir.msl
index bb165f6..d72ef56 100644
--- a/test/tint/expressions/type_conv/vec3/function/bool-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/bool-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* t;
+};
-thread bool t = false;
-bool3 m() {
- t = true;
- return bool3(t);
+bool3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = true;
+ return bool3((*tint_module_vars.t));
}
-void f() {
- float3 v = float3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float3 v = float3(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool t = false;
- ^
-program_source:10:10: warning: unused variable 'v' [-Wunused-variable]
- float3 v = float3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/function/bool-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/bool-i32.wgsl.expected.ir.msl
index 844ae7a..e1421cb 100644
--- a/test/tint/expressions/type_conv/vec3/function/bool-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/bool-i32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* t;
+};
-thread bool t = false;
-bool3 m() {
- t = true;
- return bool3(t);
+bool3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = true;
+ return bool3((*tint_module_vars.t));
}
-void f() {
- int3 v = int3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ int3 v = int3(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool t = false;
- ^
-program_source:10:8: warning: unused variable 'v' [-Wunused-variable]
- int3 v = int3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/function/bool-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/bool-u32.wgsl.expected.ir.msl
index 2f0b369..e4075b5 100644
--- a/test/tint/expressions/type_conv/vec3/function/bool-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/bool-u32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* t;
+};
-thread bool t = false;
-bool3 m() {
- t = true;
- return bool3(t);
+bool3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = true;
+ return bool3((*tint_module_vars.t));
}
-void f() {
- uint3 v = uint3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ uint3 v = uint3(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool t = false;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- uint3 v = uint3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/function/f16-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/f16-bool.wgsl.expected.ir.msl
index 3def4e4..c2b7218 100644
--- a/test/tint/expressions/type_conv/vec3/function/f16-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/f16-bool.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half3 m() {
- t = 1.0h;
- return half3(t);
+half3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0h;
+ return half3((*tint_module_vars.t));
}
-void f() {
- bool3 v = bool3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ bool3 v = bool3(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- bool3 v = bool3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/function/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/f16-f32.wgsl.expected.ir.msl
index 0ae8001..0495cd3 100644
--- a/test/tint/expressions/type_conv/vec3/function/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/f16-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half3 m() {
- t = 1.0h;
- return half3(t);
+half3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0h;
+ return half3((*tint_module_vars.t));
}
-void f() {
- float3 v = float3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float3 v = float3(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:10: warning: unused variable 'v' [-Wunused-variable]
- float3 v = float3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/function/f16-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/f16-i32.wgsl.expected.ir.msl
index d4bc367..793b8b7 100644
--- a/test/tint/expressions/type_conv/vec3/function/f16-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/f16-i32.wgsl.expected.ir.msl
@@ -1,23 +1,16 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half3 m() {
- t = 1.0h;
- return half3(t);
-}
-void f() {
- int3 v = tint_v3f16_to_v3i32(m());
+half3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0h;
+ return half3((*tint_module_vars.t));
}
int3 tint_v3f16_to_v3i32(half3 value) {
return select(int3(2147483647), select(int3((-2147483647 - 1)), int3(value), (value >= half3(-65504.0h))), (value <= half3(65504.0h)));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:12: error: use of undeclared identifier 'tint_v3f16_to_v3i32'
- int3 v = tint_v3f16_to_v3i32(m());
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ int3 v = tint_v3f16_to_v3i32(m(tint_module_vars));
+}
diff --git a/test/tint/expressions/type_conv/vec3/function/f16-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/f16-u32.wgsl.expected.ir.msl
index 1efe82d..f1ccea7 100644
--- a/test/tint/expressions/type_conv/vec3/function/f16-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/f16-u32.wgsl.expected.ir.msl
@@ -1,23 +1,16 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half3 m() {
- t = 1.0h;
- return half3(t);
-}
-void f() {
- uint3 v = tint_v3f16_to_v3u32(m());
+half3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0h;
+ return half3((*tint_module_vars.t));
}
uint3 tint_v3f16_to_v3u32(half3 value) {
return select(uint3(4294967295u), select(uint3(0u), uint3(value), (value >= half3(0.0h))), (value <= half3(65504.0h)));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:13: error: use of undeclared identifier 'tint_v3f16_to_v3u32'
- uint3 v = tint_v3f16_to_v3u32(m());
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ uint3 v = tint_v3f16_to_v3u32(m(tint_module_vars));
+}
diff --git a/test/tint/expressions/type_conv/vec3/function/f32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/f32-bool.wgsl.expected.ir.msl
index 13c4b62..e0a199e 100644
--- a/test/tint/expressions/type_conv/vec3/function/f32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/f32-bool.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float3 m() {
- t = 1.0f;
- return float3(t);
+float3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0f;
+ return float3((*tint_module_vars.t));
}
-void f() {
- bool3 v = bool3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ bool3 v = bool3(m(tint_module_vars));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- bool3 v = bool3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/function/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/f32-f16.wgsl.expected.ir.msl
index 0ea1407..51facac 100644
--- a/test/tint/expressions/type_conv/vec3/function/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/f32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float3 m() {
- t = 1.0f;
- return float3(t);
+float3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0f;
+ return float3((*tint_module_vars.t));
}
-void f() {
- half3 v = half3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half3 v = half3(m(tint_module_vars));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- half3 v = half3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/function/f32-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/f32-i32.wgsl.expected.ir.msl
index fe64085..bfe740c 100644
--- a/test/tint/expressions/type_conv/vec3/function/f32-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/f32-i32.wgsl.expected.ir.msl
@@ -1,23 +1,16 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float3 m() {
- t = 1.0f;
- return float3(t);
-}
-void f() {
- int3 v = tint_v3f32_to_v3i32(m());
+float3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0f;
+ return float3((*tint_module_vars.t));
}
int3 tint_v3f32_to_v3i32(float3 value) {
return select(int3(2147483647), select(int3((-2147483647 - 1)), int3(value), (value >= float3(-2147483648.0f))), (value <= float3(2147483520.0f)));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:12: error: use of undeclared identifier 'tint_v3f32_to_v3i32'
- int3 v = tint_v3f32_to_v3i32(m());
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ int3 v = tint_v3f32_to_v3i32(m(tint_module_vars));
+}
diff --git a/test/tint/expressions/type_conv/vec3/function/f32-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/f32-u32.wgsl.expected.ir.msl
index 15b7591..fb43d64 100644
--- a/test/tint/expressions/type_conv/vec3/function/f32-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/f32-u32.wgsl.expected.ir.msl
@@ -1,23 +1,16 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float3 m() {
- t = 1.0f;
- return float3(t);
-}
-void f() {
- uint3 v = tint_v3f32_to_v3u32(m());
+float3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0f;
+ return float3((*tint_module_vars.t));
}
uint3 tint_v3f32_to_v3u32(float3 value) {
return select(uint3(4294967295u), select(uint3(0u), uint3(value), (value >= float3(0.0f))), (value <= float3(4294967040.0f)));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:13: error: use of undeclared identifier 'tint_v3f32_to_v3u32'
- uint3 v = tint_v3f32_to_v3u32(m());
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ uint3 v = tint_v3f32_to_v3u32(m(tint_module_vars));
+}
diff --git a/test/tint/expressions/type_conv/vec3/function/i32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/i32-bool.wgsl.expected.ir.msl
index 0266ae4..a66b47b 100644
--- a/test/tint/expressions/type_conv/vec3/function/i32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/i32-bool.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* t;
+};
-thread int t = 0;
-int3 m() {
- t = 1;
- return int3(t);
+int3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1;
+ return int3((*tint_module_vars.t));
}
-void f() {
- bool3 v = bool3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ bool3 v = bool3(m(tint_module_vars));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int t = 0;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- bool3 v = bool3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/function/i32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/i32-f16.wgsl.expected.ir.msl
index 39dccf2..21ec04a 100644
--- a/test/tint/expressions/type_conv/vec3/function/i32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/i32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* t;
+};
-thread int t = 0;
-int3 m() {
- t = 1;
- return int3(t);
+int3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1;
+ return int3((*tint_module_vars.t));
}
-void f() {
- half3 v = half3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half3 v = half3(m(tint_module_vars));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int t = 0;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- half3 v = half3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/function/i32-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/i32-f32.wgsl.expected.ir.msl
index e6eded8..d45ffaf 100644
--- a/test/tint/expressions/type_conv/vec3/function/i32-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/i32-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* t;
+};
-thread int t = 0;
-int3 m() {
- t = 1;
- return int3(t);
+int3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1;
+ return int3((*tint_module_vars.t));
}
-void f() {
- float3 v = float3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float3 v = float3(m(tint_module_vars));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int t = 0;
- ^
-program_source:10:10: warning: unused variable 'v' [-Wunused-variable]
- float3 v = float3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/function/i32-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/i32-u32.wgsl.expected.ir.msl
index a08fb57..6aafae6 100644
--- a/test/tint/expressions/type_conv/vec3/function/i32-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/i32-u32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* t;
+};
-thread int t = 0;
-int3 m() {
- t = 1;
- return int3(t);
+int3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1;
+ return int3((*tint_module_vars.t));
}
-void f() {
- uint3 v = uint3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ uint3 v = uint3(m(tint_module_vars));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int t = 0;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- uint3 v = uint3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/function/u32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/u32-bool.wgsl.expected.ir.msl
index e7557f0..28f4a79 100644
--- a/test/tint/expressions/type_conv/vec3/function/u32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/u32-bool.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* t;
+};
-thread uint t = 0u;
-uint3 m() {
- t = 1u;
- return uint3(t);
+uint3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1u;
+ return uint3((*tint_module_vars.t));
}
-void f() {
- bool3 v = bool3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ bool3 v = bool3(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint t = 0u;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- bool3 v = bool3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/function/u32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/u32-f16.wgsl.expected.ir.msl
index 3a19e1c..3867ddd 100644
--- a/test/tint/expressions/type_conv/vec3/function/u32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/u32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* t;
+};
-thread uint t = 0u;
-uint3 m() {
- t = 1u;
- return uint3(t);
+uint3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1u;
+ return uint3((*tint_module_vars.t));
}
-void f() {
- half3 v = half3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half3 v = half3(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint t = 0u;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- half3 v = half3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/function/u32-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/u32-f32.wgsl.expected.ir.msl
index d17e18e..0e1a62e 100644
--- a/test/tint/expressions/type_conv/vec3/function/u32-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/u32-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* t;
+};
-thread uint t = 0u;
-uint3 m() {
- t = 1u;
- return uint3(t);
+uint3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1u;
+ return uint3((*tint_module_vars.t));
}
-void f() {
- float3 v = float3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float3 v = float3(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint t = 0u;
- ^
-program_source:10:10: warning: unused variable 'v' [-Wunused-variable]
- float3 v = float3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/function/u32-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/function/u32-i32.wgsl.expected.ir.msl
index 0dda7ac..8db1b68 100644
--- a/test/tint/expressions/type_conv/vec3/function/u32-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/function/u32-i32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* t;
+};
-thread uint t = 0u;
-uint3 m() {
- t = 1u;
- return uint3(t);
+uint3 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1u;
+ return uint3((*tint_module_vars.t));
}
-void f() {
- int3 v = int3(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ int3 v = int3(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint t = 0u;
- ^
-program_source:10:8: warning: unused variable 'v' [-Wunused-variable]
- int3 v = int3(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/var/bool-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/bool-f16.wgsl.expected.ir.msl
index d64b875..557081d 100644
--- a/test/tint/expressions/type_conv/vec3/var/bool-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/bool-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool3* u;
+};
-thread bool3 u = bool3(true);
-void f() {
- half3 const v = half3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half3 const v = half3((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread bool3 u = bool3(true);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- half3 const v = half3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/var/bool-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/bool-f32.wgsl.expected.ir.msl
index 0c66595..966e0d4 100644
--- a/test/tint/expressions/type_conv/vec3/var/bool-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/bool-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool3* u;
+};
-thread bool3 u = bool3(true);
-void f() {
- float3 const v = float3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float3 const v = float3((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread bool3 u = bool3(true);
- ^
-program_source:6:16: warning: unused variable 'v' [-Wunused-variable]
- float3 const v = float3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/var/bool-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/bool-i32.wgsl.expected.ir.msl
index 54dc6c7..6563fbb 100644
--- a/test/tint/expressions/type_conv/vec3/var/bool-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/bool-i32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool3* u;
+};
-thread bool3 u = bool3(true);
-void f() {
- int3 const v = int3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ int3 const v = int3((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread bool3 u = bool3(true);
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- int3 const v = int3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/var/bool-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/bool-u32.wgsl.expected.ir.msl
index b9c2e9f..1d3f717 100644
--- a/test/tint/expressions/type_conv/vec3/var/bool-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/bool-u32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool3* u;
+};
-thread bool3 u = bool3(true);
-void f() {
- uint3 const v = uint3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ uint3 const v = uint3((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread bool3 u = bool3(true);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- uint3 const v = uint3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/var/f16-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/f16-bool.wgsl.expected.ir.msl
index db580cb..aad8265 100644
--- a/test/tint/expressions/type_conv/vec3/var/f16-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/f16-bool.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half3* u;
+};
-thread half3 u = half3(1.0h);
-void f() {
- bool3 const v = bool3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ bool3 const v = bool3((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread half3 u = half3(1.0h);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- bool3 const v = bool3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/var/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/f16-f32.wgsl.expected.ir.msl
index fa83c74..224689d 100644
--- a/test/tint/expressions/type_conv/vec3/var/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/f16-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half3* u;
+};
-thread half3 u = half3(1.0h);
-void f() {
- float3 const v = float3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float3 const v = float3((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread half3 u = half3(1.0h);
- ^
-program_source:6:16: warning: unused variable 'v' [-Wunused-variable]
- float3 const v = float3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/var/f16-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/f16-i32.wgsl.expected.ir.msl
index bdd22f9..1dc56ec 100644
--- a/test/tint/expressions/type_conv/vec3/var/f16-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/f16-i32.wgsl.expected.ir.msl
@@ -1,19 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half3* u;
+};
-thread half3 u = half3(1.0h);
-void f() {
- int3 const v = tint_v3f16_to_v3i32(u);
-}
int3 tint_v3f16_to_v3i32(half3 value) {
return select(int3(2147483647), select(int3((-2147483647 - 1)), int3(value), (value >= half3(-65504.0h))), (value <= half3(65504.0h)));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread half3 u = half3(1.0h);
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- int3 const v = tint_v3f16_to_v3i32(u);
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ int3 const v = tint_v3f16_to_v3i32((*tint_module_vars.u));
+}
diff --git a/test/tint/expressions/type_conv/vec3/var/f16-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/f16-u32.wgsl.expected.ir.msl
index 6ef6399..5714331 100644
--- a/test/tint/expressions/type_conv/vec3/var/f16-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/f16-u32.wgsl.expected.ir.msl
@@ -1,19 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half3* u;
+};
-thread half3 u = half3(1.0h);
-void f() {
- uint3 const v = tint_v3f16_to_v3u32(u);
-}
uint3 tint_v3f16_to_v3u32(half3 value) {
return select(uint3(4294967295u), select(uint3(0u), uint3(value), (value >= half3(0.0h))), (value <= half3(65504.0h)));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread half3 u = half3(1.0h);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- uint3 const v = tint_v3f16_to_v3u32(u);
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ uint3 const v = tint_v3f16_to_v3u32((*tint_module_vars.u));
+}
diff --git a/test/tint/expressions/type_conv/vec3/var/f32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/f32-bool.wgsl.expected.ir.msl
index 6e61818..b1594fe 100644
--- a/test/tint/expressions/type_conv/vec3/var/f32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/f32-bool.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float3* u;
+};
-thread float3 u = float3(1.0f);
-void f() {
- bool3 const v = bool3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ bool3 const v = bool3((*tint_module_vars.u));
}
-program_source:4:15: error: program scope variable must reside in constant address space
-thread float3 u = float3(1.0f);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- bool3 const v = bool3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/var/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/f32-f16.wgsl.expected.ir.msl
index fce9964..2a224b9 100644
--- a/test/tint/expressions/type_conv/vec3/var/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/f32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float3* u;
+};
-thread float3 u = float3(1.0f);
-void f() {
- half3 const v = half3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half3 const v = half3((*tint_module_vars.u));
}
-program_source:4:15: error: program scope variable must reside in constant address space
-thread float3 u = float3(1.0f);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- half3 const v = half3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/var/f32-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/f32-i32.wgsl.expected.ir.msl
index 90a82a1..9d81bba 100644
--- a/test/tint/expressions/type_conv/vec3/var/f32-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/f32-i32.wgsl.expected.ir.msl
@@ -1,19 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float3* u;
+};
-thread float3 u = float3(1.0f);
-void f() {
- int3 const v = tint_v3f32_to_v3i32(u);
-}
int3 tint_v3f32_to_v3i32(float3 value) {
return select(int3(2147483647), select(int3((-2147483647 - 1)), int3(value), (value >= float3(-2147483648.0f))), (value <= float3(2147483520.0f)));
}
-program_source:4:15: error: program scope variable must reside in constant address space
-thread float3 u = float3(1.0f);
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- int3 const v = tint_v3f32_to_v3i32(u);
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ int3 const v = tint_v3f32_to_v3i32((*tint_module_vars.u));
+}
diff --git a/test/tint/expressions/type_conv/vec3/var/f32-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/f32-u32.wgsl.expected.ir.msl
index 08f0a5f..7ede6d7 100644
--- a/test/tint/expressions/type_conv/vec3/var/f32-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/f32-u32.wgsl.expected.ir.msl
@@ -1,19 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float3* u;
+};
-thread float3 u = float3(1.0f);
-void f() {
- uint3 const v = tint_v3f32_to_v3u32(u);
-}
uint3 tint_v3f32_to_v3u32(float3 value) {
return select(uint3(4294967295u), select(uint3(0u), uint3(value), (value >= float3(0.0f))), (value <= float3(4294967040.0f)));
}
-program_source:4:15: error: program scope variable must reside in constant address space
-thread float3 u = float3(1.0f);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- uint3 const v = tint_v3f32_to_v3u32(u);
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ uint3 const v = tint_v3f32_to_v3u32((*tint_module_vars.u));
+}
diff --git a/test/tint/expressions/type_conv/vec3/var/i32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/i32-bool.wgsl.expected.ir.msl
index 75afebc..2d79c49 100644
--- a/test/tint/expressions/type_conv/vec3/var/i32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/i32-bool.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int3* u;
+};
-thread int3 u = int3(1);
-void f() {
- bool3 const v = bool3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ bool3 const v = bool3((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread int3 u = int3(1);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- bool3 const v = bool3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/var/i32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/i32-f16.wgsl.expected.ir.msl
index 322ccfe..379ca57 100644
--- a/test/tint/expressions/type_conv/vec3/var/i32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/i32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int3* u;
+};
-thread int3 u = int3(1);
-void f() {
- half3 const v = half3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half3 const v = half3((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread int3 u = int3(1);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- half3 const v = half3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/var/i32-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/i32-f32.wgsl.expected.ir.msl
index 87f86ab..377741b 100644
--- a/test/tint/expressions/type_conv/vec3/var/i32-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/i32-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int3* u;
+};
-thread int3 u = int3(1);
-void f() {
- float3 const v = float3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float3 const v = float3((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread int3 u = int3(1);
- ^
-program_source:6:16: warning: unused variable 'v' [-Wunused-variable]
- float3 const v = float3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/var/i32-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/i32-u32.wgsl.expected.ir.msl
index b054a1c..52de391 100644
--- a/test/tint/expressions/type_conv/vec3/var/i32-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/i32-u32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int3* u;
+};
-thread int3 u = int3(1);
-void f() {
- uint3 const v = uint3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ uint3 const v = uint3((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread int3 u = int3(1);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- uint3 const v = uint3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/var/u32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/u32-bool.wgsl.expected.ir.msl
index f46bf61..b55b1eb 100644
--- a/test/tint/expressions/type_conv/vec3/var/u32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/u32-bool.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint3* u;
+};
-thread uint3 u = uint3(1u);
-void f() {
- bool3 const v = bool3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ bool3 const v = bool3((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint3 u = uint3(1u);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- bool3 const v = bool3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/var/u32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/u32-f16.wgsl.expected.ir.msl
index 267905c..5c1195e 100644
--- a/test/tint/expressions/type_conv/vec3/var/u32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/u32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint3* u;
+};
-thread uint3 u = uint3(1u);
-void f() {
- half3 const v = half3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half3 const v = half3((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint3 u = uint3(1u);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- half3 const v = half3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/var/u32-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/u32-f32.wgsl.expected.ir.msl
index 3991655..bee2172 100644
--- a/test/tint/expressions/type_conv/vec3/var/u32-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/u32-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint3* u;
+};
-thread uint3 u = uint3(1u);
-void f() {
- float3 const v = float3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float3 const v = float3((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint3 u = uint3(1u);
- ^
-program_source:6:16: warning: unused variable 'v' [-Wunused-variable]
- float3 const v = float3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec3/var/u32-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec3/var/u32-i32.wgsl.expected.ir.msl
index 0d5302d..4d59555 100644
--- a/test/tint/expressions/type_conv/vec3/var/u32-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec3/var/u32-i32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint3* u;
+};
-thread uint3 u = uint3(1u);
-void f() {
- int3 const v = int3(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ int3 const v = int3((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint3 u = uint3(1u);
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- int3 const v = int3(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/function/bool-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/bool-f16.wgsl.expected.ir.msl
index f80ff7a..86a004d 100644
--- a/test/tint/expressions/type_conv/vec4/function/bool-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/bool-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* t;
+};
-thread bool t = false;
-bool4 m() {
- t = true;
- return bool4(t);
+bool4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = true;
+ return bool4((*tint_module_vars.t));
}
-void f() {
- half4 v = half4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half4 v = half4(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool t = false;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- half4 v = half4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/function/bool-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/bool-f32.wgsl.expected.ir.msl
index 2eabe06..11ad02f 100644
--- a/test/tint/expressions/type_conv/vec4/function/bool-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/bool-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* t;
+};
-thread bool t = false;
-bool4 m() {
- t = true;
- return bool4(t);
+bool4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = true;
+ return bool4((*tint_module_vars.t));
}
-void f() {
- float4 v = float4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float4 v = float4(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool t = false;
- ^
-program_source:10:10: warning: unused variable 'v' [-Wunused-variable]
- float4 v = float4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/function/bool-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/bool-i32.wgsl.expected.ir.msl
index 85816d1..010e55a 100644
--- a/test/tint/expressions/type_conv/vec4/function/bool-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/bool-i32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* t;
+};
-thread bool t = false;
-bool4 m() {
- t = true;
- return bool4(t);
+bool4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = true;
+ return bool4((*tint_module_vars.t));
}
-void f() {
- int4 v = int4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ int4 v = int4(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool t = false;
- ^
-program_source:10:8: warning: unused variable 'v' [-Wunused-variable]
- int4 v = int4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/function/bool-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/bool-u32.wgsl.expected.ir.msl
index 7635de9..4b940cf 100644
--- a/test/tint/expressions/type_conv/vec4/function/bool-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/bool-u32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* t;
+};
-thread bool t = false;
-bool4 m() {
- t = true;
- return bool4(t);
+bool4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = true;
+ return bool4((*tint_module_vars.t));
}
-void f() {
- uint4 v = uint4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ uint4 v = uint4(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool t = false;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- uint4 v = uint4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/function/f16-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/f16-bool.wgsl.expected.ir.msl
index 79b149a..eff8ad7 100644
--- a/test/tint/expressions/type_conv/vec4/function/f16-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/f16-bool.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half4 m() {
- t = 1.0h;
- return half4(t);
+half4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0h;
+ return half4((*tint_module_vars.t));
}
-void f() {
- bool4 v = bool4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ bool4 v = bool4(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- bool4 v = bool4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/function/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/f16-f32.wgsl.expected.ir.msl
index 21dac4d..b766e08 100644
--- a/test/tint/expressions/type_conv/vec4/function/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/f16-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half4 m() {
- t = 1.0h;
- return half4(t);
+half4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0h;
+ return half4((*tint_module_vars.t));
}
-void f() {
- float4 v = float4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float4 v = float4(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:10: warning: unused variable 'v' [-Wunused-variable]
- float4 v = float4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/function/f16-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/f16-i32.wgsl.expected.ir.msl
index 8b1cd78..985dd9b 100644
--- a/test/tint/expressions/type_conv/vec4/function/f16-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/f16-i32.wgsl.expected.ir.msl
@@ -1,23 +1,16 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half4 m() {
- t = 1.0h;
- return half4(t);
-}
-void f() {
- int4 v = tint_v4f16_to_v4i32(m());
+half4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0h;
+ return half4((*tint_module_vars.t));
}
int4 tint_v4f16_to_v4i32(half4 value) {
return select(int4(2147483647), select(int4((-2147483647 - 1)), int4(value), (value >= half4(-65504.0h))), (value <= half4(65504.0h)));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:12: error: use of undeclared identifier 'tint_v4f16_to_v4i32'
- int4 v = tint_v4f16_to_v4i32(m());
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ int4 v = tint_v4f16_to_v4i32(m(tint_module_vars));
+}
diff --git a/test/tint/expressions/type_conv/vec4/function/f16-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/f16-u32.wgsl.expected.ir.msl
index 719daff..0e158be 100644
--- a/test/tint/expressions/type_conv/vec4/function/f16-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/f16-u32.wgsl.expected.ir.msl
@@ -1,23 +1,16 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half* t;
+};
-thread half t = 0.0h;
-half4 m() {
- t = 1.0h;
- return half4(t);
-}
-void f() {
- uint4 v = tint_v4f16_to_v4u32(m());
+half4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0h;
+ return half4((*tint_module_vars.t));
}
uint4 tint_v4f16_to_v4u32(half4 value) {
return select(uint4(4294967295u), select(uint4(0u), uint4(value), (value >= half4(0.0h))), (value <= half4(65504.0h)));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread half t = 0.0h;
- ^
-program_source:10:13: error: use of undeclared identifier 'tint_v4f16_to_v4u32'
- uint4 v = tint_v4f16_to_v4u32(m());
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ uint4 v = tint_v4f16_to_v4u32(m(tint_module_vars));
+}
diff --git a/test/tint/expressions/type_conv/vec4/function/f32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/f32-bool.wgsl.expected.ir.msl
index d13ad6f..4ef1af3 100644
--- a/test/tint/expressions/type_conv/vec4/function/f32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/f32-bool.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float4 m() {
- t = 1.0f;
- return float4(t);
+float4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0f;
+ return float4((*tint_module_vars.t));
}
-void f() {
- bool4 v = bool4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ bool4 v = bool4(m(tint_module_vars));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- bool4 v = bool4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/function/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/f32-f16.wgsl.expected.ir.msl
index ede73c8..8c6c091 100644
--- a/test/tint/expressions/type_conv/vec4/function/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/f32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float4 m() {
- t = 1.0f;
- return float4(t);
+float4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0f;
+ return float4((*tint_module_vars.t));
}
-void f() {
- half4 v = half4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half4 v = half4(m(tint_module_vars));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- half4 v = half4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/function/f32-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/f32-i32.wgsl.expected.ir.msl
index 7b854b5..e34e857 100644
--- a/test/tint/expressions/type_conv/vec4/function/f32-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/f32-i32.wgsl.expected.ir.msl
@@ -1,23 +1,16 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float4 m() {
- t = 1.0f;
- return float4(t);
-}
-void f() {
- int4 v = tint_v4f32_to_v4i32(m());
+float4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0f;
+ return float4((*tint_module_vars.t));
}
int4 tint_v4f32_to_v4i32(float4 value) {
return select(int4(2147483647), select(int4((-2147483647 - 1)), int4(value), (value >= float4(-2147483648.0f))), (value <= float4(2147483520.0f)));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:12: error: use of undeclared identifier 'tint_v4f32_to_v4i32'
- int4 v = tint_v4f32_to_v4i32(m());
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ int4 v = tint_v4f32_to_v4i32(m(tint_module_vars));
+}
diff --git a/test/tint/expressions/type_conv/vec4/function/f32-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/f32-u32.wgsl.expected.ir.msl
index 6279399..2ef15ae 100644
--- a/test/tint/expressions/type_conv/vec4/function/f32-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/f32-u32.wgsl.expected.ir.msl
@@ -1,23 +1,16 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* t;
+};
-thread float t = 0.0f;
-float4 m() {
- t = 1.0f;
- return float4(t);
-}
-void f() {
- uint4 v = tint_v4f32_to_v4u32(m());
+float4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1.0f;
+ return float4((*tint_module_vars.t));
}
uint4 tint_v4f32_to_v4u32(float4 value) {
return select(uint4(4294967295u), select(uint4(0u), uint4(value), (value >= float4(0.0f))), (value <= float4(4294967040.0f)));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float t = 0.0f;
- ^
-program_source:10:13: error: use of undeclared identifier 'tint_v4f32_to_v4u32'
- uint4 v = tint_v4f32_to_v4u32(m());
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ uint4 v = tint_v4f32_to_v4u32(m(tint_module_vars));
+}
diff --git a/test/tint/expressions/type_conv/vec4/function/i32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/i32-bool.wgsl.expected.ir.msl
index ad0f1ac..b157d83 100644
--- a/test/tint/expressions/type_conv/vec4/function/i32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/i32-bool.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* t;
+};
-thread int t = 0;
-int4 m() {
- t = 1;
- return int4(t);
+int4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1;
+ return int4((*tint_module_vars.t));
}
-void f() {
- bool4 v = bool4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ bool4 v = bool4(m(tint_module_vars));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int t = 0;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- bool4 v = bool4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/function/i32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/i32-f16.wgsl.expected.ir.msl
index 055382a..bd6879a 100644
--- a/test/tint/expressions/type_conv/vec4/function/i32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/i32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* t;
+};
-thread int t = 0;
-int4 m() {
- t = 1;
- return int4(t);
+int4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1;
+ return int4((*tint_module_vars.t));
}
-void f() {
- half4 v = half4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half4 v = half4(m(tint_module_vars));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int t = 0;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- half4 v = half4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/function/i32-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/i32-f32.wgsl.expected.ir.msl
index 4ea3701..fa70e40 100644
--- a/test/tint/expressions/type_conv/vec4/function/i32-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/i32-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* t;
+};
-thread int t = 0;
-int4 m() {
- t = 1;
- return int4(t);
+int4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1;
+ return int4((*tint_module_vars.t));
}
-void f() {
- float4 v = float4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float4 v = float4(m(tint_module_vars));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int t = 0;
- ^
-program_source:10:10: warning: unused variable 'v' [-Wunused-variable]
- float4 v = float4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/function/i32-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/i32-u32.wgsl.expected.ir.msl
index c930eac..00cc07e 100644
--- a/test/tint/expressions/type_conv/vec4/function/i32-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/i32-u32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* t;
+};
-thread int t = 0;
-int4 m() {
- t = 1;
- return int4(t);
+int4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1;
+ return int4((*tint_module_vars.t));
}
-void f() {
- uint4 v = uint4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ uint4 v = uint4(m(tint_module_vars));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int t = 0;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- uint4 v = uint4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/function/u32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/u32-bool.wgsl.expected.ir.msl
index 5f41f0f..2745f5e 100644
--- a/test/tint/expressions/type_conv/vec4/function/u32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/u32-bool.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* t;
+};
-thread uint t = 0u;
-uint4 m() {
- t = 1u;
- return uint4(t);
+uint4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1u;
+ return uint4((*tint_module_vars.t));
}
-void f() {
- bool4 v = bool4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ bool4 v = bool4(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint t = 0u;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- bool4 v = bool4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/function/u32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/u32-f16.wgsl.expected.ir.msl
index c553f60..a4172c3 100644
--- a/test/tint/expressions/type_conv/vec4/function/u32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/u32-f16.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* t;
+};
-thread uint t = 0u;
-uint4 m() {
- t = 1u;
- return uint4(t);
+uint4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1u;
+ return uint4((*tint_module_vars.t));
}
-void f() {
- half4 v = half4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ half4 v = half4(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint t = 0u;
- ^
-program_source:10:9: warning: unused variable 'v' [-Wunused-variable]
- half4 v = half4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/function/u32-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/u32-f32.wgsl.expected.ir.msl
index e547733..0bd8b9e 100644
--- a/test/tint/expressions/type_conv/vec4/function/u32-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/u32-f32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* t;
+};
-thread uint t = 0u;
-uint4 m() {
- t = 1u;
- return uint4(t);
+uint4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1u;
+ return uint4((*tint_module_vars.t));
}
-void f() {
- float4 v = float4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ float4 v = float4(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint t = 0u;
- ^
-program_source:10:10: warning: unused variable 'v' [-Wunused-variable]
- float4 v = float4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/function/u32-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/function/u32-i32.wgsl.expected.ir.msl
index 33b2a17..df71f26 100644
--- a/test/tint/expressions/type_conv/vec4/function/u32-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/function/u32-i32.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint* t;
+};
-thread uint t = 0u;
-uint4 m() {
- t = 1u;
- return uint4(t);
+uint4 m(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.t) = 1u;
+ return uint4((*tint_module_vars.t));
}
-void f() {
- int4 v = int4(m());
+void f(tint_module_vars_struct tint_module_vars) {
+ int4 v = int4(m(tint_module_vars));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint t = 0u;
- ^
-program_source:10:8: warning: unused variable 'v' [-Wunused-variable]
- int4 v = int4(m());
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/var/bool-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/bool-f16.wgsl.expected.ir.msl
index 80e5be0..7922117 100644
--- a/test/tint/expressions/type_conv/vec4/var/bool-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/bool-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool4* u;
+};
-thread bool4 u = bool4(true);
-void f() {
- half4 const v = half4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half4 const v = half4((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread bool4 u = bool4(true);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- half4 const v = half4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/var/bool-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/bool-f32.wgsl.expected.ir.msl
index 2835fc0f..ed5a243 100644
--- a/test/tint/expressions/type_conv/vec4/var/bool-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/bool-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool4* u;
+};
-thread bool4 u = bool4(true);
-void f() {
- float4 const v = float4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float4 const v = float4((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread bool4 u = bool4(true);
- ^
-program_source:6:16: warning: unused variable 'v' [-Wunused-variable]
- float4 const v = float4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/var/bool-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/bool-i32.wgsl.expected.ir.msl
index 0b2308e..e51991a 100644
--- a/test/tint/expressions/type_conv/vec4/var/bool-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/bool-i32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool4* u;
+};
-thread bool4 u = bool4(true);
-void f() {
- int4 const v = int4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ int4 const v = int4((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread bool4 u = bool4(true);
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- int4 const v = int4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/var/bool-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/bool-u32.wgsl.expected.ir.msl
index 209ce75..fb1503c 100644
--- a/test/tint/expressions/type_conv/vec4/var/bool-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/bool-u32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool4* u;
+};
-thread bool4 u = bool4(true);
-void f() {
- uint4 const v = uint4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ uint4 const v = uint4((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread bool4 u = bool4(true);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- uint4 const v = uint4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/var/f16-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/f16-bool.wgsl.expected.ir.msl
index 6b7ba30..bd0f1d6 100644
--- a/test/tint/expressions/type_conv/vec4/var/f16-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/f16-bool.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half4* u;
+};
-thread half4 u = half4(1.0h);
-void f() {
- bool4 const v = bool4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ bool4 const v = bool4((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread half4 u = half4(1.0h);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- bool4 const v = bool4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/var/f16-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/f16-f32.wgsl.expected.ir.msl
index 3a602fd..4c6efe9 100644
--- a/test/tint/expressions/type_conv/vec4/var/f16-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/f16-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half4* u;
+};
-thread half4 u = half4(1.0h);
-void f() {
- float4 const v = float4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float4 const v = float4((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread half4 u = half4(1.0h);
- ^
-program_source:6:16: warning: unused variable 'v' [-Wunused-variable]
- float4 const v = float4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/var/f16-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/f16-i32.wgsl.expected.ir.msl
index 06fec5e..c585bad 100644
--- a/test/tint/expressions/type_conv/vec4/var/f16-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/f16-i32.wgsl.expected.ir.msl
@@ -1,19 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half4* u;
+};
-thread half4 u = half4(1.0h);
-void f() {
- int4 const v = tint_v4f16_to_v4i32(u);
-}
int4 tint_v4f16_to_v4i32(half4 value) {
return select(int4(2147483647), select(int4((-2147483647 - 1)), int4(value), (value >= half4(-65504.0h))), (value <= half4(65504.0h)));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread half4 u = half4(1.0h);
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- int4 const v = tint_v4f16_to_v4i32(u);
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ int4 const v = tint_v4f16_to_v4i32((*tint_module_vars.u));
+}
diff --git a/test/tint/expressions/type_conv/vec4/var/f16-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/f16-u32.wgsl.expected.ir.msl
index 4e96090..33527dd 100644
--- a/test/tint/expressions/type_conv/vec4/var/f16-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/f16-u32.wgsl.expected.ir.msl
@@ -1,19 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread half4* u;
+};
-thread half4 u = half4(1.0h);
-void f() {
- uint4 const v = tint_v4f16_to_v4u32(u);
-}
uint4 tint_v4f16_to_v4u32(half4 value) {
return select(uint4(4294967295u), select(uint4(0u), uint4(value), (value >= half4(0.0h))), (value <= half4(65504.0h)));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread half4 u = half4(1.0h);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- uint4 const v = tint_v4f16_to_v4u32(u);
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ uint4 const v = tint_v4f16_to_v4u32((*tint_module_vars.u));
+}
diff --git a/test/tint/expressions/type_conv/vec4/var/f32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/f32-bool.wgsl.expected.ir.msl
index cd08f418..1b76307 100644
--- a/test/tint/expressions/type_conv/vec4/var/f32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/f32-bool.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float4* u;
+};
-thread float4 u = float4(1.0f);
-void f() {
- bool4 const v = bool4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ bool4 const v = bool4((*tint_module_vars.u));
}
-program_source:4:15: error: program scope variable must reside in constant address space
-thread float4 u = float4(1.0f);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- bool4 const v = bool4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/var/f32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/f32-f16.wgsl.expected.ir.msl
index ff7720d..83b16c7 100644
--- a/test/tint/expressions/type_conv/vec4/var/f32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/f32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float4* u;
+};
-thread float4 u = float4(1.0f);
-void f() {
- half4 const v = half4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half4 const v = half4((*tint_module_vars.u));
}
-program_source:4:15: error: program scope variable must reside in constant address space
-thread float4 u = float4(1.0f);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- half4 const v = half4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/var/f32-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/f32-i32.wgsl.expected.ir.msl
index 03dd661..6426fb7 100644
--- a/test/tint/expressions/type_conv/vec4/var/f32-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/f32-i32.wgsl.expected.ir.msl
@@ -1,19 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float4* u;
+};
-thread float4 u = float4(1.0f);
-void f() {
- int4 const v = tint_v4f32_to_v4i32(u);
-}
int4 tint_v4f32_to_v4i32(float4 value) {
return select(int4(2147483647), select(int4((-2147483647 - 1)), int4(value), (value >= float4(-2147483648.0f))), (value <= float4(2147483520.0f)));
}
-program_source:4:15: error: program scope variable must reside in constant address space
-thread float4 u = float4(1.0f);
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- int4 const v = tint_v4f32_to_v4i32(u);
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ int4 const v = tint_v4f32_to_v4i32((*tint_module_vars.u));
+}
diff --git a/test/tint/expressions/type_conv/vec4/var/f32-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/f32-u32.wgsl.expected.ir.msl
index bbdd99a..127f45e 100644
--- a/test/tint/expressions/type_conv/vec4/var/f32-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/f32-u32.wgsl.expected.ir.msl
@@ -1,19 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float4* u;
+};
-thread float4 u = float4(1.0f);
-void f() {
- uint4 const v = tint_v4f32_to_v4u32(u);
-}
uint4 tint_v4f32_to_v4u32(float4 value) {
return select(uint4(4294967295u), select(uint4(0u), uint4(value), (value >= float4(0.0f))), (value <= float4(4294967040.0f)));
}
-program_source:4:15: error: program scope variable must reside in constant address space
-thread float4 u = float4(1.0f);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- uint4 const v = tint_v4f32_to_v4u32(u);
- ^
-
+void f(tint_module_vars_struct tint_module_vars) {
+ uint4 const v = tint_v4f32_to_v4u32((*tint_module_vars.u));
+}
diff --git a/test/tint/expressions/type_conv/vec4/var/i32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/i32-bool.wgsl.expected.ir.msl
index b7ad5c7..0a5ea33 100644
--- a/test/tint/expressions/type_conv/vec4/var/i32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/i32-bool.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int4* u;
+};
-thread int4 u = int4(1);
-void f() {
- bool4 const v = bool4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ bool4 const v = bool4((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread int4 u = int4(1);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- bool4 const v = bool4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/var/i32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/i32-f16.wgsl.expected.ir.msl
index eab4e3c..f9a8b41 100644
--- a/test/tint/expressions/type_conv/vec4/var/i32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/i32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int4* u;
+};
-thread int4 u = int4(1);
-void f() {
- half4 const v = half4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half4 const v = half4((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread int4 u = int4(1);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- half4 const v = half4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/var/i32-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/i32-f32.wgsl.expected.ir.msl
index 7f6383b..d755810 100644
--- a/test/tint/expressions/type_conv/vec4/var/i32-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/i32-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int4* u;
+};
-thread int4 u = int4(1);
-void f() {
- float4 const v = float4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float4 const v = float4((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread int4 u = int4(1);
- ^
-program_source:6:16: warning: unused variable 'v' [-Wunused-variable]
- float4 const v = float4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/var/i32-u32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/i32-u32.wgsl.expected.ir.msl
index 8fabc17..5ccfefc 100644
--- a/test/tint/expressions/type_conv/vec4/var/i32-u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/i32-u32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int4* u;
+};
-thread int4 u = int4(1);
-void f() {
- uint4 const v = uint4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ uint4 const v = uint4((*tint_module_vars.u));
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread int4 u = int4(1);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- uint4 const v = uint4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/var/u32-bool.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/u32-bool.wgsl.expected.ir.msl
index 64fd31c..918b4c8 100644
--- a/test/tint/expressions/type_conv/vec4/var/u32-bool.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/u32-bool.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint4* u;
+};
-thread uint4 u = uint4(1u);
-void f() {
- bool4 const v = bool4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ bool4 const v = bool4((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint4 u = uint4(1u);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- bool4 const v = bool4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/var/u32-f16.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/u32-f16.wgsl.expected.ir.msl
index 740a71e..68c673e 100644
--- a/test/tint/expressions/type_conv/vec4/var/u32-f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/u32-f16.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint4* u;
+};
-thread uint4 u = uint4(1u);
-void f() {
- half4 const v = half4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ half4 const v = half4((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint4 u = uint4(1u);
- ^
-program_source:6:15: warning: unused variable 'v' [-Wunused-variable]
- half4 const v = half4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/var/u32-f32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/u32-f32.wgsl.expected.ir.msl
index 739a9f3..d7d234e 100644
--- a/test/tint/expressions/type_conv/vec4/var/u32-f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/u32-f32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint4* u;
+};
-thread uint4 u = uint4(1u);
-void f() {
- float4 const v = float4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ float4 const v = float4((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint4 u = uint4(1u);
- ^
-program_source:6:16: warning: unused variable 'v' [-Wunused-variable]
- float4 const v = float4(u);
- ^
-
diff --git a/test/tint/expressions/type_conv/vec4/var/u32-i32.wgsl.expected.ir.msl b/test/tint/expressions/type_conv/vec4/var/u32-i32.wgsl.expected.ir.msl
index bec07b0..9bc6952 100644
--- a/test/tint/expressions/type_conv/vec4/var/u32-i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_conv/vec4/var/u32-i32.wgsl.expected.ir.msl
@@ -1,16 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread uint4* u;
+};
-thread uint4 u = uint4(1u);
-void f() {
- int4 const v = int4(u);
+void f(tint_module_vars_struct tint_module_vars) {
+ int4 const v = int4((*tint_module_vars.u));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint4 u = uint4(1u);
- ^
-program_source:6:14: warning: unused variable 'v' [-Wunused-variable]
- int4 const v = int4(u);
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/explicit/abstract.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/explicit/abstract.wgsl.expected.ir.msl
index c81ca4f..a706e87 100644
--- a/test/tint/expressions/type_ctor/array/explicit/abstract.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/abstract.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<float, 2>* arr;
+};
-thread tint_array<float, 2> arr = tint_array<float, 2>{1.0f, 2.0f};
-void f() {
- tint_array<float, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<float, 2> v = (*tint_module_vars.arr);
}
-program_source:16:29: error: program scope variable must reside in constant address space
-thread tint_array<float, 2> arr = tint_array<float, 2>{1.0f, 2.0f};
- ^
-program_source:18:24: warning: unused variable 'v' [-Wunused-variable]
- tint_array<float, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/explicit/array/abstract.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/explicit/array/abstract.wgsl.expected.ir.msl
index b447ff1..db752e0 100644
--- a/test/tint/expressions/type_ctor/array/explicit/array/abstract.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/array/abstract.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<tint_array<float, 2>, 2>* arr;
+};
-thread tint_array<tint_array<float, 2>, 2> arr = tint_array<tint_array<float, 2>, 2>{tint_array<float, 2>{1.0f, 2.0f}, tint_array<float, 2>{3.0f, 4.0f}};
-void f() {
- tint_array<tint_array<float, 2>, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<tint_array<float, 2>, 2> v = (*tint_module_vars.arr);
}
-program_source:16:44: error: program scope variable must reside in constant address space
-thread tint_array<tint_array<float, 2>, 2> arr = tint_array<tint_array<float, 2>, 2>{tint_array<float, 2>{1.0f, 2.0f}, tint_array<float, 2>{3.0f, 4.0f}};
- ^
-program_source:18:39: warning: unused variable 'v' [-Wunused-variable]
- tint_array<tint_array<float, 2>, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/explicit/array/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/explicit/array/f32.wgsl.expected.ir.msl
index b447ff1..db752e0 100644
--- a/test/tint/expressions/type_ctor/array/explicit/array/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/array/f32.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<tint_array<float, 2>, 2>* arr;
+};
-thread tint_array<tint_array<float, 2>, 2> arr = tint_array<tint_array<float, 2>, 2>{tint_array<float, 2>{1.0f, 2.0f}, tint_array<float, 2>{3.0f, 4.0f}};
-void f() {
- tint_array<tint_array<float, 2>, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<tint_array<float, 2>, 2> v = (*tint_module_vars.arr);
}
-program_source:16:44: error: program scope variable must reside in constant address space
-thread tint_array<tint_array<float, 2>, 2> arr = tint_array<tint_array<float, 2>, 2>{tint_array<float, 2>{1.0f, 2.0f}, tint_array<float, 2>{3.0f, 4.0f}};
- ^
-program_source:18:39: warning: unused variable 'v' [-Wunused-variable]
- tint_array<tint_array<float, 2>, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/explicit/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/explicit/f32.wgsl.expected.ir.msl
index c81ca4f..a706e87 100644
--- a/test/tint/expressions/type_ctor/array/explicit/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/f32.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<float, 2>* arr;
+};
-thread tint_array<float, 2> arr = tint_array<float, 2>{1.0f, 2.0f};
-void f() {
- tint_array<float, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<float, 2> v = (*tint_module_vars.arr);
}
-program_source:16:29: error: program scope variable must reside in constant address space
-thread tint_array<float, 2> arr = tint_array<float, 2>{1.0f, 2.0f};
- ^
-program_source:18:24: warning: unused variable 'v' [-Wunused-variable]
- tint_array<float, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/explicit/i32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/explicit/i32.wgsl.expected.ir.msl
index 74ea049..0aacac8 100644
--- a/test/tint/expressions/type_ctor/array/explicit/i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/i32.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<int, 2>* arr;
+};
-thread tint_array<int, 2> arr = tint_array<int, 2>{1, 2};
-void f() {
- tint_array<int, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<int, 2> v = (*tint_module_vars.arr);
}
-program_source:16:27: error: program scope variable must reside in constant address space
-thread tint_array<int, 2> arr = tint_array<int, 2>{1, 2};
- ^
-program_source:18:22: warning: unused variable 'v' [-Wunused-variable]
- tint_array<int, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/explicit/mat2x2/abstract.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/explicit/mat2x2/abstract.wgsl.expected.ir.msl
index 2e3b058..bf71d0d 100644
--- a/test/tint/expressions/type_ctor/array/explicit/mat2x2/abstract.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/mat2x2/abstract.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,12 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<float2x2, 2>* arr;
+};
-thread tint_array<float2x2, 2> arr = tint_array<float2x2, 2>{float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)), float2x2(float2(5.0f, 6.0f), float2(7.0f, 8.0f))};
-void f() {
- tint_array<float2x2, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<float2x2, 2> v = (*tint_module_vars.arr);
}
-program_source:16:32: error: program scope variable must reside in constant address space
-thread tint_array<float2x2, 2> arr = tint_array<float2x2, 2>{float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)), float2x2(float2(5.0f, 6.0f), float2(7.0f, 8.0f))};
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/explicit/mat2x2/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/explicit/mat2x2/f32.wgsl.expected.ir.msl
index 2e3b058..bf71d0d 100644
--- a/test/tint/expressions/type_ctor/array/explicit/mat2x2/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/mat2x2/f32.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,12 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<float2x2, 2>* arr;
+};
-thread tint_array<float2x2, 2> arr = tint_array<float2x2, 2>{float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)), float2x2(float2(5.0f, 6.0f), float2(7.0f, 8.0f))};
-void f() {
- tint_array<float2x2, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<float2x2, 2> v = (*tint_module_vars.arr);
}
-program_source:16:32: error: program scope variable must reside in constant address space
-thread tint_array<float2x2, 2> arr = tint_array<float2x2, 2>{float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)), float2x2(float2(5.0f, 6.0f), float2(7.0f, 8.0f))};
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/explicit/u32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/explicit/u32.wgsl.expected.ir.msl
index 16cfda7..aa732c1 100644
--- a/test/tint/expressions/type_ctor/array/explicit/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/u32.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<uint, 2>* arr;
+};
-thread tint_array<uint, 2> arr = tint_array<uint, 2>{1u, 2u};
-void f() {
- tint_array<uint, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<uint, 2> v = (*tint_module_vars.arr);
}
-program_source:16:28: error: program scope variable must reside in constant address space
-thread tint_array<uint, 2> arr = tint_array<uint, 2>{1u, 2u};
- ^
-program_source:18:23: warning: unused variable 'v' [-Wunused-variable]
- tint_array<uint, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/explicit/vec2/abstract.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/explicit/vec2/abstract.wgsl.expected.ir.msl
index c97df58..33c0a20 100644
--- a/test/tint/expressions/type_ctor/array/explicit/vec2/abstract.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/vec2/abstract.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<float2, 2>* arr;
+};
-thread tint_array<float2, 2> arr = tint_array<float2, 2>{float2(1.0f), float2(2.0f)};
-void f() {
- tint_array<float2, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<float2, 2> v = (*tint_module_vars.arr);
}
-program_source:16:30: error: program scope variable must reside in constant address space
-thread tint_array<float2, 2> arr = tint_array<float2, 2>{float2(1.0f), float2(2.0f)};
- ^
-program_source:18:25: warning: unused variable 'v' [-Wunused-variable]
- tint_array<float2, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/explicit/vec2/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/explicit/vec2/f32.wgsl.expected.ir.msl
index c97df58..33c0a20 100644
--- a/test/tint/expressions/type_ctor/array/explicit/vec2/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/vec2/f32.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<float2, 2>* arr;
+};
-thread tint_array<float2, 2> arr = tint_array<float2, 2>{float2(1.0f), float2(2.0f)};
-void f() {
- tint_array<float2, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<float2, 2> v = (*tint_module_vars.arr);
}
-program_source:16:30: error: program scope variable must reside in constant address space
-thread tint_array<float2, 2> arr = tint_array<float2, 2>{float2(1.0f), float2(2.0f)};
- ^
-program_source:18:25: warning: unused variable 'v' [-Wunused-variable]
- tint_array<float2, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/explicit/vec2/i32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/explicit/vec2/i32.wgsl.expected.ir.msl
index a679881..149d65d 100644
--- a/test/tint/expressions/type_ctor/array/explicit/vec2/i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/vec2/i32.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<int2, 2>* arr;
+};
-thread tint_array<int2, 2> arr = tint_array<int2, 2>{int2(1), int2(2)};
-void f() {
- tint_array<int2, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<int2, 2> v = (*tint_module_vars.arr);
}
-program_source:16:28: error: program scope variable must reside in constant address space
-thread tint_array<int2, 2> arr = tint_array<int2, 2>{int2(1), int2(2)};
- ^
-program_source:18:23: warning: unused variable 'v' [-Wunused-variable]
- tint_array<int2, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/explicit/vec2/u32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/explicit/vec2/u32.wgsl.expected.ir.msl
index fc73b45..c5de1b0 100644
--- a/test/tint/expressions/type_ctor/array/explicit/vec2/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/vec2/u32.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<uint2, 2>* arr;
+};
-thread tint_array<uint2, 2> arr = tint_array<uint2, 2>{uint2(1u), uint2(2u)};
-void f() {
- tint_array<uint2, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<uint2, 2> v = (*tint_module_vars.arr);
}
-program_source:16:29: error: program scope variable must reside in constant address space
-thread tint_array<uint2, 2> arr = tint_array<uint2, 2>{uint2(1u), uint2(2u)};
- ^
-program_source:18:24: warning: unused variable 'v' [-Wunused-variable]
- tint_array<uint2, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/inferred/abstract.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/inferred/abstract.wgsl.expected.ir.msl
index 74ea049..0aacac8 100644
--- a/test/tint/expressions/type_ctor/array/inferred/abstract.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/abstract.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<int, 2>* arr;
+};
-thread tint_array<int, 2> arr = tint_array<int, 2>{1, 2};
-void f() {
- tint_array<int, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<int, 2> v = (*tint_module_vars.arr);
}
-program_source:16:27: error: program scope variable must reside in constant address space
-thread tint_array<int, 2> arr = tint_array<int, 2>{1, 2};
- ^
-program_source:18:22: warning: unused variable 'v' [-Wunused-variable]
- tint_array<int, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/inferred/array/abstract.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/inferred/array/abstract.wgsl.expected.ir.msl
index 1fac236..cd553cb 100644
--- a/test/tint/expressions/type_ctor/array/inferred/array/abstract.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/array/abstract.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<tint_array<int, 2>, 2>* arr;
+};
-thread tint_array<tint_array<int, 2>, 2> arr = tint_array<tint_array<int, 2>, 2>{tint_array<int, 2>{1, 2}, tint_array<int, 2>{3, 4}};
-void f() {
- tint_array<tint_array<int, 2>, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<tint_array<int, 2>, 2> v = (*tint_module_vars.arr);
}
-program_source:16:42: error: program scope variable must reside in constant address space
-thread tint_array<tint_array<int, 2>, 2> arr = tint_array<tint_array<int, 2>, 2>{tint_array<int, 2>{1, 2}, tint_array<int, 2>{3, 4}};
- ^
-program_source:18:37: warning: unused variable 'v' [-Wunused-variable]
- tint_array<tint_array<int, 2>, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/inferred/array/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/inferred/array/f32.wgsl.expected.ir.msl
index b447ff1..db752e0 100644
--- a/test/tint/expressions/type_ctor/array/inferred/array/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/array/f32.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<tint_array<float, 2>, 2>* arr;
+};
-thread tint_array<tint_array<float, 2>, 2> arr = tint_array<tint_array<float, 2>, 2>{tint_array<float, 2>{1.0f, 2.0f}, tint_array<float, 2>{3.0f, 4.0f}};
-void f() {
- tint_array<tint_array<float, 2>, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<tint_array<float, 2>, 2> v = (*tint_module_vars.arr);
}
-program_source:16:44: error: program scope variable must reside in constant address space
-thread tint_array<tint_array<float, 2>, 2> arr = tint_array<tint_array<float, 2>, 2>{tint_array<float, 2>{1.0f, 2.0f}, tint_array<float, 2>{3.0f, 4.0f}};
- ^
-program_source:18:39: warning: unused variable 'v' [-Wunused-variable]
- tint_array<tint_array<float, 2>, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/inferred/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/inferred/f32.wgsl.expected.ir.msl
index c81ca4f..a706e87 100644
--- a/test/tint/expressions/type_ctor/array/inferred/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/f32.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<float, 2>* arr;
+};
-thread tint_array<float, 2> arr = tint_array<float, 2>{1.0f, 2.0f};
-void f() {
- tint_array<float, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<float, 2> v = (*tint_module_vars.arr);
}
-program_source:16:29: error: program scope variable must reside in constant address space
-thread tint_array<float, 2> arr = tint_array<float, 2>{1.0f, 2.0f};
- ^
-program_source:18:24: warning: unused variable 'v' [-Wunused-variable]
- tint_array<float, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/inferred/i32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/inferred/i32.wgsl.expected.ir.msl
index 74ea049..0aacac8 100644
--- a/test/tint/expressions/type_ctor/array/inferred/i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/i32.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<int, 2>* arr;
+};
-thread tint_array<int, 2> arr = tint_array<int, 2>{1, 2};
-void f() {
- tint_array<int, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<int, 2> v = (*tint_module_vars.arr);
}
-program_source:16:27: error: program scope variable must reside in constant address space
-thread tint_array<int, 2> arr = tint_array<int, 2>{1, 2};
- ^
-program_source:18:22: warning: unused variable 'v' [-Wunused-variable]
- tint_array<int, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/inferred/mat2x2/abstract.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/inferred/mat2x2/abstract.wgsl.expected.ir.msl
index 2e3b058..bf71d0d 100644
--- a/test/tint/expressions/type_ctor/array/inferred/mat2x2/abstract.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/mat2x2/abstract.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,12 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<float2x2, 2>* arr;
+};
-thread tint_array<float2x2, 2> arr = tint_array<float2x2, 2>{float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)), float2x2(float2(5.0f, 6.0f), float2(7.0f, 8.0f))};
-void f() {
- tint_array<float2x2, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<float2x2, 2> v = (*tint_module_vars.arr);
}
-program_source:16:32: error: program scope variable must reside in constant address space
-thread tint_array<float2x2, 2> arr = tint_array<float2x2, 2>{float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)), float2x2(float2(5.0f, 6.0f), float2(7.0f, 8.0f))};
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/inferred/mat2x2/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/inferred/mat2x2/f32.wgsl.expected.ir.msl
index 2e3b058..bf71d0d 100644
--- a/test/tint/expressions/type_ctor/array/inferred/mat2x2/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/mat2x2/f32.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,12 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<float2x2, 2>* arr;
+};
-thread tint_array<float2x2, 2> arr = tint_array<float2x2, 2>{float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)), float2x2(float2(5.0f, 6.0f), float2(7.0f, 8.0f))};
-void f() {
- tint_array<float2x2, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<float2x2, 2> v = (*tint_module_vars.arr);
}
-program_source:16:32: error: program scope variable must reside in constant address space
-thread tint_array<float2x2, 2> arr = tint_array<float2x2, 2>{float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)), float2x2(float2(5.0f, 6.0f), float2(7.0f, 8.0f))};
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/inferred/u32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/inferred/u32.wgsl.expected.ir.msl
index 16cfda7..aa732c1 100644
--- a/test/tint/expressions/type_ctor/array/inferred/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/u32.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<uint, 2>* arr;
+};
-thread tint_array<uint, 2> arr = tint_array<uint, 2>{1u, 2u};
-void f() {
- tint_array<uint, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<uint, 2> v = (*tint_module_vars.arr);
}
-program_source:16:28: error: program scope variable must reside in constant address space
-thread tint_array<uint, 2> arr = tint_array<uint, 2>{1u, 2u};
- ^
-program_source:18:23: warning: unused variable 'v' [-Wunused-variable]
- tint_array<uint, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/inferred/vec2/abstract.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/inferred/vec2/abstract.wgsl.expected.ir.msl
index c97df58..33c0a20 100644
--- a/test/tint/expressions/type_ctor/array/inferred/vec2/abstract.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/vec2/abstract.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<float2, 2>* arr;
+};
-thread tint_array<float2, 2> arr = tint_array<float2, 2>{float2(1.0f), float2(2.0f)};
-void f() {
- tint_array<float2, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<float2, 2> v = (*tint_module_vars.arr);
}
-program_source:16:30: error: program scope variable must reside in constant address space
-thread tint_array<float2, 2> arr = tint_array<float2, 2>{float2(1.0f), float2(2.0f)};
- ^
-program_source:18:25: warning: unused variable 'v' [-Wunused-variable]
- tint_array<float2, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/inferred/vec2/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/inferred/vec2/f32.wgsl.expected.ir.msl
index c97df58..33c0a20 100644
--- a/test/tint/expressions/type_ctor/array/inferred/vec2/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/vec2/f32.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<float2, 2>* arr;
+};
-thread tint_array<float2, 2> arr = tint_array<float2, 2>{float2(1.0f), float2(2.0f)};
-void f() {
- tint_array<float2, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<float2, 2> v = (*tint_module_vars.arr);
}
-program_source:16:30: error: program scope variable must reside in constant address space
-thread tint_array<float2, 2> arr = tint_array<float2, 2>{float2(1.0f), float2(2.0f)};
- ^
-program_source:18:25: warning: unused variable 'v' [-Wunused-variable]
- tint_array<float2, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/inferred/vec2/i32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/inferred/vec2/i32.wgsl.expected.ir.msl
index a679881..149d65d 100644
--- a/test/tint/expressions/type_ctor/array/inferred/vec2/i32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/vec2/i32.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<int2, 2>* arr;
+};
-thread tint_array<int2, 2> arr = tint_array<int2, 2>{int2(1), int2(2)};
-void f() {
- tint_array<int2, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<int2, 2> v = (*tint_module_vars.arr);
}
-program_source:16:28: error: program scope variable must reside in constant address space
-thread tint_array<int2, 2> arr = tint_array<int2, 2>{int2(1), int2(2)};
- ^
-program_source:18:23: warning: unused variable 'v' [-Wunused-variable]
- tint_array<int2, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/array/inferred/vec2/u32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/array/inferred/vec2/u32.wgsl.expected.ir.msl
index fc73b45..c5de1b0 100644
--- a/test/tint/expressions/type_ctor/array/inferred/vec2/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/vec2/u32.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,15 +12,10 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<uint2, 2>* arr;
+};
-thread tint_array<uint2, 2> arr = tint_array<uint2, 2>{uint2(1u), uint2(2u)};
-void f() {
- tint_array<uint2, 2> v = arr;
+void f(tint_module_vars_struct tint_module_vars) {
+ tint_array<uint2, 2> v = (*tint_module_vars.arr);
}
-program_source:16:29: error: program scope variable must reside in constant address space
-thread tint_array<uint2, 2> arr = tint_array<uint2, 2>{uint2(1u), uint2(2u)};
- ^
-program_source:18:24: warning: unused variable 'v' [-Wunused-variable]
- tint_array<uint2, 2> v = arr;
- ^
-
diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f16.wgsl.expected.ir.msl
index 281487e..4c68798 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x2* m;
+ device half2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x2<f16>, read_write> = var, mat2x2<f16>(vec2<f16>(0.0h, 1.0h), vec2<f16>(2.0h, 3.0h))
- %out:ptr<storage, mat2x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half2x2* out [[buffer(0)]]) {
+ thread half2x2 m = half2x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = half2x2((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f16> = load %m
- %5:mat2x2<f16> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.ir.msl
index 4dda801..5f14672 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x2* m;
+ device float2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x2<f32>, read_write> = var, mat2x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f))
- %out:ptr<storage, mat2x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x2* out [[buffer(0)]]) {
+ thread float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = float2x2((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f32> = load %m
- %5:mat2x2<f32> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat2x2/explicit/scalars/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f16.wgsl.expected.ir.msl
index 42b86c1..8a832b8 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x2* m;
+ device half2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x2<f16>, read_write> = var, mat2x2<f16>(vec2<f16>(0.0h, 1.0h), vec2<f16>(2.0h, 3.0h))
- %out:ptr<storage, mat2x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half2x2* out [[buffer(0)]]) {
+ thread half2x2 m = half2x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.ir.msl
index 3f4a245..5aa1a1e 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x2* m;
+ device float2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x2<f32>, read_write> = var, mat2x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f))
- %out:ptr<storage, mat2x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x2* out [[buffer(0)]]) {
+ thread float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat2x2/explicit/vectors/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f16.wgsl.expected.ir.msl
index 42b86c1..8a832b8 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x2* m;
+ device half2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x2<f16>, read_write> = var, mat2x2<f16>(vec2<f16>(0.0h, 1.0h), vec2<f16>(2.0h, 3.0h))
- %out:ptr<storage, mat2x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half2x2* out [[buffer(0)]]) {
+ thread half2x2 m = half2x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.ir.msl
index 3f4a245..5aa1a1e 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x2* m;
+ device float2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x2<f32>, read_write> = var, mat2x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f))
- %out:ptr<storage, mat2x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x2* out [[buffer(0)]]) {
+ thread float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat2x2/inferred/identity/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f16.wgsl.expected.ir.msl
index 281487e..4c68798 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x2* m;
+ device half2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x2<f16>, read_write> = var, mat2x2<f16>(vec2<f16>(0.0h, 1.0h), vec2<f16>(2.0h, 3.0h))
- %out:ptr<storage, mat2x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half2x2* out [[buffer(0)]]) {
+ thread half2x2 m = half2x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = half2x2((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f16> = load %m
- %5:mat2x2<f16> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.ir.msl
index 4dda801..5f14672 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x2* m;
+ device float2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x2<f32>, read_write> = var, mat2x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f))
- %out:ptr<storage, mat2x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x2* out [[buffer(0)]]) {
+ thread float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = float2x2((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f32> = load %m
- %5:mat2x2<f32> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.ir.msl
index d7f3dcc..1dc41c0 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.ir.msl
@@ -1,20 +1,10 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat2x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x2* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ (*tint_module_vars.out) = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- store %out, mat2x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.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/expressions/type_ctor/mat2x2/inferred/scalars/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f16.wgsl.expected.ir.msl
index 42b86c1..8a832b8 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x2* m;
+ device half2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x2<f16>, read_write> = var, mat2x2<f16>(vec2<f16>(0.0h, 1.0h), vec2<f16>(2.0h, 3.0h))
- %out:ptr<storage, mat2x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half2x2* out [[buffer(0)]]) {
+ thread half2x2 m = half2x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.ir.msl
index 3f4a245..5aa1a1e 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x2* m;
+ device float2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x2<f32>, read_write> = var, mat2x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f))
- %out:ptr<storage, mat2x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x2* out [[buffer(0)]]) {
+ thread float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.ir.msl
index d7f3dcc..1dc41c0 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.ir.msl
@@ -1,20 +1,10 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat2x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x2* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ (*tint_module_vars.out) = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- store %out, mat2x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.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/expressions/type_ctor/mat2x2/inferred/vectors/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f16.wgsl.expected.ir.msl
index 42b86c1..8a832b8 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x2* m;
+ device half2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x2<f16>, read_write> = var, mat2x2<f16>(vec2<f16>(0.0h, 1.0h), vec2<f16>(2.0h, 3.0h))
- %out:ptr<storage, mat2x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half2x2* out [[buffer(0)]]) {
+ thread half2x2 m = half2x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.ir.msl
index 3f4a245..5aa1a1e 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x2* m;
+ device float2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x2<f32>, read_write> = var, mat2x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f))
- %out:ptr<storage, mat2x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x2* out [[buffer(0)]]) {
+ thread float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat2x2/load/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x2/load/f16.wgsl.expected.ir.msl
index 9363978..cae3bd0 100644
--- a/test/tint/expressions/type_ctor/mat2x2/load/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/load/f16.wgsl.expected.ir.msl
@@ -1,23 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat2x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half2x2* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ half2x2 m = half2x2(half2(0.0h), half2(0.0h));
+ (*tint_module_vars.out) = half2x2(m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:ptr<function, mat2x2<f16>, read_write> = var, mat2x2<f16>(vec2<f16>(0.0h))
- %4:mat2x2<f16> = load %m
- %5:mat2x2<f16> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat2x2/load/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x2/load/f32.wgsl.expected.ir.msl
index c0e5971..b066f0b 100644
--- a/test/tint/expressions/type_ctor/mat2x2/load/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/load/f32.wgsl.expected.ir.msl
@@ -1,23 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat2x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x2* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ float2x2 m = float2x2(float2(0.0f), float2(0.0f));
+ (*tint_module_vars.out) = float2x2(m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:ptr<function, mat2x2<f32>, read_write> = var, mat2x2<f32>(vec2<f32>(0.0f))
- %4:mat2x2<f32> = load %m
- %5:mat2x2<f32> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat2x2/zero/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x2/zero/f16.wgsl.expected.ir.msl
index 4099885..7a0a8ca 100644
--- a/test/tint/expressions/type_ctor/mat2x2/zero/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/zero/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x2* m;
+ device half2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x2<f16>, read_write> = var, mat2x2<f16>(vec2<f16>(0.0h))
- %out:ptr<storage, mat2x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half2x2* out [[buffer(0)]]) {
+ thread half2x2 m = half2x2(half2(0.0h), half2(0.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.ir.msl
index 0680fbe..40054f8 100644
--- a/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x2* m;
+ device float2x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x2<f32>, read_write> = var, mat2x2<f32>(vec2<f32>(0.0f))
- %out:ptr<storage, mat2x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x2* out [[buffer(0)]]) {
+ thread float2x2 m = float2x2(float2(0.0f), float2(0.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x2<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat2x3/explicit/identity/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f16.wgsl.expected.ir.msl
index 2619ee2..37114d6 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f16.wgsl.expected.ir.msl
@@ -1,34 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x3* m;
+ device half2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x3<f16>, read_write> = var, mat2x3<f16>(vec3<f16>(0.0h, 1.0h, 2.0h), vec3<f16>(3.0h, 4.0h, 5.0h))
- %out:ptr<storage, mat2x3<f16>, read_write> = var @binding_point(0, 0)
+void tint_store_and_preserve_padding(device half2x3* const target, half2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f16> = load %m
- %5:mat2x3<f16> = construct %4
- %6:void = call %tint_store_and_preserve_padding, %out, %5
- ret
- }
+kernel void f(device half2x3* out [[buffer(0)]]) {
+ thread half2x3 m = half2x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, half2x3((*tint_module_vars.m)));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f16>, read_write>, %value_param:mat2x3<f16>):void {
- $B3: {
- %10:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %11:vec3<f16> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %13:vec3<f16> = access %value_param, 1u
- store %12, %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/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.ir.msl
index 3bdeb77..3a8248f 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.ir.msl
@@ -1,34 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x3* m;
+ device float2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x3<f32>, read_write> = var, mat2x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f))
- %out:ptr<storage, mat2x3<f32>, read_write> = var @binding_point(0, 0)
+void tint_store_and_preserve_padding(device float2x3* const target, float2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f32> = load %m
- %5:mat2x3<f32> = construct %4
- %6:void = call %tint_store_and_preserve_padding, %out, %5
- ret
- }
+kernel void f(device float2x3* out [[buffer(0)]]) {
+ thread float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, float2x3((*tint_module_vars.m)));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f32>, read_write>, %value_param:mat2x3<f32>):void {
- $B3: {
- %10:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %11:vec3<f32> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %13:vec3<f32> = access %value_param, 1u
- store %12, %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/expressions/type_ctor/mat2x3/explicit/scalars/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f16.wgsl.expected.ir.msl
index 8bd65fe..b741177 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f16.wgsl.expected.ir.msl
@@ -1,33 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x3* m;
+ device half2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x3<f16>, read_write> = var, mat2x3<f16>(vec3<f16>(0.0h, 1.0h, 2.0h), vec3<f16>(3.0h, 4.0h, 5.0h))
- %out:ptr<storage, mat2x3<f16>, read_write> = var @binding_point(0, 0)
+void tint_store_and_preserve_padding(device half2x3* const target, half2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f16> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device half2x3* out [[buffer(0)]]) {
+ thread half2x3 m = half2x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f16>, read_write>, %value_param:mat2x3<f16>):void {
- $B3: {
- %9:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %10:vec3<f16> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %12:vec3<f16> = access %value_param, 1u
- 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/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.ir.msl
index 6de92fb..c9a5358 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.ir.msl
@@ -1,33 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x3* m;
+ device float2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x3<f32>, read_write> = var, mat2x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f))
- %out:ptr<storage, mat2x3<f32>, read_write> = var @binding_point(0, 0)
+void tint_store_and_preserve_padding(device float2x3* const target, float2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f32> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device float2x3* out [[buffer(0)]]) {
+ thread float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f32>, read_write>, %value_param:mat2x3<f32>):void {
- $B3: {
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %10:vec3<f32> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %12:vec3<f32> = access %value_param, 1u
- 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/expressions/type_ctor/mat2x3/explicit/vectors/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f16.wgsl.expected.ir.msl
index 8bd65fe..b741177 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f16.wgsl.expected.ir.msl
@@ -1,33 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x3* m;
+ device half2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x3<f16>, read_write> = var, mat2x3<f16>(vec3<f16>(0.0h, 1.0h, 2.0h), vec3<f16>(3.0h, 4.0h, 5.0h))
- %out:ptr<storage, mat2x3<f16>, read_write> = var @binding_point(0, 0)
+void tint_store_and_preserve_padding(device half2x3* const target, half2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f16> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device half2x3* out [[buffer(0)]]) {
+ thread half2x3 m = half2x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f16>, read_write>, %value_param:mat2x3<f16>):void {
- $B3: {
- %9:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %10:vec3<f16> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %12:vec3<f16> = access %value_param, 1u
- 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/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.ir.msl
index 6de92fb..c9a5358 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.ir.msl
@@ -1,33 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x3* m;
+ device float2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x3<f32>, read_write> = var, mat2x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f))
- %out:ptr<storage, mat2x3<f32>, read_write> = var @binding_point(0, 0)
+void tint_store_and_preserve_padding(device float2x3* const target, float2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f32> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device float2x3* out [[buffer(0)]]) {
+ thread float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f32>, read_write>, %value_param:mat2x3<f32>):void {
- $B3: {
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %10:vec3<f32> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %12:vec3<f32> = access %value_param, 1u
- 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/expressions/type_ctor/mat2x3/inferred/identity/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f16.wgsl.expected.ir.msl
index 2619ee2..37114d6 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f16.wgsl.expected.ir.msl
@@ -1,34 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x3* m;
+ device half2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x3<f16>, read_write> = var, mat2x3<f16>(vec3<f16>(0.0h, 1.0h, 2.0h), vec3<f16>(3.0h, 4.0h, 5.0h))
- %out:ptr<storage, mat2x3<f16>, read_write> = var @binding_point(0, 0)
+void tint_store_and_preserve_padding(device half2x3* const target, half2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f16> = load %m
- %5:mat2x3<f16> = construct %4
- %6:void = call %tint_store_and_preserve_padding, %out, %5
- ret
- }
+kernel void f(device half2x3* out [[buffer(0)]]) {
+ thread half2x3 m = half2x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, half2x3((*tint_module_vars.m)));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f16>, read_write>, %value_param:mat2x3<f16>):void {
- $B3: {
- %10:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %11:vec3<f16> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %13:vec3<f16> = access %value_param, 1u
- store %12, %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/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.ir.msl
index 3bdeb77..3a8248f 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.ir.msl
@@ -1,34 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x3* m;
+ device float2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x3<f32>, read_write> = var, mat2x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f))
- %out:ptr<storage, mat2x3<f32>, read_write> = var @binding_point(0, 0)
+void tint_store_and_preserve_padding(device float2x3* const target, float2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f32> = load %m
- %5:mat2x3<f32> = construct %4
- %6:void = call %tint_store_and_preserve_padding, %out, %5
- ret
- }
+kernel void f(device float2x3* out [[buffer(0)]]) {
+ thread float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, float2x3((*tint_module_vars.m)));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f32>, read_write>, %value_param:mat2x3<f32>):void {
- $B3: {
- %10:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %11:vec3<f32> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %13:vec3<f32> = access %value_param, 1u
- store %12, %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/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.ir.msl
index ae5af58..b104cd1 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.ir.msl
@@ -1,31 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat2x3<f32>, read_write> = var @binding_point(0, 0)
+void tint_store_and_preserve_padding(device float2x3* const target, float2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %3:void = call %tint_store_and_preserve_padding, %out, mat2x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f))
- ret
- }
+kernel void f(device float2x3* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f32>, read_write>, %value_param:mat2x3<f32>):void {
- $B3: {
- %7:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %8:vec3<f32> = access %value_param, 0u
- store %7, %8
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %10:vec3<f32> = access %value_param, 1u
- 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/expressions/type_ctor/mat2x3/inferred/scalars/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f16.wgsl.expected.ir.msl
index 8bd65fe..b741177 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f16.wgsl.expected.ir.msl
@@ -1,33 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x3* m;
+ device half2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x3<f16>, read_write> = var, mat2x3<f16>(vec3<f16>(0.0h, 1.0h, 2.0h), vec3<f16>(3.0h, 4.0h, 5.0h))
- %out:ptr<storage, mat2x3<f16>, read_write> = var @binding_point(0, 0)
+void tint_store_and_preserve_padding(device half2x3* const target, half2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f16> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device half2x3* out [[buffer(0)]]) {
+ thread half2x3 m = half2x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f16>, read_write>, %value_param:mat2x3<f16>):void {
- $B3: {
- %9:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %10:vec3<f16> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %12:vec3<f16> = access %value_param, 1u
- 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/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.ir.msl
index 6de92fb..c9a5358 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.ir.msl
@@ -1,33 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x3* m;
+ device float2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x3<f32>, read_write> = var, mat2x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f))
- %out:ptr<storage, mat2x3<f32>, read_write> = var @binding_point(0, 0)
+void tint_store_and_preserve_padding(device float2x3* const target, float2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f32> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device float2x3* out [[buffer(0)]]) {
+ thread float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f32>, read_write>, %value_param:mat2x3<f32>):void {
- $B3: {
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %10:vec3<f32> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %12:vec3<f32> = access %value_param, 1u
- 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/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.ir.msl
index ae5af58..b104cd1 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.ir.msl
@@ -1,31 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat2x3<f32>, read_write> = var @binding_point(0, 0)
+void tint_store_and_preserve_padding(device float2x3* const target, float2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %3:void = call %tint_store_and_preserve_padding, %out, mat2x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f))
- ret
- }
+kernel void f(device float2x3* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f32>, read_write>, %value_param:mat2x3<f32>):void {
- $B3: {
- %7:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %8:vec3<f32> = access %value_param, 0u
- store %7, %8
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %10:vec3<f32> = access %value_param, 1u
- 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/expressions/type_ctor/mat2x3/inferred/vectors/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f16.wgsl.expected.ir.msl
index 8bd65fe..b741177 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f16.wgsl.expected.ir.msl
@@ -1,33 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x3* m;
+ device half2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x3<f16>, read_write> = var, mat2x3<f16>(vec3<f16>(0.0h, 1.0h, 2.0h), vec3<f16>(3.0h, 4.0h, 5.0h))
- %out:ptr<storage, mat2x3<f16>, read_write> = var @binding_point(0, 0)
+void tint_store_and_preserve_padding(device half2x3* const target, half2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f16> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device half2x3* out [[buffer(0)]]) {
+ thread half2x3 m = half2x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f16>, read_write>, %value_param:mat2x3<f16>):void {
- $B3: {
- %9:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %10:vec3<f16> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %12:vec3<f16> = access %value_param, 1u
- 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/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.ir.msl
index 6de92fb..c9a5358 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.ir.msl
@@ -1,33 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x3* m;
+ device float2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x3<f32>, read_write> = var, mat2x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f))
- %out:ptr<storage, mat2x3<f32>, read_write> = var @binding_point(0, 0)
+void tint_store_and_preserve_padding(device float2x3* const target, float2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f32> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device float2x3* out [[buffer(0)]]) {
+ thread float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f32>, read_write>, %value_param:mat2x3<f32>):void {
- $B3: {
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %10:vec3<f32> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %12:vec3<f32> = access %value_param, 1u
- 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/expressions/type_ctor/mat2x3/load/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x3/load/f16.wgsl.expected.ir.msl
index cfbb960..7f26f49 100644
--- a/test/tint/expressions/type_ctor/mat2x3/load/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/load/f16.wgsl.expected.ir.msl
@@ -1,34 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat2x3<f16>, read_write> = var @binding_point(0, 0)
+void tint_store_and_preserve_padding(device half2x3* const target, half2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:ptr<function, mat2x3<f16>, read_write> = var, mat2x3<f16>(vec3<f16>(0.0h))
- %4:mat2x3<f16> = load %m
- %5:mat2x3<f16> = construct %4
- %6:void = call %tint_store_and_preserve_padding, %out, %5
- ret
- }
+kernel void f(device half2x3* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ half2x3 m = half2x3(half3(0.0h), half3(0.0h));
+ tint_store_and_preserve_padding(tint_module_vars.out, half2x3(m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f16>, read_write>, %value_param:mat2x3<f16>):void {
- $B3: {
- %10:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %11:vec3<f16> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %13:vec3<f16> = access %value_param, 1u
- store %12, %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/expressions/type_ctor/mat2x3/load/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x3/load/f32.wgsl.expected.ir.msl
index 32137a0..15b2b5e 100644
--- a/test/tint/expressions/type_ctor/mat2x3/load/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/load/f32.wgsl.expected.ir.msl
@@ -1,34 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat2x3<f32>, read_write> = var @binding_point(0, 0)
+void tint_store_and_preserve_padding(device float2x3* const target, float2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:ptr<function, mat2x3<f32>, read_write> = var, mat2x3<f32>(vec3<f32>(0.0f))
- %4:mat2x3<f32> = load %m
- %5:mat2x3<f32> = construct %4
- %6:void = call %tint_store_and_preserve_padding, %out, %5
- ret
- }
+kernel void f(device float2x3* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ float2x3 m = float2x3(float3(0.0f), float3(0.0f));
+ tint_store_and_preserve_padding(tint_module_vars.out, float2x3(m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f32>, read_write>, %value_param:mat2x3<f32>):void {
- $B3: {
- %10:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %11:vec3<f32> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %13:vec3<f32> = access %value_param, 1u
- store %12, %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/expressions/type_ctor/mat2x3/zero/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x3/zero/f16.wgsl.expected.ir.msl
index f77c475..39b1128 100644
--- a/test/tint/expressions/type_ctor/mat2x3/zero/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/zero/f16.wgsl.expected.ir.msl
@@ -1,33 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x3* m;
+ device half2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x3<f16>, read_write> = var, mat2x3<f16>(vec3<f16>(0.0h))
- %out:ptr<storage, mat2x3<f16>, read_write> = var @binding_point(0, 0)
+void tint_store_and_preserve_padding(device half2x3* const target, half2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f16> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device half2x3* out [[buffer(0)]]) {
+ thread half2x3 m = half2x3(half3(0.0h), half3(0.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f16>, read_write>, %value_param:mat2x3<f16>):void {
- $B3: {
- %9:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %10:vec3<f16> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %12:vec3<f16> = access %value_param, 1u
- 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/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.ir.msl
index 70ad078..a3c5077 100644
--- a/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.ir.msl
@@ -1,33 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x3* m;
+ device float2x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x3<f32>, read_write> = var, mat2x3<f32>(vec3<f32>(0.0f))
- %out:ptr<storage, mat2x3<f32>, read_write> = var @binding_point(0, 0)
+void tint_store_and_preserve_padding(device float2x3* const target, float2x3 value_param) {
+ (*target)[0u] = value_param[0u];
+ (*target)[1u] = value_param[1u];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x3<f32> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device float2x3* out [[buffer(0)]]) {
+ thread float2x3 m = float2x3(float3(0.0f), float3(0.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat2x3<f32>, read_write>, %value_param:mat2x3<f32>):void {
- $B3: {
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %10:vec3<f32> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %12:vec3<f32> = access %value_param, 1u
- 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/expressions/type_ctor/mat2x4/explicit/identity/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f16.wgsl.expected.ir.msl
index 1597cd9..3286eb6 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x4* m;
+ device half2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x4<f16>, read_write> = var, mat2x4<f16>(vec4<f16>(0.0h, 1.0h, 2.0h, 3.0h), vec4<f16>(4.0h, 5.0h, 6.0h, 7.0h))
- %out:ptr<storage, mat2x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half2x4* out [[buffer(0)]]) {
+ thread half2x4 m = half2x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = half2x4((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f16> = load %m
- %5:mat2x4<f16> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.ir.msl
index 602e3f6..dd86111 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x4* m;
+ device float2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x4<f32>, read_write> = var, mat2x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f))
- %out:ptr<storage, mat2x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x4* out [[buffer(0)]]) {
+ thread float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = float2x4((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f32> = load %m
- %5:mat2x4<f32> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat2x4/explicit/scalars/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f16.wgsl.expected.ir.msl
index 483754b..004898d 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x4* m;
+ device half2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x4<f16>, read_write> = var, mat2x4<f16>(vec4<f16>(0.0h, 1.0h, 2.0h, 3.0h), vec4<f16>(4.0h, 5.0h, 6.0h, 7.0h))
- %out:ptr<storage, mat2x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half2x4* out [[buffer(0)]]) {
+ thread half2x4 m = half2x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.ir.msl
index a902608..c698196 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x4* m;
+ device float2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x4<f32>, read_write> = var, mat2x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f))
- %out:ptr<storage, mat2x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x4* out [[buffer(0)]]) {
+ thread float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat2x4/explicit/vectors/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f16.wgsl.expected.ir.msl
index 483754b..004898d 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x4* m;
+ device half2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x4<f16>, read_write> = var, mat2x4<f16>(vec4<f16>(0.0h, 1.0h, 2.0h, 3.0h), vec4<f16>(4.0h, 5.0h, 6.0h, 7.0h))
- %out:ptr<storage, mat2x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half2x4* out [[buffer(0)]]) {
+ thread half2x4 m = half2x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.ir.msl
index a902608..c698196 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x4* m;
+ device float2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x4<f32>, read_write> = var, mat2x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f))
- %out:ptr<storage, mat2x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x4* out [[buffer(0)]]) {
+ thread float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat2x4/inferred/identity/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f16.wgsl.expected.ir.msl
index 1597cd9..3286eb6 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x4* m;
+ device half2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x4<f16>, read_write> = var, mat2x4<f16>(vec4<f16>(0.0h, 1.0h, 2.0h, 3.0h), vec4<f16>(4.0h, 5.0h, 6.0h, 7.0h))
- %out:ptr<storage, mat2x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half2x4* out [[buffer(0)]]) {
+ thread half2x4 m = half2x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = half2x4((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f16> = load %m
- %5:mat2x4<f16> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.ir.msl
index 602e3f6..dd86111 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x4* m;
+ device float2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x4<f32>, read_write> = var, mat2x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f))
- %out:ptr<storage, mat2x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x4* out [[buffer(0)]]) {
+ thread float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = float2x4((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f32> = load %m
- %5:mat2x4<f32> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.ir.msl
index fae26aa..3026fbe3 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.ir.msl
@@ -1,20 +1,10 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat2x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x4* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ (*tint_module_vars.out) = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- store %out, mat2x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.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/expressions/type_ctor/mat2x4/inferred/scalars/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f16.wgsl.expected.ir.msl
index 483754b..004898d 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x4* m;
+ device half2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x4<f16>, read_write> = var, mat2x4<f16>(vec4<f16>(0.0h, 1.0h, 2.0h, 3.0h), vec4<f16>(4.0h, 5.0h, 6.0h, 7.0h))
- %out:ptr<storage, mat2x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half2x4* out [[buffer(0)]]) {
+ thread half2x4 m = half2x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.ir.msl
index a902608..c698196 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x4* m;
+ device float2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x4<f32>, read_write> = var, mat2x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f))
- %out:ptr<storage, mat2x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x4* out [[buffer(0)]]) {
+ thread float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.ir.msl
index fae26aa..3026fbe3 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.ir.msl
@@ -1,20 +1,10 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat2x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x4* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ (*tint_module_vars.out) = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- store %out, mat2x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.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/expressions/type_ctor/mat2x4/inferred/vectors/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f16.wgsl.expected.ir.msl
index 483754b..004898d 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x4* m;
+ device half2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x4<f16>, read_write> = var, mat2x4<f16>(vec4<f16>(0.0h, 1.0h, 2.0h, 3.0h), vec4<f16>(4.0h, 5.0h, 6.0h, 7.0h))
- %out:ptr<storage, mat2x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half2x4* out [[buffer(0)]]) {
+ thread half2x4 m = half2x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.ir.msl
index a902608..c698196 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x4* m;
+ device float2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x4<f32>, read_write> = var, mat2x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f))
- %out:ptr<storage, mat2x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x4* out [[buffer(0)]]) {
+ thread float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat2x4/load/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x4/load/f16.wgsl.expected.ir.msl
index 515c6cf..5fe385a 100644
--- a/test/tint/expressions/type_ctor/mat2x4/load/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/load/f16.wgsl.expected.ir.msl
@@ -1,23 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat2x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half2x4* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ half2x4 m = half2x4(half4(0.0h), half4(0.0h));
+ (*tint_module_vars.out) = half2x4(m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:ptr<function, mat2x4<f16>, read_write> = var, mat2x4<f16>(vec4<f16>(0.0h))
- %4:mat2x4<f16> = load %m
- %5:mat2x4<f16> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat2x4/load/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x4/load/f32.wgsl.expected.ir.msl
index 83c77f5..0e08d0b 100644
--- a/test/tint/expressions/type_ctor/mat2x4/load/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/load/f32.wgsl.expected.ir.msl
@@ -1,23 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat2x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x4* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ float2x4 m = float2x4(float4(0.0f), float4(0.0f));
+ (*tint_module_vars.out) = float2x4(m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:ptr<function, mat2x4<f32>, read_write> = var, mat2x4<f32>(vec4<f32>(0.0f))
- %4:mat2x4<f32> = load %m
- %5:mat2x4<f32> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat2x4/zero/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x4/zero/f16.wgsl.expected.ir.msl
index 18cc1f7..fdcdee2 100644
--- a/test/tint/expressions/type_ctor/mat2x4/zero/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/zero/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half2x4* m;
+ device half2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x4<f16>, read_write> = var, mat2x4<f16>(vec4<f16>(0.0h))
- %out:ptr<storage, mat2x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half2x4* out [[buffer(0)]]) {
+ thread half2x4 m = half2x4(half4(0.0h), half4(0.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.ir.msl
index 7225b73..265d79c 100644
--- a/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x4* m;
+ device float2x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat2x4<f32>, read_write> = var, mat2x4<f32>(vec4<f32>(0.0f))
- %out:ptr<storage, mat2x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float2x4* out [[buffer(0)]]) {
+ thread float2x4 m = float2x4(float4(0.0f), float4(0.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat2x4<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x2/explicit/identity/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f16.wgsl.expected.ir.msl
index 68d8372b..67fb019 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x2* m;
+ device half3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x2<f16>, read_write> = var, mat3x2<f16>(vec2<f16>(0.0h, 1.0h), vec2<f16>(2.0h, 3.0h), vec2<f16>(4.0h, 5.0h))
- %out:ptr<storage, mat3x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half3x2* out [[buffer(0)]]) {
+ thread half3x2 m = half3x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h), half2(4.0h, 5.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = half3x2((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f16> = load %m
- %5:mat3x2<f16> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.ir.msl
index e0de70d..4faea37 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x2* m;
+ device float3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x2<f32>, read_write> = var, mat3x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f), vec2<f32>(4.0f, 5.0f))
- %out:ptr<storage, mat3x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x2* out [[buffer(0)]]) {
+ thread float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = float3x2((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f32> = load %m
- %5:mat3x2<f32> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat3x2/explicit/scalars/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f16.wgsl.expected.ir.msl
index a0d7871..521eca77 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x2* m;
+ device half3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x2<f16>, read_write> = var, mat3x2<f16>(vec2<f16>(0.0h, 1.0h), vec2<f16>(2.0h, 3.0h), vec2<f16>(4.0h, 5.0h))
- %out:ptr<storage, mat3x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half3x2* out [[buffer(0)]]) {
+ thread half3x2 m = half3x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h), half2(4.0h, 5.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.ir.msl
index 53e8af3..f8511bb 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x2* m;
+ device float3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x2<f32>, read_write> = var, mat3x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f), vec2<f32>(4.0f, 5.0f))
- %out:ptr<storage, mat3x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x2* out [[buffer(0)]]) {
+ thread float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x2/explicit/vectors/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f16.wgsl.expected.ir.msl
index a0d7871..521eca77 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x2* m;
+ device half3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x2<f16>, read_write> = var, mat3x2<f16>(vec2<f16>(0.0h, 1.0h), vec2<f16>(2.0h, 3.0h), vec2<f16>(4.0h, 5.0h))
- %out:ptr<storage, mat3x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half3x2* out [[buffer(0)]]) {
+ thread half3x2 m = half3x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h), half2(4.0h, 5.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.ir.msl
index 53e8af3..f8511bb 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x2* m;
+ device float3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x2<f32>, read_write> = var, mat3x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f), vec2<f32>(4.0f, 5.0f))
- %out:ptr<storage, mat3x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x2* out [[buffer(0)]]) {
+ thread float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x2/inferred/identity/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f16.wgsl.expected.ir.msl
index 68d8372b..67fb019 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x2* m;
+ device half3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x2<f16>, read_write> = var, mat3x2<f16>(vec2<f16>(0.0h, 1.0h), vec2<f16>(2.0h, 3.0h), vec2<f16>(4.0h, 5.0h))
- %out:ptr<storage, mat3x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half3x2* out [[buffer(0)]]) {
+ thread half3x2 m = half3x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h), half2(4.0h, 5.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = half3x2((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f16> = load %m
- %5:mat3x2<f16> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.ir.msl
index e0de70d..4faea37 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x2* m;
+ device float3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x2<f32>, read_write> = var, mat3x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f), vec2<f32>(4.0f, 5.0f))
- %out:ptr<storage, mat3x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x2* out [[buffer(0)]]) {
+ thread float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = float3x2((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f32> = load %m
- %5:mat3x2<f32> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.ir.msl
index 35f38c8..d3aa798 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.ir.msl
@@ -1,20 +1,10 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat3x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x2* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ (*tint_module_vars.out) = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- store %out, mat3x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f), vec2<f32>(4.0f, 5.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/expressions/type_ctor/mat3x2/inferred/scalars/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f16.wgsl.expected.ir.msl
index a0d7871..521eca77 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x2* m;
+ device half3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x2<f16>, read_write> = var, mat3x2<f16>(vec2<f16>(0.0h, 1.0h), vec2<f16>(2.0h, 3.0h), vec2<f16>(4.0h, 5.0h))
- %out:ptr<storage, mat3x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half3x2* out [[buffer(0)]]) {
+ thread half3x2 m = half3x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h), half2(4.0h, 5.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.ir.msl
index 53e8af3..f8511bb 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x2* m;
+ device float3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x2<f32>, read_write> = var, mat3x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f), vec2<f32>(4.0f, 5.0f))
- %out:ptr<storage, mat3x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x2* out [[buffer(0)]]) {
+ thread float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.ir.msl
index 35f38c8..d3aa798 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.ir.msl
@@ -1,20 +1,10 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat3x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x2* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ (*tint_module_vars.out) = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- store %out, mat3x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f), vec2<f32>(4.0f, 5.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/expressions/type_ctor/mat3x2/inferred/vectors/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f16.wgsl.expected.ir.msl
index a0d7871..521eca77 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x2* m;
+ device half3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x2<f16>, read_write> = var, mat3x2<f16>(vec2<f16>(0.0h, 1.0h), vec2<f16>(2.0h, 3.0h), vec2<f16>(4.0h, 5.0h))
- %out:ptr<storage, mat3x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half3x2* out [[buffer(0)]]) {
+ thread half3x2 m = half3x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h), half2(4.0h, 5.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.ir.msl
index 53e8af3..f8511bb 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x2* m;
+ device float3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x2<f32>, read_write> = var, mat3x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f), vec2<f32>(4.0f, 5.0f))
- %out:ptr<storage, mat3x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x2* out [[buffer(0)]]) {
+ thread float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x2/load/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x2/load/f16.wgsl.expected.ir.msl
index 9c00151..79eea62 100644
--- a/test/tint/expressions/type_ctor/mat3x2/load/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/load/f16.wgsl.expected.ir.msl
@@ -1,23 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat3x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half3x2* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ half3x2 m = half3x2(half2(0.0h), half2(0.0h), half2(0.0h));
+ (*tint_module_vars.out) = half3x2(m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:ptr<function, mat3x2<f16>, read_write> = var, mat3x2<f16>(vec2<f16>(0.0h))
- %4:mat3x2<f16> = load %m
- %5:mat3x2<f16> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat3x2/load/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x2/load/f32.wgsl.expected.ir.msl
index 82b31bb..e683848 100644
--- a/test/tint/expressions/type_ctor/mat3x2/load/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/load/f32.wgsl.expected.ir.msl
@@ -1,23 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat3x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x2* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ float3x2 m = float3x2(float2(0.0f), float2(0.0f), float2(0.0f));
+ (*tint_module_vars.out) = float3x2(m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:ptr<function, mat3x2<f32>, read_write> = var, mat3x2<f32>(vec2<f32>(0.0f))
- %4:mat3x2<f32> = load %m
- %5:mat3x2<f32> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat3x2/zero/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x2/zero/f16.wgsl.expected.ir.msl
index de3e5f4..1474c28 100644
--- a/test/tint/expressions/type_ctor/mat3x2/zero/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/zero/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x2* m;
+ device half3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x2<f16>, read_write> = var, mat3x2<f16>(vec2<f16>(0.0h))
- %out:ptr<storage, mat3x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half3x2* out [[buffer(0)]]) {
+ thread half3x2 m = half3x2(half2(0.0h), half2(0.0h), half2(0.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.ir.msl
index 81a9b6d..44c518f 100644
--- a/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x2* m;
+ device float3x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x2<f32>, read_write> = var, mat3x2<f32>(vec2<f32>(0.0f))
- %out:ptr<storage, mat3x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x2* out [[buffer(0)]]) {
+ thread float3x2 m = float3x2(float2(0.0f), float2(0.0f), float2(0.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x2<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x3/explicit/identity/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f16.wgsl.expected.ir.msl
index 713b725..7a81f8b 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f16.wgsl.expected.ir.msl
@@ -1,37 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x3* m;
+ device half3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x3<f16>, read_write> = var, mat3x3<f16>(vec3<f16>(0.0h, 1.0h, 2.0h), vec3<f16>(3.0h, 4.0h, 5.0h), vec3<f16>(6.0h, 7.0h, 8.0h))
- %out:ptr<storage, mat3x3<f16>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f16> = load %m
- %5:mat3x3<f16> = construct %4
- %6:void = call %tint_store_and_preserve_padding, %out, %5
- ret
- }
+kernel void f(device half3x3* out [[buffer(0)]]) {
+ thread half3x3 m = half3x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h), half3(6.0h, 7.0h, 8.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, half3x3((*tint_module_vars.m)));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f16>, read_write>, %value_param:mat3x3<f16>):void {
- $B3: {
- %10:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %11:vec3<f16> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %13:vec3<f16> = access %value_param, 1u
- store %12, %13
- %14:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %15:vec3<f16> = access %value_param, 2u
- store %14, %15
- 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/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.ir.msl
index b261ad3..d47de76 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.ir.msl
@@ -1,37 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x3* m;
+ device float3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x3<f32>, read_write> = var, mat3x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f), vec3<f32>(6.0f, 7.0f, 8.0f))
- %out:ptr<storage, mat3x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f32> = load %m
- %5:mat3x3<f32> = construct %4
- %6:void = call %tint_store_and_preserve_padding, %out, %5
- ret
- }
+kernel void f(device float3x3* out [[buffer(0)]]) {
+ thread float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, float3x3((*tint_module_vars.m)));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f32>, read_write>, %value_param:mat3x3<f32>):void {
- $B3: {
- %10:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %11:vec3<f32> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %13:vec3<f32> = access %value_param, 1u
- store %12, %13
- %14:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %15:vec3<f32> = access %value_param, 2u
- store %14, %15
- 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/expressions/type_ctor/mat3x3/explicit/scalars/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f16.wgsl.expected.ir.msl
index d193a29..d54d574 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f16.wgsl.expected.ir.msl
@@ -1,36 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x3* m;
+ device half3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x3<f16>, read_write> = var, mat3x3<f16>(vec3<f16>(0.0h, 1.0h, 2.0h), vec3<f16>(3.0h, 4.0h, 5.0h), vec3<f16>(6.0h, 7.0h, 8.0h))
- %out:ptr<storage, mat3x3<f16>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f16> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device half3x3* out [[buffer(0)]]) {
+ thread half3x3 m = half3x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h), half3(6.0h, 7.0h, 8.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f16>, read_write>, %value_param:mat3x3<f16>):void {
- $B3: {
- %9:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %10:vec3<f16> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %12:vec3<f16> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %14:vec3<f16> = access %value_param, 2u
- 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/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.ir.msl
index 671fd01..63fddf5 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.ir.msl
@@ -1,36 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x3* m;
+ device float3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x3<f32>, read_write> = var, mat3x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f), vec3<f32>(6.0f, 7.0f, 8.0f))
- %out:ptr<storage, mat3x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f32> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device float3x3* out [[buffer(0)]]) {
+ thread float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f32>, read_write>, %value_param:mat3x3<f32>):void {
- $B3: {
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %10:vec3<f32> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %12:vec3<f32> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %14:vec3<f32> = access %value_param, 2u
- 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/expressions/type_ctor/mat3x3/explicit/vectors/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f16.wgsl.expected.ir.msl
index d193a29..d54d574 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f16.wgsl.expected.ir.msl
@@ -1,36 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x3* m;
+ device half3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x3<f16>, read_write> = var, mat3x3<f16>(vec3<f16>(0.0h, 1.0h, 2.0h), vec3<f16>(3.0h, 4.0h, 5.0h), vec3<f16>(6.0h, 7.0h, 8.0h))
- %out:ptr<storage, mat3x3<f16>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f16> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device half3x3* out [[buffer(0)]]) {
+ thread half3x3 m = half3x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h), half3(6.0h, 7.0h, 8.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f16>, read_write>, %value_param:mat3x3<f16>):void {
- $B3: {
- %9:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %10:vec3<f16> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %12:vec3<f16> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %14:vec3<f16> = access %value_param, 2u
- 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/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.ir.msl
index 671fd01..63fddf5 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.ir.msl
@@ -1,36 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x3* m;
+ device float3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x3<f32>, read_write> = var, mat3x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f), vec3<f32>(6.0f, 7.0f, 8.0f))
- %out:ptr<storage, mat3x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f32> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device float3x3* out [[buffer(0)]]) {
+ thread float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f32>, read_write>, %value_param:mat3x3<f32>):void {
- $B3: {
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %10:vec3<f32> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %12:vec3<f32> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %14:vec3<f32> = access %value_param, 2u
- 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/expressions/type_ctor/mat3x3/inferred/identity/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f16.wgsl.expected.ir.msl
index 713b725..7a81f8b 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f16.wgsl.expected.ir.msl
@@ -1,37 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x3* m;
+ device half3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x3<f16>, read_write> = var, mat3x3<f16>(vec3<f16>(0.0h, 1.0h, 2.0h), vec3<f16>(3.0h, 4.0h, 5.0h), vec3<f16>(6.0h, 7.0h, 8.0h))
- %out:ptr<storage, mat3x3<f16>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f16> = load %m
- %5:mat3x3<f16> = construct %4
- %6:void = call %tint_store_and_preserve_padding, %out, %5
- ret
- }
+kernel void f(device half3x3* out [[buffer(0)]]) {
+ thread half3x3 m = half3x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h), half3(6.0h, 7.0h, 8.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, half3x3((*tint_module_vars.m)));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f16>, read_write>, %value_param:mat3x3<f16>):void {
- $B3: {
- %10:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %11:vec3<f16> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %13:vec3<f16> = access %value_param, 1u
- store %12, %13
- %14:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %15:vec3<f16> = access %value_param, 2u
- store %14, %15
- 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/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.ir.msl
index b261ad3..d47de76 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.ir.msl
@@ -1,37 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x3* m;
+ device float3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x3<f32>, read_write> = var, mat3x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f), vec3<f32>(6.0f, 7.0f, 8.0f))
- %out:ptr<storage, mat3x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f32> = load %m
- %5:mat3x3<f32> = construct %4
- %6:void = call %tint_store_and_preserve_padding, %out, %5
- ret
- }
+kernel void f(device float3x3* out [[buffer(0)]]) {
+ thread float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, float3x3((*tint_module_vars.m)));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f32>, read_write>, %value_param:mat3x3<f32>):void {
- $B3: {
- %10:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %11:vec3<f32> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %13:vec3<f32> = access %value_param, 1u
- store %12, %13
- %14:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %15:vec3<f32> = access %value_param, 2u
- store %14, %15
- 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/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.ir.msl
index d51d719..251e0b2 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.ir.msl
@@ -1,34 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat3x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %3:void = call %tint_store_and_preserve_padding, %out, mat3x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f), vec3<f32>(6.0f, 7.0f, 8.0f))
- ret
- }
+kernel void f(device float3x3* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f32>, read_write>, %value_param:mat3x3<f32>):void {
- $B3: {
- %7:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %8:vec3<f32> = access %value_param, 0u
- store %7, %8
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %10:vec3<f32> = access %value_param, 1u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %12:vec3<f32> = access %value_param, 2u
- 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/expressions/type_ctor/mat3x3/inferred/scalars/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f16.wgsl.expected.ir.msl
index d193a29..d54d574 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f16.wgsl.expected.ir.msl
@@ -1,36 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x3* m;
+ device half3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x3<f16>, read_write> = var, mat3x3<f16>(vec3<f16>(0.0h, 1.0h, 2.0h), vec3<f16>(3.0h, 4.0h, 5.0h), vec3<f16>(6.0h, 7.0h, 8.0h))
- %out:ptr<storage, mat3x3<f16>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f16> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device half3x3* out [[buffer(0)]]) {
+ thread half3x3 m = half3x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h), half3(6.0h, 7.0h, 8.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f16>, read_write>, %value_param:mat3x3<f16>):void {
- $B3: {
- %9:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %10:vec3<f16> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %12:vec3<f16> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %14:vec3<f16> = access %value_param, 2u
- 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/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.ir.msl
index 671fd01..63fddf5 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.ir.msl
@@ -1,36 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x3* m;
+ device float3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x3<f32>, read_write> = var, mat3x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f), vec3<f32>(6.0f, 7.0f, 8.0f))
- %out:ptr<storage, mat3x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f32> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device float3x3* out [[buffer(0)]]) {
+ thread float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f32>, read_write>, %value_param:mat3x3<f32>):void {
- $B3: {
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %10:vec3<f32> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %12:vec3<f32> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %14:vec3<f32> = access %value_param, 2u
- 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/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.ir.msl
index d51d719..251e0b2 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.ir.msl
@@ -1,34 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat3x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %3:void = call %tint_store_and_preserve_padding, %out, mat3x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f), vec3<f32>(6.0f, 7.0f, 8.0f))
- ret
- }
+kernel void f(device float3x3* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f32>, read_write>, %value_param:mat3x3<f32>):void {
- $B3: {
- %7:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %8:vec3<f32> = access %value_param, 0u
- store %7, %8
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %10:vec3<f32> = access %value_param, 1u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %12:vec3<f32> = access %value_param, 2u
- 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/expressions/type_ctor/mat3x3/inferred/vectors/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f16.wgsl.expected.ir.msl
index d193a29..d54d574 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f16.wgsl.expected.ir.msl
@@ -1,36 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x3* m;
+ device half3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x3<f16>, read_write> = var, mat3x3<f16>(vec3<f16>(0.0h, 1.0h, 2.0h), vec3<f16>(3.0h, 4.0h, 5.0h), vec3<f16>(6.0h, 7.0h, 8.0h))
- %out:ptr<storage, mat3x3<f16>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f16> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device half3x3* out [[buffer(0)]]) {
+ thread half3x3 m = half3x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h), half3(6.0h, 7.0h, 8.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f16>, read_write>, %value_param:mat3x3<f16>):void {
- $B3: {
- %9:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %10:vec3<f16> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %12:vec3<f16> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %14:vec3<f16> = access %value_param, 2u
- 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/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.ir.msl
index 671fd01..63fddf5 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.ir.msl
@@ -1,36 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x3* m;
+ device float3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x3<f32>, read_write> = var, mat3x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f), vec3<f32>(6.0f, 7.0f, 8.0f))
- %out:ptr<storage, mat3x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f32> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device float3x3* out [[buffer(0)]]) {
+ thread float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f32>, read_write>, %value_param:mat3x3<f32>):void {
- $B3: {
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %10:vec3<f32> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %12:vec3<f32> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %14:vec3<f32> = access %value_param, 2u
- 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/expressions/type_ctor/mat3x3/load/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x3/load/f16.wgsl.expected.ir.msl
index 2d84436..7f80b18 100644
--- a/test/tint/expressions/type_ctor/mat3x3/load/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/load/f16.wgsl.expected.ir.msl
@@ -1,37 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat3x3<f16>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:ptr<function, mat3x3<f16>, read_write> = var, mat3x3<f16>(vec3<f16>(0.0h))
- %4:mat3x3<f16> = load %m
- %5:mat3x3<f16> = construct %4
- %6:void = call %tint_store_and_preserve_padding, %out, %5
- ret
- }
+kernel void f(device half3x3* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ half3x3 m = half3x3(half3(0.0h), half3(0.0h), half3(0.0h));
+ tint_store_and_preserve_padding(tint_module_vars.out, half3x3(m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f16>, read_write>, %value_param:mat3x3<f16>):void {
- $B3: {
- %10:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %11:vec3<f16> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %13:vec3<f16> = access %value_param, 1u
- store %12, %13
- %14:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %15:vec3<f16> = access %value_param, 2u
- store %14, %15
- 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/expressions/type_ctor/mat3x3/load/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x3/load/f32.wgsl.expected.ir.msl
index 4835e49..befce49 100644
--- a/test/tint/expressions/type_ctor/mat3x3/load/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/load/f32.wgsl.expected.ir.msl
@@ -1,37 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat3x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:ptr<function, mat3x3<f32>, read_write> = var, mat3x3<f32>(vec3<f32>(0.0f))
- %4:mat3x3<f32> = load %m
- %5:mat3x3<f32> = construct %4
- %6:void = call %tint_store_and_preserve_padding, %out, %5
- ret
- }
+kernel void f(device float3x3* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ float3x3 m = float3x3(float3(0.0f), float3(0.0f), float3(0.0f));
+ tint_store_and_preserve_padding(tint_module_vars.out, float3x3(m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f32>, read_write>, %value_param:mat3x3<f32>):void {
- $B3: {
- %10:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %11:vec3<f32> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %13:vec3<f32> = access %value_param, 1u
- store %12, %13
- %14:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %15:vec3<f32> = access %value_param, 2u
- store %14, %15
- 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/expressions/type_ctor/mat3x3/zero/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x3/zero/f16.wgsl.expected.ir.msl
index 6aaeeca..51e8405 100644
--- a/test/tint/expressions/type_ctor/mat3x3/zero/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/zero/f16.wgsl.expected.ir.msl
@@ -1,36 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x3* m;
+ device half3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x3<f16>, read_write> = var, mat3x3<f16>(vec3<f16>(0.0h))
- %out:ptr<storage, mat3x3<f16>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f16> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device half3x3* out [[buffer(0)]]) {
+ thread half3x3 m = half3x3(half3(0.0h), half3(0.0h), half3(0.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f16>, read_write>, %value_param:mat3x3<f16>):void {
- $B3: {
- %9:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %10:vec3<f16> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %12:vec3<f16> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %14:vec3<f16> = access %value_param, 2u
- 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/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.ir.msl
index 4b7f717..32ddcf3 100644
--- a/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.ir.msl
@@ -1,36 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x3* m;
+ device float3x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x3<f32>, read_write> = var, mat3x3<f32>(vec3<f32>(0.0f))
- %out:ptr<storage, mat3x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x3<f32> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device float3x3* out [[buffer(0)]]) {
+ thread float3x3 m = float3x3(float3(0.0f), float3(0.0f), float3(0.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat3x3<f32>, read_write>, %value_param:mat3x3<f32>):void {
- $B3: {
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %10:vec3<f32> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %12:vec3<f32> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %14:vec3<f32> = access %value_param, 2u
- 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/expressions/type_ctor/mat3x4/explicit/identity/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f16.wgsl.expected.ir.msl
index b2749f3..bc51772 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x4* m;
+ device half3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x4<f16>, read_write> = var, mat3x4<f16>(vec4<f16>(0.0h, 1.0h, 2.0h, 3.0h), vec4<f16>(4.0h, 5.0h, 6.0h, 7.0h), vec4<f16>(8.0h, 9.0h, 10.0h, 11.0h))
- %out:ptr<storage, mat3x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half3x4* out [[buffer(0)]]) {
+ thread half3x4 m = half3x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h), half4(8.0h, 9.0h, 10.0h, 11.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = half3x4((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f16> = load %m
- %5:mat3x4<f16> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.ir.msl
index bfad518..76fae16 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x4* m;
+ device float3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x4<f32>, read_write> = var, mat3x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f), vec4<f32>(8.0f, 9.0f, 10.0f, 11.0f))
- %out:ptr<storage, mat3x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x4* out [[buffer(0)]]) {
+ thread float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = float3x4((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f32> = load %m
- %5:mat3x4<f32> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat3x4/explicit/scalars/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f16.wgsl.expected.ir.msl
index 622dcd5..3bc3c94 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x4* m;
+ device half3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x4<f16>, read_write> = var, mat3x4<f16>(vec4<f16>(0.0h, 1.0h, 2.0h, 3.0h), vec4<f16>(4.0h, 5.0h, 6.0h, 7.0h), vec4<f16>(8.0h, 9.0h, 10.0h, 11.0h))
- %out:ptr<storage, mat3x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half3x4* out [[buffer(0)]]) {
+ thread half3x4 m = half3x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h), half4(8.0h, 9.0h, 10.0h, 11.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.ir.msl
index eabe5e4..87e836e 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x4* m;
+ device float3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x4<f32>, read_write> = var, mat3x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f), vec4<f32>(8.0f, 9.0f, 10.0f, 11.0f))
- %out:ptr<storage, mat3x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x4* out [[buffer(0)]]) {
+ thread float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x4/explicit/vectors/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f16.wgsl.expected.ir.msl
index 622dcd5..3bc3c94 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x4* m;
+ device half3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x4<f16>, read_write> = var, mat3x4<f16>(vec4<f16>(0.0h, 1.0h, 2.0h, 3.0h), vec4<f16>(4.0h, 5.0h, 6.0h, 7.0h), vec4<f16>(8.0h, 9.0h, 10.0h, 11.0h))
- %out:ptr<storage, mat3x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half3x4* out [[buffer(0)]]) {
+ thread half3x4 m = half3x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h), half4(8.0h, 9.0h, 10.0h, 11.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.ir.msl
index eabe5e4..87e836e 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x4* m;
+ device float3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x4<f32>, read_write> = var, mat3x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f), vec4<f32>(8.0f, 9.0f, 10.0f, 11.0f))
- %out:ptr<storage, mat3x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x4* out [[buffer(0)]]) {
+ thread float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x4/inferred/identity/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f16.wgsl.expected.ir.msl
index b2749f3..bc51772 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x4* m;
+ device half3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x4<f16>, read_write> = var, mat3x4<f16>(vec4<f16>(0.0h, 1.0h, 2.0h, 3.0h), vec4<f16>(4.0h, 5.0h, 6.0h, 7.0h), vec4<f16>(8.0h, 9.0h, 10.0h, 11.0h))
- %out:ptr<storage, mat3x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half3x4* out [[buffer(0)]]) {
+ thread half3x4 m = half3x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h), half4(8.0h, 9.0h, 10.0h, 11.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = half3x4((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f16> = load %m
- %5:mat3x4<f16> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.ir.msl
index bfad518..76fae16 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x4* m;
+ device float3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x4<f32>, read_write> = var, mat3x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f), vec4<f32>(8.0f, 9.0f, 10.0f, 11.0f))
- %out:ptr<storage, mat3x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x4* out [[buffer(0)]]) {
+ thread float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = float3x4((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f32> = load %m
- %5:mat3x4<f32> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.ir.msl
index ba5564e..3e2e29c 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.ir.msl
@@ -1,20 +1,10 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat3x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x4* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ (*tint_module_vars.out) = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- store %out, mat3x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f), vec4<f32>(8.0f, 9.0f, 10.0f, 11.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/expressions/type_ctor/mat3x4/inferred/scalars/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f16.wgsl.expected.ir.msl
index 622dcd5..3bc3c94 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x4* m;
+ device half3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x4<f16>, read_write> = var, mat3x4<f16>(vec4<f16>(0.0h, 1.0h, 2.0h, 3.0h), vec4<f16>(4.0h, 5.0h, 6.0h, 7.0h), vec4<f16>(8.0h, 9.0h, 10.0h, 11.0h))
- %out:ptr<storage, mat3x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half3x4* out [[buffer(0)]]) {
+ thread half3x4 m = half3x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h), half4(8.0h, 9.0h, 10.0h, 11.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.ir.msl
index eabe5e4..87e836e 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x4* m;
+ device float3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x4<f32>, read_write> = var, mat3x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f), vec4<f32>(8.0f, 9.0f, 10.0f, 11.0f))
- %out:ptr<storage, mat3x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x4* out [[buffer(0)]]) {
+ thread float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.ir.msl
index ba5564e..3e2e29c 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.ir.msl
@@ -1,20 +1,10 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat3x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x4* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ (*tint_module_vars.out) = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- store %out, mat3x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f), vec4<f32>(8.0f, 9.0f, 10.0f, 11.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/expressions/type_ctor/mat3x4/inferred/vectors/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f16.wgsl.expected.ir.msl
index 622dcd5..3bc3c94 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x4* m;
+ device half3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x4<f16>, read_write> = var, mat3x4<f16>(vec4<f16>(0.0h, 1.0h, 2.0h, 3.0h), vec4<f16>(4.0h, 5.0h, 6.0h, 7.0h), vec4<f16>(8.0h, 9.0h, 10.0h, 11.0h))
- %out:ptr<storage, mat3x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half3x4* out [[buffer(0)]]) {
+ thread half3x4 m = half3x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h), half4(8.0h, 9.0h, 10.0h, 11.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.ir.msl
index eabe5e4..87e836e 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x4* m;
+ device float3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x4<f32>, read_write> = var, mat3x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f), vec4<f32>(8.0f, 9.0f, 10.0f, 11.0f))
- %out:ptr<storage, mat3x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x4* out [[buffer(0)]]) {
+ thread float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x4/load/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x4/load/f16.wgsl.expected.ir.msl
index eee4a1e..91ef6da 100644
--- a/test/tint/expressions/type_ctor/mat3x4/load/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/load/f16.wgsl.expected.ir.msl
@@ -1,23 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat3x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half3x4* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ half3x4 m = half3x4(half4(0.0h), half4(0.0h), half4(0.0h));
+ (*tint_module_vars.out) = half3x4(m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:ptr<function, mat3x4<f16>, read_write> = var, mat3x4<f16>(vec4<f16>(0.0h))
- %4:mat3x4<f16> = load %m
- %5:mat3x4<f16> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat3x4/load/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x4/load/f32.wgsl.expected.ir.msl
index 0a1a884..d7a1834 100644
--- a/test/tint/expressions/type_ctor/mat3x4/load/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/load/f32.wgsl.expected.ir.msl
@@ -1,23 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat3x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x4* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ float3x4 m = float3x4(float4(0.0f), float4(0.0f), float4(0.0f));
+ (*tint_module_vars.out) = float3x4(m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:ptr<function, mat3x4<f32>, read_write> = var, mat3x4<f32>(vec4<f32>(0.0f))
- %4:mat3x4<f32> = load %m
- %5:mat3x4<f32> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat3x4/zero/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x4/zero/f16.wgsl.expected.ir.msl
index 02d09d0..ce0e634 100644
--- a/test/tint/expressions/type_ctor/mat3x4/zero/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/zero/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half3x4* m;
+ device half3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x4<f16>, read_write> = var, mat3x4<f16>(vec4<f16>(0.0h))
- %out:ptr<storage, mat3x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half3x4* out [[buffer(0)]]) {
+ thread half3x4 m = half3x4(half4(0.0h), half4(0.0h), half4(0.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.ir.msl
index cdc34e6..f87e279 100644
--- a/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float3x4* m;
+ device float3x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat3x4<f32>, read_write> = var, mat3x4<f32>(vec4<f32>(0.0f))
- %out:ptr<storage, mat3x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float3x4* out [[buffer(0)]]) {
+ thread float3x4 m = float3x4(float4(0.0f), float4(0.0f), float4(0.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat3x4<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x2/explicit/identity/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f16.wgsl.expected.ir.msl
index 838e0cf..682cf05 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x2* m;
+ device half4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x2<f16>, read_write> = var, mat4x2<f16>(vec2<f16>(0.0h, 1.0h), vec2<f16>(2.0h, 3.0h), vec2<f16>(4.0h, 5.0h), vec2<f16>(6.0h, 7.0h))
- %out:ptr<storage, mat4x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half4x2* out [[buffer(0)]]) {
+ thread half4x2 m = half4x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h), half2(4.0h, 5.0h), half2(6.0h, 7.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = half4x2((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f16> = load %m
- %5:mat4x2<f16> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.ir.msl
index 635f09a..5fd8f2b 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x2* m;
+ device float4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x2<f32>, read_write> = var, mat4x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f), vec2<f32>(4.0f, 5.0f), vec2<f32>(6.0f, 7.0f))
- %out:ptr<storage, mat4x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x2* out [[buffer(0)]]) {
+ thread float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = float4x2((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f32> = load %m
- %5:mat4x2<f32> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat4x2/explicit/scalars/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f16.wgsl.expected.ir.msl
index 2a6e7ab..fe8aa1a 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x2* m;
+ device half4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x2<f16>, read_write> = var, mat4x2<f16>(vec2<f16>(0.0h, 1.0h), vec2<f16>(2.0h, 3.0h), vec2<f16>(4.0h, 5.0h), vec2<f16>(6.0h, 7.0h))
- %out:ptr<storage, mat4x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half4x2* out [[buffer(0)]]) {
+ thread half4x2 m = half4x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h), half2(4.0h, 5.0h), half2(6.0h, 7.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.ir.msl
index aa889aa..2beb638 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x2* m;
+ device float4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x2<f32>, read_write> = var, mat4x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f), vec2<f32>(4.0f, 5.0f), vec2<f32>(6.0f, 7.0f))
- %out:ptr<storage, mat4x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x2* out [[buffer(0)]]) {
+ thread float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x2/explicit/vectors/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f16.wgsl.expected.ir.msl
index 2a6e7ab..fe8aa1a 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x2* m;
+ device half4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x2<f16>, read_write> = var, mat4x2<f16>(vec2<f16>(0.0h, 1.0h), vec2<f16>(2.0h, 3.0h), vec2<f16>(4.0h, 5.0h), vec2<f16>(6.0h, 7.0h))
- %out:ptr<storage, mat4x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half4x2* out [[buffer(0)]]) {
+ thread half4x2 m = half4x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h), half2(4.0h, 5.0h), half2(6.0h, 7.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.ir.msl
index aa889aa..2beb638 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x2* m;
+ device float4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x2<f32>, read_write> = var, mat4x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f), vec2<f32>(4.0f, 5.0f), vec2<f32>(6.0f, 7.0f))
- %out:ptr<storage, mat4x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x2* out [[buffer(0)]]) {
+ thread float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x2/inferred/identity/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f16.wgsl.expected.ir.msl
index 838e0cf..682cf05 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x2* m;
+ device half4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x2<f16>, read_write> = var, mat4x2<f16>(vec2<f16>(0.0h, 1.0h), vec2<f16>(2.0h, 3.0h), vec2<f16>(4.0h, 5.0h), vec2<f16>(6.0h, 7.0h))
- %out:ptr<storage, mat4x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half4x2* out [[buffer(0)]]) {
+ thread half4x2 m = half4x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h), half2(4.0h, 5.0h), half2(6.0h, 7.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = half4x2((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f16> = load %m
- %5:mat4x2<f16> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.ir.msl
index 635f09a..5fd8f2b 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x2* m;
+ device float4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x2<f32>, read_write> = var, mat4x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f), vec2<f32>(4.0f, 5.0f), vec2<f32>(6.0f, 7.0f))
- %out:ptr<storage, mat4x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x2* out [[buffer(0)]]) {
+ thread float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = float4x2((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f32> = load %m
- %5:mat4x2<f32> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.ir.msl
index 343fbe3..4213fd0 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.ir.msl
@@ -1,20 +1,10 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat4x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x2* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ (*tint_module_vars.out) = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- store %out, mat4x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f), vec2<f32>(4.0f, 5.0f), vec2<f32>(6.0f, 7.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/expressions/type_ctor/mat4x2/inferred/scalars/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f16.wgsl.expected.ir.msl
index 2a6e7ab..fe8aa1a 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x2* m;
+ device half4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x2<f16>, read_write> = var, mat4x2<f16>(vec2<f16>(0.0h, 1.0h), vec2<f16>(2.0h, 3.0h), vec2<f16>(4.0h, 5.0h), vec2<f16>(6.0h, 7.0h))
- %out:ptr<storage, mat4x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half4x2* out [[buffer(0)]]) {
+ thread half4x2 m = half4x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h), half2(4.0h, 5.0h), half2(6.0h, 7.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.ir.msl
index aa889aa..2beb638 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x2* m;
+ device float4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x2<f32>, read_write> = var, mat4x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f), vec2<f32>(4.0f, 5.0f), vec2<f32>(6.0f, 7.0f))
- %out:ptr<storage, mat4x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x2* out [[buffer(0)]]) {
+ thread float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.ir.msl
index 343fbe3..4213fd0 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.ir.msl
@@ -1,20 +1,10 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat4x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x2* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ (*tint_module_vars.out) = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- store %out, mat4x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f), vec2<f32>(4.0f, 5.0f), vec2<f32>(6.0f, 7.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/expressions/type_ctor/mat4x2/inferred/vectors/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f16.wgsl.expected.ir.msl
index 2a6e7ab..fe8aa1a 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x2* m;
+ device half4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x2<f16>, read_write> = var, mat4x2<f16>(vec2<f16>(0.0h, 1.0h), vec2<f16>(2.0h, 3.0h), vec2<f16>(4.0h, 5.0h), vec2<f16>(6.0h, 7.0h))
- %out:ptr<storage, mat4x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half4x2* out [[buffer(0)]]) {
+ thread half4x2 m = half4x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h), half2(4.0h, 5.0h), half2(6.0h, 7.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.ir.msl
index aa889aa..2beb638 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x2* m;
+ device float4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x2<f32>, read_write> = var, mat4x2<f32>(vec2<f32>(0.0f, 1.0f), vec2<f32>(2.0f, 3.0f), vec2<f32>(4.0f, 5.0f), vec2<f32>(6.0f, 7.0f))
- %out:ptr<storage, mat4x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x2* out [[buffer(0)]]) {
+ thread float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x2/load/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x2/load/f16.wgsl.expected.ir.msl
index 588c5c4..f9b6e38 100644
--- a/test/tint/expressions/type_ctor/mat4x2/load/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/load/f16.wgsl.expected.ir.msl
@@ -1,23 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat4x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half4x2* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ half4x2 m = half4x2(half2(0.0h), half2(0.0h), half2(0.0h), half2(0.0h));
+ (*tint_module_vars.out) = half4x2(m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:ptr<function, mat4x2<f16>, read_write> = var, mat4x2<f16>(vec2<f16>(0.0h))
- %4:mat4x2<f16> = load %m
- %5:mat4x2<f16> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat4x2/load/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x2/load/f32.wgsl.expected.ir.msl
index de58a0b..4232333 100644
--- a/test/tint/expressions/type_ctor/mat4x2/load/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/load/f32.wgsl.expected.ir.msl
@@ -1,23 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat4x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x2* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ float4x2 m = float4x2(float2(0.0f), float2(0.0f), float2(0.0f), float2(0.0f));
+ (*tint_module_vars.out) = float4x2(m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:ptr<function, mat4x2<f32>, read_write> = var, mat4x2<f32>(vec2<f32>(0.0f))
- %4:mat4x2<f32> = load %m
- %5:mat4x2<f32> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat4x2/zero/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x2/zero/f16.wgsl.expected.ir.msl
index f6160a4..9004e83 100644
--- a/test/tint/expressions/type_ctor/mat4x2/zero/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/zero/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x2* m;
+ device half4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x2<f16>, read_write> = var, mat4x2<f16>(vec2<f16>(0.0h))
- %out:ptr<storage, mat4x2<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half4x2* out [[buffer(0)]]) {
+ thread half4x2 m = half4x2(half2(0.0h), half2(0.0h), half2(0.0h), half2(0.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.ir.msl
index f001a30..fab4f75 100644
--- a/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x2* m;
+ device float4x2* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x2<f32>, read_write> = var, mat4x2<f32>(vec2<f32>(0.0f))
- %out:ptr<storage, mat4x2<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x2* out [[buffer(0)]]) {
+ thread float4x2 m = float4x2(float2(0.0f), float2(0.0f), float2(0.0f), float2(0.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x2<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x3/explicit/identity/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f16.wgsl.expected.ir.msl
index 84cc74e..7f337f7 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f16.wgsl.expected.ir.msl
@@ -1,40 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x3* m;
+ device half4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x3<f16>, read_write> = var, mat4x3<f16>(vec3<f16>(0.0h, 1.0h, 2.0h), vec3<f16>(3.0h, 4.0h, 5.0h), vec3<f16>(6.0h, 7.0h, 8.0h), vec3<f16>(9.0h, 10.0h, 11.0h))
- %out:ptr<storage, mat4x3<f16>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f16> = load %m
- %5:mat4x3<f16> = construct %4
- %6:void = call %tint_store_and_preserve_padding, %out, %5
- ret
- }
+kernel void f(device half4x3* out [[buffer(0)]]) {
+ thread half4x3 m = half4x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h), half3(6.0h, 7.0h, 8.0h), half3(9.0h, 10.0h, 11.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, half4x3((*tint_module_vars.m)));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f16>, read_write>, %value_param:mat4x3<f16>):void {
- $B3: {
- %10:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %11:vec3<f16> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %13:vec3<f16> = access %value_param, 1u
- store %12, %13
- %14:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %15:vec3<f16> = access %value_param, 2u
- store %14, %15
- %16:ptr<storage, vec3<f16>, read_write> = access %target, 3u
- %17:vec3<f16> = access %value_param, 3u
- store %16, %17
- 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/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.ir.msl
index e834e13..ddbce20 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.ir.msl
@@ -1,40 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x3* m;
+ device float4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x3<f32>, read_write> = var, mat4x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f), vec3<f32>(6.0f, 7.0f, 8.0f), vec3<f32>(9.0f, 10.0f, 11.0f))
- %out:ptr<storage, mat4x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f32> = load %m
- %5:mat4x3<f32> = construct %4
- %6:void = call %tint_store_and_preserve_padding, %out, %5
- ret
- }
+kernel void f(device float4x3* out [[buffer(0)]]) {
+ thread float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, float4x3((*tint_module_vars.m)));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f32>, read_write>, %value_param:mat4x3<f32>):void {
- $B3: {
- %10:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %11:vec3<f32> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %13:vec3<f32> = access %value_param, 1u
- store %12, %13
- %14:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %15:vec3<f32> = access %value_param, 2u
- store %14, %15
- %16:ptr<storage, vec3<f32>, read_write> = access %target, 3u
- %17:vec3<f32> = access %value_param, 3u
- store %16, %17
- 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/expressions/type_ctor/mat4x3/explicit/scalars/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f16.wgsl.expected.ir.msl
index df6b7ce..93e1d80 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f16.wgsl.expected.ir.msl
@@ -1,39 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x3* m;
+ device half4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x3<f16>, read_write> = var, mat4x3<f16>(vec3<f16>(0.0h, 1.0h, 2.0h), vec3<f16>(3.0h, 4.0h, 5.0h), vec3<f16>(6.0h, 7.0h, 8.0h), vec3<f16>(9.0h, 10.0h, 11.0h))
- %out:ptr<storage, mat4x3<f16>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f16> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device half4x3* out [[buffer(0)]]) {
+ thread half4x3 m = half4x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h), half3(6.0h, 7.0h, 8.0h), half3(9.0h, 10.0h, 11.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f16>, read_write>, %value_param:mat4x3<f16>):void {
- $B3: {
- %9:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %10:vec3<f16> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %12:vec3<f16> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %14:vec3<f16> = access %value_param, 2u
- store %13, %14
- %15:ptr<storage, vec3<f16>, read_write> = access %target, 3u
- %16:vec3<f16> = access %value_param, 3u
- store %15, %16
- 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/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.ir.msl
index e65757c..113532e 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.ir.msl
@@ -1,39 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x3* m;
+ device float4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x3<f32>, read_write> = var, mat4x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f), vec3<f32>(6.0f, 7.0f, 8.0f), vec3<f32>(9.0f, 10.0f, 11.0f))
- %out:ptr<storage, mat4x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f32> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device float4x3* out [[buffer(0)]]) {
+ thread float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f32>, read_write>, %value_param:mat4x3<f32>):void {
- $B3: {
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %10:vec3<f32> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %12:vec3<f32> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %14:vec3<f32> = access %value_param, 2u
- store %13, %14
- %15:ptr<storage, vec3<f32>, read_write> = access %target, 3u
- %16:vec3<f32> = access %value_param, 3u
- store %15, %16
- 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/expressions/type_ctor/mat4x3/explicit/vectors/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f16.wgsl.expected.ir.msl
index df6b7ce..93e1d80 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f16.wgsl.expected.ir.msl
@@ -1,39 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x3* m;
+ device half4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x3<f16>, read_write> = var, mat4x3<f16>(vec3<f16>(0.0h, 1.0h, 2.0h), vec3<f16>(3.0h, 4.0h, 5.0h), vec3<f16>(6.0h, 7.0h, 8.0h), vec3<f16>(9.0h, 10.0h, 11.0h))
- %out:ptr<storage, mat4x3<f16>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f16> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device half4x3* out [[buffer(0)]]) {
+ thread half4x3 m = half4x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h), half3(6.0h, 7.0h, 8.0h), half3(9.0h, 10.0h, 11.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f16>, read_write>, %value_param:mat4x3<f16>):void {
- $B3: {
- %9:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %10:vec3<f16> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %12:vec3<f16> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %14:vec3<f16> = access %value_param, 2u
- store %13, %14
- %15:ptr<storage, vec3<f16>, read_write> = access %target, 3u
- %16:vec3<f16> = access %value_param, 3u
- store %15, %16
- 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/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.ir.msl
index e65757c..113532e 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.ir.msl
@@ -1,39 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x3* m;
+ device float4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x3<f32>, read_write> = var, mat4x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f), vec3<f32>(6.0f, 7.0f, 8.0f), vec3<f32>(9.0f, 10.0f, 11.0f))
- %out:ptr<storage, mat4x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f32> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device float4x3* out [[buffer(0)]]) {
+ thread float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f32>, read_write>, %value_param:mat4x3<f32>):void {
- $B3: {
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %10:vec3<f32> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %12:vec3<f32> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %14:vec3<f32> = access %value_param, 2u
- store %13, %14
- %15:ptr<storage, vec3<f32>, read_write> = access %target, 3u
- %16:vec3<f32> = access %value_param, 3u
- store %15, %16
- 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/expressions/type_ctor/mat4x3/inferred/identity/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f16.wgsl.expected.ir.msl
index 84cc74e..7f337f7 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f16.wgsl.expected.ir.msl
@@ -1,40 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x3* m;
+ device half4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x3<f16>, read_write> = var, mat4x3<f16>(vec3<f16>(0.0h, 1.0h, 2.0h), vec3<f16>(3.0h, 4.0h, 5.0h), vec3<f16>(6.0h, 7.0h, 8.0h), vec3<f16>(9.0h, 10.0h, 11.0h))
- %out:ptr<storage, mat4x3<f16>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f16> = load %m
- %5:mat4x3<f16> = construct %4
- %6:void = call %tint_store_and_preserve_padding, %out, %5
- ret
- }
+kernel void f(device half4x3* out [[buffer(0)]]) {
+ thread half4x3 m = half4x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h), half3(6.0h, 7.0h, 8.0h), half3(9.0h, 10.0h, 11.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, half4x3((*tint_module_vars.m)));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f16>, read_write>, %value_param:mat4x3<f16>):void {
- $B3: {
- %10:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %11:vec3<f16> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %13:vec3<f16> = access %value_param, 1u
- store %12, %13
- %14:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %15:vec3<f16> = access %value_param, 2u
- store %14, %15
- %16:ptr<storage, vec3<f16>, read_write> = access %target, 3u
- %17:vec3<f16> = access %value_param, 3u
- store %16, %17
- 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/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.ir.msl
index e834e13..ddbce20 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.ir.msl
@@ -1,40 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x3* m;
+ device float4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x3<f32>, read_write> = var, mat4x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f), vec3<f32>(6.0f, 7.0f, 8.0f), vec3<f32>(9.0f, 10.0f, 11.0f))
- %out:ptr<storage, mat4x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f32> = load %m
- %5:mat4x3<f32> = construct %4
- %6:void = call %tint_store_and_preserve_padding, %out, %5
- ret
- }
+kernel void f(device float4x3* out [[buffer(0)]]) {
+ thread float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, float4x3((*tint_module_vars.m)));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f32>, read_write>, %value_param:mat4x3<f32>):void {
- $B3: {
- %10:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %11:vec3<f32> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %13:vec3<f32> = access %value_param, 1u
- store %12, %13
- %14:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %15:vec3<f32> = access %value_param, 2u
- store %14, %15
- %16:ptr<storage, vec3<f32>, read_write> = access %target, 3u
- %17:vec3<f32> = access %value_param, 3u
- store %16, %17
- 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/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.ir.msl
index 9ac57da..a659c88 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.ir.msl
@@ -1,37 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat4x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %3:void = call %tint_store_and_preserve_padding, %out, mat4x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f), vec3<f32>(6.0f, 7.0f, 8.0f), vec3<f32>(9.0f, 10.0f, 11.0f))
- ret
- }
+kernel void f(device float4x3* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f32>, read_write>, %value_param:mat4x3<f32>):void {
- $B3: {
- %7:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %8:vec3<f32> = access %value_param, 0u
- store %7, %8
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %10:vec3<f32> = access %value_param, 1u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %12:vec3<f32> = access %value_param, 2u
- store %11, %12
- %13:ptr<storage, vec3<f32>, read_write> = access %target, 3u
- %14:vec3<f32> = access %value_param, 3u
- 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/expressions/type_ctor/mat4x3/inferred/scalars/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f16.wgsl.expected.ir.msl
index df6b7ce..93e1d80 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f16.wgsl.expected.ir.msl
@@ -1,39 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x3* m;
+ device half4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x3<f16>, read_write> = var, mat4x3<f16>(vec3<f16>(0.0h, 1.0h, 2.0h), vec3<f16>(3.0h, 4.0h, 5.0h), vec3<f16>(6.0h, 7.0h, 8.0h), vec3<f16>(9.0h, 10.0h, 11.0h))
- %out:ptr<storage, mat4x3<f16>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f16> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device half4x3* out [[buffer(0)]]) {
+ thread half4x3 m = half4x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h), half3(6.0h, 7.0h, 8.0h), half3(9.0h, 10.0h, 11.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f16>, read_write>, %value_param:mat4x3<f16>):void {
- $B3: {
- %9:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %10:vec3<f16> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %12:vec3<f16> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %14:vec3<f16> = access %value_param, 2u
- store %13, %14
- %15:ptr<storage, vec3<f16>, read_write> = access %target, 3u
- %16:vec3<f16> = access %value_param, 3u
- store %15, %16
- 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/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.ir.msl
index e65757c..113532e 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.ir.msl
@@ -1,39 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x3* m;
+ device float4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x3<f32>, read_write> = var, mat4x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f), vec3<f32>(6.0f, 7.0f, 8.0f), vec3<f32>(9.0f, 10.0f, 11.0f))
- %out:ptr<storage, mat4x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f32> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device float4x3* out [[buffer(0)]]) {
+ thread float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f32>, read_write>, %value_param:mat4x3<f32>):void {
- $B3: {
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %10:vec3<f32> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %12:vec3<f32> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %14:vec3<f32> = access %value_param, 2u
- store %13, %14
- %15:ptr<storage, vec3<f32>, read_write> = access %target, 3u
- %16:vec3<f32> = access %value_param, 3u
- store %15, %16
- 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/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.ir.msl
index 9ac57da..a659c88 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.ir.msl
@@ -1,37 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat4x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %3:void = call %tint_store_and_preserve_padding, %out, mat4x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f), vec3<f32>(6.0f, 7.0f, 8.0f), vec3<f32>(9.0f, 10.0f, 11.0f))
- ret
- }
+kernel void f(device float4x3* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f32>, read_write>, %value_param:mat4x3<f32>):void {
- $B3: {
- %7:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %8:vec3<f32> = access %value_param, 0u
- store %7, %8
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %10:vec3<f32> = access %value_param, 1u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %12:vec3<f32> = access %value_param, 2u
- store %11, %12
- %13:ptr<storage, vec3<f32>, read_write> = access %target, 3u
- %14:vec3<f32> = access %value_param, 3u
- 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/expressions/type_ctor/mat4x3/inferred/vectors/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f16.wgsl.expected.ir.msl
index df6b7ce..93e1d80 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f16.wgsl.expected.ir.msl
@@ -1,39 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x3* m;
+ device half4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x3<f16>, read_write> = var, mat4x3<f16>(vec3<f16>(0.0h, 1.0h, 2.0h), vec3<f16>(3.0h, 4.0h, 5.0h), vec3<f16>(6.0h, 7.0h, 8.0h), vec3<f16>(9.0h, 10.0h, 11.0h))
- %out:ptr<storage, mat4x3<f16>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f16> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device half4x3* out [[buffer(0)]]) {
+ thread half4x3 m = half4x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h), half3(6.0h, 7.0h, 8.0h), half3(9.0h, 10.0h, 11.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f16>, read_write>, %value_param:mat4x3<f16>):void {
- $B3: {
- %9:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %10:vec3<f16> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %12:vec3<f16> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %14:vec3<f16> = access %value_param, 2u
- store %13, %14
- %15:ptr<storage, vec3<f16>, read_write> = access %target, 3u
- %16:vec3<f16> = access %value_param, 3u
- store %15, %16
- 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/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.ir.msl
index e65757c..113532e 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.ir.msl
@@ -1,39 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x3* m;
+ device float4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x3<f32>, read_write> = var, mat4x3<f32>(vec3<f32>(0.0f, 1.0f, 2.0f), vec3<f32>(3.0f, 4.0f, 5.0f), vec3<f32>(6.0f, 7.0f, 8.0f), vec3<f32>(9.0f, 10.0f, 11.0f))
- %out:ptr<storage, mat4x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f32> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device float4x3* out [[buffer(0)]]) {
+ thread float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f32>, read_write>, %value_param:mat4x3<f32>):void {
- $B3: {
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %10:vec3<f32> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %12:vec3<f32> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %14:vec3<f32> = access %value_param, 2u
- store %13, %14
- %15:ptr<storage, vec3<f32>, read_write> = access %target, 3u
- %16:vec3<f32> = access %value_param, 3u
- store %15, %16
- 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/expressions/type_ctor/mat4x3/load/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x3/load/f16.wgsl.expected.ir.msl
index b2d5c8a..a781ea3 100644
--- a/test/tint/expressions/type_ctor/mat4x3/load/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/load/f16.wgsl.expected.ir.msl
@@ -1,40 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat4x3<f16>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:ptr<function, mat4x3<f16>, read_write> = var, mat4x3<f16>(vec3<f16>(0.0h))
- %4:mat4x3<f16> = load %m
- %5:mat4x3<f16> = construct %4
- %6:void = call %tint_store_and_preserve_padding, %out, %5
- ret
- }
+kernel void f(device half4x3* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ half4x3 m = half4x3(half3(0.0h), half3(0.0h), half3(0.0h), half3(0.0h));
+ tint_store_and_preserve_padding(tint_module_vars.out, half4x3(m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f16>, read_write>, %value_param:mat4x3<f16>):void {
- $B3: {
- %10:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %11:vec3<f16> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %13:vec3<f16> = access %value_param, 1u
- store %12, %13
- %14:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %15:vec3<f16> = access %value_param, 2u
- store %14, %15
- %16:ptr<storage, vec3<f16>, read_write> = access %target, 3u
- %17:vec3<f16> = access %value_param, 3u
- store %16, %17
- 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/expressions/type_ctor/mat4x3/load/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x3/load/f32.wgsl.expected.ir.msl
index e70076e..8c4aef5 100644
--- a/test/tint/expressions/type_ctor/mat4x3/load/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/load/f32.wgsl.expected.ir.msl
@@ -1,40 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat4x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:ptr<function, mat4x3<f32>, read_write> = var, mat4x3<f32>(vec3<f32>(0.0f))
- %4:mat4x3<f32> = load %m
- %5:mat4x3<f32> = construct %4
- %6:void = call %tint_store_and_preserve_padding, %out, %5
- ret
- }
+kernel void f(device float4x3* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ float4x3 m = float4x3(float3(0.0f), float3(0.0f), float3(0.0f), float3(0.0f));
+ tint_store_and_preserve_padding(tint_module_vars.out, float4x3(m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f32>, read_write>, %value_param:mat4x3<f32>):void {
- $B3: {
- %10:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %11:vec3<f32> = access %value_param, 0u
- store %10, %11
- %12:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %13:vec3<f32> = access %value_param, 1u
- store %12, %13
- %14:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %15:vec3<f32> = access %value_param, 2u
- store %14, %15
- %16:ptr<storage, vec3<f32>, read_write> = access %target, 3u
- %17:vec3<f32> = access %value_param, 3u
- store %16, %17
- 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/expressions/type_ctor/mat4x3/zero/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x3/zero/f16.wgsl.expected.ir.msl
index c92d020..7ba6fe0 100644
--- a/test/tint/expressions/type_ctor/mat4x3/zero/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/zero/f16.wgsl.expected.ir.msl
@@ -1,39 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x3* m;
+ device half4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x3<f16>, read_write> = var, mat4x3<f16>(vec3<f16>(0.0h))
- %out:ptr<storage, mat4x3<f16>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f16> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device half4x3* out [[buffer(0)]]) {
+ thread half4x3 m = half4x3(half3(0.0h), half3(0.0h), half3(0.0h), half3(0.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f16>, read_write>, %value_param:mat4x3<f16>):void {
- $B3: {
- %9:ptr<storage, vec3<f16>, read_write> = access %target, 0u
- %10:vec3<f16> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f16>, read_write> = access %target, 1u
- %12:vec3<f16> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f16>, read_write> = access %target, 2u
- %14:vec3<f16> = access %value_param, 2u
- store %13, %14
- %15:ptr<storage, vec3<f16>, read_write> = access %target, 3u
- %16:vec3<f16> = access %value_param, 3u
- store %15, %16
- 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/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.ir.msl
index e9865f9..fd2382b 100644
--- a/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.ir.msl
@@ -1,39 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x3* m;
+ device float4x3* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x3<f32>, read_write> = var, mat4x3<f32>(vec3<f32>(0.0f))
- %out:ptr<storage, mat4x3<f32>, read_write> = var @binding_point(0, 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];
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x3<f32> = load %m
- %5:void = call %tint_store_and_preserve_padding, %out, %4
- ret
- }
+kernel void f(device float4x3* out [[buffer(0)]]) {
+ thread float4x3 m = float4x3(float3(0.0f), float3(0.0f), float3(0.0f), float3(0.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ tint_store_and_preserve_padding(tint_module_vars.out, (*tint_module_vars.m));
}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, mat4x3<f32>, read_write>, %value_param:mat4x3<f32>):void {
- $B3: {
- %9:ptr<storage, vec3<f32>, read_write> = access %target, 0u
- %10:vec3<f32> = access %value_param, 0u
- store %9, %10
- %11:ptr<storage, vec3<f32>, read_write> = access %target, 1u
- %12:vec3<f32> = access %value_param, 1u
- store %11, %12
- %13:ptr<storage, vec3<f32>, read_write> = access %target, 2u
- %14:vec3<f32> = access %value_param, 2u
- store %13, %14
- %15:ptr<storage, vec3<f32>, read_write> = access %target, 3u
- %16:vec3<f32> = access %value_param, 3u
- store %15, %16
- 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/expressions/type_ctor/mat4x4/explicit/identity/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f16.wgsl.expected.ir.msl
index 3eba67e..5366300 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x4* m;
+ device half4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x4<f16>, read_write> = var, mat4x4<f16>(vec4<f16>(0.0h, 1.0h, 2.0h, 3.0h), vec4<f16>(4.0h, 5.0h, 6.0h, 7.0h), vec4<f16>(8.0h, 9.0h, 10.0h, 11.0h), vec4<f16>(12.0h, 13.0h, 14.0h, 15.0h))
- %out:ptr<storage, mat4x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half4x4* out [[buffer(0)]]) {
+ thread half4x4 m = half4x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h), half4(8.0h, 9.0h, 10.0h, 11.0h), half4(12.0h, 13.0h, 14.0h, 15.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = half4x4((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f16> = load %m
- %5:mat4x4<f16> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.ir.msl
index 250a01c..fa069a1 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x4* m;
+ device float4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x4<f32>, read_write> = var, mat4x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f), vec4<f32>(8.0f, 9.0f, 10.0f, 11.0f), vec4<f32>(12.0f, 13.0f, 14.0f, 15.0f))
- %out:ptr<storage, mat4x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x4* out [[buffer(0)]]) {
+ thread float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = float4x4((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f32> = load %m
- %5:mat4x4<f32> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat4x4/explicit/scalars/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f16.wgsl.expected.ir.msl
index e8a0c48..1c7f1e0 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x4* m;
+ device half4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x4<f16>, read_write> = var, mat4x4<f16>(vec4<f16>(0.0h, 1.0h, 2.0h, 3.0h), vec4<f16>(4.0h, 5.0h, 6.0h, 7.0h), vec4<f16>(8.0h, 9.0h, 10.0h, 11.0h), vec4<f16>(12.0h, 13.0h, 14.0h, 15.0h))
- %out:ptr<storage, mat4x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half4x4* out [[buffer(0)]]) {
+ thread half4x4 m = half4x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h), half4(8.0h, 9.0h, 10.0h, 11.0h), half4(12.0h, 13.0h, 14.0h, 15.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.ir.msl
index b143f20..7b8a342 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x4* m;
+ device float4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x4<f32>, read_write> = var, mat4x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f), vec4<f32>(8.0f, 9.0f, 10.0f, 11.0f), vec4<f32>(12.0f, 13.0f, 14.0f, 15.0f))
- %out:ptr<storage, mat4x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x4* out [[buffer(0)]]) {
+ thread float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x4/explicit/vectors/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f16.wgsl.expected.ir.msl
index e8a0c48..1c7f1e0 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x4* m;
+ device half4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x4<f16>, read_write> = var, mat4x4<f16>(vec4<f16>(0.0h, 1.0h, 2.0h, 3.0h), vec4<f16>(4.0h, 5.0h, 6.0h, 7.0h), vec4<f16>(8.0h, 9.0h, 10.0h, 11.0h), vec4<f16>(12.0h, 13.0h, 14.0h, 15.0h))
- %out:ptr<storage, mat4x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half4x4* out [[buffer(0)]]) {
+ thread half4x4 m = half4x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h), half4(8.0h, 9.0h, 10.0h, 11.0h), half4(12.0h, 13.0h, 14.0h, 15.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.ir.msl
index b143f20..7b8a342 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x4* m;
+ device float4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x4<f32>, read_write> = var, mat4x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f), vec4<f32>(8.0f, 9.0f, 10.0f, 11.0f), vec4<f32>(12.0f, 13.0f, 14.0f, 15.0f))
- %out:ptr<storage, mat4x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x4* out [[buffer(0)]]) {
+ thread float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x4/inferred/identity/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f16.wgsl.expected.ir.msl
index 3eba67e..5366300 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f16.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x4* m;
+ device half4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x4<f16>, read_write> = var, mat4x4<f16>(vec4<f16>(0.0h, 1.0h, 2.0h, 3.0h), vec4<f16>(4.0h, 5.0h, 6.0h, 7.0h), vec4<f16>(8.0h, 9.0h, 10.0h, 11.0h), vec4<f16>(12.0h, 13.0h, 14.0h, 15.0h))
- %out:ptr<storage, mat4x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half4x4* out [[buffer(0)]]) {
+ thread half4x4 m = half4x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h), half4(8.0h, 9.0h, 10.0h, 11.0h), half4(12.0h, 13.0h, 14.0h, 15.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = half4x4((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f16> = load %m
- %5:mat4x4<f16> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.ir.msl
index 250a01c..fa069a1 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.ir.msl
@@ -1,23 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x4* m;
+ device float4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x4<f32>, read_write> = var, mat4x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f), vec4<f32>(8.0f, 9.0f, 10.0f, 11.0f), vec4<f32>(12.0f, 13.0f, 14.0f, 15.0f))
- %out:ptr<storage, mat4x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x4* out [[buffer(0)]]) {
+ thread float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = float4x4((*tint_module_vars.m));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f32> = load %m
- %5:mat4x4<f32> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.ir.msl
index c0e6669..80649b5 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.ir.msl
@@ -1,20 +1,10 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat4x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x4* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ (*tint_module_vars.out) = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- store %out, mat4x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f), vec4<f32>(8.0f, 9.0f, 10.0f, 11.0f), vec4<f32>(12.0f, 13.0f, 14.0f, 15.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/expressions/type_ctor/mat4x4/inferred/scalars/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f16.wgsl.expected.ir.msl
index e8a0c48..1c7f1e0 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x4* m;
+ device half4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x4<f16>, read_write> = var, mat4x4<f16>(vec4<f16>(0.0h, 1.0h, 2.0h, 3.0h), vec4<f16>(4.0h, 5.0h, 6.0h, 7.0h), vec4<f16>(8.0h, 9.0h, 10.0h, 11.0h), vec4<f16>(12.0h, 13.0h, 14.0h, 15.0h))
- %out:ptr<storage, mat4x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half4x4* out [[buffer(0)]]) {
+ thread half4x4 m = half4x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h), half4(8.0h, 9.0h, 10.0h, 11.0h), half4(12.0h, 13.0h, 14.0h, 15.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.ir.msl
index b143f20..7b8a342 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x4* m;
+ device float4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x4<f32>, read_write> = var, mat4x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f), vec4<f32>(8.0f, 9.0f, 10.0f, 11.0f), vec4<f32>(12.0f, 13.0f, 14.0f, 15.0f))
- %out:ptr<storage, mat4x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x4* out [[buffer(0)]]) {
+ thread float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.ir.msl
index c0e6669..80649b5 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.ir.msl
@@ -1,20 +1,10 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat4x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x4* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ (*tint_module_vars.out) = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f));
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- store %out, mat4x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f), vec4<f32>(8.0f, 9.0f, 10.0f, 11.0f), vec4<f32>(12.0f, 13.0f, 14.0f, 15.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/expressions/type_ctor/mat4x4/inferred/vectors/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f16.wgsl.expected.ir.msl
index e8a0c48..1c7f1e0 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x4* m;
+ device half4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x4<f16>, read_write> = var, mat4x4<f16>(vec4<f16>(0.0h, 1.0h, 2.0h, 3.0h), vec4<f16>(4.0h, 5.0h, 6.0h, 7.0h), vec4<f16>(8.0h, 9.0h, 10.0h, 11.0h), vec4<f16>(12.0h, 13.0h, 14.0h, 15.0h))
- %out:ptr<storage, mat4x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half4x4* out [[buffer(0)]]) {
+ thread half4x4 m = half4x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h), half4(8.0h, 9.0h, 10.0h, 11.0h), half4(12.0h, 13.0h, 14.0h, 15.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.ir.msl
index b143f20..7b8a342 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x4* m;
+ device float4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x4<f32>, read_write> = var, mat4x4<f32>(vec4<f32>(0.0f, 1.0f, 2.0f, 3.0f), vec4<f32>(4.0f, 5.0f, 6.0f, 7.0f), vec4<f32>(8.0f, 9.0f, 10.0f, 11.0f), vec4<f32>(12.0f, 13.0f, 14.0f, 15.0f))
- %out:ptr<storage, mat4x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x4* out [[buffer(0)]]) {
+ thread float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f32> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x4/load/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x4/load/f16.wgsl.expected.ir.msl
index 1c8cd6e..7f0df97 100644
--- a/test/tint/expressions/type_ctor/mat4x4/load/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/load/f16.wgsl.expected.ir.msl
@@ -1,23 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat4x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half4x4* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ half4x4 m = half4x4(half4(0.0h), half4(0.0h), half4(0.0h), half4(0.0h));
+ (*tint_module_vars.out) = half4x4(m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:ptr<function, mat4x4<f16>, read_write> = var, mat4x4<f16>(vec4<f16>(0.0h))
- %4:mat4x4<f16> = load %m
- %5:mat4x4<f16> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat4x4/load/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x4/load/f32.wgsl.expected.ir.msl
index 46c9871..5e621d2 100644
--- a/test/tint/expressions/type_ctor/mat4x4/load/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/load/f32.wgsl.expected.ir.msl
@@ -1,23 +1,11 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %out:ptr<storage, mat4x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x4* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ float4x4 m = float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f));
+ (*tint_module_vars.out) = float4x4(m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %m:ptr<function, mat4x4<f32>, read_write> = var, mat4x4<f32>(vec4<f32>(0.0f))
- %4:mat4x4<f32> = load %m
- %5:mat4x4<f32> = construct %4
- store %out, %5
- 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/expressions/type_ctor/mat4x4/zero/f16.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x4/zero/f16.wgsl.expected.ir.msl
index c8a0634..546cb14 100644
--- a/test/tint/expressions/type_ctor/mat4x4/zero/f16.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/zero/f16.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread half4x4* m;
+ device half4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x4<f16>, read_write> = var, mat4x4<f16>(vec4<f16>(0.0h))
- %out:ptr<storage, mat4x4<f16>, read_write> = var @binding_point(0, 0)
+kernel void f(device half4x4* out [[buffer(0)]]) {
+ thread half4x4 m = half4x4(half4(0.0h), half4(0.0h), half4(0.0h), half4(0.0h));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f16> = load %m
- store %out, %4
- 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/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.ir.msl b/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.ir.msl
index 4d5a209..6c53af1 100644
--- a/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.ir.msl
@@ -1,22 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ thread float4x4* m;
+ device float4x4* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %m:ptr<private, mat4x4<f32>, read_write> = var, mat4x4<f32>(vec4<f32>(0.0f))
- %out:ptr<storage, mat4x4<f32>, read_write> = var @binding_point(0, 0)
+kernel void f(device float4x4* out [[buffer(0)]]) {
+ thread float4x4 m = float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f));
+ tint_module_vars_struct const tint_module_vars = {.m=(&m), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.m);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:mat4x4<f32> = load %m
- store %out, %4
- 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/identifiers/underscore/double/alias.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/double/alias.wgsl.expected.ir.msl
index 02ab5e8..72701cb 100644
--- a/test/tint/identifiers/underscore/double/alias.wgsl.expected.ir.msl
+++ b/test/tint/identifiers/underscore/double/alias.wgsl.expected.ir.msl
@@ -1,25 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 0)
+kernel void f(device int* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ int c = 0;
+ int d = 0;
+ (*tint_module_vars.s) = (c + d);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %c:ptr<function, i32, read_write> = var
- %d:ptr<function, i32, read_write> = var
- %5:i32 = load %c
- %6:i32 = load %d
- %7:i32 = add %5, %6
- store %s, %7
- 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/identifiers/underscore/double/const.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/double/const.wgsl.expected.ir.msl
index 2414db8..b4da174 100644
--- a/test/tint/identifiers/underscore/double/const.wgsl.expected.ir.msl
+++ b/test/tint/identifiers/underscore/double/const.wgsl.expected.ir.msl
@@ -1,20 +1,10 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 0)
+kernel void f(device int* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ (*tint_module_vars.s) = 3;
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- store %s, 3i
- 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/identifiers/underscore/double/let.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/double/let.wgsl.expected.ir.msl
index d4a08cd..4a1d8ab 100644
--- a/test/tint/identifiers/underscore/double/let.wgsl.expected.ir.msl
+++ b/test/tint/identifiers/underscore/double/let.wgsl.expected.ir.msl
@@ -1,27 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 0)
+kernel void f(device int* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ int const a = 1;
+ int const a__ = a;
+ int const b = a;
+ int const b__ = a__;
+ (*tint_module_vars.s) = (((a + a__) + b) + b__);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %a:i32 = let 1i
- %a__:i32 = let %a
- %b:i32 = let %a
- %b__:i32 = let %a__
- %7:i32 = add %a, %a__
- %8:i32 = add %7, %b
- %9:i32 = add %8, %b__
- store %s, %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/identifiers/underscore/double/parameter.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/double/parameter.wgsl.expected.ir.msl
index 14a631f..58219fa 100644
--- a/test/tint/identifiers/underscore/double/parameter.wgsl.expected.ir.msl
+++ b/test/tint/identifiers/underscore/double/parameter.wgsl.expected.ir.msl
@@ -1,27 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 0)
+void f(int a__, tint_module_vars_struct tint_module_vars) {
+ int const b = a__;
+ (*tint_module_vars.s) = b;
}
-
-%f = func(%a__:i32):void {
- $B2: {
- %b:i32 = let %a__
- store %s, %b
- ret
- }
+kernel void tint_symbol(device int* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ f(1, tint_module_vars);
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:void = call %f, 1i
- 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/identifiers/underscore/double/struct.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/double/struct.wgsl.expected.ir.msl
index 16e0624..13991e1 100644
--- a/test/tint/identifiers/underscore/double/struct.wgsl.expected.ir.msl
+++ b/test/tint/identifiers/underscore/double/struct.wgsl.expected.ir.msl
@@ -1,29 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* s;
+};
+struct a__ {
+ int b__;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: a__ = struct @align(4) {
- b__:i32 @offset(0)
+kernel void f(device int* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ a__ const c = a__{};
+ int const d = c.b__;
+ (*tint_module_vars.s) = (c.b__ + d);
}
-
-$B1: { # root
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %c:a__ = let a__(0i)
- %4:i32 = access %c, 0u
- %d:i32 = let %4
- %6:i32 = access %c, 0u
- %7:i32 = add %6, %d
- store %s, %7
- 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/identifiers/underscore/double/var.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/double/var.wgsl.expected.ir.msl
index d017af5..eec150f 100644
--- a/test/tint/identifiers/underscore/double/var.wgsl.expected.ir.msl
+++ b/test/tint/identifiers/underscore/double/var.wgsl.expected.ir.msl
@@ -1,29 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* s;
+ thread int* a;
+ thread int* a__;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 0)
- %a:ptr<private, i32, read_write> = var, 1i
- %a__:ptr<private, i32, read_write> = var, 2i
+kernel void f(device int* s [[buffer(0)]]) {
+ thread int a = 1;
+ thread int a__ = 2;
+ tint_module_vars_struct const tint_module_vars = {.s=s, .a=(&a), .a__=(&a__)};
+ int b = (*tint_module_vars.a);
+ int b__ = (*tint_module_vars.a__);
+ (*tint_module_vars.s) = (b + b__);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:i32 = load %a
- %b:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %a__
- %b__:ptr<function, i32, read_write> = var, %7
- %9:i32 = load %b
- %10:i32 = load %b__
- %11:i32 = add %9, %10
- store %s, %11
- 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/identifiers/underscore/prefix/lower/alias.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/prefix/lower/alias.wgsl.expected.ir.msl
index 02ab5e8..72701cb 100644
--- a/test/tint/identifiers/underscore/prefix/lower/alias.wgsl.expected.ir.msl
+++ b/test/tint/identifiers/underscore/prefix/lower/alias.wgsl.expected.ir.msl
@@ -1,25 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 0)
+kernel void f(device int* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ int c = 0;
+ int d = 0;
+ (*tint_module_vars.s) = (c + d);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %c:ptr<function, i32, read_write> = var
- %d:ptr<function, i32, read_write> = var
- %5:i32 = load %c
- %6:i32 = load %d
- %7:i32 = add %5, %6
- store %s, %7
- 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/identifiers/underscore/prefix/lower/const.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/prefix/lower/const.wgsl.expected.ir.msl
index 2414db8..b4da174 100644
--- a/test/tint/identifiers/underscore/prefix/lower/const.wgsl.expected.ir.msl
+++ b/test/tint/identifiers/underscore/prefix/lower/const.wgsl.expected.ir.msl
@@ -1,20 +1,10 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 0)
+kernel void f(device int* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ (*tint_module_vars.s) = 3;
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- store %s, 3i
- 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/identifiers/underscore/prefix/lower/let.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/prefix/lower/let.wgsl.expected.ir.msl
index 1a3ece5..79209c7 100644
--- a/test/tint/identifiers/underscore/prefix/lower/let.wgsl.expected.ir.msl
+++ b/test/tint/identifiers/underscore/prefix/lower/let.wgsl.expected.ir.msl
@@ -1,27 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 0)
+kernel void f(device int* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ int const a = 1;
+ int const _a = a;
+ int const b = a;
+ int const _b = _a;
+ (*tint_module_vars.s) = (((a + _a) + b) + _b);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %a:i32 = let 1i
- %_a:i32 = let %a
- %b:i32 = let %a
- %_b:i32 = let %_a
- %7:i32 = add %a, %_a
- %8:i32 = add %7, %b
- %9:i32 = add %8, %_b
- store %s, %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/identifiers/underscore/prefix/lower/parameter.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/prefix/lower/parameter.wgsl.expected.ir.msl
index 6e35dc2..0c594d0 100644
--- a/test/tint/identifiers/underscore/prefix/lower/parameter.wgsl.expected.ir.msl
+++ b/test/tint/identifiers/underscore/prefix/lower/parameter.wgsl.expected.ir.msl
@@ -1,27 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 0)
+void f(int _a, tint_module_vars_struct tint_module_vars) {
+ int const b = _a;
+ (*tint_module_vars.s) = b;
}
-
-%f = func(%_a:i32):void {
- $B2: {
- %b:i32 = let %_a
- store %s, %b
- ret
- }
+kernel void tint_symbol(device int* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ f(1, tint_module_vars);
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:void = call %f, 1i
- 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/identifiers/underscore/prefix/lower/struct.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/prefix/lower/struct.wgsl.expected.ir.msl
index b13e311..b2a502f 100644
--- a/test/tint/identifiers/underscore/prefix/lower/struct.wgsl.expected.ir.msl
+++ b/test/tint/identifiers/underscore/prefix/lower/struct.wgsl.expected.ir.msl
@@ -1,29 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* s;
+};
+struct _a {
+ int _b;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: _a = struct @align(4) {
- _b:i32 @offset(0)
+kernel void f(device int* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ _a const c = _a{};
+ int const d = c._b;
+ (*tint_module_vars.s) = (c._b + d);
}
-
-$B1: { # root
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %c:_a = let _a(0i)
- %4:i32 = access %c, 0u
- %d:i32 = let %4
- %6:i32 = access %c, 0u
- %7:i32 = add %6, %d
- store %s, %7
- 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/identifiers/underscore/prefix/lower/var.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/prefix/lower/var.wgsl.expected.ir.msl
index 9605c8b..001f6c4 100644
--- a/test/tint/identifiers/underscore/prefix/lower/var.wgsl.expected.ir.msl
+++ b/test/tint/identifiers/underscore/prefix/lower/var.wgsl.expected.ir.msl
@@ -1,29 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* s;
+ thread int* a;
+ thread int* _a;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 0)
- %a:ptr<private, i32, read_write> = var, 1i
- %_a:ptr<private, i32, read_write> = var, 2i
+kernel void f(device int* s [[buffer(0)]]) {
+ thread int a = 1;
+ thread int _a = 2;
+ tint_module_vars_struct const tint_module_vars = {.s=s, .a=(&a), ._a=(&_a)};
+ int b = (*tint_module_vars.a);
+ int _b = (*tint_module_vars._a);
+ (*tint_module_vars.s) = (b + _b);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:i32 = load %a
- %b:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %_a
- %_b:ptr<function, i32, read_write> = var, %7
- %9:i32 = load %b
- %10:i32 = load %_b
- %11:i32 = add %9, %10
- store %s, %11
- 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/identifiers/underscore/prefix/upper/alias.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/prefix/upper/alias.wgsl.expected.ir.msl
index 02ab5e8..72701cb 100644
--- a/test/tint/identifiers/underscore/prefix/upper/alias.wgsl.expected.ir.msl
+++ b/test/tint/identifiers/underscore/prefix/upper/alias.wgsl.expected.ir.msl
@@ -1,25 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 0)
+kernel void f(device int* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ int c = 0;
+ int d = 0;
+ (*tint_module_vars.s) = (c + d);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %c:ptr<function, i32, read_write> = var
- %d:ptr<function, i32, read_write> = var
- %5:i32 = load %c
- %6:i32 = load %d
- %7:i32 = add %5, %6
- store %s, %7
- 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/identifiers/underscore/prefix/upper/let.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/prefix/upper/let.wgsl.expected.ir.msl
index 7eee399..ba974b4 100644
--- a/test/tint/identifiers/underscore/prefix/upper/let.wgsl.expected.ir.msl
+++ b/test/tint/identifiers/underscore/prefix/upper/let.wgsl.expected.ir.msl
@@ -1,27 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 0)
+kernel void f(device int* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ int const A = 1;
+ int const _A = 2;
+ int const B = A;
+ int const _B = _A;
+ (*tint_module_vars.s) = (((A + _A) + B) + _B);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %A:i32 = let 1i
- %_A:i32 = let 2i
- %B:i32 = let %A
- %_B:i32 = let %_A
- %7:i32 = add %A, %_A
- %8:i32 = add %7, %B
- %9:i32 = add %8, %_B
- store %s, %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/identifiers/underscore/prefix/upper/parameter.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/prefix/upper/parameter.wgsl.expected.ir.msl
index db464a8..6553670 100644
--- a/test/tint/identifiers/underscore/prefix/upper/parameter.wgsl.expected.ir.msl
+++ b/test/tint/identifiers/underscore/prefix/upper/parameter.wgsl.expected.ir.msl
@@ -1,27 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* s;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 0)
+void f(int _A, tint_module_vars_struct tint_module_vars) {
+ int const B = _A;
+ (*tint_module_vars.s) = B;
}
-
-%f = func(%_A:i32):void {
- $B2: {
- %B:i32 = let %_A
- store %s, %B
- ret
- }
+kernel void tint_symbol(device int* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ f(1, tint_module_vars);
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:void = call %f, 1i
- 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/identifiers/underscore/prefix/upper/struct.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/prefix/upper/struct.wgsl.expected.ir.msl
index b912fa9..978dc46 100644
--- a/test/tint/identifiers/underscore/prefix/upper/struct.wgsl.expected.ir.msl
+++ b/test/tint/identifiers/underscore/prefix/upper/struct.wgsl.expected.ir.msl
@@ -1,29 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* s;
+};
+struct _A {
+ int _B;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: _A = struct @align(4) {
- _B:i32 @offset(0)
+kernel void f(device int* s [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.s=s};
+ _A const c = _A{};
+ int const d = c._B;
+ (*tint_module_vars.s) = (c._B + d);
}
-
-$B1: { # root
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %c:_A = let _A(0i)
- %4:i32 = access %c, 0u
- %d:i32 = let %4
- %6:i32 = access %c, 0u
- %7:i32 = add %6, %d
- store %s, %7
- 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/identifiers/underscore/prefix/upper/var.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/prefix/upper/var.wgsl.expected.ir.msl
index 7c016a8..3bf815f 100644
--- a/test/tint/identifiers/underscore/prefix/upper/var.wgsl.expected.ir.msl
+++ b/test/tint/identifiers/underscore/prefix/upper/var.wgsl.expected.ir.msl
@@ -1,29 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* s;
+ thread int* A;
+ thread int* _A;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %s:ptr<storage, i32, read_write> = var @binding_point(0, 0)
- %A:ptr<private, i32, read_write> = var, 1i
- %_A:ptr<private, i32, read_write> = var, 2i
+kernel void f(device int* s [[buffer(0)]]) {
+ thread int A = 1;
+ thread int _A = 2;
+ tint_module_vars_struct const tint_module_vars = {.s=s, .A=(&A), ._A=(&_A)};
+ int B = (*tint_module_vars.A);
+ int _B = (*tint_module_vars._A);
+ (*tint_module_vars.s) = (B + _B);
}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %5:i32 = load %A
- %B:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %_A
- %_B:ptr<function, i32, read_write> = var, %7
- %9:i32 = load %B
- %10:i32 = load %_B
- %11:i32 = add %9, %10
- store %s, %11
- 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/layout/storage/mat2x2/f32.wgsl.expected.ir.msl b/test/tint/layout/storage/mat2x2/f32.wgsl.expected.ir.msl
index 8429213..83f2ad3 100644
--- a/test/tint/layout/storage/mat2x2/f32.wgsl.expected.ir.msl
+++ b/test/tint/layout/storage/mat2x2/f32.wgsl.expected.ir.msl
@@ -1,28 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct SSBO {
+ float2x2 m;
+};
+struct tint_module_vars_struct {
+ device SSBO* ssbo;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: SSBO = struct @align(8) {
- m:mat2x2<f32> @offset(0)
+kernel void f(device SSBO* ssbo [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.ssbo=ssbo};
+ float2x2 const v = (*tint_module_vars.ssbo).m;
+ (*tint_module_vars.ssbo).m = v;
}
-
-$B1: { # root
- %ssbo:ptr<storage, SSBO, read_write> = var @binding_point(0, 0)
-}
-
-%f = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %3:ptr<storage, mat2x2<f32>, read_write> = access %ssbo, 0u
- %4:mat2x2<f32> = load %3
- %v:mat2x2<f32> = let %4
- %6:ptr<storage, mat2x2<f32>, read_write> = access %ssbo, 0u
- store %6, %v
- 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/out_of_order_decls/array/alias.wgsl.expected.ir.msl b/test/tint/out_of_order_decls/array/alias.wgsl.expected.ir.msl
index 61afed3..ae31a83 100644
--- a/test/tint/out_of_order_decls/array/alias.wgsl.expected.ir.msl
+++ b/test/tint/out_of_order_decls/array/alias.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,12 +12,12 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<int, 4>* A;
+};
-thread tint_array<int, 4> A = {};
fragment void f() {
- A[0] = 1;
+ thread tint_array<int, 4> A = {};
+ tint_module_vars_struct const tint_module_vars = {.A=(&A)};
+ (*tint_module_vars.A)[0] = 1;
}
-program_source:16:27: error: program scope variable must reside in constant address space
-thread tint_array<int, 4> A = {};
- ^
-
diff --git a/test/tint/out_of_order_decls/array/struct.wgsl.expected.ir.msl b/test/tint/out_of_order_decls/array/struct.wgsl.expected.ir.msl
index 6a4b89d..ff62074 100644
--- a/test/tint/out_of_order_decls/array/struct.wgsl.expected.ir.msl
+++ b/test/tint/out_of_order_decls/array/struct.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -17,12 +15,12 @@
struct S {
int m;
};
+struct tint_module_vars_struct {
+ thread tint_array<S, 4>* A;
+};
-thread tint_array<S, 4> A = {};
fragment void f() {
- A[0] = S{.m=1};
+ thread tint_array<S, 4> A = {};
+ tint_module_vars_struct const tint_module_vars = {.A=(&A)};
+ (*tint_module_vars.A)[0] = S{.m=1};
}
-program_source:19:25: error: program scope variable must reside in constant address space
-thread tint_array<S, 4> A = {};
- ^
-
diff --git a/test/tint/out_of_order_decls/func/var.wgsl.expected.ir.msl b/test/tint/out_of_order_decls/func/var.wgsl.expected.ir.msl
index afda7c5..7f63f6a 100644
--- a/test/tint/out_of_order_decls/func/var.wgsl.expected.ir.msl
+++ b/test/tint/out_of_order_decls/func/var.wgsl.expected.ir.msl
@@ -1,16 +1,11 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* a;
+};
-thread int a = 1;
fragment void f() {
- int const b = a;
+ thread int a = 1;
+ tint_module_vars_struct const tint_module_vars = {.a=(&a)};
+ int const b = (*tint_module_vars.a);
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int a = 1;
- ^
-program_source:6:13: warning: unused variable 'b' [-Wunused-variable]
- int const b = a;
- ^
-
diff --git a/test/tint/ptr_ref/access/matrix.wgsl.expected.ir.msl b/test/tint/ptr_ref/access/matrix.wgsl.expected.ir.msl
index ab4c76f..f50b494 100644
--- a/test/tint/ptr_ref/access/matrix.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/access/matrix.wgsl.expected.ir.msl
@@ -1,20 +1,8 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
kernel void tint_symbol() {
float3x3 m = float3x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f));
- thread float3* const v = m[1];
- v = float3(5.0f);
+ thread float3* const v = (&m[1]);
+ (*v) = float3(5.0f);
}
-program_source:6:24: error: cannot initialize a variable of type 'float3 *const' with an lvalue of type 'vec<float, 3>' (vector of 3 'float' values)
- thread float3* const v = m[1];
- ^ ~~~~
-program_source:7:5: error: cannot assign to variable 'v' with const-qualified type 'float3 *const'
- v = float3(5.0f);
- ~ ^
-program_source:6:24: note: variable 'v' declared const here
- thread float3* const v = m[1];
- ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
-
diff --git a/test/tint/ptr_ref/load/global/i32.spvasm.expected.ir.msl b/test/tint/ptr_ref/load/global/i32.spvasm.expected.ir.msl
index f08e7dd..a93fc0f 100644
--- a/test/tint/ptr_ref/load/global/i32.spvasm.expected.ir.msl
+++ b/test/tint/ptr_ref/load/global/i32.spvasm.expected.ir.msl
@@ -1,19 +1,14 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* I;
+};
-thread int I = 0;
-void main_1() {
- int const x_11 = (I + 1);
+void main_1(tint_module_vars_struct tint_module_vars) {
+ int const x_11 = ((*tint_module_vars.I) + 1);
}
kernel void tint_symbol() {
- main_1();
+ thread int I = 0;
+ tint_module_vars_struct const tint_module_vars = {.I=(&I)};
+ main_1(tint_module_vars);
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int I = 0;
- ^
-program_source:6:13: warning: unused variable 'x_11' [-Wunused-variable]
- int const x_11 = (I + 1);
- ^
-
diff --git a/test/tint/ptr_ref/load/global/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/global/i32.wgsl.expected.ir.msl
index 48870d6..80853a1 100644
--- a/test/tint/ptr_ref/load/global/i32.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/global/i32.wgsl.expected.ir.msl
@@ -1,17 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* I;
+};
-thread int I = 0;
kernel void tint_symbol() {
- int const i = I;
+ thread int I = 0;
+ tint_module_vars_struct const tint_module_vars = {.I=(&I)};
+ int const i = (*tint_module_vars.I);
int const u = (i + 1);
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int I = 0;
- ^
-program_source:7:13: warning: unused variable 'u' [-Wunused-variable]
- int const u = (i + 1);
- ^
-
diff --git a/test/tint/ptr_ref/load/global/struct_field.spvasm.expected.ir.msl b/test/tint/ptr_ref/load/global/struct_field.spvasm.expected.ir.msl
index ebcf5ae..5335a0a 100644
--- a/test/tint/ptr_ref/load/global/struct_field.spvasm.expected.ir.msl
+++ b/test/tint/ptr_ref/load/global/struct_field.spvasm.expected.ir.msl
@@ -1,20 +1,18 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct S {
int i;
};
+struct tint_module_vars_struct {
+ thread S* V;
+};
-thread S V = {};
-void main_1() {
+void main_1(tint_module_vars_struct tint_module_vars) {
int i = 0;
- i = V.i;
+ i = (*tint_module_vars.V).i;
}
kernel void tint_symbol() {
- main_1();
+ thread S V = {};
+ tint_module_vars_struct const tint_module_vars = {.V=(&V)};
+ main_1(tint_module_vars);
}
-program_source:7:10: error: program scope variable must reside in constant address space
-thread S V = {};
- ^
-
diff --git a/test/tint/ptr_ref/load/global/struct_field.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/global/struct_field.wgsl.expected.ir.msl
index 5941748..07b75d3 100644
--- a/test/tint/ptr_ref/load/global/struct_field.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/global/struct_field.wgsl.expected.ir.msl
@@ -1,19 +1,14 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct S {
int i;
};
+struct tint_module_vars_struct {
+ thread S* V;
+};
-thread S V = {};
kernel void tint_symbol() {
- int const i = V.i;
+ thread S V = {};
+ tint_module_vars_struct const tint_module_vars = {.V=(&V)};
+ int const i = (*tint_module_vars.V).i;
}
-program_source:7:10: error: program scope variable must reside in constant address space
-thread S V = {};
- ^
-program_source:9:13: warning: unused variable 'i' [-Wunused-variable]
- int const i = V.i;
- ^
-
diff --git a/test/tint/ptr_ref/load/local/ptr_function.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/local/ptr_function.wgsl.expected.ir.msl
index 7eab9cb..3c5aef3 100644
--- a/test/tint/ptr_ref/load/local/ptr_function.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/local/ptr_function.wgsl.expected.ir.msl
@@ -1,17 +1,8 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
kernel void tint_symbol() {
int i = 123;
- thread int* const p = i;
- int const u = (p + 1);
+ thread int* const p = (&i);
+ int const u = ((*p) + 1);
}
-program_source:6:21: error: cannot initialize a variable of type 'int *const' with an lvalue of type 'int'
- thread int* const p = i;
- ^ ~
-program_source:7:13: error: cannot initialize a variable of type 'const int' with an rvalue of type 'int *'
- int const u = (p + 1);
- ^ ~~~~~~~
-
diff --git a/test/tint/ptr_ref/load/local/ptr_private.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/local/ptr_private.wgsl.expected.ir.msl
index 1da1a69..e5c9cac 100644
--- a/test/tint/ptr_ref/load/local/ptr_private.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/local/ptr_private.wgsl.expected.ir.msl
@@ -1,17 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* i;
+};
-thread int i = 123;
kernel void tint_symbol() {
- thread int* const p = i;
- int const u = (p + 1);
+ thread int i = 123;
+ tint_module_vars_struct const tint_module_vars = {.i=(&i)};
+ thread int* const p = tint_module_vars.i;
+ int const u = ((*p) + 1);
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int i = 123;
- ^
-program_source:7:13: error: cannot initialize a variable of type 'const int' with an rvalue of type 'int *'
- int const u = (p + 1);
- ^ ~~~~~~~
-
diff --git a/test/tint/ptr_ref/load/local/ptr_storage.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/local/ptr_storage.wgsl.expected.ir.msl
index 14e76e5..965bab3 100644
--- a/test/tint/ptr_ref/load/local/ptr_storage.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/local/ptr_storage.wgsl.expected.ir.msl
@@ -1,28 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- a:i32 @offset(0)
+kernel void tint_symbol(device S* v [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.v=v};
+ device int* const p = (&(*tint_module_vars.v).a);
+ int const u = ((*p) + 1);
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %3:ptr<storage, i32, read_write> = access %v, 0u
- %p:ptr<storage, i32, read_write> = let %3
- %5:i32 = load %p
- %6:i32 = add %5, 1i
- %u:i32 = let %6
- 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/ptr_ref/load/local/ptr_uniform.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/local/ptr_uniform.wgsl.expected.ir.msl
index b062550..281ed39 100644
--- a/test/tint/ptr_ref/load/local/ptr_uniform.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/local/ptr_uniform.wgsl.expected.ir.msl
@@ -1,28 +1,14 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int a;
+};
+struct tint_module_vars_struct {
+ const constant S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- a:i32 @offset(0)
+kernel void tint_symbol(const constant S* v [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.v=v};
+ const constant int* const p = (&(*tint_module_vars.v).a);
+ int const u = ((*p) + 1);
}
-
-$B1: { # root
- %v:ptr<uniform, S, read> = var @binding_point(0, 0)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %3:ptr<uniform, i32, read> = access %v, 0u
- %p:ptr<uniform, i32, read> = let %3
- %5:i32 = load %p
- %6:i32 = add %5, 1i
- %u:i32 = let %6
- 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/ptr_ref/load/param/function/array_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/function/array_in_struct.wgsl.expected.ir.msl
index 2206f2b..63db61e 100644
--- a/test/tint/ptr_ref/load/param/function/array_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/function/array_in_struct.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -19,70 +17,9 @@
};
tint_array<int, 4> func(thread tint_array<int, 4>* const pointer) {
- return pointer;
+ return (*pointer);
}
kernel void tint_symbol() {
str F = {};
- tint_array<int, 4> const r = func(F.arr);
+ tint_array<int, 4> const r = func((&F.arr));
}
-program_source:20:10: error: no viable conversion from returned value of type 'tint_array<int, 4> *const' to function return type 'tint_array<int, 4>'
- return pointer;
- ^~~~~~~
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const tint_array<int, 4> &' for 1st argument; dereference the argument with *
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const tint_array<int, 4> &' for 1st argument; dereference the argument with *
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const tint_array<int, 4> &' for 1st argument; dereference the argument with *
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const device tint_array<int, 4> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const threadgroup tint_array<int, 4> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const constant tint_array<int, 4> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const device tint_array<int, 4> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const threadgroup tint_array<int, 4> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const constant tint_array<int, 4> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const constant tint_array<int, 4> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'tint_array<int, 4> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'device tint_array<int, 4> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'threadgroup tint_array<int, 4> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'tint_array<int, 4> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'device tint_array<int, 4> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'threadgroup tint_array<int, 4> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'tint_array<int, 4> &&' for 1st argument
-struct tint_array {
- ^
-program_source:24:32: error: no matching function for call to 'func'
- tint_array<int, 4> const r = func(F.arr);
- ^~~~
-program_source:19:20: note: candidate function not viable: no known conversion from 'tint_array<int, 4>' to 'tint_array<int, 4> *const' for 1st argument; take the address of the argument with &
-tint_array<int, 4> func(thread tint_array<int, 4>* const pointer) {
- ^
-
diff --git a/test/tint/ptr_ref/load/param/function/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/function/i32.wgsl.expected.ir.msl
index 8fde8df..27cb1ff 100644
--- a/test/tint/ptr_ref/load/param/function/i32.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/function/i32.wgsl.expected.ir.msl
@@ -1,22 +1,10 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
int func(thread int* const pointer) {
- return pointer;
+ return (*pointer);
}
kernel void tint_symbol() {
int F = 0;
- int const r = func(F);
+ int const r = func((&F));
}
-program_source:5:10: error: cannot initialize return object of type 'int' with an lvalue of type 'int *const'
- return pointer;
- ^~~~~~~
-program_source:9:17: error: no matching function for call to 'func'
- int const r = func(F);
- ^~~~
-program_source:4:5: note: candidate function not viable: no known conversion from 'int' to 'int *const' for 1st argument; take the address of the argument with &
-int func(thread int* const pointer) {
- ^
-
diff --git a/test/tint/ptr_ref/load/param/function/i32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/function/i32_in_struct.wgsl.expected.ir.msl
index f23c502..aeecff6 100644
--- a/test/tint/ptr_ref/load/param/function/i32_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/function/i32_in_struct.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct str {
@@ -7,19 +5,9 @@
};
int func(thread int* const pointer) {
- return pointer;
+ return (*pointer);
}
kernel void tint_symbol() {
str F = {};
- int const r = func(F.i);
+ int const r = func((&F.i));
}
-program_source:8:10: error: cannot initialize return object of type 'int' with an lvalue of type 'int *const'
- return pointer;
- ^~~~~~~
-program_source:12:17: error: no matching function for call to 'func'
- int const r = func(F.i);
- ^~~~
-program_source:7:5: note: candidate function not viable: no known conversion from 'int' to 'int *const' for 1st argument; take the address of the argument with &
-int func(thread int* const pointer) {
- ^
-
diff --git a/test/tint/ptr_ref/load/param/function/struct_in_array.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/function/struct_in_array.wgsl.expected.ir.msl
index af589aa..424ce33 100644
--- a/test/tint/ptr_ref/load/param/function/struct_in_array.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/function/struct_in_array.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct str {
@@ -19,70 +17,9 @@
str func(thread str* const pointer) {
- return pointer;
+ return (*pointer);
}
kernel void tint_symbol() {
tint_array<str, 4> F = {};
- str const r = func(F[2]);
+ str const r = func((&F[2]));
}
-program_source:20:10: error: no viable conversion from returned value of type 'str *const' to function return type 'str'
- return pointer;
- ^~~~~~~
-program_source:3:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const str &' for 1st argument; dereference the argument with *
-struct str {
- ^
-program_source:3:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const str &' for 1st argument; dereference the argument with *
-struct str {
- ^
-program_source:3:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const str &' for 1st argument; dereference the argument with *
-struct str {
- ^
-program_source:3:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const device str &' for 1st argument
-struct str {
- ^
-program_source:3:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const threadgroup str &' for 1st argument
-struct str {
- ^
-program_source:3:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const constant str &' for 1st argument
-struct str {
- ^
-program_source:3:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const device str &' for 1st argument
-struct str {
- ^
-program_source:3:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const threadgroup str &' for 1st argument
-struct str {
- ^
-program_source:3:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const constant str &' for 1st argument
-struct str {
- ^
-program_source:3:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const constant str &' for 1st argument
-struct str {
- ^
-program_source:3:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'str *const' to 'str &&' for 1st argument
-struct str {
- ^
-program_source:3:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'str *const' to 'device str &&' for 1st argument
-struct str {
- ^
-program_source:3:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'str *const' to 'threadgroup str &&' for 1st argument
-struct str {
- ^
-program_source:3:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'str *const' to 'str &&' for 1st argument
-struct str {
- ^
-program_source:3:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'str *const' to 'device str &&' for 1st argument
-struct str {
- ^
-program_source:3:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'str *const' to 'threadgroup str &&' for 1st argument
-struct str {
- ^
-program_source:3:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'str *const' to 'str &&' for 1st argument
-struct str {
- ^
-program_source:24:17: error: no matching function for call to 'func'
- str const r = func(F[2]);
- ^~~~
-program_source:19:5: note: candidate function not viable: no known conversion from 'str' to 'str *const' for 1st argument; take the address of the argument with &
-str func(thread str* const pointer) {
- ^
-
diff --git a/test/tint/ptr_ref/load/param/function/vec2_f32_in_mat2x2.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/function/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
index a2b85d0..2efe96d 100644
--- a/test/tint/ptr_ref/load/param/function/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/function/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
@@ -1,22 +1,10 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
float2 func(thread float2* const pointer) {
- return pointer;
+ return (*pointer);
}
kernel void tint_symbol() {
float2x2 F = float2x2(0.0f);
- float2 const r = func(F[1]);
+ float2 const r = func((&F[1]));
}
-program_source:5:10: error: cannot initialize return object of type 'float2' (vector of 2 'float' values) with an lvalue of type 'float2 *const'
- return pointer;
- ^~~~~~~
-program_source:9:20: error: no matching function for call to 'func'
- float2 const r = func(F[1]);
- ^~~~
-program_source:4:8: note: candidate function not viable: no known conversion from 'vec<float, 2>' (vector of 2 'float' values) to 'float2 *const' for 1st argument; take the address of the argument with &
-float2 func(thread float2* const pointer) {
- ^
-
diff --git a/test/tint/ptr_ref/load/param/function/vec4_f32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/function/vec4_f32.wgsl.expected.ir.msl
index b4e02d6..54b6b9f 100644
--- a/test/tint/ptr_ref/load/param/function/vec4_f32.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/function/vec4_f32.wgsl.expected.ir.msl
@@ -1,22 +1,10 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
float4 func(thread float4* const pointer) {
- return pointer;
+ return (*pointer);
}
kernel void tint_symbol() {
float4 F = 0.0f;
- float4 const r = func(F);
+ float4 const r = func((&F));
}
-program_source:5:10: error: cannot initialize return object of type 'float4' (vector of 4 'float' values) with an lvalue of type 'float4 *const'
- return pointer;
- ^~~~~~~
-program_source:9:20: error: no matching function for call to 'func'
- float4 const r = func(F);
- ^~~~
-program_source:4:8: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'float4 *const' for 1st argument; take the address of the argument with &
-float4 func(thread float4* const pointer) {
- ^
-
diff --git a/test/tint/ptr_ref/load/param/function/vec4_f32_in_mat2x4.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/function/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
index fdb732b..22ed730 100644
--- a/test/tint/ptr_ref/load/param/function/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/function/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
@@ -1,22 +1,10 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
float4 func(thread float4* const pointer) {
- return pointer;
+ return (*pointer);
}
kernel void tint_symbol() {
float2x4 F = float2x4(0.0f);
- float4 const r = func(F[1]);
+ float4 const r = func((&F[1]));
}
-program_source:5:10: error: cannot initialize return object of type 'float4' (vector of 4 'float' values) with an lvalue of type 'float4 *const'
- return pointer;
- ^~~~~~~
-program_source:9:20: error: no matching function for call to 'func'
- float4 const r = func(F[1]);
- ^~~~
-program_source:4:8: note: candidate function not viable: no known conversion from 'vec<float, 4>' (vector of 4 'float' values) to 'float4 *const' for 1st argument; take the address of the argument with &
-float4 func(thread float4* const pointer) {
- ^
-
diff --git a/test/tint/ptr_ref/load/param/function/vec4_f32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/function/vec4_f32_in_struct.wgsl.expected.ir.msl
index 40bdda9..61e7278 100644
--- a/test/tint/ptr_ref/load/param/function/vec4_f32_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/function/vec4_f32_in_struct.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct str {
@@ -7,19 +5,9 @@
};
float4 func(thread float4* const pointer) {
- return pointer;
+ return (*pointer);
}
kernel void tint_symbol() {
str F = {};
- float4 const r = func(F.i);
+ float4 const r = func((&F.i));
}
-program_source:8:10: error: cannot initialize return object of type 'float4' (vector of 4 'float' values) with an lvalue of type 'float4 *const'
- return pointer;
- ^~~~~~~
-program_source:12:20: error: no matching function for call to 'func'
- float4 const r = func(F.i);
- ^~~~
-program_source:7:8: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'float4 *const' for 1st argument; take the address of the argument with &
-float4 func(thread float4* const pointer) {
- ^
-
diff --git a/test/tint/ptr_ref/load/param/private/array_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/private/array_in_struct.wgsl.expected.ir.msl
index bccad69..298deac 100644
--- a/test/tint/ptr_ref/load/param/private/array_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/private/array_in_struct.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -17,72 +15,15 @@
struct str {
tint_array<int, 4> arr;
};
+struct tint_module_vars_struct {
+ thread str* P;
+};
-thread str P = {};
tint_array<int, 4> func(thread tint_array<int, 4>* const pointer) {
- return pointer;
+ return (*pointer);
}
kernel void tint_symbol() {
- tint_array<int, 4> const r = func(P.arr);
+ thread str P = {};
+ tint_module_vars_struct const tint_module_vars = {.P=(&P)};
+ tint_array<int, 4> const r = func((&(*tint_module_vars.P).arr));
}
-program_source:19:12: error: program scope variable must reside in constant address space
-thread str P = {};
- ^
-program_source:21:10: error: no viable conversion from returned value of type 'tint_array<int, 4> *const' to function return type 'tint_array<int, 4>'
- return pointer;
- ^~~~~~~
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const tint_array<int, 4> &' for 1st argument; dereference the argument with *
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const tint_array<int, 4> &' for 1st argument; dereference the argument with *
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const tint_array<int, 4> &' for 1st argument; dereference the argument with *
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const device tint_array<int, 4> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const threadgroup tint_array<int, 4> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const constant tint_array<int, 4> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const device tint_array<int, 4> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const threadgroup tint_array<int, 4> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const constant tint_array<int, 4> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'const constant tint_array<int, 4> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'tint_array<int, 4> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'device tint_array<int, 4> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'threadgroup tint_array<int, 4> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'tint_array<int, 4> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'device tint_array<int, 4> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'threadgroup tint_array<int, 4> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'tint_array<int, 4> *const' to 'tint_array<int, 4> &&' for 1st argument
-struct tint_array {
- ^
-program_source:24:28: warning: unused variable 'r' [-Wunused-variable]
- tint_array<int, 4> const r = func(P.arr);
- ^
-
diff --git a/test/tint/ptr_ref/load/param/private/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/private/i32.wgsl.expected.ir.msl
index 3788448..4030324 100644
--- a/test/tint/ptr_ref/load/param/private/i32.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/private/i32.wgsl.expected.ir.msl
@@ -1,22 +1,14 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* P;
+};
-thread int P = 0;
int func(thread int* const pointer) {
- return pointer;
+ return (*pointer);
}
kernel void tint_symbol() {
- int const r = func(P);
+ thread int P = 0;
+ tint_module_vars_struct const tint_module_vars = {.P=(&P)};
+ int const r = func(tint_module_vars.P);
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int P = 0;
- ^
-program_source:6:10: error: cannot initialize return object of type 'int' with an lvalue of type 'int *const'
- return pointer;
- ^~~~~~~
-program_source:9:13: warning: unused variable 'r' [-Wunused-variable]
- int const r = func(P);
- ^
-
diff --git a/test/tint/ptr_ref/load/param/private/i32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/private/i32_in_struct.wgsl.expected.ir.msl
index 41906b5..c68a38e 100644
--- a/test/tint/ptr_ref/load/param/private/i32_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/private/i32_in_struct.wgsl.expected.ir.msl
@@ -1,25 +1,17 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct str {
int i;
};
+struct tint_module_vars_struct {
+ thread str* P;
+};
-thread str P = {};
int func(thread int* const pointer) {
- return pointer;
+ return (*pointer);
}
kernel void tint_symbol() {
- int const r = func(P.i);
+ thread str P = {};
+ tint_module_vars_struct const tint_module_vars = {.P=(&P)};
+ int const r = func((&(*tint_module_vars.P).i));
}
-program_source:7:12: error: program scope variable must reside in constant address space
-thread str P = {};
- ^
-program_source:9:10: error: cannot initialize return object of type 'int' with an lvalue of type 'int *const'
- return pointer;
- ^~~~~~~
-program_source:12:13: warning: unused variable 'r' [-Wunused-variable]
- int const r = func(P.i);
- ^
-
diff --git a/test/tint/ptr_ref/load/param/private/struct_in_array.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/private/struct_in_array.wgsl.expected.ir.msl
index 808d5b3..39f93db 100644
--- a/test/tint/ptr_ref/load/param/private/struct_in_array.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/private/struct_in_array.wgsl.expected.ir.msl
@@ -1,7 +1,8 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct str {
+ int i;
+};
template<typename T, size_t N>
struct tint_array {
const constant T& operator[](size_t i) const constant { return elements[i]; }
@@ -14,75 +15,15 @@
T elements[N];
};
-struct str {
- int i;
+struct tint_module_vars_struct {
+ thread tint_array<str, 4>* P;
};
-thread tint_array<str, 4> P = {};
str func(thread str* const pointer) {
- return pointer;
+ return (*pointer);
}
kernel void tint_symbol() {
- str const r = func(P[2]);
+ thread tint_array<str, 4> P = {};
+ tint_module_vars_struct const tint_module_vars = {.P=(&P)};
+ str const r = func((&(*tint_module_vars.P)[2]));
}
-program_source:19:27: error: program scope variable must reside in constant address space
-thread tint_array<str, 4> P = {};
- ^
-program_source:21:10: error: no viable conversion from returned value of type 'str *const' to function return type 'str'
- return pointer;
- ^~~~~~~
-program_source:15:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const str &' for 1st argument; dereference the argument with *
-struct str {
- ^
-program_source:15:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const str &' for 1st argument; dereference the argument with *
-struct str {
- ^
-program_source:15:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const str &' for 1st argument; dereference the argument with *
-struct str {
- ^
-program_source:15:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const device str &' for 1st argument
-struct str {
- ^
-program_source:15:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const threadgroup str &' for 1st argument
-struct str {
- ^
-program_source:15:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const constant str &' for 1st argument
-struct str {
- ^
-program_source:15:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const device str &' for 1st argument
-struct str {
- ^
-program_source:15:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const threadgroup str &' for 1st argument
-struct str {
- ^
-program_source:15:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const constant str &' for 1st argument
-struct str {
- ^
-program_source:15:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'str *const' to 'const constant str &' for 1st argument
-struct str {
- ^
-program_source:15:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'str *const' to 'str &&' for 1st argument
-struct str {
- ^
-program_source:15:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'str *const' to 'device str &&' for 1st argument
-struct str {
- ^
-program_source:15:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'str *const' to 'threadgroup str &&' for 1st argument
-struct str {
- ^
-program_source:15:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'str *const' to 'str &&' for 1st argument
-struct str {
- ^
-program_source:15:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'str *const' to 'device str &&' for 1st argument
-struct str {
- ^
-program_source:15:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'str *const' to 'threadgroup str &&' for 1st argument
-struct str {
- ^
-program_source:15:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'str *const' to 'str &&' for 1st argument
-struct str {
- ^
-program_source:24:13: warning: unused variable 'r' [-Wunused-variable]
- str const r = func(P[2]);
- ^
-
diff --git a/test/tint/ptr_ref/load/param/private/vec2_f32_in_mat2x2.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/private/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
index 27f0a3c..4ebd764 100644
--- a/test/tint/ptr_ref/load/param/private/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/private/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
@@ -1,22 +1,14 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x2* P;
+};
-thread float2x2 P = float2x2(0.0f);
float2 func(thread float2* const pointer) {
- return pointer;
+ return (*pointer);
}
kernel void tint_symbol() {
- float2 const r = func(P[1]);
+ thread float2x2 P = float2x2(0.0f);
+ tint_module_vars_struct const tint_module_vars = {.P=(&P)};
+ float2 const r = func((&(*tint_module_vars.P)[1]));
}
-program_source:4:17: error: program scope variable must reside in constant address space
-thread float2x2 P = float2x2(0.0f);
- ^
-program_source:6:10: error: cannot initialize return object of type 'float2' (vector of 2 'float' values) with an lvalue of type 'float2 *const'
- return pointer;
- ^~~~~~~
-program_source:9:16: warning: unused variable 'r' [-Wunused-variable]
- float2 const r = func(P[1]);
- ^
-
diff --git a/test/tint/ptr_ref/load/param/private/vec4_f32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/private/vec4_f32.wgsl.expected.ir.msl
index f709c6a..aec9649 100644
--- a/test/tint/ptr_ref/load/param/private/vec4_f32.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/private/vec4_f32.wgsl.expected.ir.msl
@@ -1,22 +1,14 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float4* P;
+};
-thread float4 P = 0.0f;
float4 func(thread float4* const pointer) {
- return pointer;
+ return (*pointer);
}
kernel void tint_symbol() {
- float4 const r = func(P);
+ thread float4 P = 0.0f;
+ tint_module_vars_struct const tint_module_vars = {.P=(&P)};
+ float4 const r = func(tint_module_vars.P);
}
-program_source:4:15: error: program scope variable must reside in constant address space
-thread float4 P = 0.0f;
- ^
-program_source:6:10: error: cannot initialize return object of type 'float4' (vector of 4 'float' values) with an lvalue of type 'float4 *const'
- return pointer;
- ^~~~~~~
-program_source:9:16: warning: unused variable 'r' [-Wunused-variable]
- float4 const r = func(P);
- ^
-
diff --git a/test/tint/ptr_ref/load/param/private/vec4_f32_in_mat2x4.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/private/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
index 69bce59..676b6ec 100644
--- a/test/tint/ptr_ref/load/param/private/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/private/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
@@ -1,22 +1,14 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x4* P;
+};
-thread float2x4 P = float2x4(0.0f);
float4 func(thread float4* const pointer) {
- return pointer;
+ return (*pointer);
}
kernel void tint_symbol() {
- float4 const r = func(P[1]);
+ thread float2x4 P = float2x4(0.0f);
+ tint_module_vars_struct const tint_module_vars = {.P=(&P)};
+ float4 const r = func((&(*tint_module_vars.P)[1]));
}
-program_source:4:17: error: program scope variable must reside in constant address space
-thread float2x4 P = float2x4(0.0f);
- ^
-program_source:6:10: error: cannot initialize return object of type 'float4' (vector of 4 'float' values) with an lvalue of type 'float4 *const'
- return pointer;
- ^~~~~~~
-program_source:9:16: warning: unused variable 'r' [-Wunused-variable]
- float4 const r = func(P[1]);
- ^
-
diff --git a/test/tint/ptr_ref/load/param/private/vec4_f32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/private/vec4_f32_in_struct.wgsl.expected.ir.msl
index 0e67ae3..19ff6e7 100644
--- a/test/tint/ptr_ref/load/param/private/vec4_f32_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/private/vec4_f32_in_struct.wgsl.expected.ir.msl
@@ -1,25 +1,17 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct str {
float4 i;
};
+struct tint_module_vars_struct {
+ thread str* P;
+};
-thread str P = {};
float4 func(thread float4* const pointer) {
- return pointer;
+ return (*pointer);
}
kernel void tint_symbol() {
- float4 const r = func(P.i);
+ thread str P = {};
+ tint_module_vars_struct const tint_module_vars = {.P=(&P)};
+ float4 const r = func((&(*tint_module_vars.P).i));
}
-program_source:7:12: error: program scope variable must reside in constant address space
-thread str P = {};
- ^
-program_source:9:10: error: cannot initialize return object of type 'float4' (vector of 4 'float' values) with an lvalue of type 'float4 *const'
- return pointer;
- ^~~~~~~
-program_source:12:16: warning: unused variable 'r' [-Wunused-variable]
- float4 const r = func(P.i);
- ^
-
diff --git a/test/tint/ptr_ref/load/param/ptr.spvasm.expected.ir.msl b/test/tint/ptr_ref/load/param/ptr.spvasm.expected.ir.msl
index fe78d03..4e5d45e 100644
--- a/test/tint/ptr_ref/load/param/ptr.spvasm.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/ptr.spvasm.expected.ir.msl
@@ -1,28 +1,16 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
int func(int value, thread int* const pointer) {
- int const x_9 = pointer;
+ int const x_9 = (*pointer);
return (value + x_9);
}
void main_1() {
int i = 0;
i = 123;
int const x_19 = i;
- int const x_18 = func(x_19, i);
+ int const x_18 = func(x_19, (&i));
}
kernel void tint_symbol() {
main_1();
}
-program_source:5:13: error: cannot initialize a variable of type 'const int' with an lvalue of type 'int *const'
- int const x_9 = pointer;
- ^ ~~~~~~~
-program_source:12:20: error: no matching function for call to 'func'
- int const x_18 = func(x_19, i);
- ^~~~
-program_source:4:5: note: candidate function not viable: no known conversion from 'int' to 'int *const' for 2nd argument; take the address of the argument with &
-int func(int value, thread int* const pointer) {
- ^
-
diff --git a/test/tint/ptr_ref/load/param/ptr.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/ptr.wgsl.expected.ir.msl
index 6d16285..6b500df 100644
--- a/test/tint/ptr_ref/load/param/ptr.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/ptr.wgsl.expected.ir.msl
@@ -1,22 +1,10 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
int func(int value, thread int* const pointer) {
- return (value + pointer);
+ return (value + (*pointer));
}
kernel void tint_symbol() {
int i = 123;
- int const r = func(i, i);
+ int const r = func(i, (&i));
}
-program_source:5:10: error: cannot initialize return object of type 'int' with an rvalue of type 'int *'
- return (value + pointer);
- ^~~~~~~~~~~~~~~~~
-program_source:9:17: error: no matching function for call to 'func'
- int const r = func(i, i);
- ^~~~
-program_source:4:5: note: candidate function not viable: no known conversion from 'int' to 'int *const' for 2nd argument; take the address of the argument with &
-int func(int value, thread int* const pointer) {
- ^
-
diff --git a/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.ir.msl
index 6472c06..4cb3626 100644
--- a/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.ir.msl
@@ -1,32 +1,28 @@
-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: str = struct @align(4) {
- arr:array<i32, 4> @offset(0)
-}
+struct str {
+ tint_array<int, 4> arr;
+};
+struct tint_module_vars_struct {
+ const device str* S;
+};
-$B1: { # root
- %S:ptr<storage, str, read> = var @binding_point(0, 0)
+tint_array<int, 4> func(const device tint_array<int, 4>* const pointer) {
+ return (*pointer);
}
-
-%func = func(%pointer:ptr<storage, array<i32, 4>, read>):array<i32, 4> {
- $B2: {
- %4:array<i32, 4> = load %pointer
- ret %4
- }
+kernel void tint_symbol(const device str* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ tint_array<int, 4> const r = func((&(*tint_module_vars.S).arr));
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:ptr<storage, array<i32, 4>, read> = access %S, 0u
- %7:array<i32, 4> = call %func, %6
- %r:array<i32, 4> = let %7
- 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/ptr_ref/load/param/storage/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/storage/i32.wgsl.expected.ir.msl
index b8fa44a..3441b21 100644
--- a/test/tint/ptr_ref/load/param/storage/i32.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/storage/i32.wgsl.expected.ir.msl
@@ -1,27 +1,13 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device int* S;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %S:ptr<storage, i32, read> = var @binding_point(0, 0)
+int func(const device int* const pointer) {
+ return (*pointer);
}
-
-%func = func(%pointer:ptr<storage, i32, read>):i32 {
- $B2: {
- %4:i32 = load %pointer
- ret %4
- }
+kernel void tint_symbol(const device int* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ int const r = func(tint_module_vars.S);
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:i32 = call %func, %S
- %r:i32 = let %6
- 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/ptr_ref/load/param/storage/i32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/storage/i32_in_struct.wgsl.expected.ir.msl
index 0593dcd..161ea8ec 100644
--- a/test/tint/ptr_ref/load/param/storage/i32_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/storage/i32_in_struct.wgsl.expected.ir.msl
@@ -1,32 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct str {
+ int i;
+};
+struct tint_module_vars_struct {
+ const device str* S;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: str = struct @align(4) {
- i:i32 @offset(0)
+int func(const device int* const pointer) {
+ return (*pointer);
}
-
-$B1: { # root
- %S:ptr<storage, str, read> = var @binding_point(0, 0)
+kernel void tint_symbol(const device str* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ int const r = func((&(*tint_module_vars.S).i));
}
-
-%func = func(%pointer:ptr<storage, i32, read>):i32 {
- $B2: {
- %4:i32 = load %pointer
- ret %4
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:ptr<storage, i32, read> = access %S, 0u
- %7:i32 = call %func, %6
- %r:i32 = let %7
- 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/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.ir.msl
index 3004ce1..48224ae 100644
--- a/test/tint/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.ir.msl
@@ -1,32 +1,28 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct str {
+ int 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: str = struct @align(4) {
- i:i32 @offset(0)
-}
+struct tint_module_vars_struct {
+ const device tint_array<str, 4>* S;
+};
-$B1: { # root
- %S:ptr<storage, array<str, 4>, read> = var @binding_point(0, 0)
+str func(const device str* const pointer) {
+ return (*pointer);
}
-
-%func = func(%pointer:ptr<storage, str, read>):str {
- $B2: {
- %4:str = load %pointer
- ret %4
- }
+kernel void tint_symbol(const device tint_array<str, 4>* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ str const r = func((&(*tint_module_vars.S)[2]));
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:ptr<storage, str, read> = access %S, 2i
- %7:str = call %func, %6
- %r:str = let %7
- 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/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
index 982f9f0..053c395 100644
--- a/test/tint/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
@@ -1,28 +1,13 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device float2x2* S;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %S:ptr<storage, mat2x2<f32>, read> = var @binding_point(0, 0)
+float2 func(const device float2* const pointer) {
+ return (*pointer);
}
-
-%func = func(%pointer:ptr<storage, vec2<f32>, read>):vec2<f32> {
- $B2: {
- %4:vec2<f32> = load %pointer
- ret %4
- }
+kernel void tint_symbol(const device float2x2* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ float2 const r = func((&(*tint_module_vars.S)[1]));
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:ptr<storage, vec2<f32>, read> = access %S, 1i
- %7:vec2<f32> = call %func, %6
- %r:vec2<f32> = let %7
- 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/ptr_ref/load/param/storage/vec4_f32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/storage/vec4_f32.wgsl.expected.ir.msl
index 8a1a501..73a59a6 100644
--- a/test/tint/ptr_ref/load/param/storage/vec4_f32.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/storage/vec4_f32.wgsl.expected.ir.msl
@@ -1,27 +1,13 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device float4* S;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %S:ptr<storage, vec4<f32>, read> = var @binding_point(0, 0)
+float4 func(const device float4* const pointer) {
+ return (*pointer);
}
-
-%func = func(%pointer:ptr<storage, vec4<f32>, read>):vec4<f32> {
- $B2: {
- %4:vec4<f32> = load %pointer
- ret %4
- }
+kernel void tint_symbol(const device float4* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ float4 const r = func(tint_module_vars.S);
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:vec4<f32> = call %func, %S
- %r:vec4<f32> = let %6
- 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/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
index 84f0808..b81ae3b 100644
--- a/test/tint/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
@@ -1,28 +1,13 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const device float2x4* S;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %S:ptr<storage, mat2x4<f32>, read> = var @binding_point(0, 0)
+float4 func(const device float4* const pointer) {
+ return (*pointer);
}
-
-%func = func(%pointer:ptr<storage, vec4<f32>, read>):vec4<f32> {
- $B2: {
- %4:vec4<f32> = load %pointer
- ret %4
- }
+kernel void tint_symbol(const device float2x4* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ float4 const r = func((&(*tint_module_vars.S)[1]));
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:ptr<storage, vec4<f32>, read> = access %S, 1i
- %7:vec4<f32> = call %func, %6
- %r:vec4<f32> = let %7
- 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/ptr_ref/load/param/storage/vec4_f32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/storage/vec4_f32_in_struct.wgsl.expected.ir.msl
index cada6c2..924b036 100644
--- a/test/tint/ptr_ref/load/param/storage/vec4_f32_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/storage/vec4_f32_in_struct.wgsl.expected.ir.msl
@@ -1,32 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct str {
+ float4 i;
+};
+struct tint_module_vars_struct {
+ const device str* S;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: str = struct @align(16) {
- i:vec4<f32> @offset(0)
+float4 func(const device float4* const pointer) {
+ return (*pointer);
}
-
-$B1: { # root
- %S:ptr<storage, str, read> = var @binding_point(0, 0)
+kernel void tint_symbol(const device str* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ float4 const r = func((&(*tint_module_vars.S).i));
}
-
-%func = func(%pointer:ptr<storage, vec4<f32>, read>):vec4<f32> {
- $B2: {
- %4:vec4<f32> = load %pointer
- ret %4
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:ptr<storage, vec4<f32>, read> = access %S, 0u
- %7:vec4<f32> = call %func, %6
- %r:vec4<f32> = let %7
- 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/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.ir.msl
index 6218623..b70d640 100644
--- a/test/tint/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.ir.msl
@@ -1,32 +1,28 @@
-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: str = struct @align(16) {
- arr:array<vec4<i32>, 4> @offset(0)
-}
+struct str {
+ tint_array<int4, 4> arr;
+};
+struct tint_module_vars_struct {
+ const constant str* S;
+};
-$B1: { # root
- %S:ptr<uniform, str, read> = var @binding_point(0, 0)
+tint_array<int4, 4> func(const constant tint_array<int4, 4>* const pointer) {
+ return (*pointer);
}
-
-%func = func(%pointer:ptr<uniform, array<vec4<i32>, 4>, read>):array<vec4<i32>, 4> {
- $B2: {
- %4:array<vec4<i32>, 4> = load %pointer
- ret %4
- }
+kernel void tint_symbol(const constant str* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ tint_array<int4, 4> const r = func((&(*tint_module_vars.S).arr));
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:ptr<uniform, array<vec4<i32>, 4>, read> = access %S, 0u
- %7:array<vec4<i32>, 4> = call %func, %6
- %r:array<vec4<i32>, 4> = let %7
- 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/ptr_ref/load/param/uniform/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/uniform/i32.wgsl.expected.ir.msl
index 2a0a0992..3960789 100644
--- a/test/tint/ptr_ref/load/param/uniform/i32.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/uniform/i32.wgsl.expected.ir.msl
@@ -1,27 +1,13 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant int* S;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %S:ptr<uniform, i32, read> = var @binding_point(0, 0)
+int func(const constant int* const pointer) {
+ return (*pointer);
}
-
-%func = func(%pointer:ptr<uniform, i32, read>):i32 {
- $B2: {
- %4:i32 = load %pointer
- ret %4
- }
+kernel void tint_symbol(const constant int* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ int const r = func(tint_module_vars.S);
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:i32 = call %func, %S
- %r:i32 = let %6
- 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/ptr_ref/load/param/uniform/i32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/uniform/i32_in_struct.wgsl.expected.ir.msl
index d3cb467..8401c5a 100644
--- a/test/tint/ptr_ref/load/param/uniform/i32_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/uniform/i32_in_struct.wgsl.expected.ir.msl
@@ -1,32 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct str {
+ int i;
+};
+struct tint_module_vars_struct {
+ const constant str* S;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: str = struct @align(4) {
- i:i32 @offset(0)
+int func(const constant int* const pointer) {
+ return (*pointer);
}
-
-$B1: { # root
- %S:ptr<uniform, str, read> = var @binding_point(0, 0)
+kernel void tint_symbol(const constant str* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ int const r = func((&(*tint_module_vars.S).i));
}
-
-%func = func(%pointer:ptr<uniform, i32, read>):i32 {
- $B2: {
- %4:i32 = load %pointer
- ret %4
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:ptr<uniform, i32, read> = access %S, 0u
- %7:i32 = call %func, %6
- %r:i32 = let %7
- 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/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.ir.msl
index e70fe7d..ae82463 100644
--- a/test/tint/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.ir.msl
@@ -1,32 +1,28 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct str {
+ int4 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: str = struct @align(16) {
- i:vec4<i32> @offset(0)
-}
+struct tint_module_vars_struct {
+ const constant tint_array<str, 4>* S;
+};
-$B1: { # root
- %S:ptr<uniform, array<str, 4>, read> = var @binding_point(0, 0)
+str func(const constant str* const pointer) {
+ return (*pointer);
}
-
-%func = func(%pointer:ptr<uniform, str, read>):str {
- $B2: {
- %4:str = load %pointer
- ret %4
- }
+kernel void tint_symbol(const constant tint_array<str, 4>* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ str const r = func((&(*tint_module_vars.S)[2]));
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:ptr<uniform, str, read> = access %S, 2i
- %7:str = call %func, %6
- %r:str = let %7
- 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/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
index 7b92425..bfa4dcf 100644
--- a/test/tint/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
@@ -1,28 +1,13 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float2x2* S;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %S:ptr<uniform, mat2x2<f32>, read> = var @binding_point(0, 0)
+float2 func(const constant float2* const pointer) {
+ return (*pointer);
}
-
-%func = func(%pointer:ptr<uniform, vec2<f32>, read>):vec2<f32> {
- $B2: {
- %4:vec2<f32> = load %pointer
- ret %4
- }
+kernel void tint_symbol(const constant float2x2* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ float2 const r = func((&(*tint_module_vars.S)[1]));
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:ptr<uniform, vec2<f32>, read> = access %S, 1i
- %7:vec2<f32> = call %func, %6
- %r:vec2<f32> = let %7
- 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/ptr_ref/load/param/uniform/vec4_f32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/uniform/vec4_f32.wgsl.expected.ir.msl
index 499fa01..e720076 100644
--- a/test/tint/ptr_ref/load/param/uniform/vec4_f32.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/uniform/vec4_f32.wgsl.expected.ir.msl
@@ -1,27 +1,13 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float4* S;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %S:ptr<uniform, vec4<f32>, read> = var @binding_point(0, 0)
+float4 func(const constant float4* const pointer) {
+ return (*pointer);
}
-
-%func = func(%pointer:ptr<uniform, vec4<f32>, read>):vec4<f32> {
- $B2: {
- %4:vec4<f32> = load %pointer
- ret %4
- }
+kernel void tint_symbol(const constant float4* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ float4 const r = func(tint_module_vars.S);
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:vec4<f32> = call %func, %S
- %r:vec4<f32> = let %6
- 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/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
index 4edcc1e..91233de 100644
--- a/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
@@ -1,28 +1,13 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float2x4* S;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %S:ptr<uniform, mat2x4<f32>, read> = var @binding_point(0, 0)
+float4 func(const constant float4* const pointer) {
+ return (*pointer);
}
-
-%func = func(%pointer:ptr<uniform, vec4<f32>, read>):vec4<f32> {
- $B2: {
- %4:vec4<f32> = load %pointer
- ret %4
- }
+kernel void tint_symbol(const constant float2x4* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ float4 const r = func((&(*tint_module_vars.S)[1]));
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:ptr<uniform, vec4<f32>, read> = access %S, 1i
- %7:vec4<f32> = call %func, %6
- %r:vec4<f32> = let %7
- 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/ptr_ref/load/param/uniform/vec4_f32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_struct.wgsl.expected.ir.msl
index eb30111..62f4c4e 100644
--- a/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_struct.wgsl.expected.ir.msl
@@ -1,32 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct str {
+ float4 i;
+};
+struct tint_module_vars_struct {
+ const constant str* S;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: str = struct @align(16) {
- i:vec4<f32> @offset(0)
+float4 func(const constant float4* const pointer) {
+ return (*pointer);
}
-
-$B1: { # root
- %S:ptr<uniform, str, read> = var @binding_point(0, 0)
+kernel void tint_symbol(const constant str* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ float4 const r = func((&(*tint_module_vars.S).i));
}
-
-%func = func(%pointer:ptr<uniform, vec4<f32>, read>):vec4<f32> {
- $B2: {
- %4:vec4<f32> = load %pointer
- ret %4
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:ptr<uniform, vec4<f32>, read> = access %S, 0u
- %7:vec4<f32> = call %func, %6
- %r:vec4<f32> = let %7
- 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/ptr_ref/store/global/i32.spvasm.expected.ir.msl b/test/tint/ptr_ref/store/global/i32.spvasm.expected.ir.msl
index 9549b00..add96d4 100644
--- a/test/tint/ptr_ref/store/global/i32.spvasm.expected.ir.msl
+++ b/test/tint/ptr_ref/store/global/i32.spvasm.expected.ir.msl
@@ -1,17 +1,15 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* I;
+};
-thread int I = 0;
-void main_1() {
- I = 123;
- I = 123;
+void main_1(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.I) = 123;
+ (*tint_module_vars.I) = 123;
}
kernel void tint_symbol() {
- main_1();
+ thread int I = 0;
+ tint_module_vars_struct const tint_module_vars = {.I=(&I)};
+ main_1(tint_module_vars);
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int I = 0;
- ^
-
diff --git a/test/tint/ptr_ref/store/global/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/global/i32.wgsl.expected.ir.msl
index 77f0be6..b1b1710 100644
--- a/test/tint/ptr_ref/store/global/i32.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/global/i32.wgsl.expected.ir.msl
@@ -1,14 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* I;
+};
-thread int I = 0;
kernel void tint_symbol() {
- I = 123;
- I = 123;
+ thread int I = 0;
+ tint_module_vars_struct const tint_module_vars = {.I=(&I)};
+ (*tint_module_vars.I) = 123;
+ (*tint_module_vars.I) = 123;
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int I = 0;
- ^
-
diff --git a/test/tint/ptr_ref/store/global/struct_field.spvasm.expected.ir.msl b/test/tint/ptr_ref/store/global/struct_field.spvasm.expected.ir.msl
index deec3d5..cff29e8 100644
--- a/test/tint/ptr_ref/store/global/struct_field.spvasm.expected.ir.msl
+++ b/test/tint/ptr_ref/store/global/struct_field.spvasm.expected.ir.msl
@@ -1,19 +1,17 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct S {
int i;
};
+struct tint_module_vars_struct {
+ thread S* V;
+};
-thread S V = {};
-void main_1() {
- V.i = 5;
+void main_1(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.V).i = 5;
}
kernel void tint_symbol() {
- main_1();
+ thread S V = {};
+ tint_module_vars_struct const tint_module_vars = {.V=(&V)};
+ main_1(tint_module_vars);
}
-program_source:7:10: error: program scope variable must reside in constant address space
-thread S V = {};
- ^
-
diff --git a/test/tint/ptr_ref/store/local/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/local/i32.wgsl.expected.ir.msl
index aa60be5..86d7b9e 100644
--- a/test/tint/ptr_ref/store/local/i32.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/local/i32.wgsl.expected.ir.msl
@@ -1,27 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
kernel void tint_symbol() {
int i = 123;
- thread int* const p = i;
- p = 123;
- p = 123;
+ thread int* const p = (&i);
+ (*p) = 123;
+ (*p) = 123;
}
-program_source:6:21: error: cannot initialize a variable of type 'int *const' with an lvalue of type 'int'
- thread int* const p = i;
- ^ ~
-program_source:7:5: error: cannot assign to variable 'p' with const-qualified type 'int *const'
- p = 123;
- ~ ^
-program_source:6:21: note: variable 'p' declared const here
- thread int* const p = i;
- ~~~~~~~~~~~~~~~~~~^~~~~
-program_source:8:5: error: cannot assign to variable 'p' with const-qualified type 'int *const'
- p = 123;
- ~ ^
-program_source:6:21: note: variable 'p' declared const here
- thread int* const p = i;
- ~~~~~~~~~~~~~~~~~~^~~~~
-
diff --git a/test/tint/ptr_ref/store/param/function/array_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/function/array_in_struct.wgsl.expected.ir.msl
index 5af32c9..5a7857b 100644
--- a/test/tint/ptr_ref/store/param/function/array_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/function/array_in_struct.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -19,22 +17,9 @@
};
void func(thread tint_array<int, 4>* const pointer) {
- pointer = tint_array<int, 4>{};
+ (*pointer) = tint_array<int, 4>{};
}
kernel void tint_symbol() {
str F = {};
- func(F.arr);
+ func((&F.arr));
}
-program_source:20:11: error: cannot assign to variable 'pointer' with const-qualified type 'tint_array<int, 4> *const'
- pointer = tint_array<int, 4>{};
- ~~~~~~~ ^
-program_source:19:44: note: variable 'pointer' declared const here
-void func(thread tint_array<int, 4>* const pointer) {
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
-program_source:24:3: error: no matching function for call to 'func'
- func(F.arr);
- ^~~~
-program_source:19:6: note: candidate function not viable: no known conversion from 'tint_array<int, 4>' to 'tint_array<int, 4> *const' for 1st argument; take the address of the argument with &
-void func(thread tint_array<int, 4>* const pointer) {
- ^
-
diff --git a/test/tint/ptr_ref/store/param/function/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/function/i32.wgsl.expected.ir.msl
index 55fb76d..a584ab3 100644
--- a/test/tint/ptr_ref/store/param/function/i32.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/function/i32.wgsl.expected.ir.msl
@@ -1,25 +1,10 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
void func(thread int* const pointer) {
- pointer = 42;
+ (*pointer) = 42;
}
kernel void tint_symbol() {
int F = 0;
- func(F);
+ func((&F));
}
-program_source:5:11: error: cannot assign to variable 'pointer' with const-qualified type 'int *const'
- pointer = 42;
- ~~~~~~~ ^
-program_source:4:29: note: variable 'pointer' declared const here
-void func(thread int* const pointer) {
- ~~~~~~~~~~~~~~~~~~^~~~~~~
-program_source:9:3: error: no matching function for call to 'func'
- func(F);
- ^~~~
-program_source:4:6: note: candidate function not viable: no known conversion from 'int' to 'int *const' for 1st argument; take the address of the argument with &
-void func(thread int* const pointer) {
- ^
-
diff --git a/test/tint/ptr_ref/store/param/function/i32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/function/i32_in_struct.wgsl.expected.ir.msl
index 8fc6fb2..c5144fc 100644
--- a/test/tint/ptr_ref/store/param/function/i32_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/function/i32_in_struct.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct str {
@@ -7,22 +5,9 @@
};
void func(thread int* const pointer) {
- pointer = 42;
+ (*pointer) = 42;
}
kernel void tint_symbol() {
str F = {};
- func(F.i);
+ func((&F.i));
}
-program_source:8:11: error: cannot assign to variable 'pointer' with const-qualified type 'int *const'
- pointer = 42;
- ~~~~~~~ ^
-program_source:7:29: note: variable 'pointer' declared const here
-void func(thread int* const pointer) {
- ~~~~~~~~~~~~~~~~~~^~~~~~~
-program_source:12:3: error: no matching function for call to 'func'
- func(F.i);
- ^~~~
-program_source:7:6: note: candidate function not viable: no known conversion from 'int' to 'int *const' for 1st argument; take the address of the argument with &
-void func(thread int* const pointer) {
- ^
-
diff --git a/test/tint/ptr_ref/store/param/function/struct_in_array.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/function/struct_in_array.wgsl.expected.ir.msl
index 99bf128..6a0ada1 100644
--- a/test/tint/ptr_ref/store/param/function/struct_in_array.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/function/struct_in_array.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct str {
@@ -19,22 +17,9 @@
void func(thread str* const pointer) {
- pointer = str{};
+ (*pointer) = str{};
}
kernel void tint_symbol() {
tint_array<str, 4> F = {};
- func(F[2]);
+ func((&F[2]));
}
-program_source:20:11: error: cannot assign to variable 'pointer' with const-qualified type 'str *const'
- pointer = str{};
- ~~~~~~~ ^
-program_source:19:29: note: variable 'pointer' declared const here
-void func(thread str* const pointer) {
- ~~~~~~~~~~~~~~~~~~^~~~~~~
-program_source:24:3: error: no matching function for call to 'func'
- func(F[2]);
- ^~~~
-program_source:19:6: note: candidate function not viable: no known conversion from 'str' to 'str *const' for 1st argument; take the address of the argument with &
-void func(thread str* const pointer) {
- ^
-
diff --git a/test/tint/ptr_ref/store/param/function/vec2_f32_in_mat2x2.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/function/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
index d099190..623e6cd 100644
--- a/test/tint/ptr_ref/store/param/function/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/function/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
@@ -1,25 +1,10 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
void func(thread float2* const pointer) {
- pointer = float2(0.0f);
+ (*pointer) = float2(0.0f);
}
kernel void tint_symbol() {
float2x2 F = float2x2(0.0f);
- func(F[1]);
+ func((&F[1]));
}
-program_source:5:11: error: cannot assign to variable 'pointer' with const-qualified type 'float2 *const'
- pointer = float2(0.0f);
- ~~~~~~~ ^
-program_source:4:32: note: variable 'pointer' declared const here
-void func(thread float2* const pointer) {
- ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
-program_source:9:3: error: no matching function for call to 'func'
- func(F[1]);
- ^~~~
-program_source:4:6: note: candidate function not viable: no known conversion from 'vec<float, 2>' (vector of 2 'float' values) to 'float2 *const' for 1st argument; take the address of the argument with &
-void func(thread float2* const pointer) {
- ^
-
diff --git a/test/tint/ptr_ref/store/param/function/vec4_f32.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/function/vec4_f32.wgsl.expected.ir.msl
index 9d13429..d03bb24 100644
--- a/test/tint/ptr_ref/store/param/function/vec4_f32.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/function/vec4_f32.wgsl.expected.ir.msl
@@ -1,25 +1,10 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
void func(thread float4* const pointer) {
- pointer = float4(0.0f);
+ (*pointer) = float4(0.0f);
}
kernel void tint_symbol() {
float4 F = 0.0f;
- func(F);
+ func((&F));
}
-program_source:5:11: error: cannot assign to variable 'pointer' with const-qualified type 'float4 *const'
- pointer = float4(0.0f);
- ~~~~~~~ ^
-program_source:4:32: note: variable 'pointer' declared const here
-void func(thread float4* const pointer) {
- ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
-program_source:9:3: error: no matching function for call to 'func'
- func(F);
- ^~~~
-program_source:4:6: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'float4 *const' for 1st argument; take the address of the argument with &
-void func(thread float4* const pointer) {
- ^
-
diff --git a/test/tint/ptr_ref/store/param/function/vec4_f32_in_mat2x4.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/function/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
index 7769f44..036323c 100644
--- a/test/tint/ptr_ref/store/param/function/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/function/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
@@ -1,25 +1,10 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
void func(thread float4* const pointer) {
- pointer = float4(0.0f);
+ (*pointer) = float4(0.0f);
}
kernel void tint_symbol() {
float2x4 F = float2x4(0.0f);
- func(F[1]);
+ func((&F[1]));
}
-program_source:5:11: error: cannot assign to variable 'pointer' with const-qualified type 'float4 *const'
- pointer = float4(0.0f);
- ~~~~~~~ ^
-program_source:4:32: note: variable 'pointer' declared const here
-void func(thread float4* const pointer) {
- ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
-program_source:9:3: error: no matching function for call to 'func'
- func(F[1]);
- ^~~~
-program_source:4:6: note: candidate function not viable: no known conversion from 'vec<float, 4>' (vector of 4 'float' values) to 'float4 *const' for 1st argument; take the address of the argument with &
-void func(thread float4* const pointer) {
- ^
-
diff --git a/test/tint/ptr_ref/store/param/function/vec4_f32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/function/vec4_f32_in_struct.wgsl.expected.ir.msl
index 52ece14..eac3dd7 100644
--- a/test/tint/ptr_ref/store/param/function/vec4_f32_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/function/vec4_f32_in_struct.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct str {
@@ -7,22 +5,9 @@
};
void func(thread float4* const pointer) {
- pointer = float4(0.0f);
+ (*pointer) = float4(0.0f);
}
kernel void tint_symbol() {
str F = {};
- func(F.i);
+ func((&F.i));
}
-program_source:8:11: error: cannot assign to variable 'pointer' with const-qualified type 'float4 *const'
- pointer = float4(0.0f);
- ~~~~~~~ ^
-program_source:7:32: note: variable 'pointer' declared const here
-void func(thread float4* const pointer) {
- ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
-program_source:12:3: error: no matching function for call to 'func'
- func(F.i);
- ^~~~
-program_source:7:6: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'float4 *const' for 1st argument; take the address of the argument with &
-void func(thread float4* const pointer) {
- ^
-
diff --git a/test/tint/ptr_ref/store/param/private/array_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/private/array_in_struct.wgsl.expected.ir.msl
index 65761d4..9e8c420 100644
--- a/test/tint/ptr_ref/store/param/private/array_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/private/array_in_struct.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -17,21 +15,15 @@
struct str {
tint_array<int, 4> arr;
};
+struct tint_module_vars_struct {
+ thread str* P;
+};
-thread str P = {};
void func(thread tint_array<int, 4>* const pointer) {
- pointer = tint_array<int, 4>{};
+ (*pointer) = tint_array<int, 4>{};
}
kernel void tint_symbol() {
- func(P.arr);
+ thread str P = {};
+ tint_module_vars_struct const tint_module_vars = {.P=(&P)};
+ func((&(*tint_module_vars.P).arr));
}
-program_source:19:12: error: program scope variable must reside in constant address space
-thread str P = {};
- ^
-program_source:21:11: error: cannot assign to variable 'pointer' with const-qualified type 'tint_array<int, 4> *const'
- pointer = tint_array<int, 4>{};
- ~~~~~~~ ^
-program_source:20:44: note: variable 'pointer' declared const here
-void func(thread tint_array<int, 4>* const pointer) {
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
-
diff --git a/test/tint/ptr_ref/store/param/private/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/private/i32.wgsl.expected.ir.msl
index cd72298..ec44ab2 100644
--- a/test/tint/ptr_ref/store/param/private/i32.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/private/i32.wgsl.expected.ir.msl
@@ -1,22 +1,14 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* P;
+};
-thread int P = 0;
void func(thread int* const pointer) {
- pointer = 42;
+ (*pointer) = 42;
}
kernel void tint_symbol() {
- func(P);
+ thread int P = 0;
+ tint_module_vars_struct const tint_module_vars = {.P=(&P)};
+ func(tint_module_vars.P);
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int P = 0;
- ^
-program_source:6:11: error: cannot assign to variable 'pointer' with const-qualified type 'int *const'
- pointer = 42;
- ~~~~~~~ ^
-program_source:5:29: note: variable 'pointer' declared const here
-void func(thread int* const pointer) {
- ~~~~~~~~~~~~~~~~~~^~~~~~~
-
diff --git a/test/tint/ptr_ref/store/param/private/i32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/private/i32_in_struct.wgsl.expected.ir.msl
index b158e1e..a1df1d8 100644
--- a/test/tint/ptr_ref/store/param/private/i32_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/private/i32_in_struct.wgsl.expected.ir.msl
@@ -1,25 +1,17 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct str {
int i;
};
+struct tint_module_vars_struct {
+ thread str* P;
+};
-thread str P = {};
void func(thread int* const pointer) {
- pointer = 42;
+ (*pointer) = 42;
}
kernel void tint_symbol() {
- func(P.i);
+ thread str P = {};
+ tint_module_vars_struct const tint_module_vars = {.P=(&P)};
+ func((&(*tint_module_vars.P).i));
}
-program_source:7:12: error: program scope variable must reside in constant address space
-thread str P = {};
- ^
-program_source:9:11: error: cannot assign to variable 'pointer' with const-qualified type 'int *const'
- pointer = 42;
- ~~~~~~~ ^
-program_source:8:29: note: variable 'pointer' declared const here
-void func(thread int* const pointer) {
- ~~~~~~~~~~~~~~~~~~^~~~~~~
-
diff --git a/test/tint/ptr_ref/store/param/private/struct_in_array.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/private/struct_in_array.wgsl.expected.ir.msl
index 1a51d5d..3472ccb 100644
--- a/test/tint/ptr_ref/store/param/private/struct_in_array.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/private/struct_in_array.wgsl.expected.ir.msl
@@ -1,7 +1,8 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct str {
+ int i;
+};
template<typename T, size_t N>
struct tint_array {
const constant T& operator[](size_t i) const constant { return elements[i]; }
@@ -14,24 +15,15 @@
T elements[N];
};
-struct str {
- int i;
+struct tint_module_vars_struct {
+ thread tint_array<str, 4>* P;
};
-thread tint_array<str, 4> P = {};
void func(thread str* const pointer) {
- pointer = str{};
+ (*pointer) = str{};
}
kernel void tint_symbol() {
- func(P[2]);
+ thread tint_array<str, 4> P = {};
+ tint_module_vars_struct const tint_module_vars = {.P=(&P)};
+ func((&(*tint_module_vars.P)[2]));
}
-program_source:19:27: error: program scope variable must reside in constant address space
-thread tint_array<str, 4> P = {};
- ^
-program_source:21:11: error: cannot assign to variable 'pointer' with const-qualified type 'str *const'
- pointer = str{};
- ~~~~~~~ ^
-program_source:20:29: note: variable 'pointer' declared const here
-void func(thread str* const pointer) {
- ~~~~~~~~~~~~~~~~~~^~~~~~~
-
diff --git a/test/tint/ptr_ref/store/param/private/vec2_f32_in_mat2x2.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/private/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
index 4489f35..eebd3ba 100644
--- a/test/tint/ptr_ref/store/param/private/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/private/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
@@ -1,22 +1,14 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x2* P;
+};
-thread float2x2 P = float2x2(0.0f);
void func(thread float2* const pointer) {
- pointer = float2(0.0f);
+ (*pointer) = float2(0.0f);
}
kernel void tint_symbol() {
- func(P[1]);
+ thread float2x2 P = float2x2(0.0f);
+ tint_module_vars_struct const tint_module_vars = {.P=(&P)};
+ func((&(*tint_module_vars.P)[1]));
}
-program_source:4:17: error: program scope variable must reside in constant address space
-thread float2x2 P = float2x2(0.0f);
- ^
-program_source:6:11: error: cannot assign to variable 'pointer' with const-qualified type 'float2 *const'
- pointer = float2(0.0f);
- ~~~~~~~ ^
-program_source:5:32: note: variable 'pointer' declared const here
-void func(thread float2* const pointer) {
- ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
-
diff --git a/test/tint/ptr_ref/store/param/private/vec4_f32.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/private/vec4_f32.wgsl.expected.ir.msl
index 4f1b1bd..2c270c6 100644
--- a/test/tint/ptr_ref/store/param/private/vec4_f32.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/private/vec4_f32.wgsl.expected.ir.msl
@@ -1,22 +1,14 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float4* P;
+};
-thread float4 P = 0.0f;
void func(thread float4* const pointer) {
- pointer = float4(0.0f);
+ (*pointer) = float4(0.0f);
}
kernel void tint_symbol() {
- func(P);
+ thread float4 P = 0.0f;
+ tint_module_vars_struct const tint_module_vars = {.P=(&P)};
+ func(tint_module_vars.P);
}
-program_source:4:15: error: program scope variable must reside in constant address space
-thread float4 P = 0.0f;
- ^
-program_source:6:11: error: cannot assign to variable 'pointer' with const-qualified type 'float4 *const'
- pointer = float4(0.0f);
- ~~~~~~~ ^
-program_source:5:32: note: variable 'pointer' declared const here
-void func(thread float4* const pointer) {
- ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
-
diff --git a/test/tint/ptr_ref/store/param/private/vec4_f32_in_mat2x4.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/private/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
index 3c1285d..e9223b4 100644
--- a/test/tint/ptr_ref/store/param/private/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/private/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
@@ -1,22 +1,14 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x4* P;
+};
-thread float2x4 P = float2x4(0.0f);
void func(thread float4* const pointer) {
- pointer = float4(0.0f);
+ (*pointer) = float4(0.0f);
}
kernel void tint_symbol() {
- func(P[1]);
+ thread float2x4 P = float2x4(0.0f);
+ tint_module_vars_struct const tint_module_vars = {.P=(&P)};
+ func((&(*tint_module_vars.P)[1]));
}
-program_source:4:17: error: program scope variable must reside in constant address space
-thread float2x4 P = float2x4(0.0f);
- ^
-program_source:6:11: error: cannot assign to variable 'pointer' with const-qualified type 'float4 *const'
- pointer = float4(0.0f);
- ~~~~~~~ ^
-program_source:5:32: note: variable 'pointer' declared const here
-void func(thread float4* const pointer) {
- ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
-
diff --git a/test/tint/ptr_ref/store/param/private/vec4_f32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/private/vec4_f32_in_struct.wgsl.expected.ir.msl
index 6e2e7f8..3428f6d 100644
--- a/test/tint/ptr_ref/store/param/private/vec4_f32_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/private/vec4_f32_in_struct.wgsl.expected.ir.msl
@@ -1,25 +1,17 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct str {
float4 i;
};
+struct tint_module_vars_struct {
+ thread str* P;
+};
-thread str P = {};
void func(thread float4* const pointer) {
- pointer = float4(0.0f);
+ (*pointer) = float4(0.0f);
}
kernel void tint_symbol() {
- func(P.i);
+ thread str P = {};
+ tint_module_vars_struct const tint_module_vars = {.P=(&P)};
+ func((&(*tint_module_vars.P).i));
}
-program_source:7:12: error: program scope variable must reside in constant address space
-thread str P = {};
- ^
-program_source:9:11: error: cannot assign to variable 'pointer' with const-qualified type 'float4 *const'
- pointer = float4(0.0f);
- ~~~~~~~ ^
-program_source:8:32: note: variable 'pointer' declared const here
-void func(thread float4* const pointer) {
- ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
-
diff --git a/test/tint/ptr_ref/store/param/ptr.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/ptr.wgsl.expected.ir.msl
index d91d1cd..d215d75 100644
--- a/test/tint/ptr_ref/store/param/ptr.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/ptr.wgsl.expected.ir.msl
@@ -1,25 +1,10 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
void func(int value, thread int* const pointer) {
- pointer = value;
+ (*pointer) = value;
}
kernel void tint_symbol() {
int i = 123;
- func(123, i);
+ func(123, (&i));
}
-program_source:5:11: error: cannot assign to variable 'pointer' with const-qualified type 'int *const'
- pointer = value;
- ~~~~~~~ ^
-program_source:4:40: note: variable 'pointer' declared const here
-void func(int value, thread int* const pointer) {
- ~~~~~~~~~~~~~~~~~~^~~~~~~
-program_source:9:3: error: no matching function for call to 'func'
- func(123, i);
- ^~~~
-program_source:4:6: note: candidate function not viable: no known conversion from 'int' to 'int *const' for 2nd argument; take the address of the argument with &
-void func(int value, thread int* const pointer) {
- ^
-
diff --git a/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.ir.msl
index 1b861a3..910c21d 100644
--- a/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.ir.msl
@@ -1,31 +1,28 @@
-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: str = struct @align(4) {
- arr:array<i32, 4> @offset(0)
-}
+struct str {
+ tint_array<int, 4> arr;
+};
+struct tint_module_vars_struct {
+ device str* S;
+};
-$B1: { # root
- %S:ptr<storage, str, read_write> = var @binding_point(0, 0)
+void func(device tint_array<int, 4>* const pointer) {
+ (*pointer) = tint_array<int, 4>{};
}
-
-%func = func(%pointer:ptr<storage, array<i32, 4>, read_write>):void {
- $B2: {
- store %pointer, array<i32, 4>(0i)
- ret
- }
+kernel void tint_symbol(device str* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ func((&(*tint_module_vars.S).arr));
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %5:ptr<storage, array<i32, 4>, read_write> = access %S, 0u
- %6:void = call %func, %5
- 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/ptr_ref/store/param/storage/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/storage/i32.wgsl.expected.ir.msl
index fcdbb3b..7dde63a 100644
--- a/test/tint/ptr_ref/store/param/storage/i32.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/storage/i32.wgsl.expected.ir.msl
@@ -1,26 +1,13 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* S;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %S:ptr<storage, i32, read_write> = var @binding_point(0, 0)
+void func(device int* const pointer) {
+ (*pointer) = 42;
}
-
-%func = func(%pointer:ptr<storage, i32, read_write>):void {
- $B2: {
- store %pointer, 42i
- ret
- }
+kernel void tint_symbol(device int* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ func(tint_module_vars.S);
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %5:void = call %func, %S
- 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/ptr_ref/store/param/storage/i32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/storage/i32_in_struct.wgsl.expected.ir.msl
index 4faa5a7..2de93aa 100644
--- a/test/tint/ptr_ref/store/param/storage/i32_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/storage/i32_in_struct.wgsl.expected.ir.msl
@@ -1,31 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct str {
+ int i;
+};
+struct tint_module_vars_struct {
+ device str* S;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: str = struct @align(4) {
- i:i32 @offset(0)
+void func(device int* const pointer) {
+ (*pointer) = 42;
}
-
-$B1: { # root
- %S:ptr<storage, str, read_write> = var @binding_point(0, 0)
+kernel void tint_symbol(device str* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ func((&(*tint_module_vars.S).i));
}
-
-%func = func(%pointer:ptr<storage, i32, read_write>):void {
- $B2: {
- store %pointer, 42i
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %5:ptr<storage, i32, read_write> = access %S, 0u
- %6:void = call %func, %5
- 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/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.ir.msl
index 6fe5e92..752fa8b 100644
--- a/test/tint/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.ir.msl
@@ -1,31 +1,28 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct str {
+ int 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: str = struct @align(4) {
- i:i32 @offset(0)
-}
+struct tint_module_vars_struct {
+ device tint_array<str, 4>* S;
+};
-$B1: { # root
- %S:ptr<storage, array<str, 4>, read_write> = var @binding_point(0, 0)
+void func(device str* const pointer) {
+ (*pointer) = str{};
}
-
-%func = func(%pointer:ptr<storage, str, read_write>):void {
- $B2: {
- store %pointer, str(0i)
- ret
- }
+kernel void tint_symbol(device tint_array<str, 4>* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ func((&(*tint_module_vars.S)[2]));
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %5:ptr<storage, str, read_write> = access %S, 2i
- %6:void = call %func, %5
- 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/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
index 32234ae..53d54f1 100644
--- a/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.msl
@@ -1,27 +1,13 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2x2* S;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %S:ptr<storage, mat2x2<f32>, read_write> = var @binding_point(0, 0)
+void func(device float2* const pointer) {
+ (*pointer) = float2(0.0f);
}
-
-%func = func(%pointer:ptr<storage, vec2<f32>, read_write>):void {
- $B2: {
- store %pointer, vec2<f32>(0.0f)
- ret
- }
+kernel void tint_symbol(device float2x2* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ func((&(*tint_module_vars.S)[1]));
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %5:ptr<storage, vec2<f32>, read_write> = access %S, 1i
- %6:void = call %func, %5
- 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/ptr_ref/store/param/storage/vec4_f32.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/storage/vec4_f32.wgsl.expected.ir.msl
index 0d2a0ce..a0155aa 100644
--- a/test/tint/ptr_ref/store/param/storage/vec4_f32.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/storage/vec4_f32.wgsl.expected.ir.msl
@@ -1,26 +1,13 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* S;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %S:ptr<storage, vec4<f32>, read_write> = var @binding_point(0, 0)
+void func(device float4* const pointer) {
+ (*pointer) = float4(0.0f);
}
-
-%func = func(%pointer:ptr<storage, vec4<f32>, read_write>):void {
- $B2: {
- store %pointer, vec4<f32>(0.0f)
- ret
- }
+kernel void tint_symbol(device float4* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ func(tint_module_vars.S);
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %5:void = call %func, %S
- 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/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
index b5c1b0f..b5e1c91 100644
--- a/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.msl
@@ -1,27 +1,13 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2x4* S;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %S:ptr<storage, mat2x4<f32>, read_write> = var @binding_point(0, 0)
+void func(device float4* const pointer) {
+ (*pointer) = float4(0.0f);
}
-
-%func = func(%pointer:ptr<storage, vec4<f32>, read_write>):void {
- $B2: {
- store %pointer, vec4<f32>(0.0f)
- ret
- }
+kernel void tint_symbol(device float2x4* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ func((&(*tint_module_vars.S)[1]));
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %5:ptr<storage, vec4<f32>, read_write> = access %S, 1i
- %6:void = call %func, %5
- 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/ptr_ref/store/param/storage/vec4_f32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_struct.wgsl.expected.ir.msl
index bda7b20..bb3ec34 100644
--- a/test/tint/ptr_ref/store/param/storage/vec4_f32_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_struct.wgsl.expected.ir.msl
@@ -1,31 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct str {
+ float4 i;
+};
+struct tint_module_vars_struct {
+ device str* S;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: str = struct @align(16) {
- i:vec4<f32> @offset(0)
+void func(device float4* const pointer) {
+ (*pointer) = float4(0.0f);
}
-
-$B1: { # root
- %S:ptr<storage, str, read_write> = var @binding_point(0, 0)
+kernel void tint_symbol(device str* S [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.S=S};
+ func((&(*tint_module_vars.S).i));
}
-
-%func = func(%pointer:ptr<storage, vec4<f32>, read_write>):void {
- $B2: {
- store %pointer, vec4<f32>(0.0f)
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %5:ptr<storage, vec4<f32>, read_write> = access %S, 0u
- %6:void = call %func, %5
- 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/ptr_sugar/array.wgsl.expected.ir.msl b/test/tint/ptr_sugar/array.wgsl.expected.ir.msl
index bdb6bf8..01e8c49 100644
--- a/test/tint/ptr_sugar/array.wgsl.expected.ir.msl
+++ b/test/tint/ptr_sugar/array.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -17,43 +15,43 @@
void deref_const() {
tint_array<int, 10> a = {};
- thread tint_array<int, 10>* const p = a;
- int b = p[0];
- p[0] = 42;
+ thread tint_array<int, 10>* const p = (&a);
+ int b = (*p)[0];
+ (*p)[0] = 42;
}
void no_deref_const() {
tint_array<int, 10> a = {};
- thread tint_array<int, 10>* const p = a;
- int b = p[0];
- p[0] = 42;
+ thread tint_array<int, 10>* const p = (&a);
+ int b = (*p)[0];
+ (*p)[0] = 42;
}
void deref_let() {
tint_array<int, 10> a = {};
- thread tint_array<int, 10>* const p = a;
+ thread tint_array<int, 10>* const p = (&a);
int const i = 0;
- int b = p[i];
- p[0] = 42;
+ int b = (*p)[i];
+ (*p)[0] = 42;
}
void no_deref_let() {
tint_array<int, 10> a = {};
- thread tint_array<int, 10>* const p = a;
+ thread tint_array<int, 10>* const p = (&a);
int const i = 0;
- int b = p[i];
- p[0] = 42;
+ int b = (*p)[i];
+ (*p)[0] = 42;
}
void deref_var() {
tint_array<int, 10> a = {};
- thread tint_array<int, 10>* const p = a;
+ thread tint_array<int, 10>* const p = (&a);
int i = 0;
- int b = p[i];
- p[0] = 42;
+ int b = (*p)[i];
+ (*p)[0] = 42;
}
void no_deref_var() {
tint_array<int, 10> a = {};
- thread tint_array<int, 10>* const p = a;
+ thread tint_array<int, 10>* const p = (&a);
int i = 0;
- int b = p[i];
- p[0] = 42;
+ int b = (*p)[i];
+ (*p)[0] = 42;
}
kernel void tint_symbol() {
deref_const();
@@ -63,268 +61,3 @@
deref_var();
no_deref_var();
}
-program_source:18:37: error: no viable conversion from 'tint_array<int, 10>' to 'tint_array<int, 10> *const'
- thread tint_array<int, 10>* const p = a;
- ^ ~
-program_source:19:7: error: no viable conversion from 'tint_array<int, 10>' to 'int'
- int b = p[0];
- ^ ~~~~
-program_source:20:8: error: no viable overloaded '='
- p[0] = 42;
- ~~~~ ^ ~~
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const tint_array<int, 10>' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const device tint_array<int, 10> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const threadgroup tint_array<int, 10> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const constant tint_array<int, 10> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'int' to 'tint_array<int, 10>' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'int' to 'device tint_array<int, 10> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'int' to 'threadgroup tint_array<int, 10> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:24:37: error: no viable conversion from 'tint_array<int, 10>' to 'tint_array<int, 10> *const'
- thread tint_array<int, 10>* const p = a;
- ^ ~
-program_source:25:7: error: no viable conversion from 'tint_array<int, 10>' to 'int'
- int b = p[0];
- ^ ~~~~
-program_source:26:8: error: no viable overloaded '='
- p[0] = 42;
- ~~~~ ^ ~~
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const tint_array<int, 10>' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const device tint_array<int, 10> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const threadgroup tint_array<int, 10> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const constant tint_array<int, 10> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'int' to 'tint_array<int, 10>' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'int' to 'device tint_array<int, 10> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'int' to 'threadgroup tint_array<int, 10> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:30:37: error: no viable conversion from 'tint_array<int, 10>' to 'tint_array<int, 10> *const'
- thread tint_array<int, 10>* const p = a;
- ^ ~
-program_source:32:7: error: no viable conversion from 'tint_array<int, 10>' to 'int'
- int b = p[i];
- ^ ~~~~
-program_source:33:8: error: no viable overloaded '='
- p[0] = 42;
- ~~~~ ^ ~~
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const tint_array<int, 10>' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const device tint_array<int, 10> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const threadgroup tint_array<int, 10> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const constant tint_array<int, 10> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'int' to 'tint_array<int, 10>' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'int' to 'device tint_array<int, 10> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'int' to 'threadgroup tint_array<int, 10> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:37:37: error: no viable conversion from 'tint_array<int, 10>' to 'tint_array<int, 10> *const'
- thread tint_array<int, 10>* const p = a;
- ^ ~
-program_source:39:7: error: no viable conversion from 'tint_array<int, 10>' to 'int'
- int b = p[i];
- ^ ~~~~
-program_source:40:8: error: no viable overloaded '='
- p[0] = 42;
- ~~~~ ^ ~~
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const tint_array<int, 10>' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const device tint_array<int, 10> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const threadgroup tint_array<int, 10> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const constant tint_array<int, 10> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'int' to 'tint_array<int, 10>' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'int' to 'device tint_array<int, 10> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'int' to 'threadgroup tint_array<int, 10> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:44:37: error: no viable conversion from 'tint_array<int, 10>' to 'tint_array<int, 10> *const'
- thread tint_array<int, 10>* const p = a;
- ^ ~
-program_source:46:7: error: no viable conversion from 'tint_array<int, 10>' to 'int'
- int b = p[i];
- ^ ~~~~
-program_source:47:8: error: no viable overloaded '='
- p[0] = 42;
- ~~~~ ^ ~~
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const tint_array<int, 10>' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const device tint_array<int, 10> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const threadgroup tint_array<int, 10> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const constant tint_array<int, 10> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'int' to 'tint_array<int, 10>' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'int' to 'device tint_array<int, 10> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'int' to 'threadgroup tint_array<int, 10> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:51:37: error: no viable conversion from 'tint_array<int, 10>' to 'tint_array<int, 10> *const'
- thread tint_array<int, 10>* const p = a;
- ^ ~
-program_source:53:7: error: no viable conversion from 'tint_array<int, 10>' to 'int'
- int b = p[i];
- ^ ~~~~
-program_source:54:8: error: no viable overloaded '='
- p[0] = 42;
- ~~~~ ^ ~~
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const tint_array<int, 10>' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const device tint_array<int, 10> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const threadgroup tint_array<int, 10> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const constant tint_array<int, 10> &' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'int' to 'tint_array<int, 10>' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'int' to 'device tint_array<int, 10> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'int' to 'threadgroup tint_array<int, 10> &&' for 1st argument
-struct tint_array {
- ^
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:4:8: note: candidate function (the implicit move assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-
diff --git a/test/tint/ptr_sugar/builtin_struct.wgsl.expected.ir.msl b/test/tint/ptr_sugar/builtin_struct.wgsl.expected.ir.msl
index 2090c9a..a8de316 100644
--- a/test/tint/ptr_sugar/builtin_struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_sugar/builtin_struct.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct modf_result_f32 {
@@ -13,27 +11,27 @@
void deref_modf() {
modf_result_f32 a = modf_result_f32{.fract=0.5f, .whole=1.0f};
- thread modf_result_f32* const p = a;
- float fract = p.fract;
- float whole = p.whole;
+ thread modf_result_f32* const p = (&a);
+ float fract = (*p).fract;
+ float whole = (*p).whole;
}
void no_deref_modf() {
modf_result_f32 a = modf_result_f32{.fract=0.5f, .whole=1.0f};
- thread modf_result_f32* const p = a;
- float fract = p.fract;
- float whole = p.whole;
+ thread modf_result_f32* const p = (&a);
+ float fract = (*p).fract;
+ float whole = (*p).whole;
}
void deref_frexp() {
frexp_result_f32 a = frexp_result_f32{.fract=0.75f, .exp=1};
- thread frexp_result_f32* const p = a;
- float fract = p.fract;
- int exp = p.exp;
+ thread frexp_result_f32* const p = (&a);
+ float fract = (*p).fract;
+ int exp = (*p).exp;
}
void no_deref_frexp() {
frexp_result_f32 a = frexp_result_f32{.fract=0.75f, .exp=1};
- thread frexp_result_f32* const p = a;
- float fract = p.fract;
- int exp = p.exp;
+ thread frexp_result_f32* const p = (&a);
+ float fract = (*p).fract;
+ int exp = (*p).exp;
}
kernel void tint_symbol() {
deref_modf();
@@ -41,48 +39,3 @@
deref_frexp();
no_deref_frexp();
}
-program_source:14:33: error: no viable conversion from 'modf_result_f32' to 'modf_result_f32 *const'
- thread modf_result_f32* const p = a;
- ^ ~
-program_source:15:18: error: member reference type 'modf_result_f32 *const' is a pointer; did you mean to use '->'?
- float fract = p.fract;
- ~^
- ->
-program_source:16:18: error: member reference type 'modf_result_f32 *const' is a pointer; did you mean to use '->'?
- float whole = p.whole;
- ~^
- ->
-program_source:20:33: error: no viable conversion from 'modf_result_f32' to 'modf_result_f32 *const'
- thread modf_result_f32* const p = a;
- ^ ~
-program_source:21:18: error: member reference type 'modf_result_f32 *const' is a pointer; did you mean to use '->'?
- float fract = p.fract;
- ~^
- ->
-program_source:22:18: error: member reference type 'modf_result_f32 *const' is a pointer; did you mean to use '->'?
- float whole = p.whole;
- ~^
- ->
-program_source:26:34: error: no viable conversion from 'frexp_result_f32' to 'frexp_result_f32 *const'
- thread frexp_result_f32* const p = a;
- ^ ~
-program_source:27:18: error: member reference type 'frexp_result_f32 *const' is a pointer; did you mean to use '->'?
- float fract = p.fract;
- ~^
- ->
-program_source:28:14: error: member reference type 'frexp_result_f32 *const' is a pointer; did you mean to use '->'?
- int exp = p.exp;
- ~^
- ->
-program_source:32:34: error: no viable conversion from 'frexp_result_f32' to 'frexp_result_f32 *const'
- thread frexp_result_f32* const p = a;
- ^ ~
-program_source:33:18: error: member reference type 'frexp_result_f32 *const' is a pointer; did you mean to use '->'?
- float fract = p.fract;
- ~^
- ->
-program_source:34:14: error: member reference type 'frexp_result_f32 *const' is a pointer; did you mean to use '->'?
- int exp = p.exp;
- ~^
- ->
-
diff --git a/test/tint/ptr_sugar/compound_assign_index.wgsl.expected.ir.msl b/test/tint/ptr_sugar/compound_assign_index.wgsl.expected.ir.msl
index 7442043..032621d 100644
--- a/test/tint/ptr_sugar/compound_assign_index.wgsl.expected.ir.msl
+++ b/test/tint/ptr_sugar/compound_assign_index.wgsl.expected.ir.msl
@@ -1,27 +1,25 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
void deref() {
int3 a = 0;
- thread int3* const p = a;
- p[0] = (p[0] + 42);
+ thread int3* const p = (&a);
+ (*p)[0] = ((*p)[0] + 42);
}
void no_deref() {
int3 a = 0;
- thread int3* const p = a;
- p[0] = (p[0] + 42);
+ thread int3* const p = (&a);
+ (*p)[0] = ((*p)[0] + 42);
}
void deref_inc() {
int3 a = 0;
- thread int3* const p = a;
- p[0] = (p[0] + 1);
+ thread int3* const p = (&a);
+ (*p)[0] = ((*p)[0] + 1);
}
void no_deref_inc() {
int3 a = 0;
- thread int3* const p = a;
- p[0] = (p[0] + 1);
+ thread int3* const p = (&a);
+ (*p)[0] = ((*p)[0] + 1);
}
kernel void tint_symbol() {
deref();
@@ -29,16 +27,3 @@
deref_inc();
no_deref_inc();
}
-program_source:6:22: error: cannot initialize a variable of type 'int3 *const' with an lvalue of type 'int3' (vector of 3 'int' values)
- thread int3* const p = a;
- ^ ~
-program_source:11:22: error: cannot initialize a variable of type 'int3 *const' with an lvalue of type 'int3' (vector of 3 'int' values)
- thread int3* const p = a;
- ^ ~
-program_source:16:22: error: cannot initialize a variable of type 'int3 *const' with an lvalue of type 'int3' (vector of 3 'int' values)
- thread int3* const p = a;
- ^ ~
-program_source:21:22: error: cannot initialize a variable of type 'int3 *const' with an lvalue of type 'int3' (vector of 3 'int' values)
- thread int3* const p = a;
- ^ ~
-
diff --git a/test/tint/ptr_sugar/compound_assign_member.wgsl.expected.ir.msl b/test/tint/ptr_sugar/compound_assign_member.wgsl.expected.ir.msl
index 0c742d4..62537f4 100644
--- a/test/tint/ptr_sugar/compound_assign_member.wgsl.expected.ir.msl
+++ b/test/tint/ptr_sugar/compound_assign_member.wgsl.expected.ir.msl
@@ -1,26 +1,17 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
void deref() {
int3 a = 0;
- thread int3* const p = a;
- p[0u] = (p[0u] + 42);
+ thread int3* const p = (&a);
+ (*p)[0u] = ((*p)[0u] + 42);
}
void no_deref() {
int3 a = 0;
- thread int3* const p = a;
- p[0u] = (p[0u] + 42);
+ thread int3* const p = (&a);
+ (*p)[0u] = ((*p)[0u] + 42);
}
kernel void tint_symbol() {
deref();
no_deref();
}
-program_source:6:22: error: cannot initialize a variable of type 'int3 *const' with an lvalue of type 'int3' (vector of 3 'int' values)
- thread int3* const p = a;
- ^ ~
-program_source:11:22: error: cannot initialize a variable of type 'int3 *const' with an lvalue of type 'int3' (vector of 3 'int' values)
- thread int3* const p = a;
- ^ ~
-
diff --git a/test/tint/ptr_sugar/matrix.wgsl.expected.ir.msl b/test/tint/ptr_sugar/matrix.wgsl.expected.ir.msl
index b9a3275..613aa1d 100644
--- a/test/tint/ptr_sugar/matrix.wgsl.expected.ir.msl
+++ b/test/tint/ptr_sugar/matrix.wgsl.expected.ir.msl
@@ -1,68 +1,19 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
void deref() {
float2x3 a = float2x3(0.0f);
- thread float2x3* const p = a;
- float3 b = p[0];
- p[0] = float3(1.0f, 2.0f, 3.0f);
+ thread float2x3* const p = (&a);
+ float3 b = (*p)[0];
+ (*p)[0] = float3(1.0f, 2.0f, 3.0f);
}
void no_deref() {
float2x3 a = float2x3(0.0f);
- thread float2x3* const p = a;
- float3 b = p[0];
- p[0] = float3(1.0f, 2.0f, 3.0f);
+ thread float2x3* const p = (&a);
+ float3 b = (*p)[0];
+ (*p)[0] = float3(1.0f, 2.0f, 3.0f);
}
kernel void tint_symbol() {
deref();
no_deref();
}
-program_source:6:26: error: no viable conversion from 'metal::float2x3' (aka 'matrix<float, 2, 3>') to 'metal::float2x3 *const' (aka 'matrix<float, 2, 3> *const')
- thread float2x3* const p = a;
- ^ ~
-program_source:7:10: error: no viable conversion from 'metal::float2x3' (aka 'matrix<float, 2, 3>') to 'float3' (vector of 3 'float' values)
- float3 b = p[0];
- ^ ~~~~
-program_source:8:8: error: no viable overloaded '='
- p[0] = float3(1.0f, 2.0f, 3.0f);
- ~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'const metal::matrix<float, 2, 3, void>' for 1st argument
-struct matrix
- ^
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'const device metal::matrix<float, 2, 3, void> &' for 1st argument
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'const threadgroup metal::matrix<float, 2, 3, void> &' for 1st argument
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'const constant metal::matrix<float, 2, 3, void> &' for 1st argument
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-program_source:12:26: error: no viable conversion from 'metal::float2x3' (aka 'matrix<float, 2, 3>') to 'metal::float2x3 *const' (aka 'matrix<float, 2, 3> *const')
- thread float2x3* const p = a;
- ^ ~
-program_source:13:10: error: no viable conversion from 'metal::float2x3' (aka 'matrix<float, 2, 3>') to 'float3' (vector of 3 'float' values)
- float3 b = p[0];
- ^ ~~~~
-program_source:14:8: error: no viable overloaded '='
- p[0] = float3(1.0f, 2.0f, 3.0f);
- ~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'const metal::matrix<float, 2, 3, void>' for 1st argument
-struct matrix
- ^
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'const device metal::matrix<float, 2, 3, void> &' for 1st argument
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'const threadgroup metal::matrix<float, 2, 3, void> &' for 1st argument
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'const constant metal::matrix<float, 2, 3, void> &' for 1st argument
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'device'
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_matrix:21:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' object is in default address space, but method expects object in address space 'threadgroup'
-
diff --git a/test/tint/ptr_sugar/struct.wgsl.expected.ir.msl b/test/tint/ptr_sugar/struct.wgsl.expected.ir.msl
index 709c93d..a13fcf8 100644
--- a/test/tint/ptr_sugar/struct.wgsl.expected.ir.msl
+++ b/test/tint/ptr_sugar/struct.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct S {
@@ -8,40 +6,17 @@
void deref() {
S a = {};
- thread S* const p = a;
- int b = p.x;
- p.x = 42;
+ thread S* const p = (&a);
+ int b = (*p).x;
+ (*p).x = 42;
}
void no_deref() {
S a = {};
- thread S* const p = a;
- int b = p.x;
- p.x = 42;
+ thread S* const p = (&a);
+ int b = (*p).x;
+ (*p).x = 42;
}
kernel void tint_symbol() {
deref();
no_deref();
}
-program_source:9:19: error: no viable conversion from 'S' to 'S *const'
- thread S* const p = a;
- ^ ~
-program_source:10:12: error: member reference type 'S *const' is a pointer; did you mean to use '->'?
- int b = p.x;
- ~^
- ->
-program_source:11:4: error: member reference type 'S *const' is a pointer; did you mean to use '->'?
- p.x = 42;
- ~^
- ->
-program_source:15:19: error: no viable conversion from 'S' to 'S *const'
- thread S* const p = a;
- ^ ~
-program_source:16:12: error: member reference type 'S *const' is a pointer; did you mean to use '->'?
- int b = p.x;
- ~^
- ->
-program_source:17:4: error: member reference type 'S *const' is a pointer; did you mean to use '->'?
- p.x = 42;
- ~^
- ->
-
diff --git a/test/tint/ptr_sugar/vector_index.wgsl.expected.ir.msl b/test/tint/ptr_sugar/vector_index.wgsl.expected.ir.msl
index 8404a69..9e0f829 100644
--- a/test/tint/ptr_sugar/vector_index.wgsl.expected.ir.msl
+++ b/test/tint/ptr_sugar/vector_index.wgsl.expected.ir.msl
@@ -1,47 +1,45 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
void deref_const() {
int3 a = 0;
- thread int3* const p = a;
- int b = p[0];
- p[0] = 42;
+ thread int3* const p = (&a);
+ int b = (*p)[0];
+ (*p)[0] = 42;
}
void no_deref_const() {
int3 a = 0;
- thread int3* const p = a;
- int b = p[0];
- p[0] = 42;
+ thread int3* const p = (&a);
+ int b = (*p)[0];
+ (*p)[0] = 42;
}
void deref_let() {
int3 a = 0;
- thread int3* const p = a;
+ thread int3* const p = (&a);
int const i = 0;
- int b = p[i];
- p[0] = 42;
+ int b = (*p)[i];
+ (*p)[0] = 42;
}
void no_deref_let() {
int3 a = 0;
- thread int3* const p = a;
+ thread int3* const p = (&a);
int const i = 0;
- int b = p[i];
- p[0] = 42;
+ int b = (*p)[i];
+ (*p)[0] = 42;
}
void deref_var() {
int3 a = 0;
- thread int3* const p = a;
+ thread int3* const p = (&a);
int i = 0;
- int b = p[i];
- p[0] = 42;
+ int b = (*p)[i];
+ (*p)[0] = 42;
}
void no_deref_var() {
int3 a = 0;
- thread int3* const p = a;
+ thread int3* const p = (&a);
int const i = 0;
- int b = p[i];
- p[0] = 42;
+ int b = (*p)[i];
+ (*p)[0] = 42;
}
kernel void tint_symbol() {
deref_const();
@@ -51,40 +49,3 @@
deref_var();
no_deref_var();
}
-program_source:6:22: error: cannot initialize a variable of type 'int3 *const' with an lvalue of type 'int3' (vector of 3 'int' values)
- thread int3* const p = a;
- ^ ~
-program_source:7:7: error: cannot initialize a variable of type 'int' with an lvalue of type 'int3' (vector of 3 'int' values)
- int b = p[0];
- ^ ~~~~
-program_source:12:22: error: cannot initialize a variable of type 'int3 *const' with an lvalue of type 'int3' (vector of 3 'int' values)
- thread int3* const p = a;
- ^ ~
-program_source:13:7: error: cannot initialize a variable of type 'int' with an lvalue of type 'int3' (vector of 3 'int' values)
- int b = p[0];
- ^ ~~~~
-program_source:18:22: error: cannot initialize a variable of type 'int3 *const' with an lvalue of type 'int3' (vector of 3 'int' values)
- thread int3* const p = a;
- ^ ~
-program_source:20:7: error: cannot initialize a variable of type 'int' with an lvalue of type 'int3' (vector of 3 'int' values)
- int b = p[i];
- ^ ~~~~
-program_source:25:22: error: cannot initialize a variable of type 'int3 *const' with an lvalue of type 'int3' (vector of 3 'int' values)
- thread int3* const p = a;
- ^ ~
-program_source:27:7: error: cannot initialize a variable of type 'int' with an lvalue of type 'int3' (vector of 3 'int' values)
- int b = p[i];
- ^ ~~~~
-program_source:32:22: error: cannot initialize a variable of type 'int3 *const' with an lvalue of type 'int3' (vector of 3 'int' values)
- thread int3* const p = a;
- ^ ~
-program_source:34:7: error: cannot initialize a variable of type 'int' with an lvalue of type 'int3' (vector of 3 'int' values)
- int b = p[i];
- ^ ~~~~
-program_source:39:22: error: cannot initialize a variable of type 'int3 *const' with an lvalue of type 'int3' (vector of 3 'int' values)
- thread int3* const p = a;
- ^ ~
-program_source:41:7: error: cannot initialize a variable of type 'int' with an lvalue of type 'int3' (vector of 3 'int' values)
- int b = p[i];
- ^ ~~~~
-
diff --git a/test/tint/ptr_sugar/vector_member.wgsl.expected.ir.msl b/test/tint/ptr_sugar/vector_member.wgsl.expected.ir.msl
index 4039c66..f4b8812 100644
--- a/test/tint/ptr_sugar/vector_member.wgsl.expected.ir.msl
+++ b/test/tint/ptr_sugar/vector_member.wgsl.expected.ir.msl
@@ -1,34 +1,19 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
void deref() {
int3 a = 0;
- thread int3* const p = a;
- int b = p[0u];
- p[0u] = 42;
+ thread int3* const p = (&a);
+ int b = (*p)[0u];
+ (*p)[0u] = 42;
}
void no_deref() {
int3 a = 0;
- thread int3* const p = a;
- int b = p[0u];
- p[0u] = 42;
+ thread int3* const p = (&a);
+ int b = (*p)[0u];
+ (*p)[0u] = 42;
}
kernel void tint_symbol() {
deref();
no_deref();
}
-program_source:6:22: error: cannot initialize a variable of type 'int3 *const' with an lvalue of type 'int3' (vector of 3 'int' values)
- thread int3* const p = a;
- ^ ~
-program_source:7:7: error: cannot initialize a variable of type 'int' with an lvalue of type 'int3' (vector of 3 'int' values)
- int b = p[0u];
- ^ ~~~~~
-program_source:12:22: error: cannot initialize a variable of type 'int3 *const' with an lvalue of type 'int3' (vector of 3 'int' values)
- thread int3* const p = a;
- ^ ~
-program_source:13:7: error: cannot initialize a variable of type 'int' with an lvalue of type 'int3' (vector of 3 'int' values)
- int b = p[0u];
- ^ ~~~~~
-
diff --git a/test/tint/samples/simple_vertex.spvasm.expected.ir.msl b/test/tint/samples/simple_vertex.spvasm.expected.ir.msl
index 7dba87b..65eb95d 100644
--- a/test/tint/samples/simple_vertex.spvasm.expected.ir.msl
+++ b/test/tint/samples/simple_vertex.spvasm.expected.ir.msl
@@ -1,20 +1,18 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float4* gl_Position;
+};
struct main_out {
float4 gl_Position [[position]];
};
-thread float4 gl_Position = 0.0f;
-void main_1() {
- gl_Position = float4(0.0f);
+void main_1(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.gl_Position) = float4(0.0f);
}
vertex main_out tint_symbol() {
- main_1();
- return {.gl_Position=gl_Position};
+ thread float4 gl_Position = 0.0f;
+ tint_module_vars_struct const tint_module_vars = {.gl_Position=(&gl_Position)};
+ main_1(tint_module_vars);
+ return {.gl_Position=(*tint_module_vars.gl_Position)};
}
-program_source:7:15: error: program scope variable must reside in constant address space
-thread float4 gl_Position = 0.0f;
- ^
-
diff --git a/test/tint/statements/compound_assign/complex_lhs.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/complex_lhs.wgsl.expected.ir.msl
index 5e20a80..485ec60 100644
--- a/test/tint/statements/compound_assign/complex_lhs.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/complex_lhs.wgsl.expected.ir.msl
@@ -1,7 +1,8 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* counter;
+};
template<typename T, size_t N>
struct tint_array {
const constant T& operator[](size_t i) const constant { return elements[i]; }
@@ -18,33 +19,18 @@
tint_array<int4, 4> a;
};
-thread int counter = 0;
-int foo() {
- counter = (counter + 1);
- return counter;
+int foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1);
+ return (*tint_module_vars.counter);
}
-int bar() {
- counter = (counter + 2);
- return counter;
+int bar(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 2);
+ return (*tint_module_vars.counter);
}
-void tint_symbol() {
+void tint_symbol(tint_module_vars_struct tint_module_vars) {
S x = S{};
- thread S* const p = x;
- thread int4* const v = p.a[foo()];
- int const v_1 = bar();
- v[v_1] = (v[v_1] + 5);
+ thread S* const p = (&x);
+ thread int4* const v = (&(*p).a[foo(tint_module_vars)]);
+ int const v_1 = bar(tint_module_vars);
+ (*v)[v_1] = ((*v)[v_1] + 5);
}
-program_source:19:12: error: program scope variable must reside in constant address space
-thread int counter = 0;
- ^
-program_source:30:19: error: no viable conversion from 'S' to 'S *const'
- thread S* const p = x;
- ^ ~
-program_source:31:27: error: member reference type 'S *const' is a pointer; did you mean to use '->'?
- thread int4* const v = p.a[foo()];
- ~^
- ->
-program_source:31:22: error: cannot initialize a variable of type 'int4 *const' with an lvalue of type 'int __attribute__((ext_vector_type(4)))' (vector of 4 'int' values)
- thread int4* const v = p.a[foo()];
- ^ ~~~~~~~~~~
-
diff --git a/test/tint/statements/compound_assign/for_loop.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/for_loop.wgsl.expected.ir.msl
index 0cad888..05a8d5f 100644
--- a/test/tint/statements/compound_assign/for_loop.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/for_loop.wgsl.expected.ir.msl
@@ -1,86 +1,52 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int a;
+ float4 b;
+ float2x2 c;
+};
+struct tint_module_vars_struct {
+ device S* v;
+ thread 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: S = struct @align(16) {
- a:i32 @offset(0)
- b:vec4<f32> @offset(16)
- c:mat2x2<f32> @offset(32)
-}
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
- %i:ptr<private, u32, read_write> = var
+int idx1(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.i) = ((*tint_module_vars.i) + 1u);
+ return 1;
}
-
-%idx1 = func():i32 {
- $B2: {
- %4:u32 = load %i
- %5:u32 = add %4, 1u
- store %i, %5
- ret 1i
- }
+int idx2(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.i) = ((*tint_module_vars.i) + 2u);
+ return 1;
}
-%idx2 = func():i32 {
- $B3: {
- %7:u32 = load %i
- %8:u32 = add %7, 2u
- store %i, %8
- ret 1i
- }
+int idx3(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.i) = ((*tint_module_vars.i) + 3u);
+ return 1;
}
-%idx3 = func():i32 {
- $B4: {
- %10:u32 = load %i
- %11:u32 = add %10, 3u
- store %i, %11
- ret 1i
- }
-}
-%foo = func():void {
- $B5: {
- %a:ptr<function, array<f32, 4>, read_write> = var, array<f32, 4>(0.0f)
- loop [i: $B6, b: $B7, c: $B8] { # loop_1
- $B6: { # initializer
- %14:i32 = call %idx1
- %15:ptr<function, f32, read_write> = access %a, %14
- %16:ptr<function, f32, read_write> = let %15
- %17:f32 = load %16
- %18:f32 = mul %17, 2.0f
- store %16, %18
- next_iteration # -> $B7
+void foo(tint_module_vars_struct tint_module_vars) {
+ tint_array<float, 4> a = tint_array<float, 4>{};
+ {
+ thread float* const v_1 = (&a[idx1(tint_module_vars)]);
+ (*v_1) = ((*v_1) * 2.0f);
+ while(true) {
+ if ((a[idx2(tint_module_vars)] < 10.0f)) {
+ } else {
+ break;
}
- $B7: { # body
- %19:i32 = call %idx2
- %20:ptr<function, f32, read_write> = access %a, %19
- %21:f32 = load %20
- %22:bool = lt %21, 10.0f
- if %22 [t: $B9, f: $B10] { # if_1
- $B9: { # true
- exit_if # if_1
- }
- $B10: { # false
- exit_loop # loop_1
- }
- }
- continue # -> $B8
- }
- $B8: { # continuing
- %23:i32 = call %idx3
- %24:ptr<function, f32, read_write> = access %a, %23
- %25:ptr<function, f32, read_write> = let %24
- %26:f32 = load %25
- %27:f32 = add %26, 1.0f
- store %25, %27
- next_iteration # -> $B7
- }
+ thread float* const v_2 = (&a[idx3(tint_module_vars)]);
+ (*v_2) = ((*v_2) + 1.0f);
+ 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/compound_assign/matrix/minus.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.ir.msl
index 16766aa..e415342 100644
--- a/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ float4x4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:mat4x4<f32> @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a - float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f)));
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, mat4x4<f32>, read_write> = access %v, 0u
- %4:mat4x4<f32> = load %3
- %5:mat4x4<f32> = sub %4, mat4x4<f32>(vec4<f32>(0.0f))
- store %3, %5
- 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/compound_assign/matrix/plus.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.ir.msl
index 618b4be..201d7be 100644
--- a/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ float4x4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:mat4x4<f32> @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a + float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f)));
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, mat4x4<f32>, read_write> = access %v, 0u
- %4:mat4x4<f32> = load %3
- %5:mat4x4<f32> = add %4, mat4x4<f32>(vec4<f32>(0.0f))
- store %3, %5
- 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/compound_assign/matrix/times-scalar.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.ir.msl
index 782a03f..910b96b 100644
--- a/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ float4x4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:mat4x4<f32> @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a * 2.0f);
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, mat4x4<f32>, read_write> = access %v, 0u
- %4:mat4x4<f32> = load %3
- %5:mat4x4<f32> = mul %4, 2.0f
- store %3, %5
- 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/compound_assign/matrix/times.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/matrix/times.wgsl.expected.ir.msl
index 82f7729..0fa4a1d 100644
--- a/test/tint/statements/compound_assign/matrix/times.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/matrix/times.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ float4x4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:mat4x4<f32> @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a * float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f)));
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, mat4x4<f32>, read_write> = access %v, 0u
- %4:mat4x4<f32> = load %3
- %5:mat4x4<f32> = mul %4, mat4x4<f32>(vec4<f32>(0.0f))
- store %3, %5
- 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/compound_assign/private.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/private.wgsl.expected.ir.msl
index acff416..69458bc 100644
--- a/test/tint/statements/compound_assign/private.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/private.wgsl.expected.ir.msl
@@ -1,26 +1,16 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* a;
+ thread float4* b;
+ thread float2x2* c;
+};
-thread int a = 0;
-thread float4 b = 0.0f;
-thread float2x2 c = float2x2(0.0f);
-void foo() {
- a = tint_div_i32(a, 2);
- b = (b * float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f)));
- c = (c * 2.0f);
-}
int tint_div_i32(int lhs, int rhs) {
return (lhs / select(rhs, 1, ((rhs == 0) | ((lhs == (-2147483647 - 1)) & (rhs == -1)))));
}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int a = 0;
- ^
-program_source:5:15: error: program scope variable must reside in constant address space
-thread float4 b = 0.0f;
- ^
-program_source:6:17: error: program scope variable must reside in constant address space
-thread float2x2 c = float2x2(0.0f);
- ^
-
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.a) = tint_div_i32((*tint_module_vars.a), 2);
+ (*tint_module_vars.b) = ((*tint_module_vars.b) * float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f)));
+ (*tint_module_vars.c) = ((*tint_module_vars.c) * 2.0f);
+}
diff --git a/test/tint/statements/compound_assign/scalar/and.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/scalar/and.wgsl.expected.ir.msl
index 4fd5a35..87af1e6 100644
--- a/test/tint/statements/compound_assign/scalar/and.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/scalar/and.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- a:i32 @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a & 2);
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, i32, read_write> = access %v, 0u
- %4:i32 = load %3
- %5:i32 = and %4, 2i
- store %3, %5
- 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/compound_assign/scalar/divide.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/scalar/divide.wgsl.expected.ir.msl
index b447b48..3506923 100644
--- a/test/tint/statements/compound_assign/scalar/divide.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/scalar/divide.wgsl.expected.ir.msl
@@ -1,39 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- a:i32 @offset(0)
+int tint_div_i32(int lhs, int rhs) {
+ return (lhs / select(rhs, 1, ((rhs == 0) | ((lhs == (-2147483647 - 1)) & (rhs == -1)))));
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = tint_div_i32((*tint_module_vars.v).a, 2);
}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, i32, read_write> = access %v, 0u
- %4:i32 = load %3
- %5:i32 = call %tint_div_i32, %4, 2i
- store %3, %5
- ret
- }
-}
-%tint_div_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B3: {
- %9:bool = eq %rhs, 0i
- %10:bool = eq %lhs, -2147483648i
- %11:bool = eq %rhs, -1i
- %12:bool = and %10, %11
- %13:bool = or %9, %12
- %14:i32 = select %rhs, 1i, %13
- %15:i32 = div %lhs, %14
- ret %15
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/compound_assign/scalar/minus.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/scalar/minus.wgsl.expected.ir.msl
index 21b1ae8..3a124e0 100644
--- a/test/tint/statements/compound_assign/scalar/minus.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/scalar/minus.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- a:i32 @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a - 2);
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, i32, read_write> = access %v, 0u
- %4:i32 = load %3
- %5:i32 = sub %4, 2i
- store %3, %5
- 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/compound_assign/scalar/modulo.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/scalar/modulo.wgsl.expected.ir.msl
index 576802c..f0eba4a 100644
--- a/test/tint/statements/compound_assign/scalar/modulo.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/scalar/modulo.wgsl.expected.ir.msl
@@ -1,42 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- a:i32 @offset(0)
+int tint_mod_i32(int lhs, int rhs) {
+ int const v_1 = select(rhs, 1, ((rhs == 0) | ((lhs == (-2147483647 - 1)) & (rhs == -1))));
+ return (lhs - ((lhs / v_1) * v_1));
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = tint_mod_i32((*tint_module_vars.v).a, 2);
}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, i32, read_write> = access %v, 0u
- %4:i32 = load %3
- %5:i32 = call %tint_mod_i32, %4, 2i
- store %3, %5
- ret
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B3: {
- %9:bool = eq %rhs, 0i
- %10:bool = eq %lhs, -2147483648i
- %11:bool = eq %rhs, -1i
- %12:bool = and %10, %11
- %13:bool = or %9, %12
- %14:i32 = select %rhs, 1i, %13
- %15:i32 = let %14
- %16:i32 = div %lhs, %15
- %17:i32 = mul %16, %15
- %18:i32 = sub %lhs, %17
- ret %18
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/compound_assign/scalar/or.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/scalar/or.wgsl.expected.ir.msl
index 3a756ab..07549af 100644
--- a/test/tint/statements/compound_assign/scalar/or.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/scalar/or.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- a:i32 @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a | 2);
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, i32, read_write> = access %v, 0u
- %4:i32 = load %3
- %5:i32 = or %4, 2i
- store %3, %5
- 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/compound_assign/scalar/plus.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/scalar/plus.wgsl.expected.ir.msl
index 9bd6a64..2db63be 100644
--- a/test/tint/statements/compound_assign/scalar/plus.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/scalar/plus.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- a:i32 @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a + 2);
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, i32, read_write> = access %v, 0u
- %4:i32 = load %3
- %5:i32 = add %4, 2i
- store %3, %5
- 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/compound_assign/scalar/shift_left.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/scalar/shift_left.wgsl.expected.ir.msl
index f51a6e5..b0d888c 100644
--- a/test/tint/statements/compound_assign/scalar/shift_left.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/scalar/shift_left.wgsl.expected.ir.msl
@@ -1,28 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- a:i32 @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a << (2u & 31u));
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, i32, read_write> = access %v, 0u
- %4:i32 = load %3
- %5:u32 = and 2u, 31u
- %6:i32 = shl %4, %5
- store %3, %6
- 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/compound_assign/scalar/shift_right.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/scalar/shift_right.wgsl.expected.ir.msl
index 1619a15..06a866e 100644
--- a/test/tint/statements/compound_assign/scalar/shift_right.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/scalar/shift_right.wgsl.expected.ir.msl
@@ -1,28 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- a:i32 @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a >> (2u & 31u));
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, i32, read_write> = access %v, 0u
- %4:i32 = load %3
- %5:u32 = and 2u, 31u
- %6:i32 = shr %4, %5
- store %3, %6
- 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/compound_assign/scalar/times.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/scalar/times.wgsl.expected.ir.msl
index b32922d..ec1a589 100644
--- a/test/tint/statements/compound_assign/scalar/times.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/scalar/times.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- a:i32 @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a * 2);
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, i32, read_write> = access %v, 0u
- %4:i32 = load %3
- %5:i32 = mul %4, 2i
- store %3, %5
- 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/compound_assign/scalar/xor.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/scalar/xor.wgsl.expected.ir.msl
index b4259c7..3ef63f2 100644
--- a/test/tint/statements/compound_assign/scalar/xor.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/scalar/xor.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- a:i32 @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a ^ 2);
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, i32, read_write> = access %v, 0u
- %4:i32 = load %3
- %5:i32 = xor %4, 2i
- store %3, %5
- 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/compound_assign/vector/and.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/vector/and.wgsl.expected.ir.msl
index c09bc08..e73ea42 100644
--- a/test/tint/statements/compound_assign/vector/and.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/vector/and.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:vec4<i32> @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a & int4(2));
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, vec4<i32>, read_write> = access %v, 0u
- %4:vec4<i32> = load %3
- %5:vec4<i32> = and %4, vec4<i32>(2i)
- store %3, %5
- 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/compound_assign/vector/divide-scalar.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/vector/divide-scalar.wgsl.expected.ir.msl
index cbb1ce9..531ae32 100644
--- a/test/tint/statements/compound_assign/vector/divide-scalar.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/vector/divide-scalar.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ float4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:vec4<f32> @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a / 2.0f);
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, vec4<f32>, read_write> = access %v, 0u
- %4:vec4<f32> = load %3
- %5:vec4<f32> = div %4, 2.0f
- store %3, %5
- 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/compound_assign/vector/divide.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/vector/divide.wgsl.expected.ir.msl
index 8586de1..8ddc6aa 100644
--- a/test/tint/statements/compound_assign/vector/divide.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/vector/divide.wgsl.expected.ir.msl
@@ -1,39 +1,15 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:vec4<i32> @offset(0)
+int4 tint_div_v4i32(int4 lhs, int4 rhs) {
+ return (lhs / select(rhs, int4(1), ((rhs == int4(0)) | ((lhs == int4((-2147483647 - 1))) & (rhs == int4(-1))))));
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = tint_div_v4i32((*tint_module_vars.v).a, int4(2));
}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, vec4<i32>, read_write> = access %v, 0u
- %4:vec4<i32> = load %3
- %5:vec4<i32> = call %tint_div_v4i32, %4, vec4<i32>(2i)
- store %3, %5
- ret
- }
-}
-%tint_div_v4i32 = func(%lhs:vec4<i32>, %rhs:vec4<i32>):vec4<i32> {
- $B3: {
- %9:vec4<bool> = eq %rhs, vec4<i32>(0i)
- %10:vec4<bool> = eq %lhs, vec4<i32>(-2147483648i)
- %11:vec4<bool> = eq %rhs, vec4<i32>(-1i)
- %12:vec4<bool> = and %10, %11
- %13:vec4<bool> = or %9, %12
- %14:vec4<i32> = select %rhs, vec4<i32>(1i), %13
- %15:vec4<i32> = div %lhs, %14
- ret %15
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/compound_assign/vector/minus-scalar.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/vector/minus-scalar.wgsl.expected.ir.msl
index caa16e9..e1feff6 100644
--- a/test/tint/statements/compound_assign/vector/minus-scalar.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/vector/minus-scalar.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ float4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:vec4<f32> @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a - 2.0f);
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, vec4<f32>, read_write> = access %v, 0u
- %4:vec4<f32> = load %3
- %5:vec4<f32> = sub %4, 2.0f
- store %3, %5
- 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/compound_assign/vector/minus.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/vector/minus.wgsl.expected.ir.msl
index 79432d8..921e52a 100644
--- a/test/tint/statements/compound_assign/vector/minus.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/vector/minus.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:vec4<i32> @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a - int4(2));
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, vec4<i32>, read_write> = access %v, 0u
- %4:vec4<i32> = load %3
- %5:vec4<i32> = sub %4, vec4<i32>(2i)
- store %3, %5
- 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/compound_assign/vector/modulo-scalar.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/vector/modulo-scalar.wgsl.expected.ir.msl
index 8d83ed2..eaeb8e2 100644
--- a/test/tint/statements/compound_assign/vector/modulo-scalar.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/vector/modulo-scalar.wgsl.expected.ir.msl
@@ -1,44 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:vec4<i32> @offset(0)
+int4 tint_mod_v4i32(int4 lhs, int4 rhs) {
+ int4 const v_1 = select(rhs, int4(1), ((rhs == int4(0)) | ((lhs == int4((-2147483647 - 1))) & (rhs == int4(-1)))));
+ return (lhs - ((lhs / v_1) * v_1));
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ int4 const v_2 = (*tint_module_vars.v).a;
+ (*tint_module_vars.v).a = tint_mod_v4i32(v_2, int4(2));
}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, vec4<i32>, read_write> = access %v, 0u
- %4:vec4<i32> = load %3
- %5:vec4<i32> = let %4
- %6:vec4<i32> = construct 2i
- %7:vec4<i32> = call %tint_mod_v4i32, %5, %6
- store %3, %7
- ret
- }
-}
-%tint_mod_v4i32 = func(%lhs:vec4<i32>, %rhs:vec4<i32>):vec4<i32> {
- $B3: {
- %11:vec4<bool> = eq %rhs, vec4<i32>(0i)
- %12:vec4<bool> = eq %lhs, vec4<i32>(-2147483648i)
- %13:vec4<bool> = eq %rhs, vec4<i32>(-1i)
- %14:vec4<bool> = and %12, %13
- %15:vec4<bool> = or %11, %14
- %16:vec4<i32> = select %rhs, vec4<i32>(1i), %15
- %17:vec4<i32> = let %16
- %18:vec4<i32> = div %lhs, %17
- %19:vec4<i32> = mul %18, %17
- %20:vec4<i32> = sub %lhs, %19
- ret %20
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/compound_assign/vector/modulo.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/vector/modulo.wgsl.expected.ir.msl
index 391a18f..1f1b1a3 100644
--- a/test/tint/statements/compound_assign/vector/modulo.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/vector/modulo.wgsl.expected.ir.msl
@@ -1,42 +1,16 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:vec4<i32> @offset(0)
+int4 tint_mod_v4i32(int4 lhs, int4 rhs) {
+ int4 const v_1 = select(rhs, int4(1), ((rhs == int4(0)) | ((lhs == int4((-2147483647 - 1))) & (rhs == int4(-1)))));
+ return (lhs - ((lhs / v_1) * v_1));
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = tint_mod_v4i32((*tint_module_vars.v).a, int4(2));
}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, vec4<i32>, read_write> = access %v, 0u
- %4:vec4<i32> = load %3
- %5:vec4<i32> = call %tint_mod_v4i32, %4, vec4<i32>(2i)
- store %3, %5
- ret
- }
-}
-%tint_mod_v4i32 = func(%lhs:vec4<i32>, %rhs:vec4<i32>):vec4<i32> {
- $B3: {
- %9:vec4<bool> = eq %rhs, vec4<i32>(0i)
- %10:vec4<bool> = eq %lhs, vec4<i32>(-2147483648i)
- %11:vec4<bool> = eq %rhs, vec4<i32>(-1i)
- %12:vec4<bool> = and %10, %11
- %13:vec4<bool> = or %9, %12
- %14:vec4<i32> = select %rhs, vec4<i32>(1i), %13
- %15:vec4<i32> = let %14
- %16:vec4<i32> = div %lhs, %15
- %17:vec4<i32> = mul %16, %15
- %18:vec4<i32> = sub %lhs, %17
- ret %18
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/compound_assign/vector/or.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/vector/or.wgsl.expected.ir.msl
index c8f7bf1..d4bea17 100644
--- a/test/tint/statements/compound_assign/vector/or.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/vector/or.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:vec4<i32> @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a | int4(2));
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, vec4<i32>, read_write> = access %v, 0u
- %4:vec4<i32> = load %3
- %5:vec4<i32> = or %4, vec4<i32>(2i)
- store %3, %5
- 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/compound_assign/vector/plus-scalar.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/vector/plus-scalar.wgsl.expected.ir.msl
index e5358ab..ff61004 100644
--- a/test/tint/statements/compound_assign/vector/plus-scalar.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/vector/plus-scalar.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ float4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:vec4<f32> @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a + 2.0f);
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, vec4<f32>, read_write> = access %v, 0u
- %4:vec4<f32> = load %3
- %5:vec4<f32> = add %4, 2.0f
- store %3, %5
- 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/compound_assign/vector/plus.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/vector/plus.wgsl.expected.ir.msl
index 6023992..cb7dad1 100644
--- a/test/tint/statements/compound_assign/vector/plus.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/vector/plus.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:vec4<i32> @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a + int4(2));
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, vec4<i32>, read_write> = access %v, 0u
- %4:vec4<i32> = load %3
- %5:vec4<i32> = add %4, vec4<i32>(2i)
- store %3, %5
- 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/compound_assign/vector/shift_left.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/vector/shift_left.wgsl.expected.ir.msl
index 176b2ed..52cb114 100644
--- a/test/tint/statements/compound_assign/vector/shift_left.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/vector/shift_left.wgsl.expected.ir.msl
@@ -1,28 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:vec4<i32> @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a << (uint4(2u) & uint4(31u)));
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, vec4<i32>, read_write> = access %v, 0u
- %4:vec4<i32> = load %3
- %5:vec4<u32> = and vec4<u32>(2u), vec4<u32>(31u)
- %6:vec4<i32> = shl %4, %5
- store %3, %6
- 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/compound_assign/vector/shift_right.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/vector/shift_right.wgsl.expected.ir.msl
index d5163d3..40ea9f2 100644
--- a/test/tint/statements/compound_assign/vector/shift_right.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/vector/shift_right.wgsl.expected.ir.msl
@@ -1,28 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:vec4<i32> @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a >> (uint4(2u) & uint4(31u)));
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, vec4<i32>, read_write> = access %v, 0u
- %4:vec4<i32> = load %3
- %5:vec4<u32> = and vec4<u32>(2u), vec4<u32>(31u)
- %6:vec4<i32> = shr %4, %5
- store %3, %6
- 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/compound_assign/vector/times-matrix.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/vector/times-matrix.wgsl.expected.ir.msl
index 7b9ab58..1c0585e 100644
--- a/test/tint/statements/compound_assign/vector/times-matrix.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/vector/times-matrix.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ float4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:vec4<f32> @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a * float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f)));
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, vec4<f32>, read_write> = access %v, 0u
- %4:vec4<f32> = load %3
- %5:vec4<f32> = mul %4, mat4x4<f32>(vec4<f32>(0.0f))
- store %3, %5
- 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/compound_assign/vector/times-scalar.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/vector/times-scalar.wgsl.expected.ir.msl
index bbaef43..dca40333 100644
--- a/test/tint/statements/compound_assign/vector/times-scalar.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/vector/times-scalar.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ float4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:vec4<f32> @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a * 2.0f);
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, vec4<f32>, read_write> = access %v, 0u
- %4:vec4<f32> = load %3
- %5:vec4<f32> = mul %4, 2.0f
- store %3, %5
- 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/compound_assign/vector/times.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/vector/times.wgsl.expected.ir.msl
index f77d642..fd71000 100644
--- a/test/tint/statements/compound_assign/vector/times.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/vector/times.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:vec4<i32> @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a * int4(2));
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, vec4<i32>, read_write> = access %v, 0u
- %4:vec4<i32> = load %3
- %5:vec4<i32> = mul %4, vec4<i32>(2i)
- store %3, %5
- 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/compound_assign/vector/xor.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/vector/xor.wgsl.expected.ir.msl
index 0f5c119..17f5e91 100644
--- a/test/tint/statements/compound_assign/vector/xor.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/vector/xor.wgsl.expected.ir.msl
@@ -1,27 +1,12 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S {
+ int4 a;
+};
+struct tint_module_vars_struct {
+ device S* v;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(16) {
- a:vec4<i32> @offset(0)
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v).a = ((*tint_module_vars.v).a ^ int4(2));
}
-
-$B1: { # root
- %v:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%foo = func():void {
- $B2: {
- %3:ptr<storage, vec4<i32>, read_write> = access %v, 0u
- %4:vec4<i32> = load %3
- %5:vec4<i32> = xor %4, vec4<i32>(2i)
- store %3, %5
- 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/compound_assign/workgroup.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/workgroup.wgsl.expected.ir.msl
index e523a83..f62b9e2 100644
--- a/test/tint/statements/compound_assign/workgroup.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/workgroup.wgsl.expected.ir.msl
@@ -1,26 +1,16 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ threadgroup int* a;
+ threadgroup float4* b;
+ threadgroup float2x2* c;
+};
-threadgroup int a;
-threadgroup float4 b;
-threadgroup float2x2 c;
-void foo() {
- a = tint_div_i32(a, 2);
- b = (b * float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f)));
- c = (c * 2.0f);
-}
int tint_div_i32(int lhs, int rhs) {
return (lhs / select(rhs, 1, ((rhs == 0) | ((lhs == (-2147483647 - 1)) & (rhs == -1)))));
}
-program_source:4:17: error: program scope variable must reside in constant address space
-threadgroup int a;
- ^
-program_source:5:20: error: program scope variable must reside in constant address space
-threadgroup float4 b;
- ^
-program_source:6:22: error: program scope variable must reside in constant address space
-threadgroup float2x2 c;
- ^
-
+void foo(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.a) = tint_div_i32((*tint_module_vars.a), 2);
+ (*tint_module_vars.b) = ((*tint_module_vars.b) * float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f)));
+ (*tint_module_vars.c) = ((*tint_module_vars.c) * 2.0f);
+}
diff --git a/test/tint/statements/decrement/array_element.wgsl.expected.ir.msl b/test/tint/statements/decrement/array_element.wgsl.expected.ir.msl
index 3812675..b1b50e1 100644
--- a/test/tint/statements/decrement/array_element.wgsl.expected.ir.msl
+++ b/test/tint/statements/decrement/array_element.wgsl.expected.ir.msl
@@ -1,23 +1,21 @@
-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: $B1: { # root
- %a:ptr<storage, array<u32>, read_write> = var @binding_point(0, 0)
+struct tint_module_vars_struct {
+ device tint_array<uint, 1>* a;
+};
+
+void tint_symbol(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.a)[1] = ((*tint_module_vars.a)[1] - 1u);
}
-
-%tint_symbol = func():void {
- $B2: {
- %3:ptr<storage, u32, read_write> = access %a, 1i
- %4:u32 = load %3
- %5:u32 = sub %4, 1u
- store %3, %5
- 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/decrement/complex.wgsl.expected.ir.msl b/test/tint/statements/decrement/complex.wgsl.expected.ir.msl
index 83c21fd..06f3397 100644
--- a/test/tint/statements/decrement/complex.wgsl.expected.ir.msl
+++ b/test/tint/statements/decrement/complex.wgsl.expected.ir.msl
@@ -1,113 +1,65 @@
-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: S = struct @align(16) {
- a:array<vec4<i32>, 4> @offset(0)
-}
+struct S {
+ tint_array<int4, 4> a;
+};
+struct tint_module_vars_struct {
+ device tint_array<S, 1>* tint_symbol;
+ thread uint* v;
+};
-$B1: { # root
- %tint_symbol:ptr<storage, array<S>, read_write> = var @binding_point(0, 0)
- %v:ptr<private, u32, read_write> = var
+int idx1(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v) = ((*tint_module_vars.v) - 1u);
+ return 1;
}
-
-%idx1 = func():i32 {
- $B2: {
- %4:u32 = load %v
- %5:u32 = sub %4, 1u
- store %v, %5
- ret 1i
- }
+int idx2(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v) = ((*tint_module_vars.v) - 1u);
+ return 2;
}
-%idx2 = func():i32 {
- $B3: {
- %7:u32 = load %v
- %8:u32 = sub %7, 1u
- store %v, %8
- ret 2i
- }
+int idx3(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v) = ((*tint_module_vars.v) - 1u);
+ return 3;
}
-%idx3 = func():i32 {
- $B4: {
- %10:u32 = load %v
- %11:u32 = sub %10, 1u
- store %v, %11
- ret 3i
- }
+int idx4(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v) = ((*tint_module_vars.v) - 1u);
+ return 4;
}
-%idx4 = func():i32 {
- $B5: {
- %13:u32 = load %v
- %14:u32 = sub %13, 1u
- store %v, %14
- ret 4i
- }
+int idx5(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v) = ((*tint_module_vars.v) - 1u);
+ return 0;
}
-%idx5 = func():i32 {
- $B6: {
- %16:u32 = load %v
- %17:u32 = sub %16, 1u
- store %v, %17
- ret 0i
- }
+int idx6(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v) = ((*tint_module_vars.v) - 1u);
+ return 2;
}
-%idx6 = func():i32 {
- $B7: {
- %19:u32 = load %v
- %20:u32 = sub %19, 1u
- store %v, %20
- ret 2i
- }
-}
-%tint_symbol_1 = func():void {
- $B8: {
- loop [i: $B9, b: $B10, c: $B11] { # loop_1
- $B9: { # initializer
- %22:i32 = call %idx1
- %23:i32 = let %22
- %24:i32 = call %idx2
- %25:ptr<storage, vec4<i32>, read_write> = access %tint_symbol, %23, 0u, %24
- %26:ptr<storage, vec4<i32>, read_write> = let %25
- %27:i32 = call %idx3
- %28:i32 = let %27
- %29:i32 = load_vector_element %26, %28
- %30:i32 = sub %29, 1i
- store_vector_element %26, %28, %30
- next_iteration # -> $B10
+void tint_symbol_1(tint_module_vars_struct tint_module_vars) {
+ {
+ int const v_1 = idx1(tint_module_vars);
+ device int4* const v_2 = (&(*tint_module_vars.tint_symbol)[v_1].a[idx2(tint_module_vars)]);
+ int const v_3 = idx3(tint_module_vars);
+ (*v_2)[v_3] = ((*v_2)[v_3] - 1);
+ while(true) {
+ if (((*tint_module_vars.v) < 10u)) {
+ } else {
+ break;
}
- $B10: { # body
- %31:u32 = load %v
- %32:bool = lt %31, 10u
- if %32 [t: $B12, f: $B13] { # if_1
- $B12: { # true
- exit_if # if_1
- }
- $B13: { # false
- exit_loop # loop_1
- }
- }
- continue # -> $B11
- }
- $B11: { # continuing
- %33:i32 = call %idx4
- %34:i32 = let %33
- %35:i32 = call %idx5
- %36:ptr<storage, vec4<i32>, read_write> = access %tint_symbol, %34, 0u, %35
- %37:ptr<storage, vec4<i32>, read_write> = let %36
- %38:i32 = call %idx6
- %39:i32 = let %38
- %40:i32 = load_vector_element %37, %39
- %41:i32 = sub %40, 1i
- store_vector_element %37, %39, %41
- next_iteration # -> $B10
- }
+ int const v_4 = idx4(tint_module_vars);
+ device int4* const v_5 = (&(*tint_module_vars.tint_symbol)[v_4].a[idx5(tint_module_vars)]);
+ int const v_6 = idx6(tint_module_vars);
+ (*v_5)[v_6] = ((*v_5)[v_6] - 1);
+ 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/decrement/for_loop_continuing.wgsl.expected.ir.msl b/test/tint/statements/decrement/for_loop_continuing.wgsl.expected.ir.msl
index 238e237..d52fe70 100644
--- a/test/tint/statements/decrement/for_loop_continuing.wgsl.expected.ir.msl
+++ b/test/tint/statements/decrement/for_loop_continuing.wgsl.expected.ir.msl
@@ -1,40 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* i;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %i:ptr<storage, u32, read_write> = var @binding_point(0, 0)
-}
-
-%tint_symbol = func():void {
- $B2: {
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %3:u32 = load %i
- %4:bool = lt %3, 10u
- if %4 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- continue # -> $B4
+void tint_symbol(tint_module_vars_struct tint_module_vars) {
+ {
+ while(true) {
+ if (((*tint_module_vars.i) < 10u)) {
+ } else {
+ break;
}
- $B4: { # continuing
- %5:u32 = load %i
- %6:u32 = sub %5, 1u
- store %i, %6
- next_iteration # -> $B3
- }
+ (*tint_module_vars.i) = ((*tint_module_vars.i) - 1u);
+ 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/decrement/for_loop_initializer.wgsl.expected.ir.msl b/test/tint/statements/decrement/for_loop_initializer.wgsl.expected.ir.msl
index 1288b7a..5127afa 100644
--- a/test/tint/statements/decrement/for_loop_initializer.wgsl.expected.ir.msl
+++ b/test/tint/statements/decrement/for_loop_initializer.wgsl.expected.ir.msl
@@ -1,40 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* i;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %i:ptr<storage, u32, read_write> = var @binding_point(0, 0)
-}
-
-%tint_symbol = func():void {
- $B2: {
- loop [i: $B3, b: $B4] { # loop_1
- $B3: { # initializer
- %3:u32 = load %i
- %4:u32 = sub %3, 1u
- store %i, %4
- next_iteration # -> $B4
+void tint_symbol(tint_module_vars_struct tint_module_vars) {
+ {
+ (*tint_module_vars.i) = ((*tint_module_vars.i) - 1u);
+ while(true) {
+ if (((*tint_module_vars.i) < 10u)) {
+ } else {
+ break;
}
- $B4: { # body
- %5:u32 = load %i
- %6:bool = lt %5, 10u
- if %6 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- continue # -> $B7
- }
+ 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/decrement/private.wgsl.expected.ir.msl b/test/tint/statements/decrement/private.wgsl.expected.ir.msl
index 91c8fa6..ca44ed3 100644
--- a/test/tint/statements/decrement/private.wgsl.expected.ir.msl
+++ b/test/tint/statements/decrement/private.wgsl.expected.ir.msl
@@ -5,5 +5,5 @@
};
void tint_symbol(tint_module_vars_struct tint_module_vars) {
- tint_module_vars.i = (tint_module_vars.i - 1);
+ (*tint_module_vars.i) = ((*tint_module_vars.i) - 1);
}
diff --git a/test/tint/statements/decrement/storage.wgsl.expected.ir.msl b/test/tint/statements/decrement/storage.wgsl.expected.ir.msl
index 94432c9..afe26c1 100644
--- a/test/tint/statements/decrement/storage.wgsl.expected.ir.msl
+++ b/test/tint/statements/decrement/storage.wgsl.expected.ir.msl
@@ -5,5 +5,5 @@
};
void tint_symbol(tint_module_vars_struct tint_module_vars) {
- tint_module_vars.i = (tint_module_vars.i - 1u);
+ (*tint_module_vars.i) = ((*tint_module_vars.i) - 1u);
}
diff --git a/test/tint/statements/decrement/vector_component.wgsl.expected.ir.msl b/test/tint/statements/decrement/vector_component.wgsl.expected.ir.msl
index 86fdc0f..0504684 100644
--- a/test/tint/statements/decrement/vector_component.wgsl.expected.ir.msl
+++ b/test/tint/statements/decrement/vector_component.wgsl.expected.ir.msl
@@ -5,6 +5,6 @@
};
void tint_symbol(tint_module_vars_struct tint_module_vars) {
- tint_module_vars.a[1] = (tint_module_vars.a[1] - 1u);
- tint_module_vars.a[2u] = (tint_module_vars.a[2u] - 1u);
+ (*tint_module_vars.a)[1] = ((*tint_module_vars.a)[1] - 1u);
+ (*tint_module_vars.a)[2u] = ((*tint_module_vars.a)[2u] - 1u);
}
diff --git a/test/tint/statements/decrement/workgroup.wgsl.expected.ir.msl b/test/tint/statements/decrement/workgroup.wgsl.expected.ir.msl
index d1bc058..2a0a0ef 100644
--- a/test/tint/statements/decrement/workgroup.wgsl.expected.ir.msl
+++ b/test/tint/statements/decrement/workgroup.wgsl.expected.ir.msl
@@ -5,5 +5,5 @@
};
void tint_symbol(tint_module_vars_struct tint_module_vars) {
- tint_module_vars.i = (tint_module_vars.i - 1);
+ (*tint_module_vars.i) = ((*tint_module_vars.i) - 1);
}
diff --git a/test/tint/statements/discard/discard_return.wgsl.expected.ir.msl b/test/tint/statements/discard/discard_return.wgsl.expected.ir.msl
index 2e04a91..68df997 100644
--- a/test/tint/statements/discard/discard_return.wgsl.expected.ir.msl
+++ b/test/tint/statements/discard/discard_return.wgsl.expected.ir.msl
@@ -1,13 +1,9 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* continue_execution;
+};
-thread bool continue_execution = true;
-void f() {
- continue_execution = false;
+void f(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.continue_execution) = false;
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool continue_execution = true;
- ^
-
diff --git a/test/tint/statements/discard/helper_functions.wgsl.expected.ir.msl b/test/tint/statements/discard/helper_functions.wgsl.expected.ir.msl
index 3c42091..80d7ee1 100644
--- a/test/tint/statements/discard/helper_functions.wgsl.expected.ir.msl
+++ b/test/tint/statements/discard/helper_functions.wgsl.expected.ir.msl
@@ -1,57 +1,28 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* non_uniform_global;
+ device float* output;
+ thread bool* continue_execution;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %non_uniform_global:ptr<storage, i32, read_write> = var @binding_point(0, 0)
- %output:ptr<storage, f32, read_write> = var @binding_point(0, 1)
- %continue_execution:ptr<private, bool, read_write> = var, true
-}
-
-%foo = func():void {
- $B2: {
- %5:i32 = load %non_uniform_global
- %6:bool = lt %5, 0i
- if %6 [t: $B3] { # if_1
- $B3: { # true
- store %continue_execution, false
- exit_if # if_1
- }
- }
- ret
+void foo(tint_module_vars_struct tint_module_vars) {
+ if (((*tint_module_vars.non_uniform_global) < 0)) {
+ (*tint_module_vars.continue_execution) = false;
}
}
-%bar = func():void {
- $B4: {
- %8:f32 = dpdx 1.0f
- %9:f32 = let %8
- %10:bool = load %continue_execution
- if %10 [t: $B5] { # if_2
- $B5: { # true
- store %output, %9
- exit_if # if_2
- }
- }
- ret
+void bar(tint_module_vars_struct tint_module_vars) {
+ float const v = dfdx(1.0f);
+ if ((*tint_module_vars.continue_execution)) {
+ (*tint_module_vars.output) = v;
}
}
-%tint_symbol = @fragment func():void {
- $B6: {
- %12:void = call %foo
- %13:void = call %bar
- %14:bool = load %continue_execution
- %15:bool = eq %14, false
- if %15 [t: $B7] { # if_3
- $B7: { # true
- terminate_invocation
- }
- }
- ret
+fragment void tint_symbol(device int* non_uniform_global [[buffer(0)]], device float* output [[buffer(1)]]) {
+ thread bool continue_execution = true;
+ tint_module_vars_struct const tint_module_vars = {.non_uniform_global=non_uniform_global, .output=output, .continue_execution=(&continue_execution)};
+ foo(tint_module_vars);
+ bar(tint_module_vars);
+ if (!((*tint_module_vars.continue_execution))) {
+ discard_fragment();
}
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/discard/if_discard_return.wgsl.expected.ir.msl b/test/tint/statements/discard/if_discard_return.wgsl.expected.ir.msl
index 361b224..07a083a 100644
--- a/test/tint/statements/discard/if_discard_return.wgsl.expected.ir.msl
+++ b/test/tint/statements/discard/if_discard_return.wgsl.expected.ir.msl
@@ -1,16 +1,12 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* continue_execution;
+};
-thread bool continue_execution = true;
-void f(bool cond) {
+void f(bool cond, tint_module_vars_struct tint_module_vars) {
if (cond) {
- continue_execution = false;
+ (*tint_module_vars.continue_execution) = false;
return;
}
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool continue_execution = true;
- ^
-
diff --git a/test/tint/statements/discard/loop_discard_return.wgsl.expected.ir.msl b/test/tint/statements/discard/loop_discard_return.wgsl.expected.ir.msl
index e9dfc0a..46bea24 100644
--- a/test/tint/statements/discard/loop_discard_return.wgsl.expected.ir.msl
+++ b/test/tint/statements/discard/loop_discard_return.wgsl.expected.ir.msl
@@ -1,19 +1,15 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* continue_execution;
+};
-thread bool continue_execution = true;
-void f() {
+void f(tint_module_vars_struct tint_module_vars) {
{
while(true) {
- continue_execution = false;
+ (*tint_module_vars.continue_execution) = false;
return;
}
}
/* unreachable */
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool continue_execution = true;
- ^
-
diff --git a/test/tint/statements/discard/multiple_returns.wgsl.expected.ir.msl b/test/tint/statements/discard/multiple_returns.wgsl.expected.ir.msl
index b5636b4..30ff5e9 100644
--- a/test/tint/statements/discard/multiple_returns.wgsl.expected.ir.msl
+++ b/test/tint/statements/discard/multiple_returns.wgsl.expected.ir.msl
@@ -1,100 +1,47 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* non_uniform_global;
+ device float* output;
+ thread bool* continue_execution;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %non_uniform_global:ptr<storage, i32, read_write> = var @binding_point(0, 0)
- %output:ptr<storage, f32, read_write> = var @binding_point(0, 1)
- %continue_execution:ptr<private, bool, read_write> = var, true
-}
-
-%tint_symbol = @fragment func():void {
- $B2: {
- %5:i32 = load %non_uniform_global
- %6:bool = lt %5, 0i
- if %6 [t: $B3] { # if_1
- $B3: { # true
- store %continue_execution, false
- exit_if # if_1
- }
- }
- %7:f32 = dpdx 1.0f
- %8:f32 = let %7
- %9:bool = load %continue_execution
- if %9 [t: $B4] { # if_2
- $B4: { # true
- store %output, %8
- exit_if # if_2
- }
- }
- %10:f32 = load %output
- %11:bool = lt %10, 0.0f
- if %11 [t: $B5] { # if_3
- $B5: { # true
- %i:ptr<function, i32, read_write> = var, 0i
- loop [b: $B6, c: $B7] { # loop_1
- $B6: { # body
- %13:f32 = load %output
- %14:f32 = let %13
- %15:i32 = load %i
- %16:f32 = convert %15
- %17:bool = gt %14, %16
- if %17 [t: $B8] { # if_4
- $B8: { # true
- %18:i32 = load %i
- %19:f32 = convert %18
- %20:f32 = let %19
- %21:bool = load %continue_execution
- if %21 [t: $B9] { # if_5
- $B9: { # true
- store %output, %20
- exit_if # if_5
- }
- }
- %22:bool = load %continue_execution
- %23:bool = eq %22, false
- if %23 [t: $B10] { # if_6
- $B10: { # true
- terminate_invocation
- }
- }
- ret
- }
- }
- continue # -> $B7
+fragment void tint_symbol(device int* non_uniform_global [[buffer(0)]], device float* output [[buffer(1)]]) {
+ thread bool continue_execution = true;
+ tint_module_vars_struct const tint_module_vars = {.non_uniform_global=non_uniform_global, .output=output, .continue_execution=(&continue_execution)};
+ if (((*tint_module_vars.non_uniform_global) < 0)) {
+ (*tint_module_vars.continue_execution) = false;
+ }
+ float const v = dfdx(1.0f);
+ if ((*tint_module_vars.continue_execution)) {
+ (*tint_module_vars.output) = v;
+ }
+ if (((*tint_module_vars.output) < 0.0f)) {
+ int i = 0;
+ {
+ while(true) {
+ float const v_1 = (*tint_module_vars.output);
+ if ((v_1 > float(i))) {
+ float const v_2 = float(i);
+ if ((*tint_module_vars.continue_execution)) {
+ (*tint_module_vars.output) = v_2;
}
- $B7: { # continuing
- %24:i32 = load %i
- %25:i32 = add %24, 1i
- store %i, %25
- %26:i32 = load %i
- %27:bool = eq %26, 5i
- break_if %27 # -> [t: exit_loop loop_1, f: $B6]
+ if (!((*tint_module_vars.continue_execution))) {
+ discard_fragment();
}
+ return;
}
- %28:bool = load %continue_execution
- %29:bool = eq %28, false
- if %29 [t: $B11] { # if_7
- $B11: { # true
- terminate_invocation
- }
- }
- ret
+ i = (i + 1);
+ if (i == 5) { break; }
+ continue;
}
}
- %30:bool = load %continue_execution
- %31:bool = eq %30, false
- if %31 [t: $B12] { # if_8
- $B12: { # true
- terminate_invocation
- }
+ if (!((*tint_module_vars.continue_execution))) {
+ discard_fragment();
}
- ret
+ return;
+ }
+ if (!((*tint_module_vars.continue_execution))) {
+ discard_fragment();
}
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/discard/nested_return.wgsl.expected.ir.msl b/test/tint/statements/discard/nested_return.wgsl.expected.ir.msl
index 0e324d8..6659eeb 100644
--- a/test/tint/statements/discard/nested_return.wgsl.expected.ir.msl
+++ b/test/tint/statements/discard/nested_return.wgsl.expected.ir.msl
@@ -1,35 +1,17 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* non_uniform_global;
+ thread bool* continue_execution;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %non_uniform_global:ptr<storage, i32, read_write> = var @binding_point(0, 0)
- %continue_execution:ptr<private, bool, read_write> = var, true
-}
-
-%tint_symbol = @fragment func():void {
- $B2: {
- %4:i32 = load %non_uniform_global
- %5:bool = lt %4, 0i
- if %5 [t: $B3] { # if_1
- $B3: { # true
- store %continue_execution, false
- exit_if # if_1
- }
- }
- %6:bool = load %continue_execution
- %7:bool = eq %6, false
- if %7 [t: $B4] { # if_2
- $B4: { # true
- terminate_invocation
- }
- }
- ret
+fragment void tint_symbol(device int* non_uniform_global [[buffer(0)]]) {
+ thread bool continue_execution = true;
+ tint_module_vars_struct const tint_module_vars = {.non_uniform_global=non_uniform_global, .continue_execution=(&continue_execution)};
+ if (((*tint_module_vars.non_uniform_global) < 0)) {
+ (*tint_module_vars.continue_execution) = false;
+ }
+ if (!((*tint_module_vars.continue_execution))) {
+ discard_fragment();
}
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/discard/non_uniform.wgsl.expected.ir.msl b/test/tint/statements/discard/non_uniform.wgsl.expected.ir.msl
index b3ed894..4437f6f 100644
--- a/test/tint/statements/discard/non_uniform.wgsl.expected.ir.msl
+++ b/test/tint/statements/discard/non_uniform.wgsl.expected.ir.msl
@@ -1,45 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* non_uniform_global;
+ device float* output;
+ thread bool* continue_execution;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %non_uniform_global:ptr<storage, i32, read_write> = var @binding_point(0, 0)
- %output:ptr<storage, f32, read_write> = var @binding_point(0, 1)
- %continue_execution:ptr<private, bool, read_write> = var, true
-}
-
-%tint_symbol = @fragment func():void {
- $B2: {
- %5:i32 = load %non_uniform_global
- %6:bool = lt %5, 0i
- if %6 [t: $B3] { # if_1
- $B3: { # true
- store %continue_execution, false
- exit_if # if_1
- }
- }
- %7:f32 = dpdx 1.0f
- %8:f32 = let %7
- %9:bool = load %continue_execution
- if %9 [t: $B4] { # if_2
- $B4: { # true
- store %output, %8
- exit_if # if_2
- }
- }
- %10:bool = load %continue_execution
- %11:bool = eq %10, false
- if %11 [t: $B5] { # if_3
- $B5: { # true
- terminate_invocation
- }
- }
- ret
+fragment void tint_symbol(device int* non_uniform_global [[buffer(0)]], device float* output [[buffer(1)]]) {
+ thread bool continue_execution = true;
+ tint_module_vars_struct const tint_module_vars = {.non_uniform_global=non_uniform_global, .output=output, .continue_execution=(&continue_execution)};
+ if (((*tint_module_vars.non_uniform_global) < 0)) {
+ (*tint_module_vars.continue_execution) = false;
+ }
+ float const v = dfdx(1.0f);
+ if ((*tint_module_vars.continue_execution)) {
+ (*tint_module_vars.output) = v;
+ }
+ if (!((*tint_module_vars.continue_execution))) {
+ discard_fragment();
}
}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix 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/increment/array_element.wgsl.expected.ir.msl b/test/tint/statements/increment/array_element.wgsl.expected.ir.msl
index 9795a66..f61d09c 100644
--- a/test/tint/statements/increment/array_element.wgsl.expected.ir.msl
+++ b/test/tint/statements/increment/array_element.wgsl.expected.ir.msl
@@ -1,23 +1,21 @@
-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: $B1: { # root
- %a:ptr<storage, array<u32>, read_write> = var @binding_point(0, 0)
+struct tint_module_vars_struct {
+ device tint_array<uint, 1>* a;
+};
+
+void tint_symbol(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.a)[1] = ((*tint_module_vars.a)[1] + 1u);
}
-
-%tint_symbol = func():void {
- $B2: {
- %3:ptr<storage, u32, read_write> = access %a, 1i
- %4:u32 = load %3
- %5:u32 = add %4, 1u
- store %3, %5
- 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/increment/complex.wgsl.expected.ir.msl b/test/tint/statements/increment/complex.wgsl.expected.ir.msl
index da42c84..309a3b0 100644
--- a/test/tint/statements/increment/complex.wgsl.expected.ir.msl
+++ b/test/tint/statements/increment/complex.wgsl.expected.ir.msl
@@ -1,113 +1,65 @@
-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: S = struct @align(16) {
- a:array<vec4<i32>, 4> @offset(0)
-}
+struct S {
+ tint_array<int4, 4> a;
+};
+struct tint_module_vars_struct {
+ device tint_array<S, 1>* tint_symbol;
+ thread uint* v;
+};
-$B1: { # root
- %tint_symbol:ptr<storage, array<S>, read_write> = var @binding_point(0, 0)
- %v:ptr<private, u32, read_write> = var
+int idx1(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v) = ((*tint_module_vars.v) + 1u);
+ return 1;
}
-
-%idx1 = func():i32 {
- $B2: {
- %4:u32 = load %v
- %5:u32 = add %4, 1u
- store %v, %5
- ret 1i
- }
+int idx2(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v) = ((*tint_module_vars.v) + 1u);
+ return 2;
}
-%idx2 = func():i32 {
- $B3: {
- %7:u32 = load %v
- %8:u32 = add %7, 1u
- store %v, %8
- ret 2i
- }
+int idx3(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v) = ((*tint_module_vars.v) + 1u);
+ return 3;
}
-%idx3 = func():i32 {
- $B4: {
- %10:u32 = load %v
- %11:u32 = add %10, 1u
- store %v, %11
- ret 3i
- }
+int idx4(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v) = ((*tint_module_vars.v) + 1u);
+ return 4;
}
-%idx4 = func():i32 {
- $B5: {
- %13:u32 = load %v
- %14:u32 = add %13, 1u
- store %v, %14
- ret 4i
- }
+int idx5(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v) = ((*tint_module_vars.v) + 1u);
+ return 0;
}
-%idx5 = func():i32 {
- $B6: {
- %16:u32 = load %v
- %17:u32 = add %16, 1u
- store %v, %17
- ret 0i
- }
+int idx6(tint_module_vars_struct tint_module_vars) {
+ (*tint_module_vars.v) = ((*tint_module_vars.v) + 1u);
+ return 2;
}
-%idx6 = func():i32 {
- $B7: {
- %19:u32 = load %v
- %20:u32 = add %19, 1u
- store %v, %20
- ret 2i
- }
-}
-%tint_symbol_1 = func():void {
- $B8: {
- loop [i: $B9, b: $B10, c: $B11] { # loop_1
- $B9: { # initializer
- %22:i32 = call %idx1
- %23:i32 = let %22
- %24:i32 = call %idx2
- %25:ptr<storage, vec4<i32>, read_write> = access %tint_symbol, %23, 0u, %24
- %26:ptr<storage, vec4<i32>, read_write> = let %25
- %27:i32 = call %idx3
- %28:i32 = let %27
- %29:i32 = load_vector_element %26, %28
- %30:i32 = add %29, 1i
- store_vector_element %26, %28, %30
- next_iteration # -> $B10
+void tint_symbol_1(tint_module_vars_struct tint_module_vars) {
+ {
+ int const v_1 = idx1(tint_module_vars);
+ device int4* const v_2 = (&(*tint_module_vars.tint_symbol)[v_1].a[idx2(tint_module_vars)]);
+ int const v_3 = idx3(tint_module_vars);
+ (*v_2)[v_3] = ((*v_2)[v_3] + 1);
+ while(true) {
+ if (((*tint_module_vars.v) < 10u)) {
+ } else {
+ break;
}
- $B10: { # body
- %31:u32 = load %v
- %32:bool = lt %31, 10u
- if %32 [t: $B12, f: $B13] { # if_1
- $B12: { # true
- exit_if # if_1
- }
- $B13: { # false
- exit_loop # loop_1
- }
- }
- continue # -> $B11
- }
- $B11: { # continuing
- %33:i32 = call %idx4
- %34:i32 = let %33
- %35:i32 = call %idx5
- %36:ptr<storage, vec4<i32>, read_write> = access %tint_symbol, %34, 0u, %35
- %37:ptr<storage, vec4<i32>, read_write> = let %36
- %38:i32 = call %idx6
- %39:i32 = let %38
- %40:i32 = load_vector_element %37, %39
- %41:i32 = add %40, 1i
- store_vector_element %37, %39, %41
- next_iteration # -> $B10
- }
+ int const v_4 = idx4(tint_module_vars);
+ device int4* const v_5 = (&(*tint_module_vars.tint_symbol)[v_4].a[idx5(tint_module_vars)]);
+ int const v_6 = idx6(tint_module_vars);
+ (*v_5)[v_6] = ((*v_5)[v_6] + 1);
+ 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/increment/for_loop_continuing.wgsl.expected.ir.msl b/test/tint/statements/increment/for_loop_continuing.wgsl.expected.ir.msl
index f54b041..d286201 100644
--- a/test/tint/statements/increment/for_loop_continuing.wgsl.expected.ir.msl
+++ b/test/tint/statements/increment/for_loop_continuing.wgsl.expected.ir.msl
@@ -1,40 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* i;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %i:ptr<storage, u32, read_write> = var @binding_point(0, 0)
-}
-
-%tint_symbol = func():void {
- $B2: {
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %3:u32 = load %i
- %4:bool = lt %3, 10u
- if %4 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- continue # -> $B4
+void tint_symbol(tint_module_vars_struct tint_module_vars) {
+ {
+ while(true) {
+ if (((*tint_module_vars.i) < 10u)) {
+ } else {
+ break;
}
- $B4: { # continuing
- %5:u32 = load %i
- %6:u32 = add %5, 1u
- store %i, %6
- next_iteration # -> $B3
- }
+ (*tint_module_vars.i) = ((*tint_module_vars.i) + 1u);
+ 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/increment/for_loop_initializer.wgsl.expected.ir.msl b/test/tint/statements/increment/for_loop_initializer.wgsl.expected.ir.msl
index f24a049..01c62af 100644
--- a/test/tint/statements/increment/for_loop_initializer.wgsl.expected.ir.msl
+++ b/test/tint/statements/increment/for_loop_initializer.wgsl.expected.ir.msl
@@ -1,40 +1,18 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* i;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %i:ptr<storage, u32, read_write> = var @binding_point(0, 0)
-}
-
-%tint_symbol = func():void {
- $B2: {
- loop [i: $B3, b: $B4] { # loop_1
- $B3: { # initializer
- %3:u32 = load %i
- %4:u32 = add %3, 1u
- store %i, %4
- next_iteration # -> $B4
+void tint_symbol(tint_module_vars_struct tint_module_vars) {
+ {
+ (*tint_module_vars.i) = ((*tint_module_vars.i) + 1u);
+ while(true) {
+ if (((*tint_module_vars.i) < 10u)) {
+ } else {
+ break;
}
- $B4: { # body
- %5:u32 = load %i
- %6:bool = lt %5, 10u
- if %6 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- continue # -> $B7
- }
+ 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/increment/private.wgsl.expected.ir.msl b/test/tint/statements/increment/private.wgsl.expected.ir.msl
index 245468b..c04def4 100644
--- a/test/tint/statements/increment/private.wgsl.expected.ir.msl
+++ b/test/tint/statements/increment/private.wgsl.expected.ir.msl
@@ -5,5 +5,5 @@
};
void tint_symbol(tint_module_vars_struct tint_module_vars) {
- tint_module_vars.i = (tint_module_vars.i + 1);
+ (*tint_module_vars.i) = ((*tint_module_vars.i) + 1);
}
diff --git a/test/tint/statements/increment/storage.wgsl.expected.ir.msl b/test/tint/statements/increment/storage.wgsl.expected.ir.msl
index b963109..e4d31d7 100644
--- a/test/tint/statements/increment/storage.wgsl.expected.ir.msl
+++ b/test/tint/statements/increment/storage.wgsl.expected.ir.msl
@@ -5,5 +5,5 @@
};
void tint_symbol(tint_module_vars_struct tint_module_vars) {
- tint_module_vars.i = (tint_module_vars.i + 1u);
+ (*tint_module_vars.i) = ((*tint_module_vars.i) + 1u);
}
diff --git a/test/tint/statements/increment/vector_component.wgsl.expected.ir.msl b/test/tint/statements/increment/vector_component.wgsl.expected.ir.msl
index ae047c7..dda8936 100644
--- a/test/tint/statements/increment/vector_component.wgsl.expected.ir.msl
+++ b/test/tint/statements/increment/vector_component.wgsl.expected.ir.msl
@@ -5,6 +5,6 @@
};
void tint_symbol(tint_module_vars_struct tint_module_vars) {
- tint_module_vars.a[1] = (tint_module_vars.a[1] + 1u);
- tint_module_vars.a[2u] = (tint_module_vars.a[2u] + 1u);
+ (*tint_module_vars.a)[1] = ((*tint_module_vars.a)[1] + 1u);
+ (*tint_module_vars.a)[2u] = ((*tint_module_vars.a)[2u] + 1u);
}
diff --git a/test/tint/statements/increment/workgroup.wgsl.expected.ir.msl b/test/tint/statements/increment/workgroup.wgsl.expected.ir.msl
index 39fbfd2..fbe6b15 100644
--- a/test/tint/statements/increment/workgroup.wgsl.expected.ir.msl
+++ b/test/tint/statements/increment/workgroup.wgsl.expected.ir.msl
@@ -5,5 +5,5 @@
};
void tint_symbol(tint_module_vars_struct tint_module_vars) {
- tint_module_vars.i = (tint_module_vars.i + 1);
+ (*tint_module_vars.i) = ((*tint_module_vars.i) + 1);
}
diff --git a/test/tint/types/buffers/storage.wgsl.expected.ir.msl b/test/tint/types/buffers/storage.wgsl.expected.ir.msl
index be7c43f..961dc23 100644
--- a/test/tint/types/buffers/storage.wgsl.expected.ir.msl
+++ b/test/tint/types/buffers/storage.wgsl.expected.ir.msl
@@ -1,22 +1,22 @@
-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: $B1: { # root
- %weights:ptr<storage, array<f32>, read> = var @binding_point(0, 0)
+struct tint_module_vars_struct {
+ const device tint_array<float, 1>* weights;
+};
+
+fragment void tint_symbol(const device tint_array<float, 1>* weights [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.weights=weights};
+ float a = (*tint_module_vars.weights)[0];
}
-
-%tint_symbol = @fragment func():void {
- $B2: {
- %3:ptr<storage, f32, read> = access %weights, 0i
- %4:f32 = load %3
- %a:ptr<function, f32, read_write> = var, %4
- 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/types/buffers/uniform.wgsl.expected.ir.msl b/test/tint/types/buffers/uniform.wgsl.expected.ir.msl
index 884bf09..8587b5a 100644
--- a/test/tint/types/buffers/uniform.wgsl.expected.ir.msl
+++ b/test/tint/types/buffers/uniform.wgsl.expected.ir.msl
@@ -1,21 +1,10 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ const constant float2* weights;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %weights:ptr<uniform, vec2<f32>, read> = var @binding_point(0, 0)
+fragment void tint_symbol(const constant float2* weights [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.weights=weights};
+ float a = (*tint_module_vars.weights)[0];
}
-
-%tint_symbol = @fragment func():void {
- $B2: {
- %3:f32 = load_vector_element %weights, 0i
- %a:ptr<function, f32, read_write> = var, %3
- 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/types/function_scope_declarations.wgsl.expected.ir.msl b/test/tint/types/function_scope_declarations.wgsl.expected.ir.msl
index 11a6ade..dbda5ce 100644
--- a/test/tint/types/function_scope_declarations.wgsl.expected.ir.msl
+++ b/test/tint/types/function_scope_declarations.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -39,17 +37,7 @@
tint_array<float, 4> const arr_let = tint_array<float, 4>{};
S struct_var = S{};
S const struct_let = S{};
- thread float* const ptr_f32 = f32_var;
- thread float4* const ptr_vec = v4f32_var;
- thread tint_array<float, 4>* const ptr_arr = arr_var;
+ thread float* const ptr_f32 = (&f32_var);
+ thread float4* const ptr_vec = (&v4f32_var);
+ thread tint_array<float, 4>* const ptr_arr = (&arr_var);
}
-program_source:40:23: error: cannot initialize a variable of type 'float *const' with an lvalue of type 'float'
- thread float* const ptr_f32 = f32_var;
- ^ ~~~~~~~
-program_source:41:24: error: cannot initialize a variable of type 'float4 *const' with an lvalue of type 'float4' (vector of 4 'float' values)
- thread float4* const ptr_vec = v4f32_var;
- ^ ~~~~~~~~~
-program_source:42:38: error: no viable conversion from 'tint_array<float, 4>' to 'tint_array<float, 4> *const'
- thread tint_array<float, 4>* const ptr_arr = arr_var;
- ^ ~~~~~~~
-
diff --git a/test/tint/types/module_scope_private_initializers.wgsl.expected.ir.msl b/test/tint/types/module_scope_private_initializers.wgsl.expected.ir.msl
index 7e87012..127fbd6 100644
--- a/test/tint/types/module_scope_private_initializers.wgsl.expected.ir.msl
+++ b/test/tint/types/module_scope_private_initializers.wgsl.expected.ir.msl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float* a;
+ thread float* b;
+};
-thread float a = 1.0f;
-thread float b = 0.0f;
kernel void tint_symbol() {
- float const x = (a + b);
+ thread float a = 1.0f;
+ thread float b = 0.0f;
+ tint_module_vars_struct const tint_module_vars = {.a=(&a), .b=(&b)};
+ float const x = ((*tint_module_vars.a) + (*tint_module_vars.b));
}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread float a = 1.0f;
- ^
-program_source:5:14: error: program scope variable must reside in constant address space
-thread float b = 0.0f;
- ^
-program_source:7:15: warning: unused variable 'x' [-Wunused-variable]
- float const x = (a + b);
- ^
-
diff --git a/test/tint/types/module_scope_var_conversions.wgsl.expected.ir.msl b/test/tint/types/module_scope_var_conversions.wgsl.expected.ir.msl
index 3487698..0daa2b2 100644
--- a/test/tint/types/module_scope_var_conversions.wgsl.expected.ir.msl
+++ b/test/tint/types/module_scope_var_conversions.wgsl.expected.ir.msl
@@ -1,108 +1,68 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread bool* bool_var1;
+ thread bool* bool_var2;
+ thread bool* bool_var3;
+ thread int* i32_var1;
+ thread int* i32_var2;
+ thread int* i32_var3;
+ thread uint* u32_var1;
+ thread uint* u32_var2;
+ thread uint* u32_var3;
+ thread bool3* v3bool_var1;
+ thread bool3* v3bool_var2;
+ thread bool3* v3bool_var3;
+ thread int3* v3i32_var1;
+ thread int3* v3i32_var2;
+ thread int3* v3i32_var3;
+ thread uint3* v3u32_var1;
+ thread uint3* v3u32_var2;
+ thread uint3* v3u32_var3;
+ thread bool3* v3bool_var4;
+ thread bool4* v4bool_var5;
+};
-thread bool bool_var1 = true;
-thread bool bool_var2 = true;
-thread bool bool_var3 = true;
-thread int i32_var1 = 1;
-thread int i32_var2 = 1;
-thread int i32_var3 = 1;
-thread uint u32_var1 = 1u;
-thread uint u32_var2 = 1u;
-thread uint u32_var3 = 1u;
-thread bool3 v3bool_var1 = bool3(true);
-thread bool3 v3bool_var2 = bool3(true);
-thread bool3 v3bool_var3 = bool3(true);
-thread int3 v3i32_var1 = int3(1);
-thread int3 v3i32_var2 = int3(1);
-thread int3 v3i32_var3 = int3(1);
-thread uint3 v3u32_var1 = uint3(1u);
-thread uint3 v3u32_var2 = uint3(1u);
-thread uint3 v3u32_var3 = uint3(1u);
-thread bool3 v3bool_var4 = bool3(true);
-thread bool4 v4bool_var5 = bool4(true, false, true, false);
kernel void tint_symbol() {
- bool_var1 = false;
- bool_var2 = false;
- bool_var3 = false;
- i32_var1 = 0;
- i32_var2 = 0;
- i32_var3 = 0;
- u32_var1 = 0u;
- u32_var2 = 0u;
- u32_var3 = 0u;
- v3bool_var1 = bool3(false);
- v3bool_var2 = bool3(false);
- v3bool_var3 = bool3(false);
- v3bool_var4 = bool3(false);
- v4bool_var5 = bool4(false);
- v3i32_var1 = int3(0);
- v3i32_var2 = int3(0);
- v3i32_var3 = int3(0);
- v3u32_var1 = uint3(0u);
- v3u32_var2 = uint3(0u);
- v3u32_var3 = uint3(0u);
+ thread bool bool_var1 = true;
+ thread bool bool_var2 = true;
+ thread bool bool_var3 = true;
+ thread int i32_var1 = 1;
+ thread int i32_var2 = 1;
+ thread int i32_var3 = 1;
+ thread uint u32_var1 = 1u;
+ thread uint u32_var2 = 1u;
+ thread uint u32_var3 = 1u;
+ thread bool3 v3bool_var1 = bool3(true);
+ thread bool3 v3bool_var2 = bool3(true);
+ thread bool3 v3bool_var3 = bool3(true);
+ thread int3 v3i32_var1 = int3(1);
+ thread int3 v3i32_var2 = int3(1);
+ thread int3 v3i32_var3 = int3(1);
+ thread uint3 v3u32_var1 = uint3(1u);
+ thread uint3 v3u32_var2 = uint3(1u);
+ thread uint3 v3u32_var3 = uint3(1u);
+ thread bool3 v3bool_var4 = bool3(true);
+ thread bool4 v4bool_var5 = bool4(true, false, true, false);
+ tint_module_vars_struct const tint_module_vars = {.bool_var1=(&bool_var1), .bool_var2=(&bool_var2), .bool_var3=(&bool_var3), .i32_var1=(&i32_var1), .i32_var2=(&i32_var2), .i32_var3=(&i32_var3), .u32_var1=(&u32_var1), .u32_var2=(&u32_var2), .u32_var3=(&u32_var3), .v3bool_var1=(&v3bool_var1), .v3bool_var2=(&v3bool_var2), .v3bool_var3=(&v3bool_var3), .v3i32_var1=(&v3i32_var1), .v3i32_var2=(&v3i32_var2), .v3i32_var3=(&v3i32_var3), .v3u32_var1=(&v3u32_var1), .v3u32_var2=(&v3u32_var2), .v3u32_var3=(&v3u32_var3), .v3bool_var4=(&v3bool_var4), .v4bool_var5=(&v4bool_var5)};
+ (*tint_module_vars.bool_var1) = false;
+ (*tint_module_vars.bool_var2) = false;
+ (*tint_module_vars.bool_var3) = false;
+ (*tint_module_vars.i32_var1) = 0;
+ (*tint_module_vars.i32_var2) = 0;
+ (*tint_module_vars.i32_var3) = 0;
+ (*tint_module_vars.u32_var1) = 0u;
+ (*tint_module_vars.u32_var2) = 0u;
+ (*tint_module_vars.u32_var3) = 0u;
+ (*tint_module_vars.v3bool_var1) = bool3(false);
+ (*tint_module_vars.v3bool_var2) = bool3(false);
+ (*tint_module_vars.v3bool_var3) = bool3(false);
+ (*tint_module_vars.v3bool_var4) = bool3(false);
+ (*tint_module_vars.v4bool_var5) = bool4(false);
+ (*tint_module_vars.v3i32_var1) = int3(0);
+ (*tint_module_vars.v3i32_var2) = int3(0);
+ (*tint_module_vars.v3i32_var3) = int3(0);
+ (*tint_module_vars.v3u32_var1) = uint3(0u);
+ (*tint_module_vars.v3u32_var2) = uint3(0u);
+ (*tint_module_vars.v3u32_var3) = uint3(0u);
}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread bool bool_var1 = true;
- ^
-program_source:5:13: error: program scope variable must reside in constant address space
-thread bool bool_var2 = true;
- ^
-program_source:6:13: error: program scope variable must reside in constant address space
-thread bool bool_var3 = true;
- ^
-program_source:7:12: error: program scope variable must reside in constant address space
-thread int i32_var1 = 1;
- ^
-program_source:8:12: error: program scope variable must reside in constant address space
-thread int i32_var2 = 1;
- ^
-program_source:9:12: error: program scope variable must reside in constant address space
-thread int i32_var3 = 1;
- ^
-program_source:10:13: error: program scope variable must reside in constant address space
-thread uint u32_var1 = 1u;
- ^
-program_source:11:13: error: program scope variable must reside in constant address space
-thread uint u32_var2 = 1u;
- ^
-program_source:12:13: error: program scope variable must reside in constant address space
-thread uint u32_var3 = 1u;
- ^
-program_source:13:14: error: program scope variable must reside in constant address space
-thread bool3 v3bool_var1 = bool3(true);
- ^
-program_source:14:14: error: program scope variable must reside in constant address space
-thread bool3 v3bool_var2 = bool3(true);
- ^
-program_source:15:14: error: program scope variable must reside in constant address space
-thread bool3 v3bool_var3 = bool3(true);
- ^
-program_source:16:13: error: program scope variable must reside in constant address space
-thread int3 v3i32_var1 = int3(1);
- ^
-program_source:17:13: error: program scope variable must reside in constant address space
-thread int3 v3i32_var2 = int3(1);
- ^
-program_source:18:13: error: program scope variable must reside in constant address space
-thread int3 v3i32_var3 = int3(1);
- ^
-program_source:19:14: error: program scope variable must reside in constant address space
-thread uint3 v3u32_var1 = uint3(1u);
- ^
-program_source:20:14: error: program scope variable must reside in constant address space
-thread uint3 v3u32_var2 = uint3(1u);
- ^
-program_source:21:14: error: program scope variable must reside in constant address space
-thread uint3 v3u32_var3 = uint3(1u);
- ^
-program_source:22:14: error: program scope variable must reside in constant address space
-thread bool3 v3bool_var4 = bool3(true);
- ^
-program_source:23:14: error: program scope variable must reside in constant address space
-thread bool4 v4bool_var5 = bool4(true, false, true, false);
- ^
-
diff --git a/test/tint/types/module_scope_var_initializers.wgsl.expected.ir.msl b/test/tint/types/module_scope_var_initializers.wgsl.expected.ir.msl
index b889680..e6954bb 100644
--- a/test/tint/types/module_scope_var_initializers.wgsl.expected.ir.msl
+++ b/test/tint/types/module_scope_var_initializers.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -17,57 +15,39 @@
struct S {
float a;
};
+struct tint_module_vars_struct {
+ thread bool* bool_var;
+ thread int* i32_var;
+ thread uint* u32_var;
+ thread float* f32_var;
+ thread int2* v2i32_var;
+ thread uint3* v3u32_var;
+ thread float4* v4f32_var;
+ thread float2x3* m2x3_var;
+ thread tint_array<float, 4>* arr_var;
+ thread S* struct_var;
+};
-thread bool bool_var = false;
-thread int i32_var = 0;
-thread uint u32_var = 0u;
-thread float f32_var = 0.0f;
-thread int2 v2i32_var = int2(0);
-thread uint3 v3u32_var = uint3(0u);
-thread float4 v4f32_var = float4(0.0f);
-thread float2x3 m2x3_var = float2x3(float3(0.0f), float3(0.0f));
-thread tint_array<float, 4> arr_var = tint_array<float, 4>{};
-thread S struct_var = S{};
kernel void tint_symbol() {
- bool_var = false;
- i32_var = 0;
- u32_var = 0u;
- f32_var = 0.0f;
- v2i32_var = int2(0);
- v3u32_var = uint3(0u);
- v4f32_var = float4(0.0f);
- m2x3_var = float2x3(float3(0.0f), float3(0.0f));
- arr_var = tint_array<float, 4>{};
- struct_var = S{};
+ thread bool bool_var = false;
+ thread int i32_var = 0;
+ thread uint u32_var = 0u;
+ thread float f32_var = 0.0f;
+ thread int2 v2i32_var = int2(0);
+ thread uint3 v3u32_var = uint3(0u);
+ thread float4 v4f32_var = float4(0.0f);
+ thread float2x3 m2x3_var = float2x3(float3(0.0f), float3(0.0f));
+ thread tint_array<float, 4> arr_var = tint_array<float, 4>{};
+ thread S struct_var = S{};
+ tint_module_vars_struct const tint_module_vars = {.bool_var=(&bool_var), .i32_var=(&i32_var), .u32_var=(&u32_var), .f32_var=(&f32_var), .v2i32_var=(&v2i32_var), .v3u32_var=(&v3u32_var), .v4f32_var=(&v4f32_var), .m2x3_var=(&m2x3_var), .arr_var=(&arr_var), .struct_var=(&struct_var)};
+ (*tint_module_vars.bool_var) = false;
+ (*tint_module_vars.i32_var) = 0;
+ (*tint_module_vars.u32_var) = 0u;
+ (*tint_module_vars.f32_var) = 0.0f;
+ (*tint_module_vars.v2i32_var) = int2(0);
+ (*tint_module_vars.v3u32_var) = uint3(0u);
+ (*tint_module_vars.v4f32_var) = float4(0.0f);
+ (*tint_module_vars.m2x3_var) = float2x3(float3(0.0f), float3(0.0f));
+ (*tint_module_vars.arr_var) = tint_array<float, 4>{};
+ (*tint_module_vars.struct_var) = S{};
}
-program_source:19:13: error: program scope variable must reside in constant address space
-thread bool bool_var = false;
- ^
-program_source:20:12: error: program scope variable must reside in constant address space
-thread int i32_var = 0;
- ^
-program_source:21:13: error: program scope variable must reside in constant address space
-thread uint u32_var = 0u;
- ^
-program_source:22:14: error: program scope variable must reside in constant address space
-thread float f32_var = 0.0f;
- ^
-program_source:23:13: error: program scope variable must reside in constant address space
-thread int2 v2i32_var = int2(0);
- ^
-program_source:24:14: error: program scope variable must reside in constant address space
-thread uint3 v3u32_var = uint3(0u);
- ^
-program_source:25:15: error: program scope variable must reside in constant address space
-thread float4 v4f32_var = float4(0.0f);
- ^
-program_source:26:17: error: program scope variable must reside in constant address space
-thread float2x3 m2x3_var = float2x3(float3(0.0f), float3(0.0f));
- ^
-program_source:27:29: error: program scope variable must reside in constant address space
-thread tint_array<float, 4> arr_var = tint_array<float, 4>{};
- ^
-program_source:28:10: error: program scope variable must reside in constant address space
-thread S struct_var = S{};
- ^
-
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_0.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_0.spvasm.expected.ir.msl
deleted file mode 100644
index 44b8dae..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_0.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint x_1 = 0u;
-void main_1() {
- uint const x_2 = x_1;
-}
-kernel void tint_symbol(uint x_1_param [[thread_index_in_threadgroup]]) {
- x_1 = x_1_param;
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint x_1 = 0u;
- ^
-program_source:6:14: warning: unused variable 'x_2' [-Wunused-variable]
- uint const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_1.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_1.spvasm.expected.ir.msl
deleted file mode 100644
index 19dc07f..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_1.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread int x_1 = 0;
-void main_1() {
- int const x_2 = x_1;
-}
-kernel void tint_symbol(uint x_1_param [[thread_index_in_threadgroup]]) {
- x_1 = as_type<int>(x_1_param);
- main_1();
-}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int x_1 = 0;
- ^
-program_source:6:13: warning: unused variable 'x_2' [-Wunused-variable]
- int const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_2.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_2.spvasm.expected.ir.msl
deleted file mode 100644
index 7658eae..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_2.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint3 x_1 = 0u;
-void main_1() {
- uint3 const x_2 = x_1;
-}
-kernel void tint_symbol(uint3 x_1_param [[thread_position_in_threadgroup]]) {
- x_1 = x_1_param;
- main_1();
-}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint3 x_1 = 0u;
- ^
-program_source:6:15: warning: unused variable 'x_2' [-Wunused-variable]
- uint3 const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_3.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_3.spvasm.expected.ir.msl
deleted file mode 100644
index 49922e8..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_3.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread int3 x_1 = 0;
-void main_1() {
- int3 const x_2 = x_1;
-}
-kernel void tint_symbol(uint3 x_1_param [[thread_position_in_threadgroup]]) {
- x_1 = as_type<int3>(x_1_param);
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread int3 x_1 = 0;
- ^
-program_source:6:14: warning: unused variable 'x_2' [-Wunused-variable]
- int3 const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_4.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_4.spvasm.expected.ir.msl
deleted file mode 100644
index 2d802fa..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_4.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint3 x_1 = 0u;
-void main_1() {
- uint3 const x_2 = x_1;
-}
-kernel void tint_symbol(uint3 x_1_param [[thread_position_in_grid]]) {
- x_1 = x_1_param;
- main_1();
-}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint3 x_1 = 0u;
- ^
-program_source:6:15: warning: unused variable 'x_2' [-Wunused-variable]
- uint3 const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_5.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_5.spvasm.expected.ir.msl
deleted file mode 100644
index 47e466f..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_5.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread int3 x_1 = 0;
-void main_1() {
- int3 const x_2 = x_1;
-}
-kernel void tint_symbol(uint3 x_1_param [[thread_position_in_grid]]) {
- x_1 = as_type<int3>(x_1_param);
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread int3 x_1 = 0;
- ^
-program_source:6:14: warning: unused variable 'x_2' [-Wunused-variable]
- int3 const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_0.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_0.spvasm.expected.ir.msl
deleted file mode 100644
index 44b8dae..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_0.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint x_1 = 0u;
-void main_1() {
- uint const x_2 = x_1;
-}
-kernel void tint_symbol(uint x_1_param [[thread_index_in_threadgroup]]) {
- x_1 = x_1_param;
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint x_1 = 0u;
- ^
-program_source:6:14: warning: unused variable 'x_2' [-Wunused-variable]
- uint const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_1.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_1.spvasm.expected.ir.msl
deleted file mode 100644
index 19dc07f..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_1.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread int x_1 = 0;
-void main_1() {
- int const x_2 = x_1;
-}
-kernel void tint_symbol(uint x_1_param [[thread_index_in_threadgroup]]) {
- x_1 = as_type<int>(x_1_param);
- main_1();
-}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int x_1 = 0;
- ^
-program_source:6:13: warning: unused variable 'x_2' [-Wunused-variable]
- int const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_2.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_2.spvasm.expected.ir.msl
deleted file mode 100644
index 7658eae..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_2.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint3 x_1 = 0u;
-void main_1() {
- uint3 const x_2 = x_1;
-}
-kernel void tint_symbol(uint3 x_1_param [[thread_position_in_threadgroup]]) {
- x_1 = x_1_param;
- main_1();
-}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint3 x_1 = 0u;
- ^
-program_source:6:15: warning: unused variable 'x_2' [-Wunused-variable]
- uint3 const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_3.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_3.spvasm.expected.ir.msl
deleted file mode 100644
index 49922e8..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_3.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread int3 x_1 = 0;
-void main_1() {
- int3 const x_2 = x_1;
-}
-kernel void tint_symbol(uint3 x_1_param [[thread_position_in_threadgroup]]) {
- x_1 = as_type<int3>(x_1_param);
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread int3 x_1 = 0;
- ^
-program_source:6:14: warning: unused variable 'x_2' [-Wunused-variable]
- int3 const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_4.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_4.spvasm.expected.ir.msl
deleted file mode 100644
index 2d802fa..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_4.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint3 x_1 = 0u;
-void main_1() {
- uint3 const x_2 = x_1;
-}
-kernel void tint_symbol(uint3 x_1_param [[thread_position_in_grid]]) {
- x_1 = x_1_param;
- main_1();
-}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint3 x_1 = 0u;
- ^
-program_source:6:15: warning: unused variable 'x_2' [-Wunused-variable]
- uint3 const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_5.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_5.spvasm.expected.ir.msl
deleted file mode 100644
index 47e466f..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_5.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread int3 x_1 = 0;
-void main_1() {
- int3 const x_2 = x_1;
-}
-kernel void tint_symbol(uint3 x_1_param [[thread_position_in_grid]]) {
- x_1 = as_type<int3>(x_1_param);
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread int3 x_1 = 0;
- ^
-program_source:6:14: warning: unused variable 'x_2' [-Wunused-variable]
- int3 const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_0.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_0.spvasm.expected.ir.msl
deleted file mode 100644
index 44b8dae..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_0.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint x_1 = 0u;
-void main_1() {
- uint const x_2 = x_1;
-}
-kernel void tint_symbol(uint x_1_param [[thread_index_in_threadgroup]]) {
- x_1 = x_1_param;
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint x_1 = 0u;
- ^
-program_source:6:14: warning: unused variable 'x_2' [-Wunused-variable]
- uint const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_1.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_1.spvasm.expected.ir.msl
deleted file mode 100644
index 19dc07f..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_1.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread int x_1 = 0;
-void main_1() {
- int const x_2 = x_1;
-}
-kernel void tint_symbol(uint x_1_param [[thread_index_in_threadgroup]]) {
- x_1 = as_type<int>(x_1_param);
- main_1();
-}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int x_1 = 0;
- ^
-program_source:6:13: warning: unused variable 'x_2' [-Wunused-variable]
- int const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_2.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_2.spvasm.expected.ir.msl
deleted file mode 100644
index 7658eae..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_2.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint3 x_1 = 0u;
-void main_1() {
- uint3 const x_2 = x_1;
-}
-kernel void tint_symbol(uint3 x_1_param [[thread_position_in_threadgroup]]) {
- x_1 = x_1_param;
- main_1();
-}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint3 x_1 = 0u;
- ^
-program_source:6:15: warning: unused variable 'x_2' [-Wunused-variable]
- uint3 const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_3.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_3.spvasm.expected.ir.msl
deleted file mode 100644
index 49922e8..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_3.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread int3 x_1 = 0;
-void main_1() {
- int3 const x_2 = x_1;
-}
-kernel void tint_symbol(uint3 x_1_param [[thread_position_in_threadgroup]]) {
- x_1 = as_type<int3>(x_1_param);
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread int3 x_1 = 0;
- ^
-program_source:6:14: warning: unused variable 'x_2' [-Wunused-variable]
- int3 const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_4.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_4.spvasm.expected.ir.msl
deleted file mode 100644
index 2d802fa..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_4.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint3 x_1 = 0u;
-void main_1() {
- uint3 const x_2 = x_1;
-}
-kernel void tint_symbol(uint3 x_1_param [[thread_position_in_grid]]) {
- x_1 = x_1_param;
- main_1();
-}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint3 x_1 = 0u;
- ^
-program_source:6:15: warning: unused variable 'x_2' [-Wunused-variable]
- uint3 const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_5.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_5.spvasm.expected.ir.msl
deleted file mode 100644
index 47e466f..0000000
--- a/test/tint/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_5.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread int3 x_1 = 0;
-void main_1() {
- int3 const x_2 = x_1;
-}
-kernel void tint_symbol(uint3 x_1_param [[thread_position_in_grid]]) {
- x_1 = as_type<int3>(x_1_param);
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread int3 x_1 = 0;
- ^
-program_source:6:14: warning: unused variable 'x_2' [-Wunused-variable]
- int3 const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_ReadReplaced_Vertex.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_ReadReplaced_Vertex.spvasm.expected.ir.msl
deleted file mode 100644
index 8b257a0..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_ReadReplaced_Vertex.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,24 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-struct main_out {
- float4 x_2_1 [[position]];
-};
-
-thread float4 x_2 = 0.0f;
-thread float x_900 = 0.0f;
-void main_1() {
- x_900 = 1.0f;
-}
-vertex main_out tint_symbol() {
- main_1();
- return {.x_2_1=x_2};
-}
-program_source:7:15: error: program scope variable must reside in constant address space
-thread float4 x_2 = 0.0f;
- ^
-program_source:8:14: error: program scope variable must reside in constant address space
-thread float x_900 = 0.0f;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_Write1_IsErased.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_Write1_IsErased.spvasm.expected.ir.msl
deleted file mode 100644
index c466e7d..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_Write1_IsErased.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,19 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-struct main_out {
- float4 x_2_1 [[position]];
-};
-
-thread float4 x_2 = 0.0f;
-void main_1() {
-}
-vertex main_out tint_symbol() {
- main_1();
- return {.x_2_1=x_2};
-}
-program_source:7:15: error: program scope variable must reside in constant address space
-thread float4 x_2 = 0.0f;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.ir.msl
deleted file mode 100644
index c466e7d..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,19 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-struct main_out {
- float4 x_2_1 [[position]];
-};
-
-thread float4 x_2 = 0.0f;
-void main_1() {
-}
-vertex main_out tint_symbol() {
- main_1();
- return {.x_2_1=x_2};
-}
-program_source:7:15: error: program scope variable must reside in constant address space
-thread float4 x_2 = 0.0f;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPriorAccess_Erased.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPriorAccess_Erased.spvasm.expected.ir.msl
deleted file mode 100644
index c466e7d..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPriorAccess_Erased.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,19 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-struct main_out {
- float4 x_2_1 [[position]];
-};
-
-thread float4 x_2 = 0.0f;
-void main_1() {
-}
-vertex main_out tint_symbol() {
- main_1();
- return {.x_2_1=x_2};
-}
-program_source:7:15: error: program scope variable must reside in constant address space
-thread float4 x_2 = 0.0f;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_ReadReplaced.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_ReadReplaced.spvasm.expected.ir.msl
deleted file mode 100644
index 3bc136b..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_ReadReplaced.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,24 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-struct main_out {
- float4 gl_Position [[position]];
-};
-
-thread float x_900 = 0.0f;
-thread float4 gl_Position = 0.0f;
-void main_1() {
- x_900 = 1.0f;
-}
-vertex main_out tint_symbol() {
- main_1();
- return {.gl_Position=gl_Position};
-}
-program_source:7:14: error: program scope variable must reside in constant address space
-thread float x_900 = 0.0f;
- ^
-program_source:8:15: error: program scope variable must reside in constant address space
-thread float4 gl_Position = 0.0f;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm.expected.ir.msl
deleted file mode 100644
index 4644812..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,19 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-struct main_out {
- float4 gl_Position [[position]];
-};
-
-thread float4 gl_Position = 0.0f;
-void main_1() {
-}
-vertex main_out tint_symbol() {
- main_1();
- return {.gl_Position=gl_Position};
-}
-program_source:7:15: error: program scope variable must reside in constant address space
-thread float4 gl_Position = 0.0f;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.ir.msl
deleted file mode 100644
index 4644812..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,19 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-struct main_out {
- float4 gl_Position [[position]];
-};
-
-thread float4 gl_Position = 0.0f;
-void main_1() {
-}
-vertex main_out tint_symbol() {
- main_1();
- return {.gl_Position=gl_Position};
-}
-program_source:7:15: error: program scope variable must reside in constant address space
-thread float4 gl_Position = 0.0f;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm.expected.ir.msl
deleted file mode 100644
index 4644812..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,19 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-struct main_out {
- float4 gl_Position [[position]];
-};
-
-thread float4 gl_Position = 0.0f;
-void main_1() {
-}
-vertex main_out tint_symbol() {
- main_1();
- return {.gl_Position=gl_Position};
-}
-program_source:7:15: error: program scope variable must reside in constant address space
-thread float4 gl_Position = 0.0f;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm.expected.ir.msl
deleted file mode 100644
index d89d0b8..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,19 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-struct main_out {
- float4 gl_Position [[position]];
-};
-
-thread float4 gl_Position = float4(1.0f, 2.0f, 3.0f, 4.0f);
-void main_1() {
-}
-vertex main_out tint_symbol() {
- main_1();
- return {.gl_Position=gl_Position};
-}
-program_source:7:15: error: program scope variable must reside in constant address space
-thread float4 gl_Position = float4(1.0f, 2.0f, 3.0f, 4.0f);
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm.expected.ir.msl
deleted file mode 100644
index 7dba87b..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-struct main_out {
- float4 gl_Position [[position]];
-};
-
-thread float4 gl_Position = 0.0f;
-void main_1() {
- gl_Position = float4(0.0f);
-}
-vertex main_out tint_symbol() {
- main_1();
- return {.gl_Position=gl_Position};
-}
-program_source:7:15: error: program scope variable must reside in constant address space
-thread float4 gl_Position = 0.0f;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm.expected.ir.msl
deleted file mode 100644
index 17378a1..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-struct main_out {
- float4 gl_Position [[position]];
-};
-
-thread float4 gl_Position = 0.0f;
-void main_1() {
- gl_Position[1u] = 0.0f;
-}
-vertex main_out tint_symbol() {
- main_1();
- return {.gl_Position=gl_Position};
-}
-program_source:7:15: error: program scope variable must reside in constant address space
-thread float4 gl_Position = 0.0f;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm.expected.ir.msl
deleted file mode 100644
index 17378a1..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-struct main_out {
- float4 gl_Position [[position]];
-};
-
-thread float4 gl_Position = 0.0f;
-void main_1() {
- gl_Position[1u] = 0.0f;
-}
-vertex main_out tint_symbol() {
- main_1();
- return {.gl_Position=gl_Position};
-}
-program_source:7:15: error: program scope variable must reside in constant address space
-thread float4 gl_Position = 0.0f;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm.expected.ir.msl
deleted file mode 100644
index 7dba87b..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-struct main_out {
- float4 gl_Position [[position]];
-};
-
-thread float4 gl_Position = 0.0f;
-void main_1() {
- gl_Position = float4(0.0f);
-}
-vertex main_out tint_symbol() {
- main_1();
- return {.gl_Position=gl_Position};
-}
-program_source:7:15: error: program scope variable must reside in constant address space
-thread float4 gl_Position = 0.0f;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_FragDepth_Out_Initializer.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_FragDepth_Out_Initializer.spvasm.expected.ir.msl
deleted file mode 100644
index c308d35..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_FragDepth_Out_Initializer.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,19 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-struct main_out {
- float x_1_1 [[depth(any)]];
-};
-
-thread float x_1 = 0.0f;
-void main_1() {
-}
-fragment main_out tint_symbol() {
- main_1();
- return {.x_1_1=x_1};
-}
-program_source:7:14: error: program scope variable must reside in constant address space
-thread float x_1 = 0.0f;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Signed.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Signed.spvasm.expected.ir.msl
deleted file mode 100644
index 477924d..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Signed.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,28 +0,0 @@
-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];
-};
-
-
-thread tint_array<int, 1> x_1 = {};
-void main_1() {
-}
-fragment void tint_symbol(uint x_1_param [[sample_mask]]) {
- x_1[0] = as_type<int>(x_1_param);
- main_1();
-}
-program_source:16:27: error: program scope variable must reside in constant address space
-thread tint_array<int, 1> x_1 = {};
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Unsigned.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Unsigned.spvasm.expected.ir.msl
deleted file mode 100644
index 867570d..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Unsigned.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,28 +0,0 @@
-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];
-};
-
-
-thread tint_array<uint, 1> x_1 = {};
-void main_1() {
-}
-fragment void tint_symbol(uint x_1_param [[sample_mask]]) {
- x_1[0] = x_1_param;
- main_1();
-}
-program_source:16:28: error: program scope variable must reside in constant address space
-thread tint_array<uint, 1> x_1 = {};
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Signed_Initializer.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Signed_Initializer.spvasm.expected.ir.msl
deleted file mode 100644
index 4f1417f..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Signed_Initializer.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,31 +0,0 @@
-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];
-};
-
-struct main_out {
- uint x_1_1 [[sample_mask]];
-};
-
-thread tint_array<int, 1> x_1 = tint_array<int, 1>{};
-void main_1() {
-}
-fragment main_out tint_symbol() {
- main_1();
- return {.x_1_1=as_type<uint>(x_1[0])};
-}
-program_source:19:27: error: program scope variable must reside in constant address space
-thread tint_array<int, 1> x_1 = tint_array<int, 1>{};
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Unsigned_Initializer.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Unsigned_Initializer.spvasm.expected.ir.msl
deleted file mode 100644
index 672fbd1..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Unsigned_Initializer.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,31 +0,0 @@
-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];
-};
-
-struct main_out {
- uint x_1_1 [[sample_mask]];
-};
-
-thread tint_array<uint, 1> x_1 = tint_array<uint, 1>{};
-void main_1() {
-}
-fragment main_out tint_symbol() {
- main_1();
- return {.x_1_1=x_1[0]};
-}
-program_source:19:28: error: program scope variable must reside in constant address space
-thread tint_array<uint, 1> x_1 = tint_array<uint, 1>{};
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_AccessChain.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_AccessChain.spvasm.expected.ir.msl
deleted file mode 100644
index 30d865d..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_AccessChain.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread int x_1 = 0;
-void main_1() {
- int const x_2 = x_1;
-}
-fragment void tint_symbol(uint x_1_param [[sample_id]]) {
- x_1 = as_type<int>(x_1_param);
- main_1();
-}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int x_1 = 0;
- ^
-program_source:6:13: warning: unused variable 'x_2' [-Wunused-variable]
- int const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_CopyObject.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_CopyObject.spvasm.expected.ir.msl
deleted file mode 100644
index 30d865d..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_CopyObject.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread int x_1 = 0;
-void main_1() {
- int const x_2 = x_1;
-}
-fragment void tint_symbol(uint x_1_param [[sample_id]]) {
- x_1 = as_type<int>(x_1_param);
- main_1();
-}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int x_1 = 0;
- ^
-program_source:6:13: warning: unused variable 'x_2' [-Wunused-variable]
- int const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_Direct.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_Direct.spvasm.expected.ir.msl
deleted file mode 100644
index 30d865d..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_Direct.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread int x_1 = 0;
-void main_1() {
- int const x_2 = x_1;
-}
-fragment void tint_symbol(uint x_1_param [[sample_id]]) {
- x_1 = as_type<int>(x_1_param);
- main_1();
-}
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int x_1 = 0;
- ^
-program_source:6:13: warning: unused variable 'x_2' [-Wunused-variable]
- int const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_AccessChain.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_AccessChain.spvasm.expected.ir.msl
deleted file mode 100644
index 1179f38..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_AccessChain.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint x_1 = 0u;
-void main_1() {
- uint const x_2 = x_1;
-}
-fragment void tint_symbol(uint x_1_param [[sample_id]]) {
- x_1 = x_1_param;
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint x_1 = 0u;
- ^
-program_source:6:14: warning: unused variable 'x_2' [-Wunused-variable]
- uint const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_CopyObject.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_CopyObject.spvasm.expected.ir.msl
deleted file mode 100644
index 1179f38..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_CopyObject.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint x_1 = 0u;
-void main_1() {
- uint const x_2 = x_1;
-}
-fragment void tint_symbol(uint x_1_param [[sample_id]]) {
- x_1 = x_1_param;
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint x_1 = 0u;
- ^
-program_source:6:14: warning: unused variable 'x_2' [-Wunused-variable]
- uint const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_Direct.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_Direct.spvasm.expected.ir.msl
deleted file mode 100644
index 1179f38..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_Direct.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint x_1 = 0u;
-void main_1() {
- uint const x_2 = x_1;
-}
-fragment void tint_symbol(uint x_1_param [[sample_id]]) {
- x_1 = x_1_param;
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint x_1 = 0u;
- ^
-program_source:6:14: warning: unused variable 'x_2' [-Wunused-variable]
- uint const x_2 = x_1;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_AccessChain.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_AccessChain.spvasm.expected.ir.msl
deleted file mode 100644
index 73a87d1..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_AccessChain.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,32 +0,0 @@
-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];
-};
-
-
-thread tint_array<int, 1> x_1 = {};
-void main_1() {
- int const x_4 = x_1[0];
-}
-fragment void tint_symbol(uint x_1_param [[sample_mask]]) {
- x_1[0] = as_type<int>(x_1_param);
- main_1();
-}
-program_source:16:27: error: program scope variable must reside in constant address space
-thread tint_array<int, 1> x_1 = {};
- ^
-program_source:18:13: warning: unused variable 'x_4' [-Wunused-variable]
- int const x_4 = x_1[0];
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_CopyObject.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_CopyObject.spvasm.expected.ir.msl
deleted file mode 100644
index 73a87d1..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_CopyObject.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,32 +0,0 @@
-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];
-};
-
-
-thread tint_array<int, 1> x_1 = {};
-void main_1() {
- int const x_4 = x_1[0];
-}
-fragment void tint_symbol(uint x_1_param [[sample_mask]]) {
- x_1[0] = as_type<int>(x_1_param);
- main_1();
-}
-program_source:16:27: error: program scope variable must reside in constant address space
-thread tint_array<int, 1> x_1 = {};
- ^
-program_source:18:13: warning: unused variable 'x_4' [-Wunused-variable]
- int const x_4 = x_1[0];
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_Direct.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_Direct.spvasm.expected.ir.msl
deleted file mode 100644
index a26b371..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_Direct.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,32 +0,0 @@
-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];
-};
-
-
-thread tint_array<int, 1> x_1 = {};
-void main_1() {
- int const x_3 = x_1[0];
-}
-fragment void tint_symbol(uint x_1_param [[sample_mask]]) {
- x_1[0] = as_type<int>(x_1_param);
- main_1();
-}
-program_source:16:27: error: program scope variable must reside in constant address space
-thread tint_array<int, 1> x_1 = {};
- ^
-program_source:18:13: warning: unused variable 'x_3' [-Wunused-variable]
- int const x_3 = x_1[0];
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_AccessChain.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_AccessChain.spvasm.expected.ir.msl
deleted file mode 100644
index cea308f..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_AccessChain.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,32 +0,0 @@
-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];
-};
-
-
-thread tint_array<uint, 1> x_1 = {};
-void main_1() {
- uint const x_4 = x_1[0];
-}
-fragment void tint_symbol(uint x_1_param [[sample_mask]]) {
- x_1[0] = x_1_param;
- main_1();
-}
-program_source:16:28: error: program scope variable must reside in constant address space
-thread tint_array<uint, 1> x_1 = {};
- ^
-program_source:18:14: warning: unused variable 'x_4' [-Wunused-variable]
- uint const x_4 = x_1[0];
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_CopyObject.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_CopyObject.spvasm.expected.ir.msl
deleted file mode 100644
index cea308f..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_CopyObject.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,32 +0,0 @@
-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];
-};
-
-
-thread tint_array<uint, 1> x_1 = {};
-void main_1() {
- uint const x_4 = x_1[0];
-}
-fragment void tint_symbol(uint x_1_param [[sample_mask]]) {
- x_1[0] = x_1_param;
- main_1();
-}
-program_source:16:28: error: program scope variable must reside in constant address space
-thread tint_array<uint, 1> x_1 = {};
- ^
-program_source:18:14: warning: unused variable 'x_4' [-Wunused-variable]
- uint const x_4 = x_1[0];
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_Direct.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_Direct.spvasm.expected.ir.msl
deleted file mode 100644
index 514dce4..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_Direct.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,32 +0,0 @@
-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];
-};
-
-
-thread tint_array<uint, 1> x_1 = {};
-void main_1() {
- uint const x_3 = x_1[0];
-}
-fragment void tint_symbol(uint x_1_param [[sample_mask]]) {
- x_1[0] = x_1_param;
- main_1();
-}
-program_source:16:28: error: program scope variable must reside in constant address space
-thread tint_array<uint, 1> x_1 = {};
- ^
-program_source:18:14: warning: unused variable 'x_3' [-Wunused-variable]
- uint const x_3 = x_1[0];
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_WithStride.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_WithStride.spvasm.expected.ir.msl
deleted file mode 100644
index 514dce4..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_WithStride.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,32 +0,0 @@
-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];
-};
-
-
-thread tint_array<uint, 1> x_1 = {};
-void main_1() {
- uint const x_3 = x_1[0];
-}
-fragment void tint_symbol(uint x_1_param [[sample_mask]]) {
- x_1[0] = x_1_param;
- main_1();
-}
-program_source:16:28: error: program scope variable must reside in constant address space
-thread tint_array<uint, 1> x_1 = {};
- ^
-program_source:18:14: warning: unused variable 'x_3' [-Wunused-variable]
- uint const x_3 = x_1[0];
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_AccessChain.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_AccessChain.spvasm.expected.ir.msl
deleted file mode 100644
index 6c43e76..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_AccessChain.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,32 +0,0 @@
-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];
-};
-
-struct main_out {
- uint x_1_1 [[sample_mask]];
-};
-
-thread tint_array<int, 1> x_1 = {};
-void main_1() {
- x_1[0] = 12;
-}
-fragment main_out tint_symbol() {
- main_1();
- return {.x_1_1=as_type<uint>(x_1[0])};
-}
-program_source:19:27: error: program scope variable must reside in constant address space
-thread tint_array<int, 1> x_1 = {};
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_CopyObject.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_CopyObject.spvasm.expected.ir.msl
deleted file mode 100644
index 6c43e76..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_CopyObject.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,32 +0,0 @@
-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];
-};
-
-struct main_out {
- uint x_1_1 [[sample_mask]];
-};
-
-thread tint_array<int, 1> x_1 = {};
-void main_1() {
- x_1[0] = 12;
-}
-fragment main_out tint_symbol() {
- main_1();
- return {.x_1_1=as_type<uint>(x_1[0])};
-}
-program_source:19:27: error: program scope variable must reside in constant address space
-thread tint_array<int, 1> x_1 = {};
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_Direct.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_Direct.spvasm.expected.ir.msl
deleted file mode 100644
index 6c43e76..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_Direct.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,32 +0,0 @@
-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];
-};
-
-struct main_out {
- uint x_1_1 [[sample_mask]];
-};
-
-thread tint_array<int, 1> x_1 = {};
-void main_1() {
- x_1[0] = 12;
-}
-fragment main_out tint_symbol() {
- main_1();
- return {.x_1_1=as_type<uint>(x_1[0])};
-}
-program_source:19:27: error: program scope variable must reside in constant address space
-thread tint_array<int, 1> x_1 = {};
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_AccessChain.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_AccessChain.spvasm.expected.ir.msl
deleted file mode 100644
index a9c8a36..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_AccessChain.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,32 +0,0 @@
-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];
-};
-
-struct main_out {
- uint x_1_1 [[sample_mask]];
-};
-
-thread tint_array<uint, 1> x_1 = {};
-void main_1() {
- x_1[0] = 0u;
-}
-fragment main_out tint_symbol() {
- main_1();
- return {.x_1_1=x_1[0]};
-}
-program_source:19:28: error: program scope variable must reside in constant address space
-thread tint_array<uint, 1> x_1 = {};
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_CopyObject.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_CopyObject.spvasm.expected.ir.msl
deleted file mode 100644
index a9c8a36..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_CopyObject.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,32 +0,0 @@
-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];
-};
-
-struct main_out {
- uint x_1_1 [[sample_mask]];
-};
-
-thread tint_array<uint, 1> x_1 = {};
-void main_1() {
- x_1[0] = 0u;
-}
-fragment main_out tint_symbol() {
- main_1();
- return {.x_1_1=x_1[0]};
-}
-program_source:19:28: error: program scope variable must reside in constant address space
-thread tint_array<uint, 1> x_1 = {};
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_Direct.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_Direct.spvasm.expected.ir.msl
deleted file mode 100644
index a9c8a36..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_Direct.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,32 +0,0 @@
-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];
-};
-
-struct main_out {
- uint x_1_1 [[sample_mask]];
-};
-
-thread tint_array<uint, 1> x_1 = {};
-void main_1() {
- x_1[0] = 0u;
-}
-fragment main_out tint_symbol() {
- main_1();
- return {.x_1_1=x_1[0]};
-}
-program_source:19:28: error: program scope variable must reside in constant address space
-thread tint_array<uint, 1> x_1 = {};
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_WithStride.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_WithStride.spvasm.expected.ir.msl
deleted file mode 100644
index a9c8a36..0000000
--- a/test/tint/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_WithStride.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,32 +0,0 @@
-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];
-};
-
-struct main_out {
- uint x_1_1 [[sample_mask]];
-};
-
-thread tint_array<uint, 1> x_1 = {};
-void main_1() {
- x_1[0] = 0u;
-}
-fragment main_out tint_symbol() {
- main_1();
- return {.x_1_1=x_1[0]};
-}
-program_source:19:28: error: program scope variable must reside in constant address space
-thread tint_array<uint, 1> x_1 = {};
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_LoopBreak_OnFalse.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_LoopBreak_OnFalse.spvasm.expected.ir.msl
deleted file mode 100644
index 78df30e..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_LoopBreak_OnFalse.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,27 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 0u;
- {
- while(true) {
- var_1 = 1u;
- if (false) {
- } else {
- break;
- }
- continue;
- }
- }
- var_1 = 5u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_LoopBreak_OnTrue.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_LoopBreak_OnTrue.spvasm.expected.ir.msl
deleted file mode 100644
index bb63b4d..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_LoopBreak_OnTrue.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,26 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 0u;
- {
- while(true) {
- var_1 = 1u;
- if (false) {
- break;
- }
- continue;
- }
- }
- var_1 = 5u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Forward_Forward_Same.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Forward_Forward_Same.spvasm.expected.ir.msl
deleted file mode 100644
index 325db3e..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Forward_Forward_Same.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,17 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 1u;
- var_1 = 2u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_IfBreak_IfBreak_Same.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_IfBreak_IfBreak_Same.spvasm.expected.ir.msl
deleted file mode 100644
index 92775e8..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_IfBreak_IfBreak_Same.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,19 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 0u;
- if (false) {
- }
- var_1 = 5u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopBreak_Continue_OnFalse.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopBreak_Continue_OnFalse.spvasm.expected.ir.msl
deleted file mode 100644
index ac791f1..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopBreak_Continue_OnFalse.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 0u;
- {
- while(true) {
- var_1 = 1u;
- if (true) {
- var_1 = 2u;
- if (false) {
- break;
- } else {
- var_1 = 4u;
- continue;
- }
- }
- var_1 = 3u;
- var_1 = 4u;
- continue;
- }
- }
- var_1 = 5u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopBreak_Continue_OnTrue.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopBreak_Continue_OnTrue.spvasm.expected.ir.msl
deleted file mode 100644
index 0ba35db..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopBreak_Continue_OnTrue.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 0u;
- {
- while(true) {
- var_1 = 1u;
- if (true) {
- var_1 = 2u;
- if (false) {
- var_1 = 4u;
- continue;
- } else {
- break;
- }
- }
- var_1 = 3u;
- var_1 = 4u;
- continue;
- }
- }
- var_1 = 5u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopBreak_Forward_OnFalse.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopBreak_Forward_OnFalse.spvasm.expected.ir.msl
deleted file mode 100644
index f11023d..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopBreak_Forward_OnFalse.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,29 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 0u;
- {
- while(true) {
- var_1 = 1u;
- var_1 = 2u;
- if (false) {
- break;
- }
- var_1 = 3u;
- var_1 = 4u;
- continue;
- }
- }
- var_1 = 5u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopBreak_Forward_OnTrue.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopBreak_Forward_OnTrue.spvasm.expected.ir.msl
deleted file mode 100644
index c382531..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopBreak_Forward_OnTrue.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,30 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 0u;
- {
- while(true) {
- var_1 = 1u;
- var_1 = 2u;
- if (false) {
- } else {
- break;
- }
- var_1 = 3u;
- var_1 = 4u;
- continue;
- }
- }
- var_1 = 5u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopBreak_MultiBlock_LoopBreak.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopBreak_MultiBlock_LoopBreak.spvasm.expected.ir.msl
deleted file mode 100644
index 991b423..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopBreak_MultiBlock_LoopBreak.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,24 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 0u;
- {
- while(true) {
- var_1 = 1u;
- var_1 = 2u;
- break;
- }
- }
- var_1 = 5u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopBreak_SingleBlock_LoopBreak.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopBreak_SingleBlock_LoopBreak.spvasm.expected.ir.msl
deleted file mode 100644
index 369d438..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopBreak_SingleBlock_LoopBreak.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,23 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 0u;
- {
- while(true) {
- var_1 = 1u;
- break;
- }
- }
- var_1 = 5u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Forward_OnFalse.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Forward_OnFalse.spvasm.expected.ir.msl
deleted file mode 100644
index 1920aa9..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Forward_OnFalse.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,32 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 1u;
- switch(42u) {
- case 20u:
- {
- var_1 = 20u;
- if (false) {
- break;
- }
- var_1 = 30u;
- break;
- }
- default:
- {
- break;
- }
- }
- var_1 = 8u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Forward_OnTrue.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Forward_OnTrue.spvasm.expected.ir.msl
deleted file mode 100644
index 78b9430..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Forward_OnTrue.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 1u;
- switch(42u) {
- case 20u:
- {
- var_1 = 20u;
- if (false) {
- } else {
- break;
- }
- var_1 = 30u;
- break;
- }
- default:
- {
- break;
- }
- }
- var_1 = 8u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_SwitchBreak_LastInCase.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_SwitchBreak_LastInCase.spvasm.expected.ir.msl
deleted file mode 100644
index 608fd45..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_SwitchBreak_LastInCase.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,28 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 1u;
- switch(42u) {
- case 20u:
- {
- var_1 = 20u;
- break;
- }
- default:
- {
- break;
- }
- }
- var_1 = 7u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_SwitchBreak_NotLastInCase.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_SwitchBreak_NotLastInCase.spvasm.expected.ir.msl
deleted file mode 100644
index 847475b..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_SwitchBreak_NotLastInCase.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 1u;
- switch(42u) {
- case 20u:
- {
- var_1 = 20u;
- if (false) {
- var_1 = 40u;
- break;
- }
- var_1 = 50u;
- break;
- }
- default:
- {
- break;
- }
- }
- var_1 = 7u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_Forward.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_Forward.spvasm.expected.ir.msl
deleted file mode 100644
index 325db3e..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_Forward.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,17 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 1u;
- var_1 = 2u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_IfBreak_FromElse.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_IfBreak_FromElse.spvasm.expected.ir.msl
deleted file mode 100644
index f413dff..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_IfBreak_FromElse.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- if (false) {
- } else {
- var_1 = 1u;
- }
- var_1 = 2u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_IfBreak_FromThen.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_IfBreak_FromThen.spvasm.expected.ir.msl
deleted file mode 100644
index 6c47222..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_IfBreak_FromThen.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,19 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- if (false) {
- var_1 = 1u;
- }
- var_1 = 2u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopBreak_MultiBlockLoop_FromBody.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopBreak_MultiBlockLoop_FromBody.spvasm.expected.ir.msl
deleted file mode 100644
index c2ca74b..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopBreak_MultiBlockLoop_FromBody.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,21 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- {
- while(true) {
- var_1 = 1u;
- break;
- }
- }
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_SwitchBreak_LastInCase.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_SwitchBreak_LastInCase.spvasm.expected.ir.msl
deleted file mode 100644
index 608fd45..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_SwitchBreak_LastInCase.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,28 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 1u;
- switch(42u) {
- case 20u:
- {
- var_1 = 20u;
- break;
- }
- default:
- {
- break;
- }
- }
- var_1 = 7u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_SwitchBreak_NotLastInCase.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_SwitchBreak_NotLastInCase.spvasm.expected.ir.msl
deleted file mode 100644
index 847475b..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_SwitchBreak_NotLastInCase.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 1u;
- switch(42u) {
- case 20u:
- {
- var_1 = 20u;
- if (false) {
- var_1 = 40u;
- break;
- }
- var_1 = 50u;
- break;
- }
- default:
- {
- break;
- }
- }
- var_1 = 7u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_IfBreak_FromElse_ForwardWithinElse.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_IfBreak_FromElse_ForwardWithinElse.spvasm.expected.ir.msl
deleted file mode 100644
index 7949a67..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_IfBreak_FromElse_ForwardWithinElse.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 1u;
- bool guard10 = true;
- if (false) {
- var_1 = 2u;
- guard10 = false;
- } else {
- if (guard10) {
- var_1 = 3u;
- if (true) {
- guard10 = false;
- }
- if (guard10) {
- var_1 = 4u;
- guard10 = false;
- }
- }
- }
- var_1 = 5u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_IfBreak_FromThenWithForward_FromElseWithForward_AlsoPremerge.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_IfBreak_FromThenWithForward_FromElseWithForward_AlsoPremerge.spvasm.expected.ir.msl
deleted file mode 100644
index 9da2f13..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_IfBreak_FromThenWithForward_FromElseWithForward_AlsoPremerge.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,49 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 1u;
- bool guard10 = true;
- if (false) {
- var_1 = 2u;
- if (true) {
- } else {
- guard10 = false;
- }
- if (guard10) {
- var_1 = 3u;
- }
- } else {
- if (guard10) {
- var_1 = 4u;
- if (true) {
- guard10 = false;
- }
- if (guard10) {
- var_1 = 5u;
- }
- }
- }
- if (guard10) {
- var_1 = 6u;
- if (false) {
- } else {
- guard10 = false;
- }
- if (guard10) {
- var_1 = 7u;
- guard10 = false;
- }
- }
- var_1 = 8u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_IfBreak_FromThen_ForwardWithinThen.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_IfBreak_FromThen_ForwardWithinThen.spvasm.expected.ir.msl
deleted file mode 100644
index 73224a6..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_IfBreak_FromThen_ForwardWithinThen.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 1u;
- bool guard10 = true;
- if (false) {
- var_1 = 2u;
- if (true) {
- guard10 = false;
- }
- if (guard10) {
- var_1 = 3u;
- guard10 = false;
- }
- } else {
- if (guard10) {
- var_1 = 4u;
- guard10 = false;
- }
- }
- var_1 = 5u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_Else_Premerge.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_Else_Premerge.spvasm.expected.ir.msl
deleted file mode 100644
index e95dde7..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_Else_Premerge.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,24 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 0u;
- if (false) {
- } else {
- var_1 = 1u;
- }
- if (true) {
- var_1 = 3u;
- }
- var_1 = 999u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_Nest_If.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_Nest_If.spvasm.expected.ir.msl
deleted file mode 100644
index 01230eb..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_Nest_If.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,31 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 0u;
- if (false) {
- var_1 = 1u;
- if (true) {
- var_1 = 2u;
- }
- var_1 = 3u;
- } else {
- var_1 = 4u;
- if (true) {
- } else {
- var_1 = 5u;
- }
- var_1 = 6u;
- }
- var_1 = 999u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_NoThen_Else.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_NoThen_Else.spvasm.expected.ir.msl
deleted file mode 100644
index 28528c9..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_NoThen_Else.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,21 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 0u;
- if (false) {
- } else {
- var_1 = 1u;
- }
- var_1 = 999u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_Then_Else.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_Then_Else.spvasm.expected.ir.msl
deleted file mode 100644
index 7c67b8b..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_Then_Else.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,22 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 0u;
- if (false) {
- var_1 = 1u;
- } else {
- var_1 = 2u;
- }
- var_1 = 999u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_Then_Else_Premerge.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_Then_Else_Premerge.spvasm.expected.ir.msl
deleted file mode 100644
index 7c82786..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_Then_Else_Premerge.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,25 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 0u;
- if (false) {
- var_1 = 1u;
- } else {
- var_1 = 2u;
- }
- if (true) {
- var_1 = 3u;
- }
- var_1 = 999u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_Then_NoElse.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_Then_NoElse.spvasm.expected.ir.msl
deleted file mode 100644
index 130801e..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_Then_NoElse.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 0u;
- if (false) {
- var_1 = 1u;
- }
- var_1 = 999u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_Then_Premerge.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_Then_Premerge.spvasm.expected.ir.msl
deleted file mode 100644
index 24f931f..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_If_Then_Premerge.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,23 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 0u;
- if (false) {
- var_1 = 1u;
- }
- if (true) {
- var_1 = 3u;
- }
- var_1 = 999u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_BodyAlwaysBreaks.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_BodyAlwaysBreaks.spvasm.expected.ir.msl
deleted file mode 100644
index c2ca74b..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_BodyAlwaysBreaks.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,21 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- {
- while(true) {
- var_1 = 1u;
- break;
- }
- }
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_BodyConditionallyBreaks_FromFalse.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_BodyConditionallyBreaks_FromFalse.spvasm.expected.ir.msl
deleted file mode 100644
index c4b5587..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_BodyConditionallyBreaks_FromFalse.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,26 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- {
- while(true) {
- var_1 = 1u;
- if (false) {
- } else {
- break;
- }
- var_1 = 2u;
- continue;
- }
- }
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_BodyConditionallyBreaks_FromFalse_Early.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_BodyConditionallyBreaks_FromFalse_Early.spvasm.expected.ir.msl
deleted file mode 100644
index 4a68870..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_BodyConditionallyBreaks_FromFalse_Early.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,27 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- {
- while(true) {
- var_1 = 1u;
- if (false) {
- } else {
- break;
- }
- var_1 = 3u;
- var_1 = 2u;
- continue;
- }
- }
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_BodyConditionallyBreaks_FromTrue.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_BodyConditionallyBreaks_FromTrue.spvasm.expected.ir.msl
deleted file mode 100644
index fc8bc94..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_BodyConditionallyBreaks_FromTrue.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,25 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- {
- while(true) {
- var_1 = 1u;
- if (false) {
- break;
- }
- var_1 = 2u;
- continue;
- }
- }
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_BodyConditionallyBreaks_FromTrue_Early.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_BodyConditionallyBreaks_FromTrue_Early.spvasm.expected.ir.msl
deleted file mode 100644
index 65067ed..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_BodyConditionallyBreaks_FromTrue_Early.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,26 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- {
- while(true) {
- var_1 = 1u;
- if (false) {
- break;
- }
- var_1 = 3u;
- var_1 = 2u;
- continue;
- }
- }
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_FalseToBody_TrueBreaks.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_FalseToBody_TrueBreaks.spvasm.expected.ir.msl
deleted file mode 100644
index 6b65e15..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_FalseToBody_TrueBreaks.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,28 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- {
- while(true) {
- var_1 = 1u;
- if (false) {
- } else {
- break;
- }
- var_1 = 2u;
- var_1 = 3u;
- continue;
- }
- }
- var_1 = 4u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Never.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Never.spvasm.expected.ir.msl
deleted file mode 100644
index 82ff151..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Never.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,22 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- {
- while(true) {
- var_1 = 1u;
- break;
- }
- }
- var_1 = 3u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_FalseBackedge.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_FalseBackedge.spvasm.expected.ir.msl
deleted file mode 100644
index a0d777f..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_FalseBackedge.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,26 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 0u;
- {
- while(true) {
- var_1 = 1u;
- if (false) {
- break;
- }
- continue;
- }
- }
- var_1 = 999u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_TrueBackedge.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_TrueBackedge.spvasm.expected.ir.msl
deleted file mode 100644
index 88c1d20..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_TrueBackedge.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,27 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 0u;
- {
- while(true) {
- var_1 = 1u;
- if (false) {
- } else {
- break;
- }
- continue;
- }
- }
- var_1 = 999u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_TrueToBody_FalseBreaks.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_TrueToBody_FalseBreaks.spvasm.expected.ir.msl
deleted file mode 100644
index 6b65e15..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_TrueToBody_FalseBreaks.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,28 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- {
- while(true) {
- var_1 = 1u;
- if (false) {
- } else {
- break;
- }
- var_1 = 2u;
- var_1 = 3u;
- continue;
- }
- }
- var_1 = 4u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_Case_SintValue.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_Case_SintValue.spvasm.expected.ir.msl
deleted file mode 100644
index 1f6278e..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_Case_SintValue.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,38 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 1u;
- switch(42) {
- case -294967296:
- {
- var_1 = 40u;
- break;
- }
- case 2000000000:
- {
- var_1 = 30u;
- break;
- }
- case 20:
- {
- var_1 = 20u;
- break;
- }
- default:
- {
- break;
- }
- }
- var_1 = 7u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_Case_UintValue.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_Case_UintValue.spvasm.expected.ir.msl
deleted file mode 100644
index 46877d5..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_Case_UintValue.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,38 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 1u;
- switch(42u) {
- case 50u:
- {
- var_1 = 40u;
- break;
- }
- case 2000000000u:
- {
- var_1 = 30u;
- break;
- }
- case 20u:
- {
- var_1 = 20u;
- break;
- }
- default:
- {
- break;
- }
- }
- var_1 = 7u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_DefaultIsCase_NoDupCases.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_DefaultIsCase_NoDupCases.spvasm.expected.ir.msl
deleted file mode 100644
index d06442a..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_DefaultIsCase_NoDupCases.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 1u;
- switch(42u) {
- case 40u:
- {
- var_1 = 40u;
- break;
- }
- case 20u:
- {
- var_1 = 20u;
- break;
- }
- default:
- {
- var_1 = 30u;
- break;
- }
- }
- var_1 = 7u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_DefaultIsCase_WithDupCase.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_DefaultIsCase_WithDupCase.spvasm.expected.ir.msl
deleted file mode 100644
index d03b891..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_DefaultIsCase_WithDupCase.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,35 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 1u;
- switch(42u) {
- case 40u:
- {
- var_1 = 40u;
- break;
- }
- case 20u:
- {
- var_1 = 20u;
- break;
- }
- case 30u:
- default:
- {
- var_1 = 30u;
- break;
- }
- }
- var_1 = 7u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_DefaultIsMerge_CasesWithDup.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_DefaultIsMerge_CasesWithDup.spvasm.expected.ir.msl
deleted file mode 100644
index f540627..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_DefaultIsMerge_CasesWithDup.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 1u;
- switch(42u) {
- case 30u:
- {
- var_1 = 30u;
- break;
- }
- case 20u:
- case 40u:
- {
- var_1 = 20u;
- break;
- }
- default:
- {
- break;
- }
- }
- var_1 = 7u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_DefaultIsMerge_NoCases.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_DefaultIsMerge_NoCases.spvasm.expected.ir.msl
deleted file mode 100644
index 83e03bc..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_DefaultIsMerge_NoCases.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,23 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 1u;
- switch(42u) {
- default:
- {
- break;
- }
- }
- var_1 = 7u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_DefaultIsMerge_OneCase.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_DefaultIsMerge_OneCase.spvasm.expected.ir.msl
deleted file mode 100644
index 608fd45..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_DefaultIsMerge_OneCase.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,28 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 1u;
- switch(42u) {
- case 20u:
- {
- var_1 = 20u;
- break;
- }
- default:
- {
- break;
- }
- }
- var_1 = 7u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_DefaultIsMerge_TwoCases.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_DefaultIsMerge_TwoCases.spvasm.expected.ir.msl
deleted file mode 100644
index 296ff46..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Switch_DefaultIsMerge_TwoCases.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint var_1 = 0u;
-void main_1() {
- var_1 = 1u;
- switch(42u) {
- case 30u:
- {
- var_1 = 30u;
- break;
- }
- case 20u:
- {
- var_1 = 20u;
- break;
- }
- default:
- {
- break;
- }
- }
- var_1 = 7u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint var_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialNonPointer_Hoisting_DefFirstBlockIf_InFunction.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialNonPointer_Hoisting_DefFirstBlockIf_InFunction.spvasm.expected.ir.msl
deleted file mode 100644
index 7bfb0d1..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialNonPointer_Hoisting_DefFirstBlockIf_InFunction.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,19 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint x_200 = 0u;
-void main_1() {
- uint const x_1 = 1u;
- if (true) {
- }
- x_200 = x_1;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint x_200 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialNonPointer_Hoisting_DefFirstBlockIf_InIf.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialNonPointer_Hoisting_DefFirstBlockIf_InIf.spvasm.expected.ir.msl
deleted file mode 100644
index 07175b6..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialNonPointer_Hoisting_DefFirstBlockIf_InIf.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,21 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint x_200 = 0u;
-void main_1() {
- if (true) {
- uint const x_1 = 1u;
- if (true) {
- }
- x_200 = x_1;
- }
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint x_200 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialNonPointer_Hoisting_DefFirstBlockSwitch_InIf.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialNonPointer_Hoisting_DefFirstBlockSwitch_InIf.spvasm.expected.ir.msl
deleted file mode 100644
index bb9b93c..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialNonPointer_Hoisting_DefFirstBlockSwitch_InIf.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,29 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint x_200 = 0u;
-void main_1() {
- if (true) {
- uint const x_1 = 1u;
- switch(1u) {
- case 0u:
- {
- break;
- }
- default:
- {
- break;
- }
- }
- x_200 = x_1;
- }
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint x_200 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_FromElseAndThen.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_FromElseAndThen.spvasm.expected.ir.msl
deleted file mode 100644
index a553db5..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_FromElseAndThen.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,43 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint x_1 = 0u;
-thread bool x_7 = false;
-thread bool x_8 = false;
-void main_1() {
- bool const x_101 = x_7;
- bool const x_102 = x_8;
- {
- while(true) {
- uint x_2 = 0u;
- if (x_101) {
- break;
- }
- if (x_102) {
- x_2 = 0u;
- x_1 = x_2;
- continue;
- } else {
- x_2 = 1u;
- x_1 = x_2;
- continue;
- }
- /* unreachable */
- }
- }
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint x_1 = 0u;
- ^
-program_source:5:13: error: program scope variable must reside in constant address space
-thread bool x_7 = false;
- ^
-program_source:6:13: error: program scope variable must reside in constant address space
-thread bool x_8 = false;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_FromHeaderAndThen.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_FromHeaderAndThen.spvasm.expected.ir.msl
deleted file mode 100644
index cfe0493..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_FromHeaderAndThen.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,43 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint x_1 = 0u;
-thread bool x_7 = false;
-thread bool x_8 = false;
-void main_1() {
- bool const x_101 = x_7;
- bool const x_102 = x_8;
- {
- while(true) {
- uint x_2 = 0u;
- if (x_101) {
- break;
- }
- x_2 = 0u;
- if (x_102) {
- x_2 = 1u;
- x_1 = x_2;
- continue;
- } else {
- x_1 = x_2;
- continue;
- }
- /* unreachable */
- }
- }
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint x_1 = 0u;
- ^
-program_source:5:13: error: program scope variable must reside in constant address space
-thread bool x_7 = false;
- ^
-program_source:6:13: error: program scope variable must reside in constant address space
-thread bool x_8 = false;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Array.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Array.spvasm.expected.ir.msl
deleted file mode 100644
index 157278d..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Array.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,16 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread float3x4 myvar = float3x4(0.0f);
-void main_1() {
- myvar[2u] = float4(42.0f);
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:17: error: program scope variable must reside in constant address space
-thread float3x4 myvar = float3x4(0.0f);
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Compound_Matrix_Vector.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Compound_Matrix_Vector.spvasm.expected.ir.msl
deleted file mode 100644
index ebc2e6e..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Compound_Matrix_Vector.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,16 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread float3x4 myvar = float3x4(0.0f);
-void main_1() {
- myvar[2u][3u] = 42.0f;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:17: error: program scope variable must reside in constant address space
-thread float3x4 myvar = float3x4(0.0f);
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_DereferenceBase.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_DereferenceBase.spvasm.expected.ir.msl
deleted file mode 100644
index 75c2765..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_DereferenceBase.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,17 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-void x_200(thread uint2* const x_1) {
- uint const x_3 = x_1[0u];
-}
-void main_1() {
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:5:14: error: cannot initialize a variable of type 'const uint' (aka 'const unsigned int') with an lvalue of type 'uint2' (vector of 2 'unsigned int' values)
- uint const x_3 = x_1[0u];
- ^ ~~~~~~~
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Matrix.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Matrix.spvasm.expected.ir.msl
deleted file mode 100644
index 157278d..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Matrix.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,16 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread float3x4 myvar = float3x4(0.0f);
-void main_1() {
- myvar[2u] = float4(42.0f);
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:17: error: program scope variable must reside in constant address space
-thread float3x4 myvar = float3x4(0.0f);
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Struct.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Struct.spvasm.expected.ir.msl
deleted file mode 100644
index 54af741..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Struct.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,20 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-struct S {
- float field0;
- float age;
-};
-
-thread S myvar = {};
-void main_1() {
- myvar.age = 42.0f;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:8:10: error: program scope variable must reside in constant address space
-thread S myvar = {};
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Struct_DifferOnlyMemberName.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Struct_DifferOnlyMemberName.spvasm.expected.ir.msl
deleted file mode 100644
index 0d90226..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Struct_DifferOnlyMemberName.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,29 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-struct S {
- float field0;
- float age;
-};
-struct S_1 {
- float field0;
- float ancientness;
-};
-
-thread S myvar = {};
-thread S_1 myvar2 = {};
-void main_1() {
- myvar.age = 42.0f;
- myvar2.ancientness = 420.0f;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:12:10: error: program scope variable must reside in constant address space
-thread S myvar = {};
- ^
-program_source:13:12: error: program scope variable must reside in constant address space
-thread S_1 myvar2 = {};
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Struct_RuntimeArray.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Struct_RuntimeArray.spvasm.expected.ir.msl
deleted file mode 100644
index 9a4bd54..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Struct_RuntimeArray.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,32 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- field0:f32 @offset(0)
- age:array<f32> @offset(4)
-}
-
-$B1: { # root
- %myvar:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%main_1 = func():void {
- $B2: {
- %3:ptr<storage, f32, read_write> = access %myvar, 1u, 2u
- store %3, 42.0f
- ret
- }
-}
-%tint_symbol = @fragment func():void {
- $B3: {
- %5:void = call %main_1
- 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/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_VectorNonConstIndex.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_VectorNonConstIndex.spvasm.expected.ir.msl
deleted file mode 100644
index 0d8d319..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_VectorNonConstIndex.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,21 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint4 myvar = 0u;
-thread uint4 x_10 = 0u;
-void main_1() {
- uint const a_dynamic_index = x_10[2u];
- myvar[a_dynamic_index] = 42u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint4 myvar = 0u;
- ^
-program_source:5:14: error: program scope variable must reside in constant address space
-thread uint4 x_10 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_VectorSwizzle.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_VectorSwizzle.spvasm.expected.ir.msl
deleted file mode 100644
index 366cfc3..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_VectorSwizzle.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,16 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint4 myvar = 0u;
-void main_1() {
- myvar[2u] = 42u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:14: error: program scope variable must reside in constant address space
-thread uint4 myvar = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_CopyMemory_Scalar_Function_To_Private.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_CopyMemory_Scalar_Function_To_Private.spvasm.expected.ir.msl
deleted file mode 100644
index 80b39e4..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_CopyMemory_Scalar_Function_To_Private.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,17 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint x_2 = 0u;
-void main_1() {
- uint x_1 = 0u;
- x_2 = x_1;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint x_2 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_StoreToModuleScopeVar.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_StoreToModuleScopeVar.spvasm.expected.ir.msl
deleted file mode 100644
index fb8955a..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_StoreToModuleScopeVar.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,16 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-
-thread uint x_1 = 0u;
-void main_1() {
- x_1 = 42u;
-}
-fragment void tint_symbol() {
- main_1();
-}
-program_source:4:13: error: program scope variable must reside in constant address space
-thread uint x_1 = 0u;
- ^
-
diff --git a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_RemapStorageBuffer_ThroughAccessChain_Cascaded.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_RemapStorageBuffer_ThroughAccessChain_Cascaded.spvasm.expected.ir.msl
deleted file mode 100644
index 8800a72..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_RemapStorageBuffer_ThroughAccessChain_Cascaded.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,32 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- field0:u32 @offset(0)
- field1:array<u32> @offset(4)
-}
-
-$B1: { # root
- %myvar:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%main_1 = func():void {
- $B2: {
- %3:ptr<storage, u32, read_write> = access %myvar, 1u, 1u
- store %3, 0u
- ret
- }
-}
-%tint_symbol = @fragment func():void {
- $B3: {
- %5:void = call %main_1
- 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/unittest/reader/spirv/SpvParserMemoryTest_RemapStorageBuffer_ThroughAccessChain_NonCascaded.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_RemapStorageBuffer_ThroughAccessChain_NonCascaded.spvasm.expected.ir.msl
deleted file mode 100644
index 690eeb2..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_RemapStorageBuffer_ThroughAccessChain_NonCascaded.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- field0:u32 @offset(0)
- field1:array<u32> @offset(4)
-}
-
-$B1: { # root
- %myvar:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%main_1 = func():void {
- $B2: {
- %3:ptr<storage, u32, read_write> = access %myvar, 0u
- store %3, 0u
- %4:ptr<storage, u32, read_write> = access %myvar, 1u, 1u
- store %4, 0u
- ret
- }
-}
-%tint_symbol = @fragment func():void {
- $B3: {
- %6:void = call %main_1
- 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/unittest/reader/spirv/SpvParserMemoryTest_RemapStorageBuffer_ThroughAccessChain_NonCascaded_InBoundsAccessChain.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_RemapStorageBuffer_ThroughAccessChain_NonCascaded_InBoundsAccessChain.spvasm.expected.ir.msl
deleted file mode 100644
index 690eeb2..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_RemapStorageBuffer_ThroughAccessChain_NonCascaded_InBoundsAccessChain.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- field0:u32 @offset(0)
- field1:array<u32> @offset(4)
-}
-
-$B1: { # root
- %myvar:ptr<storage, S, read_write> = var @binding_point(0, 0)
-}
-
-%main_1 = func():void {
- $B2: {
- %3:ptr<storage, u32, read_write> = access %myvar, 0u
- store %3, 0u
- %4:ptr<storage, u32, read_write> = access %myvar, 1u, 1u
- store %4, 0u
- ret
- }
-}
-%tint_symbol = @fragment func():void {
- $B3: {
- %6:void = call %main_1
- 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/unittest/reader/spirv/SpvParserTest_EmitFunctions_Function_EntryPoint_Vertex.spvasm.expected.ir.msl b/test/tint/unittest/reader/spirv/SpvParserTest_EmitFunctions_Function_EntryPoint_Vertex.spvasm.expected.ir.msl
deleted file mode 100644
index c466e7d..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserTest_EmitFunctions_Function_EntryPoint_Vertex.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,19 +0,0 @@
-SKIP: FAILED
-
-#include <metal_stdlib>
-using namespace metal;
-struct main_out {
- float4 x_2_1 [[position]];
-};
-
-thread float4 x_2 = 0.0f;
-void main_1() {
-}
-vertex main_out tint_symbol() {
- main_1();
- return {.x_2_1=x_2};
-}
-program_source:7:15: error: program scope variable must reside in constant address space
-thread float4 x_2 = 0.0f;
- ^
-
diff --git a/test/tint/var/inferred/global.wgsl.expected.ir.msl b/test/tint/var/inferred/global.wgsl.expected.ir.msl
index d60fbc5..95b79fc 100644
--- a/test/tint/var/inferred/global.wgsl.expected.ir.msl
+++ b/test/tint/var/inferred/global.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
struct MyStruct {
@@ -17,135 +15,57 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread int* v1;
+ thread uint* v2;
+ thread float* v3;
+ thread int3* v4;
+ thread uint3* v5;
+ thread float3* v6;
+ thread MyStruct* v7;
+ thread tint_array<float, 10>* v8;
+ thread int* v9;
+ thread uint* v10;
+ thread float* v11;
+ thread MyStruct* v12;
+ thread MyStruct* v13;
+ thread tint_array<float, 10>* v14;
+ thread int3* v15;
+ thread float3* v16;
+};
-thread int v1 = 1;
-thread uint v2 = 1u;
-thread float v3 = 1.0f;
-thread int3 v4 = int3(1);
-thread uint3 v5 = uint3(1u, 2u, 3u);
-thread float3 v6 = float3(1.0f, 2.0f, 3.0f);
-thread MyStruct v7 = MyStruct{.f1=1.0f};
-thread tint_array<float, 10> v8 = tint_array<float, 10>{};
-thread int v9 = 0;
-thread uint v10 = 0u;
-thread float v11 = 0.0f;
-thread MyStruct v12 = MyStruct{};
-thread MyStruct v13 = MyStruct{};
-thread tint_array<float, 10> v14 = tint_array<float, 10>{};
-thread int3 v15 = int3(1, 2, 3);
-thread float3 v16 = float3(1.0f, 2.0f, 3.0f);
kernel void f() {
- int const l1 = v1;
- uint const l2 = v2;
- float const l3 = v3;
- int3 const l4 = v4;
- uint3 const l5 = v5;
- float3 const l6 = v6;
- MyStruct const l7 = v7;
- tint_array<float, 10> const l8 = v8;
- int const l9 = v9;
- uint const l10 = v10;
- float const l11 = v11;
- MyStruct const l12 = v12;
- MyStruct const l13 = v13;
- tint_array<float, 10> const l14 = v14;
- int3 const l15 = v15;
- float3 const l16 = v16;
+ thread int v1 = 1;
+ thread uint v2 = 1u;
+ thread float v3 = 1.0f;
+ thread int3 v4 = int3(1);
+ thread uint3 v5 = uint3(1u, 2u, 3u);
+ thread float3 v6 = float3(1.0f, 2.0f, 3.0f);
+ thread MyStruct v7 = MyStruct{.f1=1.0f};
+ thread tint_array<float, 10> v8 = tint_array<float, 10>{};
+ thread int v9 = 0;
+ thread uint v10 = 0u;
+ thread float v11 = 0.0f;
+ thread MyStruct v12 = MyStruct{};
+ thread MyStruct v13 = MyStruct{};
+ thread tint_array<float, 10> v14 = tint_array<float, 10>{};
+ thread int3 v15 = int3(1, 2, 3);
+ thread float3 v16 = float3(1.0f, 2.0f, 3.0f);
+ tint_module_vars_struct const tint_module_vars = {.v1=(&v1), .v2=(&v2), .v3=(&v3), .v4=(&v4), .v5=(&v5), .v6=(&v6), .v7=(&v7), .v8=(&v8), .v9=(&v9), .v10=(&v10), .v11=(&v11), .v12=(&v12), .v13=(&v13), .v14=(&v14), .v15=(&v15), .v16=(&v16)};
+ int const l1 = (*tint_module_vars.v1);
+ uint const l2 = (*tint_module_vars.v2);
+ float const l3 = (*tint_module_vars.v3);
+ int3 const l4 = (*tint_module_vars.v4);
+ uint3 const l5 = (*tint_module_vars.v5);
+ float3 const l6 = (*tint_module_vars.v6);
+ MyStruct const l7 = (*tint_module_vars.v7);
+ tint_array<float, 10> const l8 = (*tint_module_vars.v8);
+ int const l9 = (*tint_module_vars.v9);
+ uint const l10 = (*tint_module_vars.v10);
+ float const l11 = (*tint_module_vars.v11);
+ MyStruct const l12 = (*tint_module_vars.v12);
+ MyStruct const l13 = (*tint_module_vars.v13);
+ tint_array<float, 10> const l14 = (*tint_module_vars.v14);
+ int3 const l15 = (*tint_module_vars.v15);
+ float3 const l16 = (*tint_module_vars.v16);
}
-program_source:19:12: error: program scope variable must reside in constant address space
-thread int v1 = 1;
- ^
-program_source:20:13: error: program scope variable must reside in constant address space
-thread uint v2 = 1u;
- ^
-program_source:21:14: error: program scope variable must reside in constant address space
-thread float v3 = 1.0f;
- ^
-program_source:22:13: error: program scope variable must reside in constant address space
-thread int3 v4 = int3(1);
- ^
-program_source:23:14: error: program scope variable must reside in constant address space
-thread uint3 v5 = uint3(1u, 2u, 3u);
- ^
-program_source:24:15: error: program scope variable must reside in constant address space
-thread float3 v6 = float3(1.0f, 2.0f, 3.0f);
- ^
-program_source:25:17: error: program scope variable must reside in constant address space
-thread MyStruct v7 = MyStruct{.f1=1.0f};
- ^
-program_source:26:30: error: program scope variable must reside in constant address space
-thread tint_array<float, 10> v8 = tint_array<float, 10>{};
- ^
-program_source:27:12: error: program scope variable must reside in constant address space
-thread int v9 = 0;
- ^
-program_source:28:13: error: program scope variable must reside in constant address space
-thread uint v10 = 0u;
- ^
-program_source:29:14: error: program scope variable must reside in constant address space
-thread float v11 = 0.0f;
- ^
-program_source:30:17: error: program scope variable must reside in constant address space
-thread MyStruct v12 = MyStruct{};
- ^
-program_source:31:17: error: program scope variable must reside in constant address space
-thread MyStruct v13 = MyStruct{};
- ^
-program_source:32:30: error: program scope variable must reside in constant address space
-thread tint_array<float, 10> v14 = tint_array<float, 10>{};
- ^
-program_source:33:13: error: program scope variable must reside in constant address space
-thread int3 v15 = int3(1, 2, 3);
- ^
-program_source:34:15: error: program scope variable must reside in constant address space
-thread float3 v16 = float3(1.0f, 2.0f, 3.0f);
- ^
-program_source:36:13: warning: unused variable 'l1' [-Wunused-variable]
- int const l1 = v1;
- ^
-program_source:37:14: warning: unused variable 'l2' [-Wunused-variable]
- uint const l2 = v2;
- ^
-program_source:38:15: warning: unused variable 'l3' [-Wunused-variable]
- float const l3 = v3;
- ^
-program_source:39:14: warning: unused variable 'l4' [-Wunused-variable]
- int3 const l4 = v4;
- ^
-program_source:40:15: warning: unused variable 'l5' [-Wunused-variable]
- uint3 const l5 = v5;
- ^
-program_source:41:16: warning: unused variable 'l6' [-Wunused-variable]
- float3 const l6 = v6;
- ^
-program_source:42:18: warning: unused variable 'l7' [-Wunused-variable]
- MyStruct const l7 = v7;
- ^
-program_source:43:31: warning: unused variable 'l8' [-Wunused-variable]
- tint_array<float, 10> const l8 = v8;
- ^
-program_source:44:13: warning: unused variable 'l9' [-Wunused-variable]
- int const l9 = v9;
- ^
-program_source:45:14: warning: unused variable 'l10' [-Wunused-variable]
- uint const l10 = v10;
- ^
-program_source:46:15: warning: unused variable 'l11' [-Wunused-variable]
- float const l11 = v11;
- ^
-program_source:47:18: warning: unused variable 'l12' [-Wunused-variable]
- MyStruct const l12 = v12;
- ^
-program_source:48:18: warning: unused variable 'l13' [-Wunused-variable]
- MyStruct const l13 = v13;
- ^
-program_source:49:31: warning: unused variable 'l14' [-Wunused-variable]
- tint_array<float, 10> const l14 = v14;
- ^
-program_source:50:14: warning: unused variable 'l15' [-Wunused-variable]
- int3 const l15 = v15;
- ^
-program_source:51:16: warning: unused variable 'l16' [-Wunused-variable]
- float3 const l16 = v16;
- ^
-
diff --git a/test/tint/var/initialization/function/nested_structs.wgsl.expected.ir.msl b/test/tint/var/initialization/function/nested_structs.wgsl.expected.ir.msl
index ff8cfd2..4c4cde8 100644
--- a/test/tint/var/initialization/function/nested_structs.wgsl.expected.ir.msl
+++ b/test/tint/var/initialization/function/nested_structs.wgsl.expected.ir.msl
@@ -1,39 +1,22 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S1 {
+ int i;
+};
+struct S2 {
+ S1 s1;
+};
+struct S3 {
+ S2 s2;
+};
+struct tint_module_vars_struct {
+ device int* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S1 = struct @align(4) {
- i:i32 @offset(0)
+int f(S3 s3) {
+ return s3.s2.s1.i;
}
-
-S2 = struct @align(4) {
- s1:S1 @offset(0)
+kernel void tint_symbol(device int* out [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = {.out=out};
+ (*tint_module_vars.out) = f(S3{.s2=S2{.s1=S1{.i=42}}});
}
-
-S3 = struct @align(4) {
- s2:S2 @offset(0)
-}
-
-$B1: { # root
- %out:ptr<storage, i32, read_write> = var @binding_point(0, 0)
-}
-
-%f = func(%s3:S3):i32 {
- $B2: {
- %4:i32 = access %s3, 0u, 0u, 0u
- ret %4
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %6:i32 = call %f, S3(S2(S1(42i)))
- store %out, %6
- 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/var/initialization/private/array/array_i32.wgsl.expected.ir.msl b/test/tint/var/initialization/private/array/array_i32.wgsl.expected.ir.msl
index 9f98115..54ddf72 100644
--- a/test/tint/var/initialization/private/array/array_i32.wgsl.expected.ir.msl
+++ b/test/tint/var/initialization/private/array/array_i32.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,23 +12,15 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<tint_array<int, 3>, 2>* zero;
+ thread tint_array<tint_array<int, 3>, 2>* init;
+};
-thread tint_array<tint_array<int, 3>, 2> zero = {};
-thread tint_array<tint_array<int, 3>, 2> init = tint_array<tint_array<int, 3>, 2>{tint_array<int, 3>{1, 2, 3}, tint_array<int, 3>{4, 5, 6}};
kernel void tint_symbol() {
- tint_array<tint_array<int, 3>, 2> v0 = zero;
- tint_array<tint_array<int, 3>, 2> v1 = init;
+ thread tint_array<tint_array<int, 3>, 2> zero = {};
+ thread tint_array<tint_array<int, 3>, 2> init = tint_array<tint_array<int, 3>, 2>{tint_array<int, 3>{1, 2, 3}, tint_array<int, 3>{4, 5, 6}};
+ tint_module_vars_struct const tint_module_vars = {.zero=(&zero), .init=(&init)};
+ tint_array<tint_array<int, 3>, 2> v0 = (*tint_module_vars.zero);
+ tint_array<tint_array<int, 3>, 2> v1 = (*tint_module_vars.init);
}
-program_source:16:42: error: program scope variable must reside in constant address space
-thread tint_array<tint_array<int, 3>, 2> zero = {};
- ^
-program_source:17:42: error: program scope variable must reside in constant address space
-thread tint_array<tint_array<int, 3>, 2> init = tint_array<tint_array<int, 3>, 2>{tint_array<int, 3>{1, 2, 3}, tint_array<int, 3>{4, 5, 6}};
- ^
-program_source:19:37: warning: unused variable 'v0' [-Wunused-variable]
- tint_array<tint_array<int, 3>, 2> v0 = zero;
- ^
-program_source:20:37: warning: unused variable 'v1' [-Wunused-variable]
- tint_array<tint_array<int, 3>, 2> v1 = init;
- ^
-
diff --git a/test/tint/var/initialization/private/array/i32.wgsl.expected.ir.msl b/test/tint/var/initialization/private/array/i32.wgsl.expected.ir.msl
index 92d7aa1..0d212a7 100644
--- a/test/tint/var/initialization/private/array/i32.wgsl.expected.ir.msl
+++ b/test/tint/var/initialization/private/array/i32.wgsl.expected.ir.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
@@ -14,23 +12,15 @@
T elements[N];
};
+struct tint_module_vars_struct {
+ thread tint_array<int, 3>* zero;
+ thread tint_array<int, 3>* init;
+};
-thread tint_array<int, 3> zero = {};
-thread tint_array<int, 3> init = tint_array<int, 3>{1, 2, 3};
kernel void tint_symbol() {
- tint_array<int, 3> v0 = zero;
- tint_array<int, 3> v1 = init;
+ thread tint_array<int, 3> zero = {};
+ thread tint_array<int, 3> init = tint_array<int, 3>{1, 2, 3};
+ tint_module_vars_struct const tint_module_vars = {.zero=(&zero), .init=(&init)};
+ tint_array<int, 3> v0 = (*tint_module_vars.zero);
+ tint_array<int, 3> v1 = (*tint_module_vars.init);
}
-program_source:16:27: error: program scope variable must reside in constant address space
-thread tint_array<int, 3> zero = {};
- ^
-program_source:17:27: error: program scope variable must reside in constant address space
-thread tint_array<int, 3> init = tint_array<int, 3>{1, 2, 3};
- ^
-program_source:19:22: warning: unused variable 'v0' [-Wunused-variable]
- tint_array<int, 3> v0 = zero;
- ^
-program_source:20:22: warning: unused variable 'v1' [-Wunused-variable]
- tint_array<int, 3> v1 = init;
- ^
-
diff --git a/test/tint/var/initialization/private/matrix.wgsl.expected.ir.msl b/test/tint/var/initialization/private/matrix.wgsl.expected.ir.msl
index 2a58c88..bd69c3c 100644
--- a/test/tint/var/initialization/private/matrix.wgsl.expected.ir.msl
+++ b/test/tint/var/initialization/private/matrix.wgsl.expected.ir.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread float2x3* v;
+};
kernel void tint_symbol() {
thread float2x3 v = float2x3(0.0f);
+ tint_module_vars_struct const tint_module_vars = {.v=(&v)};
}
diff --git a/test/tint/var/initialization/private/nested_structs.wgsl.expected.ir.msl b/test/tint/var/initialization/private/nested_structs.wgsl.expected.ir.msl
index 35028b3..7e74110 100644
--- a/test/tint/var/initialization/private/nested_structs.wgsl.expected.ir.msl
+++ b/test/tint/var/initialization/private/nested_structs.wgsl.expected.ir.msl
@@ -1,35 +1,21 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct S1 {
+ int i;
+};
+struct S2 {
+ S1 s1;
+};
+struct S3 {
+ S2 s2;
+};
+struct tint_module_vars_struct {
+ thread S3* P;
+ device int* out;
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S1 = struct @align(4) {
- i:i32 @offset(0)
+kernel void tint_symbol(device int* out [[buffer(0)]]) {
+ thread S3 P = S3{.s2=S2{.s1=S1{.i=42}}};
+ tint_module_vars_struct const tint_module_vars = {.P=(&P), .out=out};
+ (*tint_module_vars.out) = (*tint_module_vars.P).s2.s1.i;
}
-
-S2 = struct @align(4) {
- s1:S1 @offset(0)
-}
-
-S3 = struct @align(4) {
- s2:S2 @offset(0)
-}
-
-$B1: { # root
- %P:ptr<private, S3, read_write> = var, S3(S2(S1(42i)))
- %out:ptr<storage, i32, read_write> = var @binding_point(0, 0)
-}
-
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B2: {
- %4:ptr<private, i32, read_write> = access %P, 0u, 0u, 0u
- %5:i32 = load %4
- store %out, %5
- 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/var/initialization/private/scalar.wgsl.expected.ir.msl b/test/tint/var/initialization/private/scalar.wgsl.expected.ir.msl
index 66ade84..66e321b 100644
--- a/test/tint/var/initialization/private/scalar.wgsl.expected.ir.msl
+++ b/test/tint/var/initialization/private/scalar.wgsl.expected.ir.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int* v;
+};
kernel void tint_symbol() {
thread int v = 0;
+ tint_module_vars_struct const tint_module_vars = {.v=(&v)};
}
diff --git a/test/tint/var/initialization/private/struct.wgsl.expected.ir.msl b/test/tint/var/initialization/private/struct.wgsl.expected.ir.msl
index 4125dab..55b3453 100644
--- a/test/tint/var/initialization/private/struct.wgsl.expected.ir.msl
+++ b/test/tint/var/initialization/private/struct.wgsl.expected.ir.msl
@@ -4,7 +4,11 @@
int a;
float b;
};
+struct tint_module_vars_struct {
+ thread S* v;
+};
kernel void tint_symbol() {
thread S v = {};
+ tint_module_vars_struct const tint_module_vars = {.v=(&v)};
}
diff --git a/test/tint/var/initialization/private/vector.wgsl.expected.ir.msl b/test/tint/var/initialization/private/vector.wgsl.expected.ir.msl
index 66b2045..31ca65f 100644
--- a/test/tint/var/initialization/private/vector.wgsl.expected.ir.msl
+++ b/test/tint/var/initialization/private/vector.wgsl.expected.ir.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_module_vars_struct {
+ thread int3* v;
+};
kernel void tint_symbol() {
thread int3 v = 0;
+ tint_module_vars_struct const tint_module_vars = {.v=(&v)};
}
diff --git a/test/tint/vk-gl-cts/api/descriptor_set/descriptor_set_layout_binding/layout_binding_order/0.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/api/descriptor_set/descriptor_set_layout_binding/layout_binding_order/0.spvasm.expected.ir.msl
deleted file mode 100644
index 9fbc5d1..0000000
--- a/test/tint/vk-gl-cts/api/descriptor_set/descriptor_set_layout_binding/layout_binding_order/0.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,58 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: result = struct @align(4) {
- res0:i32 @offset(0)
- res1:i32 @offset(4)
- res2:i32 @offset(8)
-}
-
-block0 = struct @align(4) {
- data0:i32 @offset(0)
-}
-
-block1 = struct @align(4) {
- data1:i32 @offset(0)
-}
-
-block2 = struct @align(4) {
- data2:i32 @offset(0)
-}
-
-$B1: { # root
- %x_4:ptr<storage, result, read_write> = var @binding_point(0, 3)
- %x_6:ptr<uniform, block0, read> = var @binding_point(0, 0)
- %x_8:ptr<uniform, block1, read> = var @binding_point(0, 1)
- %x_10:ptr<uniform, block2, read> = var @binding_point(0, 2)
-}
-
-%main_1 = func():void {
- $B2: {
- %6:ptr<storage, i32, read_write> = access %x_4, 0u
- %7:ptr<uniform, i32, read> = access %x_6, 0u
- %8:i32 = load %7
- store %6, %8
- %9:ptr<storage, i32, read_write> = access %x_4, 1u
- %10:ptr<uniform, i32, read> = access %x_8, 0u
- %11:i32 = load %10
- store %9, %11
- %12:ptr<storage, i32, read_write> = access %x_4, 2u
- %13:ptr<uniform, i32, read> = access %x_10, 0u
- %14:i32 = load %13
- store %12, %14
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %16:void = call %main_1
- 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/vk-gl-cts/api/descriptor_set/descriptor_set_layout_binding/layout_binding_order/0.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/api/descriptor_set/descriptor_set_layout_binding/layout_binding_order/0.wgsl.expected.ir.msl
deleted file mode 100644
index 11752b8..0000000
--- a/test/tint/vk-gl-cts/api/descriptor_set/descriptor_set_layout_binding/layout_binding_order/0.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,61 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: result = struct @align(4) {
- res0:i32 @offset(0)
- res1:i32 @offset(4)
- res2:i32 @offset(8)
-}
-
-block0 = struct @align(4) {
- data0:i32 @offset(0)
-}
-
-block1 = struct @align(4) {
- data1:i32 @offset(0)
-}
-
-block2 = struct @align(4) {
- data2:i32 @offset(0)
-}
-
-$B1: { # root
- %x_4:ptr<storage, result, read_write> = var @binding_point(0, 3)
- %x_6:ptr<uniform, block0, read> = var @binding_point(0, 0)
- %x_8:ptr<uniform, block1, read> = var @binding_point(0, 1)
- %x_10:ptr<uniform, block2, read> = var @binding_point(0, 2)
-}
-
-%main_1 = func():void {
- $B2: {
- %6:ptr<uniform, i32, read> = access %x_6, 0u
- %7:i32 = load %6
- %x_25:i32 = let %7
- %9:ptr<storage, i32, read_write> = access %x_4, 0u
- store %9, %x_25
- %10:ptr<uniform, i32, read> = access %x_8, 0u
- %11:i32 = load %10
- %x_28:i32 = let %11
- %13:ptr<storage, i32, read_write> = access %x_4, 1u
- store %13, %x_28
- %14:ptr<uniform, i32, read> = access %x_10, 0u
- %15:i32 = load %14
- %x_31:i32 = let %15
- %17:ptr<storage, i32, read_write> = access %x_4, 2u
- store %17, %x_31
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %19:void = call %main_1
- 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/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_compute/0.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_compute/0.spvasm.expected.ir.msl
deleted file mode 100644
index 2cee44b..0000000
--- a/test/tint/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_compute/0.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,31 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: block0 = struct @align(16) {
- data:vec4<f32> @offset(0)
-}
-
-$B1: { # root
- %x_4:ptr<storage, block0, read_write> = var @binding_point(0, 1)
-}
-
-%main_1 = func():void {
- $B2: {
- %3:ptr<storage, vec4<f32>, read_write> = access %x_4, 0u
- store %3, vec4<f32>(1.0f, 2.0f, 3.0f, 4.0f)
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %5:void = call %main_1
- 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/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_compute/0.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_compute/0.wgsl.expected.ir.msl
deleted file mode 100644
index 2cee44b..0000000
--- a/test/tint/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_compute/0.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,31 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: block0 = struct @align(16) {
- data:vec4<f32> @offset(0)
-}
-
-$B1: { # root
- %x_4:ptr<storage, block0, read_write> = var @binding_point(0, 1)
-}
-
-%main_1 = func():void {
- $B2: {
- %3:ptr<storage, vec4<f32>, read_write> = access %x_4, 0u
- store %3, vec4<f32>(1.0f, 2.0f, 3.0f, 4.0f)
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %5:void = call %main_1
- 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/vk-gl-cts/graphicsfuzz/early-return-and-barrier/0.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/early-return-and-barrier/0.spvasm.expected.ir.msl
deleted file mode 100644
index 18ecc8e..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/early-return-and-barrier/0.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,82 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: theSSBO = struct @align(4) {
- out_data:i32 @offset(0)
-}
-
-$B1: { # root
- %x_4:ptr<storage, theSSBO, read_write> = var @binding_point(0, 0)
-}
-
-%main_1 = func():void {
- $B2: {
- %x_30:ptr<function, mat2x2<f32>, read_write> = var
- %x_32:ptr<function, i32, read_write> = var
- %5:ptr<storage, i32, read_write> = access %x_4, 0u
- store %5, 42i
- store %x_30, mat2x2<f32>(vec2<f32>(0.0f))
- store %x_32, 1i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %x_33:ptr<function, i32, read_write> = var
- %7:i32 = load %x_32
- %8:bool = gt %7, 0i
- if %8 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- continue # -> $B4
- }
- $B4: { # continuing
- %9:i32 = load %x_32
- %10:i32 = sub %9, 1i
- store %x_33, %10
- store %x_30, mat2x2<f32>(vec2<f32>(1.0f, 0.0f), vec2<f32>(0.0f, 1.0f))
- %11:i32 = load %x_33
- store %x_32, %11
- next_iteration # -> $B3
- }
- }
- %12:ptr<function, vec2<f32>, read_write> = access %x_30, 0u
- %13:vec2<f32> = load %12
- %14:vec2<f32> = sub %13, vec2<f32>(1.0f, 0.0f)
- %15:ptr<function, vec2<f32>, read_write> = access %x_30, 1u
- %16:vec2<f32> = load %15
- %17:vec2<f32> = sub %16, vec2<f32>(0.0f, 1.0f)
- %18:mat2x2<f32> = construct %14, %17
- %19:vec2<f32> = mul vec2<f32>(1.0f), %18
- %x_41:vec2<f32> = let %19
- loop [b: $B7] { # loop_2
- $B7: { # body
- %21:f32 = access %x_41, 0u
- %22:bool = lt 1.0f, %21
- if %22 [t: $B8] { # if_2
- $B8: { # true
- exit_loop # loop_2
- }
- }
- %23:void = msl.threadgroup_barrier 4u
- exit_loop # loop_2
- }
- }
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B9: {
- %25:void = call %main_1
- 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/vk-gl-cts/graphicsfuzz/early-return-and-barrier/0.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/early-return-and-barrier/0.wgsl.expected.ir.msl
deleted file mode 100644
index afab298..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/early-return-and-barrier/0.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,85 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: theSSBO = struct @align(4) {
- out_data:i32 @offset(0)
-}
-
-$B1: { # root
- %x_4:ptr<storage, theSSBO, read_write> = var @binding_point(0, 0)
-}
-
-%main_1 = func():void {
- $B2: {
- %x_30:ptr<function, mat2x2<f32>, read_write> = var
- %x_30_phi:ptr<function, mat2x2<f32>, read_write> = var
- %x_32_phi:ptr<function, i32, read_write> = var
- %6:ptr<storage, i32, read_write> = access %x_4, 0u
- store %6, 42i
- store %x_30_phi, mat2x2<f32>(vec2<f32>(0.0f))
- store %x_32_phi, 1i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %x_33:ptr<function, i32, read_write> = var
- %8:mat2x2<f32> = load %x_30_phi
- store %x_30, %8
- %9:i32 = load %x_32_phi
- %x_32:i32 = let %9
- %11:bool = gt %x_32, 0i
- if %11 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- continue # -> $B4
- }
- $B4: { # continuing
- %12:i32 = sub %x_32, 1i
- store %x_33, %12
- store %x_30_phi, mat2x2<f32>(vec2<f32>(1.0f, 0.0f), vec2<f32>(0.0f, 1.0f))
- %13:i32 = load %x_33
- store %x_32_phi, %13
- next_iteration # -> $B3
- }
- }
- %14:ptr<function, vec2<f32>, read_write> = access %x_30, 0u
- %15:vec2<f32> = load %14
- %16:vec2<f32> = sub %15, vec2<f32>(1.0f, 0.0f)
- %17:ptr<function, vec2<f32>, read_write> = access %x_30, 1u
- %18:vec2<f32> = load %17
- %19:vec2<f32> = sub %18, vec2<f32>(0.0f, 1.0f)
- %20:mat2x2<f32> = construct %16, %19
- %21:vec2<f32> = mul vec2<f32>(1.0f), %20
- %x_41:vec2<f32> = let %21
- loop [b: $B7] { # loop_2
- $B7: { # body
- %23:f32 = access %x_41, 0u
- %24:bool = lt 1.0f, %23
- if %24 [t: $B8] { # if_2
- $B8: { # true
- exit_loop # loop_2
- }
- }
- %25:void = msl.threadgroup_barrier 4u
- exit_loop # loop_2
- }
- }
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B9: {
- %27:void = call %main_1
- 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/vk-gl-cts/graphicsfuzz/two-nested-for-loops-with-returns/0-opt.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/two-nested-for-loops-with-returns/0-opt.spvasm.expected.ir.msl
deleted file mode 100644
index 9fad2d20..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/two-nested-for-loops-with-returns/0-opt.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,96 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: doesNotMatter = struct @align(4) {
- x_compute_data:array<f32> @offset(0)
-}
-
-$B1: { # root
- %x_9:ptr<storage, doesNotMatter, read_write> = var @binding_point(0, 0)
-}
-
-%nb_mod_ = func():f32 {
- $B2: {
- %s:ptr<function, f32, read_write> = var
- %i:ptr<function, i32, read_write> = var
- %GLF_live1i:ptr<function, i32, read_write> = var
- %GLF_live1_looplimiter2:ptr<function, i32, read_write> = var
- %x_51:ptr<function, f32, read_write> = var
- %x_56:ptr<function, f32, read_write> = var
- store %s, 0.0f
- store %i, 5i
- loop [b: $B3] { # loop_1
- $B3: { # body
- %x_50:ptr<function, f32, read_write> = var
- store %x_56, 0.0f
- if true [t: $B4, f: $B5] { # if_1
- $B4: { # true
- exit_if # if_1
- }
- $B5: { # false
- exit_loop # loop_1
- }
- }
- store %GLF_live1i, 0i
- loop [b: $B6] { # loop_2
- $B6: { # body
- store %x_51, 0.0f
- if true [t: $B7, f: $B8] { # if_2
- $B7: { # true
- exit_if # if_2
- }
- $B8: { # false
- exit_loop # loop_2
- }
- }
- if false [t: $B9] { # if_3
- $B9: { # true
- store %x_50, 1.0f
- %10:f32 = load %x_50
- store %s, %10
- %11:f32 = load %x_50
- store %x_51, %11
- exit_loop # loop_2
- }
- }
- ret 42.0f
- }
- }
- %12:f32 = load %x_51
- %13:bool = lte 5.0f, %12
- if %13 [t: $B10] { # if_4
- $B10: { # true
- %14:f32 = load %x_51
- store %x_56, %14
- exit_loop # loop_1
- }
- }
- ret 42.0f
- }
- }
- %15:f32 = load %x_56
- ret %15
- }
-}
-%main_1 = func():void {
- $B11: {
- %17:f32 = call %nb_mod_
- %x_32:f32 = let %17
- %19:ptr<storage, f32, read_write> = access %x_9, 0u, 0i
- store %19, %x_32
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B12: {
- %21:void = call %main_1
- 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/vk-gl-cts/graphicsfuzz/two-nested-for-loops-with-returns/0-opt.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/two-nested-for-loops-with-returns/0-opt.wgsl.expected.ir.msl
deleted file mode 100644
index ed79910..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/two-nested-for-loops-with-returns/0-opt.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,100 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: doesNotMatter = struct @align(4) {
- x_compute_data:array<f32> @offset(0)
-}
-
-$B1: { # root
- %x_9:ptr<storage, doesNotMatter, read_write> = var @binding_point(0, 0)
-}
-
-%nb_mod_ = func():f32 {
- $B2: {
- %s:ptr<function, f32, read_write> = var
- %i:ptr<function, i32, read_write> = var
- %GLF_live1i:ptr<function, i32, read_write> = var
- %GLF_live1_looplimiter2:ptr<function, i32, read_write> = var
- %x_51:ptr<function, f32, read_write> = var
- %x_56_phi:ptr<function, f32, read_write> = var
- store %s, 0.0f
- store %i, 5i
- loop [b: $B3] { # loop_1
- $B3: { # body
- %x_50:ptr<function, f32, read_write> = var
- %x_51_phi:ptr<function, f32, read_write> = var
- store %x_56_phi, 0.0f
- if true [t: $B4, f: $B5] { # if_1
- $B4: { # true
- exit_if # if_1
- }
- $B5: { # false
- exit_loop # loop_1
- }
- }
- store %GLF_live1i, 0i
- loop [b: $B6] { # loop_2
- $B6: { # body
- store %x_51_phi, 0.0f
- if true [t: $B7, f: $B8] { # if_2
- $B7: { # true
- exit_if # if_2
- }
- $B8: { # false
- exit_loop # loop_2
- }
- }
- if false [t: $B9] { # if_3
- $B9: { # true
- store %x_50, 1.0f
- %11:f32 = load %x_50
- store %s, %11
- %12:f32 = load %x_50
- store %x_51_phi, %12
- exit_loop # loop_2
- }
- }
- ret 42.0f
- }
- }
- %13:f32 = load %x_51_phi
- store %x_51, %13
- %14:f32 = load %x_51
- %15:bool = lte 5.0f, %14
- if %15 [t: $B10] { # if_4
- $B10: { # true
- %16:f32 = load %x_51
- store %x_56_phi, %16
- exit_loop # loop_1
- }
- }
- ret 42.0f
- }
- }
- %17:f32 = load %x_56_phi
- %x_56:f32 = let %17
- ret %x_56
- }
-}
-%main_1 = func():void {
- $B11: {
- %20:f32 = call %nb_mod_
- %x_32:f32 = let %20
- %22:ptr<storage, f32, read_write> = access %x_9, 0u, 0i
- store %22, %x_32
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B12: {
- %24:void = call %main_1
- 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/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.ir.msl
deleted file mode 100644
index 26da6db..0000000
--- a/test/tint/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,162 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: In2 = struct @align(4) {
- data_in2:array<i32, 8> @offset(0)
-}
-
-Out0 = struct @align(4) {
- data_out0:array<i32, 1024> @offset(0)
-}
-
-In1 = struct @align(4) {
- data_in1:array<i32, 512> @offset(0)
-}
-
-In0 = struct @align(4) {
- data_in0:array<i32, 512> @offset(0)
-}
-
-$B1: { # root
- %x_13:ptr<storage, In2, read> = var @binding_point(0, 2)
- %x_15:ptr<storage, Out0, read_write> = var @binding_point(0, 3)
- %x_17:ptr<storage, In1, read> = var @binding_point(0, 1)
- %x_19:ptr<storage, In0, read> = var @binding_point(0, 0)
-}
-
-%main_1 = func(%tint_wgid:vec3<u32>):void {
- $B2: {
- %base_index_in:ptr<function, u32, read_write> = var
- %base_index_out:ptr<function, u32, read_write> = var
- %index_in0:ptr<function, i32, read_write> = var
- %index_in1:ptr<function, i32, read_write> = var
- %index_out0:ptr<function, i32, read_write> = var
- %index_out1:ptr<function, i32, read_write> = var
- %condition_index:ptr<function, i32, read_write> = var
- %i:ptr<function, i32, read_write> = var
- %temp0:ptr<function, i32, read_write> = var
- %temp1:ptr<function, i32, read_write> = var
- %17:u32 = access %tint_wgid, 0u
- %18:u32 = mul 128u, %17
- store %base_index_in, %18
- %19:u32 = access %tint_wgid, 0u
- %20:u32 = mul 256u, %19
- store %base_index_out, %20
- store %index_in0, 127i
- store %index_in1, 383i
- store %index_out0, 255i
- store %index_out1, 383i
- store %condition_index, 0i
- store %i, 0i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %21:i32 = load %i
- %22:bool = lt %21, 256i
- if %22 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %23:i32 = load %condition_index
- %24:ptr<storage, i32, read> = access %x_13, 0u, %23
- %25:i32 = load %24
- %26:bool = eq %25, 0i
- if %26 [t: $B7, f: $B8] { # if_2
- $B7: { # true
- %27:u32 = load %base_index_out
- %x_77:u32 = let %27
- %29:i32 = load %index_out0
- %x_78:i32 = let %29
- %31:u32 = bitcast %x_78
- %32:u32 = add %x_77, %31
- %33:ptr<storage, i32, read_write> = access %x_15, 0u, %32
- %34:ptr<storage, i32, read_write> = let %33
- %35:u32 = load %base_index_in
- %36:u32 = let %35
- %37:i32 = load %index_in0
- %38:u32 = bitcast %37
- %39:u32 = add %36, %38
- %40:ptr<storage, i32, read> = access %x_17, 0u, %39
- %41:i32 = load %40
- store %34, %41
- %42:i32 = load %index_out0
- %43:i32 = sub %42, 1i
- store %index_out0, %43
- %44:i32 = load %index_in1
- %45:i32 = sub %44, 1i
- store %index_in1, %45
- exit_if # if_2
- }
- $B8: { # false
- %46:u32 = load %base_index_out
- %x_92:u32 = let %46
- %48:i32 = load %index_out1
- %x_93:i32 = let %48
- %50:u32 = bitcast %x_93
- %51:u32 = add %x_92, %50
- %52:ptr<storage, i32, read_write> = access %x_15, 0u, %51
- %53:ptr<storage, i32, read_write> = let %52
- %54:u32 = load %base_index_in
- %55:u32 = let %54
- %56:i32 = load %index_in1
- %57:u32 = bitcast %56
- %58:u32 = add %55, %57
- %59:ptr<storage, i32, read> = access %x_19, 0u, %58
- %60:i32 = load %59
- store %53, %60
- %61:i32 = load %index_out1
- %62:i32 = sub %61, 1i
- store %index_out1, %62
- %63:i32 = load %index_in1
- %64:i32 = sub %63, 1i
- store %index_in1, %64
- exit_if # if_2
- }
- }
- %65:i32 = load %condition_index
- %66:i32 = load %condition_index
- %67:i32 = add %66, 1i
- %68:ptr<storage, i32, read> = access %x_13, 0u, %67
- %69:i32 = load %68
- %70:i32 = add %65, %69
- store %condition_index, %70
- %71:i32 = load %index_in0
- store %temp0, %71
- %72:i32 = load %index_in1
- store %index_in0, %72
- %73:i32 = load %temp0
- store %index_in1, %73
- %74:i32 = load %index_out0
- store %temp1, %74
- %75:i32 = load %index_out1
- store %index_out0, %75
- %76:i32 = load %temp1
- store %index_out1, %76
- continue # -> $B4
- }
- $B4: { # continuing
- %77:i32 = load %i
- %78:i32 = add %77, 1i
- store %i, %78
- next_iteration # -> $B3
- }
- }
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(4, 1, 1) func(%gl_WorkGroupID_param:vec3<u32> [@workgroup_id]):void {
- $B9: {
- %81:void = call %main_1, %gl_WorkGroupID_param
- 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/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.ir.msl
deleted file mode 100644
index 594a41a..0000000
--- a/test/tint/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,185 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: In2 = struct @align(4) {
- data_in2:array<i32, 8> @offset(0)
-}
-
-Out0 = struct @align(4) {
- data_out0:array<i32, 1024> @offset(0)
-}
-
-In1 = struct @align(4) {
- data_in1:array<i32, 512> @offset(0)
-}
-
-In0 = struct @align(4) {
- data_in0:array<i32, 512> @offset(0)
-}
-
-$B1: { # root
- %gl_WorkGroupID:ptr<private, vec3<u32>, read_write> = var
- %x_13:ptr<storage, In2, read> = var @binding_point(0, 2)
- %x_15:ptr<storage, Out0, read_write> = var @binding_point(0, 3)
- %x_17:ptr<storage, In1, read> = var @binding_point(0, 1)
- %x_19:ptr<storage, In0, read> = var @binding_point(0, 0)
-}
-
-%main_1 = func():void {
- $B2: {
- %base_index_in:ptr<function, u32, read_write> = var
- %base_index_out:ptr<function, u32, read_write> = var
- %index_in0:ptr<function, i32, read_write> = var
- %index_in1:ptr<function, i32, read_write> = var
- %index_out0:ptr<function, i32, read_write> = var
- %index_out1:ptr<function, i32, read_write> = var
- %condition_index:ptr<function, i32, read_write> = var
- %i:ptr<function, i32, read_write> = var
- %temp0:ptr<function, i32, read_write> = var
- %temp1:ptr<function, i32, read_write> = var
- %17:u32 = load_vector_element %gl_WorkGroupID, 0u
- %x_58:u32 = let %17
- %19:u32 = mul 128u, %x_58
- store %base_index_in, %19
- %20:u32 = load_vector_element %gl_WorkGroupID, 0u
- %x_61:u32 = let %20
- %22:u32 = mul 256u, %x_61
- store %base_index_out, %22
- store %index_in0, 127i
- store %index_in1, 383i
- store %index_out0, 255i
- store %index_out1, 383i
- store %condition_index, 0i
- store %i, 0i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %23:i32 = load %i
- %x_67:i32 = let %23
- %25:bool = lt %x_67, 256i
- if %25 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %26:i32 = load %condition_index
- %x_70:i32 = let %26
- %28:ptr<storage, i32, read> = access %x_13, 0u, %x_70
- %29:i32 = load %28
- %x_72:i32 = let %29
- %31:bool = eq %x_72, 0i
- if %31 [t: $B7, f: $B8] { # if_2
- $B7: { # true
- %32:u32 = load %base_index_out
- %x_77:u32 = let %32
- %34:i32 = load %index_out0
- %x_78:i32 = let %34
- %36:u32 = load %base_index_in
- %x_81:u32 = let %36
- %38:i32 = load %index_in0
- %x_82:i32 = let %38
- %40:u32 = bitcast %x_82
- %41:u32 = add %x_81, %40
- %42:ptr<storage, i32, read> = access %x_17, 0u, %41
- %43:i32 = load %42
- %x_86:i32 = let %43
- %45:u32 = bitcast %x_78
- %46:u32 = add %x_77, %45
- %47:ptr<storage, i32, read_write> = access %x_15, 0u, %46
- store %47, %x_86
- %48:i32 = load %index_out0
- %x_88:i32 = let %48
- %50:i32 = sub %x_88, 1i
- store %index_out0, %50
- %51:i32 = load %index_in1
- %x_90:i32 = let %51
- %53:i32 = sub %x_90, 1i
- store %index_in1, %53
- exit_if # if_2
- }
- $B8: { # false
- %54:u32 = load %base_index_out
- %x_92:u32 = let %54
- %56:i32 = load %index_out1
- %x_93:i32 = let %56
- %58:u32 = load %base_index_in
- %x_96:u32 = let %58
- %60:i32 = load %index_in1
- %x_97:i32 = let %60
- %62:u32 = bitcast %x_97
- %63:u32 = add %x_96, %62
- %64:ptr<storage, i32, read> = access %x_19, 0u, %63
- %65:i32 = load %64
- %x_101:i32 = let %65
- %67:u32 = bitcast %x_93
- %68:u32 = add %x_92, %67
- %69:ptr<storage, i32, read_write> = access %x_15, 0u, %68
- store %69, %x_101
- %70:i32 = load %index_out1
- %x_103:i32 = let %70
- %72:i32 = sub %x_103, 1i
- store %index_out1, %72
- %73:i32 = load %index_in1
- %x_105:i32 = let %73
- %75:i32 = sub %x_105, 1i
- store %index_in1, %75
- exit_if # if_2
- }
- }
- %76:i32 = load %condition_index
- %x_107:i32 = let %76
- %78:i32 = add %x_107, 1i
- %79:ptr<storage, i32, read> = access %x_13, 0u, %78
- %80:i32 = load %79
- %x_110:i32 = let %80
- %82:i32 = load %condition_index
- %x_111:i32 = let %82
- %84:i32 = add %x_111, %x_110
- store %condition_index, %84
- %85:i32 = load %index_in0
- %x_113:i32 = let %85
- store %temp0, %x_113
- %87:i32 = load %index_in1
- %x_114:i32 = let %87
- store %index_in0, %x_114
- %89:i32 = load %temp0
- %x_115:i32 = let %89
- store %index_in1, %x_115
- %91:i32 = load %index_out0
- %x_116:i32 = let %91
- store %temp1, %x_116
- %93:i32 = load %index_out1
- %x_117:i32 = let %93
- store %index_out0, %x_117
- %95:i32 = load %temp1
- %x_118:i32 = let %95
- store %index_out1, %x_118
- continue # -> $B4
- }
- $B4: { # continuing
- %97:i32 = load %i
- %x_119:i32 = let %97
- %99:i32 = add %x_119, 1i
- store %i, %99
- next_iteration # -> $B3
- }
- }
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(4, 1, 1) func(%gl_WorkGroupID_param:vec3<u32> [@workgroup_id]):void {
- $B9: {
- store %gl_WorkGroupID, %gl_WorkGroupID_param
- %102:void = call %main_1
- 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/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.ir.msl
deleted file mode 100644
index d3fb672..0000000
--- a/test/tint/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,162 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: In2 = struct @align(4) {
- data_in2:array<i32, 8> @offset(0)
-}
-
-Out0 = struct @align(4) {
- data_out0:array<i32, 1024> @offset(0)
-}
-
-In0 = struct @align(4) {
- data_in0:array<i32, 512> @offset(0)
-}
-
-In1 = struct @align(4) {
- data_in1:array<i32, 512> @offset(0)
-}
-
-$B1: { # root
- %x_13:ptr<storage, In2, read> = var @binding_point(0, 2)
- %x_15:ptr<storage, Out0, read_write> = var @binding_point(0, 3)
- %x_17:ptr<storage, In0, read> = var @binding_point(0, 0)
- %x_19:ptr<storage, In1, read> = var @binding_point(0, 1)
-}
-
-%main_1 = func(%tint_wgid:vec3<u32>):void {
- $B2: {
- %base_index_in:ptr<function, u32, read_write> = var
- %base_index_out:ptr<function, u32, read_write> = var
- %index_in0:ptr<function, i32, read_write> = var
- %index_in1:ptr<function, i32, read_write> = var
- %index_out0:ptr<function, i32, read_write> = var
- %index_out1:ptr<function, i32, read_write> = var
- %condition_index:ptr<function, i32, read_write> = var
- %i:ptr<function, i32, read_write> = var
- %temp0:ptr<function, i32, read_write> = var
- %temp1:ptr<function, i32, read_write> = var
- %17:u32 = access %tint_wgid, 0u
- %18:u32 = mul 128u, %17
- store %base_index_in, %18
- %19:u32 = access %tint_wgid, 0u
- %20:u32 = mul 256u, %19
- store %base_index_out, %20
- store %index_in0, 0i
- store %index_in1, -128i
- store %index_out0, 0i
- store %index_out1, -128i
- store %condition_index, 0i
- store %i, 0i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %21:i32 = load %i
- %22:bool = lt %21, 256i
- if %22 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %23:i32 = load %condition_index
- %24:ptr<storage, i32, read> = access %x_13, 0u, %23
- %25:i32 = load %24
- %26:bool = eq %25, 0i
- if %26 [t: $B7, f: $B8] { # if_2
- $B7: { # true
- %27:u32 = load %base_index_out
- %x_75:u32 = let %27
- %29:i32 = load %index_out0
- %x_76:i32 = let %29
- %31:u32 = bitcast %x_76
- %32:u32 = add %x_75, %31
- %33:ptr<storage, i32, read_write> = access %x_15, 0u, %32
- %34:ptr<storage, i32, read_write> = let %33
- %35:u32 = load %base_index_in
- %36:u32 = let %35
- %37:i32 = load %index_in0
- %38:u32 = bitcast %37
- %39:u32 = add %36, %38
- %40:ptr<storage, i32, read> = access %x_17, 0u, %39
- %41:i32 = load %40
- store %34, %41
- %42:i32 = load %index_out0
- %43:i32 = add %42, 1i
- store %index_out0, %43
- %44:i32 = load %index_in1
- %45:i32 = add %44, 1i
- store %index_in1, %45
- exit_if # if_2
- }
- $B8: { # false
- %46:u32 = load %base_index_out
- %x_90:u32 = let %46
- %48:i32 = load %index_out1
- %x_91:i32 = let %48
- %50:u32 = bitcast %x_91
- %51:u32 = add %x_90, %50
- %52:ptr<storage, i32, read_write> = access %x_15, 0u, %51
- %53:ptr<storage, i32, read_write> = let %52
- %54:u32 = load %base_index_in
- %55:u32 = let %54
- %56:i32 = load %index_in1
- %57:u32 = bitcast %56
- %58:u32 = add %55, %57
- %59:ptr<storage, i32, read> = access %x_19, 0u, %58
- %60:i32 = load %59
- store %53, %60
- %61:i32 = load %index_out1
- %62:i32 = add %61, 1i
- store %index_out1, %62
- %63:i32 = load %index_in1
- %64:i32 = add %63, 1i
- store %index_in1, %64
- exit_if # if_2
- }
- }
- %65:i32 = load %condition_index
- %66:i32 = load %condition_index
- %67:i32 = add %66, 1i
- %68:ptr<storage, i32, read> = access %x_13, 0u, %67
- %69:i32 = load %68
- %70:i32 = add %65, %69
- store %condition_index, %70
- %71:i32 = load %index_in0
- store %temp0, %71
- %72:i32 = load %index_in1
- store %index_in0, %72
- %73:i32 = load %temp0
- store %index_in1, %73
- %74:i32 = load %index_out0
- store %temp1, %74
- %75:i32 = load %index_out1
- store %index_out0, %75
- %76:i32 = load %temp1
- store %index_out1, %76
- continue # -> $B4
- }
- $B4: { # continuing
- %77:i32 = load %i
- %78:i32 = add %77, 1i
- store %i, %78
- next_iteration # -> $B3
- }
- }
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(4, 1, 1) func(%gl_WorkGroupID_param:vec3<u32> [@workgroup_id]):void {
- $B9: {
- %81:void = call %main_1, %gl_WorkGroupID_param
- 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/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.ir.msl
deleted file mode 100644
index 82a26e8..0000000
--- a/test/tint/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,185 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: In2 = struct @align(4) {
- data_in2:array<i32, 8> @offset(0)
-}
-
-Out0 = struct @align(4) {
- data_out0:array<i32, 1024> @offset(0)
-}
-
-In0 = struct @align(4) {
- data_in0:array<i32, 512> @offset(0)
-}
-
-In1 = struct @align(4) {
- data_in1:array<i32, 512> @offset(0)
-}
-
-$B1: { # root
- %gl_WorkGroupID:ptr<private, vec3<u32>, read_write> = var
- %x_13:ptr<storage, In2, read> = var @binding_point(0, 2)
- %x_15:ptr<storage, Out0, read_write> = var @binding_point(0, 3)
- %x_17:ptr<storage, In0, read> = var @binding_point(0, 0)
- %x_19:ptr<storage, In1, read> = var @binding_point(0, 1)
-}
-
-%main_1 = func():void {
- $B2: {
- %base_index_in:ptr<function, u32, read_write> = var
- %base_index_out:ptr<function, u32, read_write> = var
- %index_in0:ptr<function, i32, read_write> = var
- %index_in1:ptr<function, i32, read_write> = var
- %index_out0:ptr<function, i32, read_write> = var
- %index_out1:ptr<function, i32, read_write> = var
- %condition_index:ptr<function, i32, read_write> = var
- %i:ptr<function, i32, read_write> = var
- %temp0:ptr<function, i32, read_write> = var
- %temp1:ptr<function, i32, read_write> = var
- %17:u32 = load_vector_element %gl_WorkGroupID, 0u
- %x_56:u32 = let %17
- %19:u32 = mul 128u, %x_56
- store %base_index_in, %19
- %20:u32 = load_vector_element %gl_WorkGroupID, 0u
- %x_59:u32 = let %20
- %22:u32 = mul 256u, %x_59
- store %base_index_out, %22
- store %index_in0, 0i
- store %index_in1, -128i
- store %index_out0, 0i
- store %index_out1, -128i
- store %condition_index, 0i
- store %i, 0i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %23:i32 = load %i
- %x_65:i32 = let %23
- %25:bool = lt %x_65, 256i
- if %25 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %26:i32 = load %condition_index
- %x_68:i32 = let %26
- %28:ptr<storage, i32, read> = access %x_13, 0u, %x_68
- %29:i32 = load %28
- %x_70:i32 = let %29
- %31:bool = eq %x_70, 0i
- if %31 [t: $B7, f: $B8] { # if_2
- $B7: { # true
- %32:u32 = load %base_index_out
- %x_75:u32 = let %32
- %34:i32 = load %index_out0
- %x_76:i32 = let %34
- %36:u32 = load %base_index_in
- %x_79:u32 = let %36
- %38:i32 = load %index_in0
- %x_80:i32 = let %38
- %40:u32 = bitcast %x_80
- %41:u32 = add %x_79, %40
- %42:ptr<storage, i32, read> = access %x_17, 0u, %41
- %43:i32 = load %42
- %x_84:i32 = let %43
- %45:u32 = bitcast %x_76
- %46:u32 = add %x_75, %45
- %47:ptr<storage, i32, read_write> = access %x_15, 0u, %46
- store %47, %x_84
- %48:i32 = load %index_out0
- %x_86:i32 = let %48
- %50:i32 = add %x_86, 1i
- store %index_out0, %50
- %51:i32 = load %index_in1
- %x_88:i32 = let %51
- %53:i32 = add %x_88, 1i
- store %index_in1, %53
- exit_if # if_2
- }
- $B8: { # false
- %54:u32 = load %base_index_out
- %x_90:u32 = let %54
- %56:i32 = load %index_out1
- %x_91:i32 = let %56
- %58:u32 = load %base_index_in
- %x_94:u32 = let %58
- %60:i32 = load %index_in1
- %x_95:i32 = let %60
- %62:u32 = bitcast %x_95
- %63:u32 = add %x_94, %62
- %64:ptr<storage, i32, read> = access %x_19, 0u, %63
- %65:i32 = load %64
- %x_99:i32 = let %65
- %67:u32 = bitcast %x_91
- %68:u32 = add %x_90, %67
- %69:ptr<storage, i32, read_write> = access %x_15, 0u, %68
- store %69, %x_99
- %70:i32 = load %index_out1
- %x_101:i32 = let %70
- %72:i32 = add %x_101, 1i
- store %index_out1, %72
- %73:i32 = load %index_in1
- %x_103:i32 = let %73
- %75:i32 = add %x_103, 1i
- store %index_in1, %75
- exit_if # if_2
- }
- }
- %76:i32 = load %condition_index
- %x_105:i32 = let %76
- %78:i32 = add %x_105, 1i
- %79:ptr<storage, i32, read> = access %x_13, 0u, %78
- %80:i32 = load %79
- %x_108:i32 = let %80
- %82:i32 = load %condition_index
- %x_109:i32 = let %82
- %84:i32 = add %x_109, %x_108
- store %condition_index, %84
- %85:i32 = load %index_in0
- %x_111:i32 = let %85
- store %temp0, %x_111
- %87:i32 = load %index_in1
- %x_112:i32 = let %87
- store %index_in0, %x_112
- %89:i32 = load %temp0
- %x_113:i32 = let %89
- store %index_in1, %x_113
- %91:i32 = load %index_out0
- %x_114:i32 = let %91
- store %temp1, %x_114
- %93:i32 = load %index_out1
- %x_115:i32 = let %93
- store %index_out0, %x_115
- %95:i32 = load %temp1
- %x_116:i32 = let %95
- store %index_out1, %x_116
- continue # -> $B4
- }
- $B4: { # continuing
- %97:i32 = load %i
- %x_117:i32 = let %97
- %99:i32 = add %x_117, 1i
- store %i, %99
- next_iteration # -> $B3
- }
- }
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(4, 1, 1) func(%gl_WorkGroupID_param:vec3<u32> [@workgroup_id]):void {
- $B9: {
- store %gl_WorkGroupID, %gl_WorkGroupID_param
- %102:void = call %main_1
- 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/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.spvasm.expected.ir.msl
deleted file mode 100644
index cd371e5..0000000
--- a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,72 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Buf1 = struct @align(4) {
- result:i32 @offset(0)
-}
-
-Buf0 = struct @align(4) {
- values:array<u32> @offset(0)
-}
-
-$B1: { # root
- %x_4:ptr<storage, Buf1, read_write> = var @binding_point(0, 1)
- %x_7:ptr<storage, Buf0, read_write> = var @binding_point(0, 0)
-}
-
-%main_1 = func():void {
- $B2: {
- %i:ptr<function, u32, read_write> = var
- %5:ptr<storage, i32, read_write> = access %x_4, 0u
- store %5, 1i
- store %i, 0u
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %6:u32 = load %i
- %7:bool = lt %6, 512u
- if %7 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %8:u32 = load %i
- %9:u32 = mul %8, 2u
- %10:ptr<storage, u32, read_write> = access %x_7, 0u, %9
- %11:u32 = load %10
- %12:u32 = load %i
- %13:bool = neq %11, %12
- if %13 [t: $B7] { # if_2
- $B7: { # true
- %14:ptr<storage, i32, read_write> = access %x_4, 0u
- store %14, 0i
- exit_if # if_2
- }
- }
- continue # -> $B4
- }
- $B4: { # continuing
- %15:u32 = load %i
- %16:u32 = add %15, 1u
- store %i, %16
- next_iteration # -> $B3
- }
- }
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B8: {
- %18:void = call %main_1
- 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/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.wgsl.expected.ir.msl
deleted file mode 100644
index 80f3ac0..0000000
--- a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,77 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Buf1 = struct @align(4) {
- result:i32 @offset(0)
-}
-
-Buf0 = struct @align(4) {
- values:array<u32> @offset(0)
-}
-
-$B1: { # root
- %x_4:ptr<storage, Buf1, read_write> = var @binding_point(0, 1)
- %x_7:ptr<storage, Buf0, read_write> = var @binding_point(0, 0)
-}
-
-%main_1 = func():void {
- $B2: {
- %i:ptr<function, u32, read_write> = var
- %5:ptr<storage, i32, read_write> = access %x_4, 0u
- store %5, 1i
- store %i, 0u
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %6:u32 = load %i
- %x_33:u32 = let %6
- %8:bool = lt %x_33, 512u
- if %8 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %9:u32 = load %i
- %x_36:u32 = let %9
- %11:u32 = mul %x_36, 2u
- %12:ptr<storage, u32, read_write> = access %x_7, 0u, %11
- %13:u32 = load %12
- %x_39:u32 = let %13
- %15:u32 = load %i
- %x_40:u32 = let %15
- %17:bool = neq %x_39, %x_40
- if %17 [t: $B7] { # if_2
- $B7: { # true
- %18:ptr<storage, i32, read_write> = access %x_4, 0u
- store %18, 0i
- exit_if # if_2
- }
- }
- continue # -> $B4
- }
- $B4: { # continuing
- %19:u32 = load %i
- %x_45:u32 = let %19
- %21:u32 = add %x_45, 1u
- store %i, %21
- next_iteration # -> $B3
- }
- }
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func():void {
- $B8: {
- %23:void = call %main_1
- 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/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.spvasm.expected.ir.msl
deleted file mode 100644
index 7cc7724..0000000
--- a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,46 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- field0:array<u32> @offset(0)
-}
-
-$B1: { # root
- %x_2:ptr<private, vec3<u32>, read_write> = var
- %x_5:ptr<storage, S, read_write> = var @binding_point(0, 0)
- %x_6:ptr<storage, S, read_write> = var @binding_point(0, 1)
- %x_7:ptr<storage, S, read_write> = var @binding_point(0, 2)
-}
-
-%main_1 = func():void {
- $B2: {
- %6:u32 = load_vector_element %x_2, 0u
- %x_21:u32 = let %6
- %8:ptr<storage, u32, read_write> = access %x_7, 0u, %x_21
- %9:ptr<storage, u32, read_write> = access %x_5, 0u, %x_21
- %10:u32 = load %9
- %11:i32 = bitcast %10
- %12:i32 = let %11
- %13:ptr<storage, u32, read_write> = access %x_6, 0u, %x_21
- %14:u32 = load %13
- %15:i32 = bitcast %14
- %16:bool = gt %12, %15
- %17:u32 = select 0u, 1u, %16
- store %8, %17
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func(%x_2_param:vec3<u32> [@global_invocation_id]):void {
- $B3: {
- store %x_2, %x_2_param
- %20:void = call %main_1
- 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/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl.expected.ir.msl
deleted file mode 100644
index ceaa51e..0000000
--- a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,48 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- field0:array<u32> @offset(0)
-}
-
-$B1: { # root
- %x_2:ptr<private, vec3<u32>, read_write> = var
- %x_5:ptr<storage, S, read_write> = var @binding_point(0, 0)
- %x_6:ptr<storage, S, read_write> = var @binding_point(0, 1)
- %x_7:ptr<storage, S, read_write> = var @binding_point(0, 2)
-}
-
-%main_1 = func():void {
- $B2: {
- %6:u32 = load_vector_element %x_2, 0u
- %x_21:u32 = let %6
- %8:ptr<storage, u32, read_write> = access %x_5, 0u, %x_21
- %9:u32 = load %8
- %x_23:u32 = let %9
- %11:ptr<storage, u32, read_write> = access %x_6, 0u, %x_21
- %12:u32 = load %11
- %x_25:u32 = let %12
- %14:ptr<storage, u32, read_write> = access %x_7, 0u, %x_21
- %15:i32 = bitcast %x_23
- %16:i32 = let %15
- %17:i32 = bitcast %x_25
- %18:bool = gt %16, %17
- %19:u32 = select 0u, 1u, %18
- store %14, %19
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func(%x_2_param:vec3<u32> [@global_invocation_id]):void {
- $B3: {
- store %x_2, %x_2_param
- %22:void = call %main_1
- 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/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.spvasm.expected.ir.msl
deleted file mode 100644
index 74815d1..0000000
--- a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,46 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- field0:array<u32> @offset(0)
-}
-
-$B1: { # root
- %x_2:ptr<private, vec3<u32>, read_write> = var
- %x_5:ptr<storage, S, read_write> = var @binding_point(0, 0)
- %x_6:ptr<storage, S, read_write> = var @binding_point(0, 1)
- %x_7:ptr<storage, S, read_write> = var @binding_point(0, 2)
-}
-
-%main_1 = func():void {
- $B2: {
- %6:u32 = load_vector_element %x_2, 0u
- %x_21:u32 = let %6
- %8:ptr<storage, u32, read_write> = access %x_7, 0u, %x_21
- %9:ptr<storage, u32, read_write> = access %x_5, 0u, %x_21
- %10:u32 = load %9
- %11:i32 = bitcast %10
- %12:i32 = let %11
- %13:ptr<storage, u32, read_write> = access %x_6, 0u, %x_21
- %14:u32 = load %13
- %15:i32 = bitcast %14
- %16:bool = gte %12, %15
- %17:u32 = select 0u, 1u, %16
- store %8, %17
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func(%x_2_param:vec3<u32> [@global_invocation_id]):void {
- $B3: {
- store %x_2, %x_2_param
- %20:void = call %main_1
- 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/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl.expected.ir.msl
deleted file mode 100644
index 5b46a17..0000000
--- a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,48 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- field0:array<u32> @offset(0)
-}
-
-$B1: { # root
- %x_2:ptr<private, vec3<u32>, read_write> = var
- %x_5:ptr<storage, S, read_write> = var @binding_point(0, 0)
- %x_6:ptr<storage, S, read_write> = var @binding_point(0, 1)
- %x_7:ptr<storage, S, read_write> = var @binding_point(0, 2)
-}
-
-%main_1 = func():void {
- $B2: {
- %6:u32 = load_vector_element %x_2, 0u
- %x_21:u32 = let %6
- %8:ptr<storage, u32, read_write> = access %x_5, 0u, %x_21
- %9:u32 = load %8
- %x_23:u32 = let %9
- %11:ptr<storage, u32, read_write> = access %x_6, 0u, %x_21
- %12:u32 = load %11
- %x_25:u32 = let %12
- %14:ptr<storage, u32, read_write> = access %x_7, 0u, %x_21
- %15:i32 = bitcast %x_23
- %16:i32 = let %15
- %17:i32 = bitcast %x_25
- %18:bool = gte %16, %17
- %19:u32 = select 0u, 1u, %18
- store %14, %19
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func(%x_2_param:vec3<u32> [@global_invocation_id]):void {
- $B3: {
- store %x_2, %x_2_param
- %22:void = call %main_1
- 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/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.spvasm.expected.ir.msl
deleted file mode 100644
index 83f4293..0000000
--- a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,46 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- field0:array<u32> @offset(0)
-}
-
-$B1: { # root
- %x_2:ptr<private, vec3<u32>, read_write> = var
- %x_5:ptr<storage, S, read_write> = var @binding_point(0, 0)
- %x_6:ptr<storage, S, read_write> = var @binding_point(0, 1)
- %x_7:ptr<storage, S, read_write> = var @binding_point(0, 2)
-}
-
-%main_1 = func():void {
- $B2: {
- %6:u32 = load_vector_element %x_2, 0u
- %x_21:u32 = let %6
- %8:ptr<storage, u32, read_write> = access %x_7, 0u, %x_21
- %9:ptr<storage, u32, read_write> = access %x_5, 0u, %x_21
- %10:u32 = load %9
- %11:i32 = bitcast %10
- %12:i32 = let %11
- %13:ptr<storage, u32, read_write> = access %x_6, 0u, %x_21
- %14:u32 = load %13
- %15:i32 = bitcast %14
- %16:bool = lt %12, %15
- %17:u32 = select 0u, 1u, %16
- store %8, %17
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func(%x_2_param:vec3<u32> [@global_invocation_id]):void {
- $B3: {
- store %x_2, %x_2_param
- %20:void = call %main_1
- 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/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl.expected.ir.msl
deleted file mode 100644
index ea7ed1d..0000000
--- a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,48 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- field0:array<u32> @offset(0)
-}
-
-$B1: { # root
- %x_2:ptr<private, vec3<u32>, read_write> = var
- %x_5:ptr<storage, S, read_write> = var @binding_point(0, 0)
- %x_6:ptr<storage, S, read_write> = var @binding_point(0, 1)
- %x_7:ptr<storage, S, read_write> = var @binding_point(0, 2)
-}
-
-%main_1 = func():void {
- $B2: {
- %6:u32 = load_vector_element %x_2, 0u
- %x_21:u32 = let %6
- %8:ptr<storage, u32, read_write> = access %x_5, 0u, %x_21
- %9:u32 = load %8
- %x_23:u32 = let %9
- %11:ptr<storage, u32, read_write> = access %x_6, 0u, %x_21
- %12:u32 = load %11
- %x_25:u32 = let %12
- %14:ptr<storage, u32, read_write> = access %x_7, 0u, %x_21
- %15:i32 = bitcast %x_23
- %16:i32 = let %15
- %17:i32 = bitcast %x_25
- %18:bool = lt %16, %17
- %19:u32 = select 0u, 1u, %18
- store %14, %19
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func(%x_2_param:vec3<u32> [@global_invocation_id]):void {
- $B3: {
- store %x_2, %x_2_param
- %22:void = call %main_1
- 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/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.spvasm.expected.ir.msl
deleted file mode 100644
index c0f8fcc..0000000
--- a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,46 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- field0:array<u32> @offset(0)
-}
-
-$B1: { # root
- %x_2:ptr<private, vec3<u32>, read_write> = var
- %x_5:ptr<storage, S, read_write> = var @binding_point(0, 0)
- %x_6:ptr<storage, S, read_write> = var @binding_point(0, 1)
- %x_7:ptr<storage, S, read_write> = var @binding_point(0, 2)
-}
-
-%main_1 = func():void {
- $B2: {
- %6:u32 = load_vector_element %x_2, 0u
- %x_21:u32 = let %6
- %8:ptr<storage, u32, read_write> = access %x_7, 0u, %x_21
- %9:ptr<storage, u32, read_write> = access %x_5, 0u, %x_21
- %10:u32 = load %9
- %11:i32 = bitcast %10
- %12:i32 = let %11
- %13:ptr<storage, u32, read_write> = access %x_6, 0u, %x_21
- %14:u32 = load %13
- %15:i32 = bitcast %14
- %16:bool = lte %12, %15
- %17:u32 = select 0u, 1u, %16
- store %8, %17
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func(%x_2_param:vec3<u32> [@global_invocation_id]):void {
- $B3: {
- store %x_2, %x_2_param
- %20:void = call %main_1
- 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/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl.expected.ir.msl
deleted file mode 100644
index 7486883..0000000
--- a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,48 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- field0:array<u32> @offset(0)
-}
-
-$B1: { # root
- %x_2:ptr<private, vec3<u32>, read_write> = var
- %x_5:ptr<storage, S, read_write> = var @binding_point(0, 0)
- %x_6:ptr<storage, S, read_write> = var @binding_point(0, 1)
- %x_7:ptr<storage, S, read_write> = var @binding_point(0, 2)
-}
-
-%main_1 = func():void {
- $B2: {
- %6:u32 = load_vector_element %x_2, 0u
- %x_21:u32 = let %6
- %8:ptr<storage, u32, read_write> = access %x_5, 0u, %x_21
- %9:u32 = load %8
- %x_23:u32 = let %9
- %11:ptr<storage, u32, read_write> = access %x_6, 0u, %x_21
- %12:u32 = load %11
- %x_25:u32 = let %12
- %14:ptr<storage, u32, read_write> = access %x_7, 0u, %x_21
- %15:i32 = bitcast %x_23
- %16:i32 = let %15
- %17:i32 = bitcast %x_25
- %18:bool = lte %16, %17
- %19:u32 = select 0u, 1u, %18
- store %14, %19
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func(%x_2_param:vec3<u32> [@global_invocation_id]):void {
- $B3: {
- store %x_2, %x_2_param
- %22:void = call %main_1
- 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/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.spvasm.expected.ir.msl
deleted file mode 100644
index 1acef4a..0000000
--- a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,58 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- field0:array<u32> @offset(0)
-}
-
-$B1: { # root
- %x_2:ptr<private, vec3<u32>, read_write> = var
- %x_5:ptr<storage, S, read_write> = var @binding_point(0, 0)
- %x_6:ptr<storage, S, read_write> = var @binding_point(0, 1)
- %x_7:ptr<storage, S, read_write> = var @binding_point(0, 2)
-}
-
-%main_1 = func():void {
- $B2: {
- %6:u32 = load_vector_element %x_2, 0u
- %x_20:u32 = let %6
- %8:ptr<storage, u32, read_write> = access %x_7, 0u, %x_20
- %9:ptr<storage, u32, read_write> = access %x_5, 0u, %x_20
- %10:u32 = load %9
- %11:i32 = bitcast %10
- %12:i32 = let %11
- %13:ptr<storage, u32, read_write> = access %x_6, 0u, %x_20
- %14:u32 = load %13
- %15:i32 = bitcast %14
- %16:i32 = call %tint_div_i32, %12, %15
- %18:u32 = bitcast %16
- store %8, %18
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func(%x_2_param:vec3<u32> [@global_invocation_id]):void {
- $B3: {
- store %x_2, %x_2_param
- %21:void = call %main_1
- ret
- }
-}
-%tint_div_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B4: {
- %24:bool = eq %rhs, 0i
- %25:bool = eq %lhs, -2147483648i
- %26:bool = eq %rhs, -1i
- %27:bool = and %25, %26
- %28:bool = or %24, %27
- %29:i32 = select %rhs, 1i, %28
- %30:i32 = div %lhs, %29
- ret %30
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl.expected.ir.msl
deleted file mode 100644
index 73c5474..0000000
--- a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,60 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- field0:array<u32> @offset(0)
-}
-
-$B1: { # root
- %x_2:ptr<private, vec3<u32>, read_write> = var
- %x_5:ptr<storage, S, read_write> = var @binding_point(0, 0)
- %x_6:ptr<storage, S, read_write> = var @binding_point(0, 1)
- %x_7:ptr<storage, S, read_write> = var @binding_point(0, 2)
-}
-
-%main_1 = func():void {
- $B2: {
- %6:u32 = load_vector_element %x_2, 0u
- %x_20:u32 = let %6
- %8:ptr<storage, u32, read_write> = access %x_5, 0u, %x_20
- %9:u32 = load %8
- %x_22:u32 = let %9
- %11:ptr<storage, u32, read_write> = access %x_6, 0u, %x_20
- %12:u32 = load %11
- %x_24:u32 = let %12
- %14:ptr<storage, u32, read_write> = access %x_7, 0u, %x_20
- %15:i32 = bitcast %x_22
- %16:i32 = let %15
- %17:i32 = bitcast %x_24
- %18:i32 = call %tint_div_i32, %16, %17
- %20:u32 = bitcast %18
- store %14, %20
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func(%x_2_param:vec3<u32> [@global_invocation_id]):void {
- $B3: {
- store %x_2, %x_2_param
- %23:void = call %main_1
- ret
- }
-}
-%tint_div_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B4: {
- %26:bool = eq %rhs, 0i
- %27:bool = eq %lhs, -2147483648i
- %28:bool = eq %rhs, -1i
- %29:bool = and %27, %28
- %30:bool = or %26, %29
- %31:i32 = select %rhs, 1i, %30
- %32:i32 = div %lhs, %31
- ret %32
- }
-}
-
-unhandled variable address space
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.ir.msl
deleted file mode 100644
index 399b26a..0000000
--- a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,41 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- field0:array<u32> @offset(0)
-}
-
-$B1: { # root
- %x_2:ptr<private, vec3<u32>, read_write> = var
- %x_5:ptr<storage, S, read_write> = var @binding_point(0, 0)
- %x_6:ptr<storage, S, read_write> = var @binding_point(0, 1)
-}
-
-%main_1 = func():void {
- $B2: {
- %5:u32 = load_vector_element %x_2, 0u
- %x_20:u32 = let %5
- %7:ptr<storage, u32, read_write> = access %x_6, 0u, %x_20
- %8:ptr<storage, u32, read_write> = access %x_5, 0u, %x_20
- %9:u32 = load %8
- %10:i32 = bitcast %9
- %11:i32 = negation %10
- %12:u32 = bitcast %11
- store %7, %12
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func(%x_2_param:vec3<u32> [@global_invocation_id]):void {
- $B3: {
- store %x_2, %x_2_param
- %15:void = call %main_1
- 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/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.ir.msl
deleted file mode 100644
index aa72ebe..0000000
--- a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,42 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- field0:array<u32> @offset(0)
-}
-
-$B1: { # root
- %x_2:ptr<private, vec3<u32>, read_write> = var
- %x_5:ptr<storage, S, read_write> = var @binding_point(0, 0)
- %x_6:ptr<storage, S, read_write> = var @binding_point(0, 1)
-}
-
-%main_1 = func():void {
- $B2: {
- %5:u32 = load_vector_element %x_2, 0u
- %x_20:u32 = let %5
- %7:ptr<storage, u32, read_write> = access %x_5, 0u, %x_20
- %8:u32 = load %7
- %x_22:u32 = let %8
- %10:ptr<storage, u32, read_write> = access %x_6, 0u, %x_20
- %11:i32 = bitcast %x_22
- %12:i32 = negation %11
- %13:u32 = bitcast %12
- store %10, %13
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func(%x_2_param:vec3<u32> [@global_invocation_id]):void {
- $B3: {
- store %x_2, %x_2_param
- %16:void = call %main_1
- 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. *
-********************************************************************