blob: 2a1a5d1e7ebb5b8e265a2139f2b368fb32ca6725 [file] [log] [blame]
#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 tint_module_vars_struct {
device tint_array<float, 1>* tint_member;
const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
};
struct tint_array_lengths_struct {
uint tint_array_length_0_0;
};
struct S {
simdgroup_float8x8 l;
simdgroup_float8x8 r;
};
struct S_Nested {
S s;
};
kernel void v(device tint_array<float, 1>* v_1 [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tint_member=v_1, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
tint_array_lengths_struct const v_2 = tint_array_lengths_struct{.tint_array_length_0_0=((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u)};
simdgroup_float8x8 m = make_filled_simdgroup_matrix<float, 8, 8>(0.0f);
tint_array<simdgroup_float8x8, 4> m_array = {};
tint_array<tint_array<simdgroup_float8x8, 4>, 4> m_nested_array = {};
S m_struct = {};
S_Nested m_nested_struct = {};
simdgroup_float8x8 const m_let = m;
tint_array<simdgroup_float8x8, 4> const m_array_let = m_array;
tint_array<tint_array<simdgroup_float8x8, 4>, 4> const m_nested_array_let = m_nested_array;
S const m_struct_let = m_struct;
S_Nested const m_nested_struct_let = m_nested_struct;
if ((((0u + (64u * 7u)) + 8u) <= v_2.tint_array_length_0_0)) {
simdgroup_store(m_let, (&(*tint_module_vars.tint_member)[0u]), ulong(64u), ulong2(0ul), false);
}
if ((((0u + (64u * 7u)) + 8u) <= v_2.tint_array_length_0_0)) {
simdgroup_store(m_array_let[0u], (&(*tint_module_vars.tint_member)[0u]), ulong(64u), ulong2(0ul), false);
}
if ((((0u + (64u * 7u)) + 8u) <= v_2.tint_array_length_0_0)) {
simdgroup_store(m_nested_array_let[1u][2u], (&(*tint_module_vars.tint_member)[0u]), ulong(64u), ulong2(0ul), false);
}
if ((((0u + (64u * 7u)) + 8u) <= v_2.tint_array_length_0_0)) {
simdgroup_store(m_struct_let.l, (&(*tint_module_vars.tint_member)[0u]), ulong(64u), ulong2(0ul), false);
}
if ((((0u + (64u * 7u)) + 8u) <= v_2.tint_array_length_0_0)) {
simdgroup_store(m_nested_struct_let.s.r, (&(*tint_module_vars.tint_member)[0u]), ulong(64u), ulong2(0ul), false);
}
}