diff --git a/naga/src/back/hlsl/writer.rs b/naga/src/back/hlsl/writer.rs index be1985a7d..3971fb2e7 100644 --- a/naga/src/back/hlsl/writer.rs +++ b/naga/src/back/hlsl/writer.rs @@ -3338,7 +3338,9 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> { rows: crate::VectorSize::Bi, width: 4, }) = get_inner_matrix_of_struct_array_member(module, base, func_ctx, true) - .or_else(|| get_global_uniform_matrix(module, base, func_ctx)) + .or_else(|| { + get_inner_matrix_of_global_uniform(module, base, func_ctx, true) + }) { write!(self.out, "__get_col_of_mat{}x2(", columns as u8)?; self.write_expr(module, base, func_ctx)?; @@ -3462,7 +3464,9 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> { width: 4, .. }) = get_inner_matrix_of_struct_array_member(module, base, func_ctx, true) - .or_else(|| get_global_uniform_matrix(module, base, func_ctx)) + .or_else(|| { + get_inner_matrix_of_global_uniform(module, base, func_ctx, true) + }) { self.write_expr(module, base, func_ctx)?; write!(self.out, "._{index}")?; @@ -3811,8 +3815,9 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> { }) = get_inner_matrix_of_struct_array_member( module, pointer, func_ctx, false, ) - .or_else(|| get_inner_matrix_of_global_uniform(module, pointer, func_ctx)) - { + .or_else(|| { + get_inner_matrix_of_global_uniform(module, pointer, func_ctx, false) + }) { let mut resolved = func_ctx.resolve_type(pointer, &module.types); let ptr_tr = resolved.pointer_base_type(); if let Some(ptr_ty) = @@ -5018,44 +5023,15 @@ pub(super) fn get_inner_matrix_of_struct_array_member( None } -/// Simpler version of get_inner_matrix_of_global_uniform that only looks at the -/// immediate expression, rather than traversing an access chain. -fn get_global_uniform_matrix( - module: &Module, - base: Handle, - func_ctx: &back::FunctionCtx<'_>, -) -> Option { - let base_tr = func_ctx - .resolve_type(base, &module.types) - .pointer_base_type(); - let base_ty = base_tr.as_ref().map(|tr| tr.inner_with(&module.types)); - match (&func_ctx.expressions[base], base_ty) { - ( - &crate::Expression::GlobalVariable(handle), - Some(&TypeInner::Matrix { - columns, - rows, - scalar, - }), - ) if module.global_variables[handle].space == crate::AddressSpace::Uniform => { - Some(MatrixType { - columns, - rows, - width: scalar.width, - }) - } - _ => None, - } -} - /// Returns the matrix data if the access chain starting at `base`: -/// - starts with an expression with resolved type of [`TypeInner::Matrix`] -/// - contains zero or more expressions with resolved type of [`TypeInner::Array`] of [`TypeInner::Matrix`] -/// - ends with an [`Expression::GlobalVariable`](crate::Expression::GlobalVariable) in [`AddressSpace::Uniform`](crate::AddressSpace::Uniform) +/// - starts with an expression with resolved type of [`TypeInner::Matrix`], or +/// - contains zero or more expressions with resolved type of [`TypeInner::Array`] of [`TypeInner::Matrix`] if `direct = false` +/// - and ends with an [`Expression::GlobalVariable`](crate::Expression::GlobalVariable) in [`AddressSpace::Uniform`](crate::AddressSpace::Uniform) fn get_inner_matrix_of_global_uniform( module: &Module, base: Handle, func_ctx: &back::FunctionCtx<'_>, + direct: bool, ) -> Option { let mut mat_data = None; let mut array_base = None; @@ -5080,7 +5056,9 @@ fn get_inner_matrix_of_global_uniform( }) } TypeInner::Array { base, .. } => { - array_base = Some(base); + if !direct { + array_base = Some(base); + } } _ => break, } diff --git a/naga/tests/in/wgsl/mat_cx2.wgsl b/naga/tests/in/wgsl/mat_cx2.wgsl index 6a2a3a6e6..991f47c12 100644 --- a/naga/tests/in/wgsl/mat_cx2.wgsl +++ b/naga/tests/in/wgsl/mat_cx2.wgsl @@ -100,14 +100,76 @@ fn access_sm() { s_sm.m[idx][idx] = l_u_e_vv; } +@group(2) @binding(0) +var s_am: array; + +@group(2) @binding(1) +var u_am: array; + +fn access_am() { + var idx = 1; + idx--; + + // loads from storage + let l_s_a = s_am; + let l_s_m_c = s_am[0]; + let l_s_m_v = s_am[idx]; + let l_s_c_cc = s_am[0][0]; + let l_s_c_cv = s_am[0][idx]; + let l_s_c_vc = s_am[idx][0]; + let l_s_c_vv = s_am[idx][idx]; + let l_s_e_ccc = s_am[0][0][0]; + let l_s_e_ccv = s_am[0][0][idx]; + let l_s_e_cvc = s_am[0][idx][0]; + let l_s_e_cvv = s_am[0][idx][idx]; + let l_s_e_vcc = s_am[idx][0][0]; + let l_s_e_vcv = s_am[idx][0][idx]; + let l_s_e_vvc = s_am[idx][idx][0]; + let l_s_e_vvv = s_am[idx][idx][idx]; + + // loads from uniform + let l_u_a = u_am; + let l_u_m_c = u_am[0]; + let l_u_m_v = u_am[idx]; + let l_u_c_cc = u_am[0][0]; + let l_u_c_cv = u_am[0][idx]; + let l_u_c_vc = u_am[idx][0]; + let l_u_c_vv = u_am[idx][idx]; + let l_u_e_ccc = u_am[0][0][0]; + let l_u_e_ccv = u_am[0][0][idx]; + let l_u_e_cvc = u_am[0][idx][0]; + let l_u_e_cvv = u_am[0][idx][idx]; + let l_u_e_vcc = u_am[idx][0][0]; + let l_u_e_vcv = u_am[idx][0][idx]; + let l_u_e_vvc = u_am[idx][idx][0]; + let l_u_e_vvv = u_am[idx][idx][idx]; + + // stores to storage + s_am = l_u_a; + s_am[0] = l_u_m_c; + s_am[idx] = l_u_m_v; + s_am[0][0] = l_u_c_cc; + s_am[0][idx] = l_u_c_cv; + s_am[idx][0] = l_u_c_vc; + s_am[idx][idx] = l_u_c_vv; + s_am[0][0][0] = l_u_e_ccc; + s_am[0][0][idx] = l_u_e_ccv; + s_am[0][idx][0] = l_u_e_cvc; + s_am[0][idx][idx] = l_u_e_cvv; + s_am[idx][0][0] = l_u_e_vcc; + s_am[idx][0][idx] = l_u_e_vcv; + s_am[idx][idx][0] = l_u_e_vvc; + s_am[idx][idx][idx] = l_u_e_vvv; +} + struct StructWithArrayOfStructOfMat { a: array, } -@group(2) @binding(0) +@group(3) @binding(0) var s_sasm: StructWithArrayOfStructOfMat; -@group(2) @binding(1) +@group(3) @binding(1) var u_sasm: StructWithArrayOfStructOfMat; fn access_sasm() { @@ -173,5 +235,6 @@ fn access_sasm() { fn main() { access_m(); access_sm(); + access_am(); access_sasm(); } diff --git a/naga/tests/in/wgsl/mat_cx3.wgsl b/naga/tests/in/wgsl/mat_cx3.wgsl index bb17a4371..788241eab 100644 --- a/naga/tests/in/wgsl/mat_cx3.wgsl +++ b/naga/tests/in/wgsl/mat_cx3.wgsl @@ -96,14 +96,76 @@ fn access_sm() { s_sm.m[idx][idx] = l_u_e_vv; } +@group(2) @binding(0) +var s_am: array; + +@group(2) @binding(1) +var u_am: array; + +fn access_am() { + var idx = 1; + idx--; + + // loads from storage + let l_s_a = s_am; + let l_s_m_c = s_am[0]; + let l_s_m_v = s_am[idx]; + let l_s_c_cc = s_am[0][0]; + let l_s_c_cv = s_am[0][idx]; + let l_s_c_vc = s_am[idx][0]; + let l_s_c_vv = s_am[idx][idx]; + let l_s_e_ccc = s_am[0][0][0]; + let l_s_e_ccv = s_am[0][0][idx]; + let l_s_e_cvc = s_am[0][idx][0]; + let l_s_e_cvv = s_am[0][idx][idx]; + let l_s_e_vcc = s_am[idx][0][0]; + let l_s_e_vcv = s_am[idx][0][idx]; + let l_s_e_vvc = s_am[idx][idx][0]; + let l_s_e_vvv = s_am[idx][idx][idx]; + + // loads from uniform + let l_u_a = u_am; + let l_u_m_c = u_am[0]; + let l_u_m_v = u_am[idx]; + let l_u_c_cc = u_am[0][0]; + let l_u_c_cv = u_am[0][idx]; + let l_u_c_vc = u_am[idx][0]; + let l_u_c_vv = u_am[idx][idx]; + let l_u_e_ccc = u_am[0][0][0]; + let l_u_e_ccv = u_am[0][0][idx]; + let l_u_e_cvc = u_am[0][idx][0]; + let l_u_e_cvv = u_am[0][idx][idx]; + let l_u_e_vcc = u_am[idx][0][0]; + let l_u_e_vcv = u_am[idx][0][idx]; + let l_u_e_vvc = u_am[idx][idx][0]; + let l_u_e_vvv = u_am[idx][idx][idx]; + + // stores to storage + s_am = l_u_a; + s_am[0] = l_u_m_c; + s_am[idx] = l_u_m_v; + s_am[0][0] = l_u_c_cc; + s_am[0][idx] = l_u_c_cv; + s_am[idx][0] = l_u_c_vc; + s_am[idx][idx] = l_u_c_vv; + s_am[0][0][0] = l_u_e_ccc; + s_am[0][0][idx] = l_u_e_ccv; + s_am[0][idx][0] = l_u_e_cvc; + s_am[0][idx][idx] = l_u_e_cvv; + s_am[idx][0][0] = l_u_e_vcc; + s_am[idx][0][idx] = l_u_e_vcv; + s_am[idx][idx][0] = l_u_e_vvc; + s_am[idx][idx][idx] = l_u_e_vvv; +} + struct StructWithArrayOfStructOfMat { a: array, } -@group(2) @binding(0) +@group(3) @binding(0) var s_sasm: StructWithArrayOfStructOfMat; -@group(2) @binding(1) +@group(3) @binding(1) var u_sasm: StructWithArrayOfStructOfMat; fn access_sasm() { @@ -169,5 +231,6 @@ fn access_sasm() { fn main() { access_m(); access_sm(); + access_am(); access_sasm(); } diff --git a/naga/tests/out/hlsl/wgsl-mat_cx2.hlsl b/naga/tests/out/hlsl/wgsl-mat_cx2.hlsl index 1de9e069c..30be83d22 100644 --- a/naga/tests/out/hlsl/wgsl-mat_cx2.hlsl +++ b/naga/tests/out/hlsl/wgsl-mat_cx2.hlsl @@ -31,8 +31,10 @@ RWByteAddressBuffer s_m : register(u0); cbuffer u_m : register(b1) { __mat2x2 u_m; } RWByteAddressBuffer s_sm : register(u0, space1); cbuffer u_sm : register(b1, space1) { StructWithMat u_sm; } -RWByteAddressBuffer s_sasm : register(u0, space2); -cbuffer u_sasm : register(b1, space2) { StructWithArrayOfStructOfMat u_sasm; } +RWByteAddressBuffer s_am : register(u0, space2); +cbuffer u_am : register(b1, space2) { __mat2x2 u_am[4]; } +RWByteAddressBuffer s_sasm : register(u0, space3); +cbuffer u_sasm : register(b1, space3) { StructWithArrayOfStructOfMat u_sasm; } void access_m() { @@ -171,6 +173,147 @@ void access_sm() return; } +typedef float2x2 ret_Constructarray4_float2x2_[4]; +ret_Constructarray4_float2x2_ Constructarray4_float2x2_(float2x2 arg0, float2x2 arg1, float2x2 arg2, float2x2 arg3) { + float2x2 ret[4] = { arg0, arg1, arg2, arg3 }; + return ret; +} + +void access_am() +{ + int idx_2 = int(1); + + int _e3 = idx_2; + idx_2 = asint(asuint(_e3) - asuint(int(1))); + float2x2 l_s_a[4] = Constructarray4_float2x2_(float2x2(asfloat(s_am.Load2(0+0)), asfloat(s_am.Load2(0+8))), float2x2(asfloat(s_am.Load2(16+0)), asfloat(s_am.Load2(16+8))), float2x2(asfloat(s_am.Load2(32+0)), asfloat(s_am.Load2(32+8))), float2x2(asfloat(s_am.Load2(48+0)), asfloat(s_am.Load2(48+8)))); + float2x2 l_s_m_c = float2x2(asfloat(s_am.Load2(0+0)), asfloat(s_am.Load2(0+8))); + int _e11 = idx_2; + float2x2 l_s_m_v = float2x2(asfloat(s_am.Load2(_e11*16+0)), asfloat(s_am.Load2(_e11*16+8))); + float2 l_s_c_cc = asfloat(s_am.Load2(0+0)); + int _e20 = idx_2; + float2 l_s_c_cv = asfloat(s_am.Load2(_e20*8+0)); + int _e24 = idx_2; + float2 l_s_c_vc = asfloat(s_am.Load2(0+_e24*16)); + int _e29 = idx_2; + int _e31 = idx_2; + float2 l_s_c_vv = asfloat(s_am.Load2(_e31*8+_e29*16)); + float l_s_e_ccc = asfloat(s_am.Load(0+0+0)); + int _e42 = idx_2; + float l_s_e_ccv = asfloat(s_am.Load(_e42*4+0+0)); + int _e47 = idx_2; + float l_s_e_cvc = asfloat(s_am.Load(0+_e47*8+0)); + int _e53 = idx_2; + int _e55 = idx_2; + float l_s_e_cvv = asfloat(s_am.Load(_e55*4+_e53*8+0)); + int _e59 = idx_2; + float l_s_e_vcc = asfloat(s_am.Load(0+0+_e59*16)); + int _e65 = idx_2; + int _e68 = idx_2; + float l_s_e_vcv = asfloat(s_am.Load(_e68*4+0+_e65*16)); + int _e72 = idx_2; + int _e74 = idx_2; + float l_s_e_vvc = asfloat(s_am.Load(0+_e74*8+_e72*16)); + int _e79 = idx_2; + int _e81 = idx_2; + int _e83 = idx_2; + float l_s_e_vvv = asfloat(s_am.Load(_e83*4+_e81*8+_e79*16)); + float2x2 l_u_a[4] = ((float2x2[4])u_am); + float2x2 l_u_m_c = ((float2x2)u_am[0]); + int _e92 = idx_2; + float2x2 l_u_m_v = ((float2x2)u_am[_e92]); + float2 l_u_c_cc = u_am[0]._0; + int _e101 = idx_2; + float2 l_u_c_cv = __get_col_of_mat2x2(u_am[0], _e101); + int _e105 = idx_2; + float2 l_u_c_vc = u_am[_e105]._0; + int _e110 = idx_2; + int _e112 = idx_2; + float2 l_u_c_vv = __get_col_of_mat2x2(u_am[_e110], _e112); + float l_u_e_ccc = u_am[0]._0.x; + int _e123 = idx_2; + float l_u_e_ccv = u_am[0]._0[_e123]; + int _e128 = idx_2; + float l_u_e_cvc = __get_col_of_mat2x2(u_am[0], _e128).x; + int _e134 = idx_2; + int _e136 = idx_2; + float l_u_e_cvv = __get_col_of_mat2x2(u_am[0], _e134)[_e136]; + int _e140 = idx_2; + float l_u_e_vcc = u_am[_e140]._0.x; + int _e146 = idx_2; + int _e149 = idx_2; + float l_u_e_vcv = u_am[_e146]._0[_e149]; + int _e153 = idx_2; + int _e155 = idx_2; + float l_u_e_vvc = __get_col_of_mat2x2(u_am[_e153], _e155).x; + int _e160 = idx_2; + int _e162 = idx_2; + int _e164 = idx_2; + float l_u_e_vvv = __get_col_of_mat2x2(u_am[_e160], _e162)[_e164]; + { + float2x2 _value2[4] = l_u_a; + { + float2x2 _value3 = _value2[0]; + s_am.Store2(0+0, asuint(_value3[0])); + s_am.Store2(0+8, asuint(_value3[1])); + } + { + float2x2 _value3 = _value2[1]; + s_am.Store2(16+0, asuint(_value3[0])); + s_am.Store2(16+8, asuint(_value3[1])); + } + { + float2x2 _value3 = _value2[2]; + s_am.Store2(32+0, asuint(_value3[0])); + s_am.Store2(32+8, asuint(_value3[1])); + } + { + float2x2 _value3 = _value2[3]; + s_am.Store2(48+0, asuint(_value3[0])); + s_am.Store2(48+8, asuint(_value3[1])); + } + } + { + float2x2 _value2 = l_u_m_c; + s_am.Store2(0+0, asuint(_value2[0])); + s_am.Store2(0+8, asuint(_value2[1])); + } + int _e171 = idx_2; + { + float2x2 _value2 = l_u_m_v; + s_am.Store2(_e171*16+0, asuint(_value2[0])); + s_am.Store2(_e171*16+8, asuint(_value2[1])); + } + s_am.Store2(0+0, asuint(l_u_c_cc)); + int _e178 = idx_2; + s_am.Store2(_e178*8+0, asuint(l_u_c_cv)); + int _e181 = idx_2; + s_am.Store2(0+_e181*16, asuint(l_u_c_vc)); + int _e185 = idx_2; + int _e187 = idx_2; + s_am.Store2(_e187*8+_e185*16, asuint(l_u_c_vv)); + s_am.Store(0+0+0, asuint(l_u_e_ccc)); + int _e196 = idx_2; + s_am.Store(_e196*4+0+0, asuint(l_u_e_ccv)); + int _e200 = idx_2; + s_am.Store(0+_e200*8+0, asuint(l_u_e_cvc)); + int _e205 = idx_2; + int _e207 = idx_2; + s_am.Store(_e207*4+_e205*8+0, asuint(l_u_e_cvv)); + int _e210 = idx_2; + s_am.Store(0+0+_e210*16, asuint(l_u_e_vcc)); + int _e215 = idx_2; + int _e218 = idx_2; + s_am.Store(_e218*4+0+_e215*16, asuint(l_u_e_vcv)); + int _e221 = idx_2; + int _e223 = idx_2; + s_am.Store(0+_e223*8+_e221*16, asuint(l_u_e_vvc)); + int _e227 = idx_2; + int _e229 = idx_2; + int _e231 = idx_2; + s_am.Store(_e231*4+_e229*8+_e227*16, asuint(l_u_e_vvv)); + return; +} + typedef StructWithMat ret_Constructarray4_StructWithMat_[4]; ret_Constructarray4_StructWithMat_ Constructarray4_StructWithMat_(StructWithMat arg0, StructWithMat arg1, StructWithMat arg2, StructWithMat arg3) { StructWithMat ret[4] = { arg0, arg1, arg2, arg3 }; @@ -185,76 +328,76 @@ StructWithArrayOfStructOfMat ConstructStructWithArrayOfStructOfMat(StructWithMat void access_sasm() { - int idx_2 = int(1); + int idx_3 = int(1); - int _e3 = idx_2; - idx_2 = asint(asuint(_e3) - asuint(int(1))); + int _e3 = idx_3; + idx_3 = asint(asuint(_e3) - asuint(int(1))); StructWithArrayOfStructOfMat l_s_s_1 = ConstructStructWithArrayOfStructOfMat(Constructarray4_StructWithMat_(ConstructStructWithMat(float2x2(asfloat(s_sasm.Load2(0+0+0+0)), asfloat(s_sasm.Load2(0+0+0+8)))), ConstructStructWithMat(float2x2(asfloat(s_sasm.Load2(0+16+0+0)), asfloat(s_sasm.Load2(0+16+0+8)))), ConstructStructWithMat(float2x2(asfloat(s_sasm.Load2(0+32+0+0)), asfloat(s_sasm.Load2(0+32+0+8)))), ConstructStructWithMat(float2x2(asfloat(s_sasm.Load2(0+48+0+0)), asfloat(s_sasm.Load2(0+48+0+8)))))); - StructWithMat l_s_a[4] = Constructarray4_StructWithMat_(ConstructStructWithMat(float2x2(asfloat(s_sasm.Load2(0+0+0+0)), asfloat(s_sasm.Load2(0+0+0+8)))), ConstructStructWithMat(float2x2(asfloat(s_sasm.Load2(0+16+0+0)), asfloat(s_sasm.Load2(0+16+0+8)))), ConstructStructWithMat(float2x2(asfloat(s_sasm.Load2(0+32+0+0)), asfloat(s_sasm.Load2(0+32+0+8)))), ConstructStructWithMat(float2x2(asfloat(s_sasm.Load2(0+48+0+0)), asfloat(s_sasm.Load2(0+48+0+8))))); - float2x2 l_s_m_c = float2x2(asfloat(s_sasm.Load2(0+0+0+0)), asfloat(s_sasm.Load2(0+0+0+8))); - int _e17 = idx_2; - float2x2 l_s_m_v = float2x2(asfloat(s_sasm.Load2(0+_e17*16+0+0)), asfloat(s_sasm.Load2(0+_e17*16+0+8))); - float2 l_s_c_cc = asfloat(s_sasm.Load2(0+0+0+0)); - int _e31 = idx_2; - float2 l_s_c_cv = asfloat(s_sasm.Load2(_e31*8+0+0+0)); - int _e36 = idx_2; - float2 l_s_c_vc = asfloat(s_sasm.Load2(0+0+_e36*16+0)); - int _e43 = idx_2; - int _e46 = idx_2; - float2 l_s_c_vv = asfloat(s_sasm.Load2(_e46*8+0+_e43*16+0)); - float l_s_e_ccc = asfloat(s_sasm.Load(0+0+0+0+0)); - int _e61 = idx_2; - float l_s_e_ccv = asfloat(s_sasm.Load(_e61*4+0+0+0+0)); - int _e68 = idx_2; - float l_s_e_cvc = asfloat(s_sasm.Load(0+_e68*8+0+0+0)); - int _e76 = idx_2; - int _e78 = idx_2; - float l_s_e_cvv = asfloat(s_sasm.Load(_e78*4+_e76*8+0+0+0)); - int _e83 = idx_2; - float l_s_e_vcc = asfloat(s_sasm.Load(0+0+0+_e83*16+0)); - int _e91 = idx_2; - int _e95 = idx_2; - float l_s_e_vcv = asfloat(s_sasm.Load(_e95*4+0+0+_e91*16+0)); - int _e100 = idx_2; - int _e103 = idx_2; - float l_s_e_vvc = asfloat(s_sasm.Load(0+_e103*8+0+_e100*16+0)); - int _e109 = idx_2; - int _e112 = idx_2; - int _e114 = idx_2; - float l_s_e_vvv = asfloat(s_sasm.Load(_e114*4+_e112*8+0+_e109*16+0)); + StructWithMat l_s_a_1[4] = Constructarray4_StructWithMat_(ConstructStructWithMat(float2x2(asfloat(s_sasm.Load2(0+0+0+0)), asfloat(s_sasm.Load2(0+0+0+8)))), ConstructStructWithMat(float2x2(asfloat(s_sasm.Load2(0+16+0+0)), asfloat(s_sasm.Load2(0+16+0+8)))), ConstructStructWithMat(float2x2(asfloat(s_sasm.Load2(0+32+0+0)), asfloat(s_sasm.Load2(0+32+0+8)))), ConstructStructWithMat(float2x2(asfloat(s_sasm.Load2(0+48+0+0)), asfloat(s_sasm.Load2(0+48+0+8))))); + float2x2 l_s_m_c_1 = float2x2(asfloat(s_sasm.Load2(0+0+0+0)), asfloat(s_sasm.Load2(0+0+0+8))); + int _e17 = idx_3; + float2x2 l_s_m_v_1 = float2x2(asfloat(s_sasm.Load2(0+_e17*16+0+0)), asfloat(s_sasm.Load2(0+_e17*16+0+8))); + float2 l_s_c_cc_1 = asfloat(s_sasm.Load2(0+0+0+0)); + int _e31 = idx_3; + float2 l_s_c_cv_1 = asfloat(s_sasm.Load2(_e31*8+0+0+0)); + int _e36 = idx_3; + float2 l_s_c_vc_1 = asfloat(s_sasm.Load2(0+0+_e36*16+0)); + int _e43 = idx_3; + int _e46 = idx_3; + float2 l_s_c_vv_1 = asfloat(s_sasm.Load2(_e46*8+0+_e43*16+0)); + float l_s_e_ccc_1 = asfloat(s_sasm.Load(0+0+0+0+0)); + int _e61 = idx_3; + float l_s_e_ccv_1 = asfloat(s_sasm.Load(_e61*4+0+0+0+0)); + int _e68 = idx_3; + float l_s_e_cvc_1 = asfloat(s_sasm.Load(0+_e68*8+0+0+0)); + int _e76 = idx_3; + int _e78 = idx_3; + float l_s_e_cvv_1 = asfloat(s_sasm.Load(_e78*4+_e76*8+0+0+0)); + int _e83 = idx_3; + float l_s_e_vcc_1 = asfloat(s_sasm.Load(0+0+0+_e83*16+0)); + int _e91 = idx_3; + int _e95 = idx_3; + float l_s_e_vcv_1 = asfloat(s_sasm.Load(_e95*4+0+0+_e91*16+0)); + int _e100 = idx_3; + int _e103 = idx_3; + float l_s_e_vvc_1 = asfloat(s_sasm.Load(0+_e103*8+0+_e100*16+0)); + int _e109 = idx_3; + int _e112 = idx_3; + int _e114 = idx_3; + float l_s_e_vvv_1 = asfloat(s_sasm.Load(_e114*4+_e112*8+0+_e109*16+0)); StructWithArrayOfStructOfMat l_u_s_1 = u_sasm; - StructWithMat l_u_a[4] = u_sasm.a; - float2x2 l_u_m_c = GetMatmOnStructWithMat(u_sasm.a[0]); - int _e129 = idx_2; - float2x2 l_u_m_v = GetMatmOnStructWithMat(u_sasm.a[_e129]); - float2 l_u_c_cc = GetMatmOnStructWithMat(u_sasm.a[0])[0]; - int _e143 = idx_2; - float2 l_u_c_cv = GetMatmOnStructWithMat(u_sasm.a[0])[_e143]; - int _e148 = idx_2; - float2 l_u_c_vc = GetMatmOnStructWithMat(u_sasm.a[_e148])[0]; - int _e155 = idx_2; - int _e158 = idx_2; - float2 l_u_c_vv = GetMatmOnStructWithMat(u_sasm.a[_e155])[_e158]; - float l_u_e_ccc = GetMatmOnStructWithMat(u_sasm.a[0])[0].x; - int _e173 = idx_2; - float l_u_e_ccv = GetMatmOnStructWithMat(u_sasm.a[0])[0][_e173]; - int _e180 = idx_2; - float l_u_e_cvc = GetMatmOnStructWithMat(u_sasm.a[0])[_e180].x; - int _e188 = idx_2; - int _e190 = idx_2; - float l_u_e_cvv = GetMatmOnStructWithMat(u_sasm.a[0])[_e188][_e190]; - int _e195 = idx_2; - float l_u_e_vcc = GetMatmOnStructWithMat(u_sasm.a[_e195])[0].x; - int _e203 = idx_2; - int _e207 = idx_2; - float l_u_e_vcv = GetMatmOnStructWithMat(u_sasm.a[_e203])[0][_e207]; - int _e212 = idx_2; - int _e215 = idx_2; - float l_u_e_vvc = GetMatmOnStructWithMat(u_sasm.a[_e212])[_e215].x; - int _e221 = idx_2; - int _e224 = idx_2; - int _e226 = idx_2; - float l_u_e_vvv = GetMatmOnStructWithMat(u_sasm.a[_e221])[_e224][_e226]; + StructWithMat l_u_a_1[4] = u_sasm.a; + float2x2 l_u_m_c_1 = GetMatmOnStructWithMat(u_sasm.a[0]); + int _e129 = idx_3; + float2x2 l_u_m_v_1 = GetMatmOnStructWithMat(u_sasm.a[_e129]); + float2 l_u_c_cc_1 = GetMatmOnStructWithMat(u_sasm.a[0])[0]; + int _e143 = idx_3; + float2 l_u_c_cv_1 = GetMatmOnStructWithMat(u_sasm.a[0])[_e143]; + int _e148 = idx_3; + float2 l_u_c_vc_1 = GetMatmOnStructWithMat(u_sasm.a[_e148])[0]; + int _e155 = idx_3; + int _e158 = idx_3; + float2 l_u_c_vv_1 = GetMatmOnStructWithMat(u_sasm.a[_e155])[_e158]; + float l_u_e_ccc_1 = GetMatmOnStructWithMat(u_sasm.a[0])[0].x; + int _e173 = idx_3; + float l_u_e_ccv_1 = GetMatmOnStructWithMat(u_sasm.a[0])[0][_e173]; + int _e180 = idx_3; + float l_u_e_cvc_1 = GetMatmOnStructWithMat(u_sasm.a[0])[_e180].x; + int _e188 = idx_3; + int _e190 = idx_3; + float l_u_e_cvv_1 = GetMatmOnStructWithMat(u_sasm.a[0])[_e188][_e190]; + int _e195 = idx_3; + float l_u_e_vcc_1 = GetMatmOnStructWithMat(u_sasm.a[_e195])[0].x; + int _e203 = idx_3; + int _e207 = idx_3; + float l_u_e_vcv_1 = GetMatmOnStructWithMat(u_sasm.a[_e203])[0][_e207]; + int _e212 = idx_3; + int _e215 = idx_3; + float l_u_e_vvc_1 = GetMatmOnStructWithMat(u_sasm.a[_e212])[_e215].x; + int _e221 = idx_3; + int _e224 = idx_3; + int _e226 = idx_3; + float l_u_e_vvv_1 = GetMatmOnStructWithMat(u_sasm.a[_e221])[_e224][_e226]; { StructWithArrayOfStructOfMat _value2 = l_u_s_1; { @@ -290,7 +433,7 @@ void access_sasm() } } { - StructWithMat _value2[4] = l_u_a; + StructWithMat _value2[4] = l_u_a_1; { StructWithMat _value3 = _value2[0]; { @@ -321,44 +464,44 @@ void access_sasm() } } { - float2x2 _value2 = l_u_m_c; + float2x2 _value2 = l_u_m_c_1; s_sasm.Store2(0+0+0+0, asuint(_value2[0])); s_sasm.Store2(0+0+0+8, asuint(_value2[1])); } - int _e238 = idx_2; + int _e238 = idx_3; { - float2x2 _value2 = l_u_m_v; + float2x2 _value2 = l_u_m_v_1; s_sasm.Store2(0+_e238*16+0+0, asuint(_value2[0])); s_sasm.Store2(0+_e238*16+0+8, asuint(_value2[1])); } - s_sasm.Store2(0+0+0+0, asuint(l_u_c_cc)); - int _e250 = idx_2; - s_sasm.Store2(_e250*8+0+0+0, asuint(l_u_c_cv)); - int _e254 = idx_2; - s_sasm.Store2(0+0+_e254*16+0, asuint(l_u_c_vc)); - int _e260 = idx_2; - int _e263 = idx_2; - s_sasm.Store2(_e263*8+0+_e260*16+0, asuint(l_u_c_vv)); - s_sasm.Store(0+0+0+0+0, asuint(l_u_e_ccc)); - int _e276 = idx_2; - s_sasm.Store(_e276*4+0+0+0+0, asuint(l_u_e_ccv)); - int _e282 = idx_2; - s_sasm.Store(0+_e282*8+0+0+0, asuint(l_u_e_cvc)); - int _e289 = idx_2; - int _e291 = idx_2; - s_sasm.Store(_e291*4+_e289*8+0+0+0, asuint(l_u_e_cvv)); - int _e295 = idx_2; - s_sasm.Store(0+0+0+_e295*16+0, asuint(l_u_e_vcc)); - int _e302 = idx_2; - int _e306 = idx_2; - s_sasm.Store(_e306*4+0+0+_e302*16+0, asuint(l_u_e_vcv)); - int _e310 = idx_2; - int _e313 = idx_2; - s_sasm.Store(0+_e313*8+0+_e310*16+0, asuint(l_u_e_vvc)); - int _e318 = idx_2; - int _e321 = idx_2; - int _e323 = idx_2; - s_sasm.Store(_e323*4+_e321*8+0+_e318*16+0, asuint(l_u_e_vvv)); + s_sasm.Store2(0+0+0+0, asuint(l_u_c_cc_1)); + int _e250 = idx_3; + s_sasm.Store2(_e250*8+0+0+0, asuint(l_u_c_cv_1)); + int _e254 = idx_3; + s_sasm.Store2(0+0+_e254*16+0, asuint(l_u_c_vc_1)); + int _e260 = idx_3; + int _e263 = idx_3; + s_sasm.Store2(_e263*8+0+_e260*16+0, asuint(l_u_c_vv_1)); + s_sasm.Store(0+0+0+0+0, asuint(l_u_e_ccc_1)); + int _e276 = idx_3; + s_sasm.Store(_e276*4+0+0+0+0, asuint(l_u_e_ccv_1)); + int _e282 = idx_3; + s_sasm.Store(0+_e282*8+0+0+0, asuint(l_u_e_cvc_1)); + int _e289 = idx_3; + int _e291 = idx_3; + s_sasm.Store(_e291*4+_e289*8+0+0+0, asuint(l_u_e_cvv_1)); + int _e295 = idx_3; + s_sasm.Store(0+0+0+_e295*16+0, asuint(l_u_e_vcc_1)); + int _e302 = idx_3; + int _e306 = idx_3; + s_sasm.Store(_e306*4+0+0+_e302*16+0, asuint(l_u_e_vcv_1)); + int _e310 = idx_3; + int _e313 = idx_3; + s_sasm.Store(0+_e313*8+0+_e310*16+0, asuint(l_u_e_vvc_1)); + int _e318 = idx_3; + int _e321 = idx_3; + int _e323 = idx_3; + s_sasm.Store(_e323*4+_e321*8+0+_e318*16+0, asuint(l_u_e_vvv_1)); return; } @@ -367,6 +510,7 @@ void main() { access_m(); access_sm(); + access_am(); access_sasm(); return; } diff --git a/naga/tests/out/hlsl/wgsl-mat_cx3.hlsl b/naga/tests/out/hlsl/wgsl-mat_cx3.hlsl index f90cdff6e..b6aa791a0 100644 --- a/naga/tests/out/hlsl/wgsl-mat_cx3.hlsl +++ b/naga/tests/out/hlsl/wgsl-mat_cx3.hlsl @@ -11,8 +11,10 @@ RWByteAddressBuffer s_m : register(u0); cbuffer u_m : register(b1) { row_major float3x3 u_m; } RWByteAddressBuffer s_sm : register(u0, space1); cbuffer u_sm : register(b1, space1) { StructWithMat u_sm; } -RWByteAddressBuffer s_sasm : register(u0, space2); -cbuffer u_sasm : register(b1, space2) { StructWithArrayOfStructOfMat u_sasm; } +RWByteAddressBuffer s_am : register(u0, space2); +cbuffer u_am : register(b1, space2) { row_major float3x3 u_am[4]; } +RWByteAddressBuffer s_sasm : register(u0, space3); +cbuffer u_sasm : register(b1, space3) { StructWithArrayOfStructOfMat u_sasm; } void access_m() { @@ -131,6 +133,153 @@ void access_sm() return; } +typedef float3x3 ret_Constructarray4_float3x3_[4]; +ret_Constructarray4_float3x3_ Constructarray4_float3x3_(float3x3 arg0, float3x3 arg1, float3x3 arg2, float3x3 arg3) { + float3x3 ret[4] = { arg0, arg1, arg2, arg3 }; + return ret; +} + +void access_am() +{ + int idx_2 = int(1); + + int _e3 = idx_2; + idx_2 = asint(asuint(_e3) - asuint(int(1))); + float3x3 l_s_a[4] = Constructarray4_float3x3_(float3x3(asfloat(s_am.Load3(0+0)), asfloat(s_am.Load3(0+16)), asfloat(s_am.Load3(0+32))), float3x3(asfloat(s_am.Load3(48+0)), asfloat(s_am.Load3(48+16)), asfloat(s_am.Load3(48+32))), float3x3(asfloat(s_am.Load3(96+0)), asfloat(s_am.Load3(96+16)), asfloat(s_am.Load3(96+32))), float3x3(asfloat(s_am.Load3(144+0)), asfloat(s_am.Load3(144+16)), asfloat(s_am.Load3(144+32)))); + float3x3 l_s_m_c = float3x3(asfloat(s_am.Load3(0+0)), asfloat(s_am.Load3(0+16)), asfloat(s_am.Load3(0+32))); + int _e11 = idx_2; + float3x3 l_s_m_v = float3x3(asfloat(s_am.Load3(_e11*48+0)), asfloat(s_am.Load3(_e11*48+16)), asfloat(s_am.Load3(_e11*48+32))); + float3 l_s_c_cc = asfloat(s_am.Load3(0+0)); + int _e20 = idx_2; + float3 l_s_c_cv = asfloat(s_am.Load3(_e20*16+0)); + int _e24 = idx_2; + float3 l_s_c_vc = asfloat(s_am.Load3(0+_e24*48)); + int _e29 = idx_2; + int _e31 = idx_2; + float3 l_s_c_vv = asfloat(s_am.Load3(_e31*16+_e29*48)); + float l_s_e_ccc = asfloat(s_am.Load(0+0+0)); + int _e42 = idx_2; + float l_s_e_ccv = asfloat(s_am.Load(_e42*4+0+0)); + int _e47 = idx_2; + float l_s_e_cvc = asfloat(s_am.Load(0+_e47*16+0)); + int _e53 = idx_2; + int _e55 = idx_2; + float l_s_e_cvv = asfloat(s_am.Load(_e55*4+_e53*16+0)); + int _e59 = idx_2; + float l_s_e_vcc = asfloat(s_am.Load(0+0+_e59*48)); + int _e65 = idx_2; + int _e68 = idx_2; + float l_s_e_vcv = asfloat(s_am.Load(_e68*4+0+_e65*48)); + int _e72 = idx_2; + int _e74 = idx_2; + float l_s_e_vvc = asfloat(s_am.Load(0+_e74*16+_e72*48)); + int _e79 = idx_2; + int _e81 = idx_2; + int _e83 = idx_2; + float l_s_e_vvv = asfloat(s_am.Load(_e83*4+_e81*16+_e79*48)); + float3x3 l_u_a[4] = u_am; + float3x3 l_u_m_c = u_am[0]; + int _e92 = idx_2; + float3x3 l_u_m_v = u_am[_e92]; + float3 l_u_c_cc = u_am[0][0]; + int _e101 = idx_2; + float3 l_u_c_cv = u_am[0][_e101]; + int _e105 = idx_2; + float3 l_u_c_vc = u_am[_e105][0]; + int _e110 = idx_2; + int _e112 = idx_2; + float3 l_u_c_vv = u_am[_e110][_e112]; + float l_u_e_ccc = u_am[0][0].x; + int _e123 = idx_2; + float l_u_e_ccv = u_am[0][0][_e123]; + int _e128 = idx_2; + float l_u_e_cvc = u_am[0][_e128].x; + int _e134 = idx_2; + int _e136 = idx_2; + float l_u_e_cvv = u_am[0][_e134][_e136]; + int _e140 = idx_2; + float l_u_e_vcc = u_am[_e140][0].x; + int _e146 = idx_2; + int _e149 = idx_2; + float l_u_e_vcv = u_am[_e146][0][_e149]; + int _e153 = idx_2; + int _e155 = idx_2; + float l_u_e_vvc = u_am[_e153][_e155].x; + int _e160 = idx_2; + int _e162 = idx_2; + int _e164 = idx_2; + float l_u_e_vvv = u_am[_e160][_e162][_e164]; + { + float3x3 _value2[4] = l_u_a; + { + float3x3 _value3 = _value2[0]; + s_am.Store3(0+0, asuint(_value3[0])); + s_am.Store3(0+16, asuint(_value3[1])); + s_am.Store3(0+32, asuint(_value3[2])); + } + { + float3x3 _value3 = _value2[1]; + s_am.Store3(48+0, asuint(_value3[0])); + s_am.Store3(48+16, asuint(_value3[1])); + s_am.Store3(48+32, asuint(_value3[2])); + } + { + float3x3 _value3 = _value2[2]; + s_am.Store3(96+0, asuint(_value3[0])); + s_am.Store3(96+16, asuint(_value3[1])); + s_am.Store3(96+32, asuint(_value3[2])); + } + { + float3x3 _value3 = _value2[3]; + s_am.Store3(144+0, asuint(_value3[0])); + s_am.Store3(144+16, asuint(_value3[1])); + s_am.Store3(144+32, asuint(_value3[2])); + } + } + { + float3x3 _value2 = l_u_m_c; + s_am.Store3(0+0, asuint(_value2[0])); + s_am.Store3(0+16, asuint(_value2[1])); + s_am.Store3(0+32, asuint(_value2[2])); + } + int _e171 = idx_2; + { + float3x3 _value2 = l_u_m_v; + s_am.Store3(_e171*48+0, asuint(_value2[0])); + s_am.Store3(_e171*48+16, asuint(_value2[1])); + s_am.Store3(_e171*48+32, asuint(_value2[2])); + } + s_am.Store3(0+0, asuint(l_u_c_cc)); + int _e178 = idx_2; + s_am.Store3(_e178*16+0, asuint(l_u_c_cv)); + int _e181 = idx_2; + s_am.Store3(0+_e181*48, asuint(l_u_c_vc)); + int _e185 = idx_2; + int _e187 = idx_2; + s_am.Store3(_e187*16+_e185*48, asuint(l_u_c_vv)); + s_am.Store(0+0+0, asuint(l_u_e_ccc)); + int _e196 = idx_2; + s_am.Store(_e196*4+0+0, asuint(l_u_e_ccv)); + int _e200 = idx_2; + s_am.Store(0+_e200*16+0, asuint(l_u_e_cvc)); + int _e205 = idx_2; + int _e207 = idx_2; + s_am.Store(_e207*4+_e205*16+0, asuint(l_u_e_cvv)); + int _e210 = idx_2; + s_am.Store(0+0+_e210*48, asuint(l_u_e_vcc)); + int _e215 = idx_2; + int _e218 = idx_2; + s_am.Store(_e218*4+0+_e215*48, asuint(l_u_e_vcv)); + int _e221 = idx_2; + int _e223 = idx_2; + s_am.Store(0+_e223*16+_e221*48, asuint(l_u_e_vvc)); + int _e227 = idx_2; + int _e229 = idx_2; + int _e231 = idx_2; + s_am.Store(_e231*4+_e229*16+_e227*48, asuint(l_u_e_vvv)); + return; +} + typedef StructWithMat ret_Constructarray4_StructWithMat_[4]; ret_Constructarray4_StructWithMat_ Constructarray4_StructWithMat_(StructWithMat arg0, StructWithMat arg1, StructWithMat arg2, StructWithMat arg3) { StructWithMat ret[4] = { arg0, arg1, arg2, arg3 }; @@ -145,76 +294,76 @@ StructWithArrayOfStructOfMat ConstructStructWithArrayOfStructOfMat(StructWithMat void access_sasm() { - int idx_2 = int(1); + int idx_3 = int(1); - int _e3 = idx_2; - idx_2 = asint(asuint(_e3) - asuint(int(1))); + int _e3 = idx_3; + idx_3 = asint(asuint(_e3) - asuint(int(1))); StructWithArrayOfStructOfMat l_s_s_1 = ConstructStructWithArrayOfStructOfMat(Constructarray4_StructWithMat_(ConstructStructWithMat(float3x3(asfloat(s_sasm.Load3(0+0+0+0)), asfloat(s_sasm.Load3(0+0+0+16)), asfloat(s_sasm.Load3(0+0+0+32)))), ConstructStructWithMat(float3x3(asfloat(s_sasm.Load3(0+48+0+0)), asfloat(s_sasm.Load3(0+48+0+16)), asfloat(s_sasm.Load3(0+48+0+32)))), ConstructStructWithMat(float3x3(asfloat(s_sasm.Load3(0+96+0+0)), asfloat(s_sasm.Load3(0+96+0+16)), asfloat(s_sasm.Load3(0+96+0+32)))), ConstructStructWithMat(float3x3(asfloat(s_sasm.Load3(0+144+0+0)), asfloat(s_sasm.Load3(0+144+0+16)), asfloat(s_sasm.Load3(0+144+0+32)))))); - StructWithMat l_s_a[4] = Constructarray4_StructWithMat_(ConstructStructWithMat(float3x3(asfloat(s_sasm.Load3(0+0+0+0)), asfloat(s_sasm.Load3(0+0+0+16)), asfloat(s_sasm.Load3(0+0+0+32)))), ConstructStructWithMat(float3x3(asfloat(s_sasm.Load3(0+48+0+0)), asfloat(s_sasm.Load3(0+48+0+16)), asfloat(s_sasm.Load3(0+48+0+32)))), ConstructStructWithMat(float3x3(asfloat(s_sasm.Load3(0+96+0+0)), asfloat(s_sasm.Load3(0+96+0+16)), asfloat(s_sasm.Load3(0+96+0+32)))), ConstructStructWithMat(float3x3(asfloat(s_sasm.Load3(0+144+0+0)), asfloat(s_sasm.Load3(0+144+0+16)), asfloat(s_sasm.Load3(0+144+0+32))))); - float3x3 l_s_m_c = float3x3(asfloat(s_sasm.Load3(0+0+0+0)), asfloat(s_sasm.Load3(0+0+0+16)), asfloat(s_sasm.Load3(0+0+0+32))); - int _e17 = idx_2; - float3x3 l_s_m_v = float3x3(asfloat(s_sasm.Load3(0+_e17*48+0+0)), asfloat(s_sasm.Load3(0+_e17*48+0+16)), asfloat(s_sasm.Load3(0+_e17*48+0+32))); - float3 l_s_c_cc = asfloat(s_sasm.Load3(0+0+0+0)); - int _e31 = idx_2; - float3 l_s_c_cv = asfloat(s_sasm.Load3(_e31*16+0+0+0)); - int _e36 = idx_2; - float3 l_s_c_vc = asfloat(s_sasm.Load3(0+0+_e36*48+0)); - int _e43 = idx_2; - int _e46 = idx_2; - float3 l_s_c_vv = asfloat(s_sasm.Load3(_e46*16+0+_e43*48+0)); - float l_s_e_ccc = asfloat(s_sasm.Load(0+0+0+0+0)); - int _e61 = idx_2; - float l_s_e_ccv = asfloat(s_sasm.Load(_e61*4+0+0+0+0)); - int _e68 = idx_2; - float l_s_e_cvc = asfloat(s_sasm.Load(0+_e68*16+0+0+0)); - int _e76 = idx_2; - int _e78 = idx_2; - float l_s_e_cvv = asfloat(s_sasm.Load(_e78*4+_e76*16+0+0+0)); - int _e83 = idx_2; - float l_s_e_vcc = asfloat(s_sasm.Load(0+0+0+_e83*48+0)); - int _e91 = idx_2; - int _e95 = idx_2; - float l_s_e_vcv = asfloat(s_sasm.Load(_e95*4+0+0+_e91*48+0)); - int _e100 = idx_2; - int _e103 = idx_2; - float l_s_e_vvc = asfloat(s_sasm.Load(0+_e103*16+0+_e100*48+0)); - int _e109 = idx_2; - int _e112 = idx_2; - int _e114 = idx_2; - float l_s_e_vvv = asfloat(s_sasm.Load(_e114*4+_e112*16+0+_e109*48+0)); + StructWithMat l_s_a_1[4] = Constructarray4_StructWithMat_(ConstructStructWithMat(float3x3(asfloat(s_sasm.Load3(0+0+0+0)), asfloat(s_sasm.Load3(0+0+0+16)), asfloat(s_sasm.Load3(0+0+0+32)))), ConstructStructWithMat(float3x3(asfloat(s_sasm.Load3(0+48+0+0)), asfloat(s_sasm.Load3(0+48+0+16)), asfloat(s_sasm.Load3(0+48+0+32)))), ConstructStructWithMat(float3x3(asfloat(s_sasm.Load3(0+96+0+0)), asfloat(s_sasm.Load3(0+96+0+16)), asfloat(s_sasm.Load3(0+96+0+32)))), ConstructStructWithMat(float3x3(asfloat(s_sasm.Load3(0+144+0+0)), asfloat(s_sasm.Load3(0+144+0+16)), asfloat(s_sasm.Load3(0+144+0+32))))); + float3x3 l_s_m_c_1 = float3x3(asfloat(s_sasm.Load3(0+0+0+0)), asfloat(s_sasm.Load3(0+0+0+16)), asfloat(s_sasm.Load3(0+0+0+32))); + int _e17 = idx_3; + float3x3 l_s_m_v_1 = float3x3(asfloat(s_sasm.Load3(0+_e17*48+0+0)), asfloat(s_sasm.Load3(0+_e17*48+0+16)), asfloat(s_sasm.Load3(0+_e17*48+0+32))); + float3 l_s_c_cc_1 = asfloat(s_sasm.Load3(0+0+0+0)); + int _e31 = idx_3; + float3 l_s_c_cv_1 = asfloat(s_sasm.Load3(_e31*16+0+0+0)); + int _e36 = idx_3; + float3 l_s_c_vc_1 = asfloat(s_sasm.Load3(0+0+_e36*48+0)); + int _e43 = idx_3; + int _e46 = idx_3; + float3 l_s_c_vv_1 = asfloat(s_sasm.Load3(_e46*16+0+_e43*48+0)); + float l_s_e_ccc_1 = asfloat(s_sasm.Load(0+0+0+0+0)); + int _e61 = idx_3; + float l_s_e_ccv_1 = asfloat(s_sasm.Load(_e61*4+0+0+0+0)); + int _e68 = idx_3; + float l_s_e_cvc_1 = asfloat(s_sasm.Load(0+_e68*16+0+0+0)); + int _e76 = idx_3; + int _e78 = idx_3; + float l_s_e_cvv_1 = asfloat(s_sasm.Load(_e78*4+_e76*16+0+0+0)); + int _e83 = idx_3; + float l_s_e_vcc_1 = asfloat(s_sasm.Load(0+0+0+_e83*48+0)); + int _e91 = idx_3; + int _e95 = idx_3; + float l_s_e_vcv_1 = asfloat(s_sasm.Load(_e95*4+0+0+_e91*48+0)); + int _e100 = idx_3; + int _e103 = idx_3; + float l_s_e_vvc_1 = asfloat(s_sasm.Load(0+_e103*16+0+_e100*48+0)); + int _e109 = idx_3; + int _e112 = idx_3; + int _e114 = idx_3; + float l_s_e_vvv_1 = asfloat(s_sasm.Load(_e114*4+_e112*16+0+_e109*48+0)); StructWithArrayOfStructOfMat l_u_s_1 = u_sasm; - StructWithMat l_u_a[4] = u_sasm.a; - float3x3 l_u_m_c = u_sasm.a[0].m; - int _e129 = idx_2; - float3x3 l_u_m_v = u_sasm.a[_e129].m; - float3 l_u_c_cc = u_sasm.a[0].m[0]; - int _e143 = idx_2; - float3 l_u_c_cv = u_sasm.a[0].m[_e143]; - int _e148 = idx_2; - float3 l_u_c_vc = u_sasm.a[_e148].m[0]; - int _e155 = idx_2; - int _e158 = idx_2; - float3 l_u_c_vv = u_sasm.a[_e155].m[_e158]; - float l_u_e_ccc = u_sasm.a[0].m[0].x; - int _e173 = idx_2; - float l_u_e_ccv = u_sasm.a[0].m[0][_e173]; - int _e180 = idx_2; - float l_u_e_cvc = u_sasm.a[0].m[_e180].x; - int _e188 = idx_2; - int _e190 = idx_2; - float l_u_e_cvv = u_sasm.a[0].m[_e188][_e190]; - int _e195 = idx_2; - float l_u_e_vcc = u_sasm.a[_e195].m[0].x; - int _e203 = idx_2; - int _e207 = idx_2; - float l_u_e_vcv = u_sasm.a[_e203].m[0][_e207]; - int _e212 = idx_2; - int _e215 = idx_2; - float l_u_e_vvc = u_sasm.a[_e212].m[_e215].x; - int _e221 = idx_2; - int _e224 = idx_2; - int _e226 = idx_2; - float l_u_e_vvv = u_sasm.a[_e221].m[_e224][_e226]; + StructWithMat l_u_a_1[4] = u_sasm.a; + float3x3 l_u_m_c_1 = u_sasm.a[0].m; + int _e129 = idx_3; + float3x3 l_u_m_v_1 = u_sasm.a[_e129].m; + float3 l_u_c_cc_1 = u_sasm.a[0].m[0]; + int _e143 = idx_3; + float3 l_u_c_cv_1 = u_sasm.a[0].m[_e143]; + int _e148 = idx_3; + float3 l_u_c_vc_1 = u_sasm.a[_e148].m[0]; + int _e155 = idx_3; + int _e158 = idx_3; + float3 l_u_c_vv_1 = u_sasm.a[_e155].m[_e158]; + float l_u_e_ccc_1 = u_sasm.a[0].m[0].x; + int _e173 = idx_3; + float l_u_e_ccv_1 = u_sasm.a[0].m[0][_e173]; + int _e180 = idx_3; + float l_u_e_cvc_1 = u_sasm.a[0].m[_e180].x; + int _e188 = idx_3; + int _e190 = idx_3; + float l_u_e_cvv_1 = u_sasm.a[0].m[_e188][_e190]; + int _e195 = idx_3; + float l_u_e_vcc_1 = u_sasm.a[_e195].m[0].x; + int _e203 = idx_3; + int _e207 = idx_3; + float l_u_e_vcv_1 = u_sasm.a[_e203].m[0][_e207]; + int _e212 = idx_3; + int _e215 = idx_3; + float l_u_e_vvc_1 = u_sasm.a[_e212].m[_e215].x; + int _e221 = idx_3; + int _e224 = idx_3; + int _e226 = idx_3; + float l_u_e_vvv_1 = u_sasm.a[_e221].m[_e224][_e226]; { StructWithArrayOfStructOfMat _value2 = l_u_s_1; { @@ -258,7 +407,7 @@ void access_sasm() } } { - StructWithMat _value2[4] = l_u_a; + StructWithMat _value2[4] = l_u_a_1; { StructWithMat _value3 = _value2[0]; { @@ -297,46 +446,46 @@ void access_sasm() } } { - float3x3 _value2 = l_u_m_c; + float3x3 _value2 = l_u_m_c_1; s_sasm.Store3(0+0+0+0, asuint(_value2[0])); s_sasm.Store3(0+0+0+16, asuint(_value2[1])); s_sasm.Store3(0+0+0+32, asuint(_value2[2])); } - int _e238 = idx_2; + int _e238 = idx_3; { - float3x3 _value2 = l_u_m_v; + float3x3 _value2 = l_u_m_v_1; s_sasm.Store3(0+_e238*48+0+0, asuint(_value2[0])); s_sasm.Store3(0+_e238*48+0+16, asuint(_value2[1])); s_sasm.Store3(0+_e238*48+0+32, asuint(_value2[2])); } - s_sasm.Store3(0+0+0+0, asuint(l_u_c_cc)); - int _e250 = idx_2; - s_sasm.Store3(_e250*16+0+0+0, asuint(l_u_c_cv)); - int _e254 = idx_2; - s_sasm.Store3(0+0+_e254*48+0, asuint(l_u_c_vc)); - int _e260 = idx_2; - int _e263 = idx_2; - s_sasm.Store3(_e263*16+0+_e260*48+0, asuint(l_u_c_vv)); - s_sasm.Store(0+0+0+0+0, asuint(l_u_e_ccc)); - int _e276 = idx_2; - s_sasm.Store(_e276*4+0+0+0+0, asuint(l_u_e_ccv)); - int _e282 = idx_2; - s_sasm.Store(0+_e282*16+0+0+0, asuint(l_u_e_cvc)); - int _e289 = idx_2; - int _e291 = idx_2; - s_sasm.Store(_e291*4+_e289*16+0+0+0, asuint(l_u_e_cvv)); - int _e295 = idx_2; - s_sasm.Store(0+0+0+_e295*48+0, asuint(l_u_e_vcc)); - int _e302 = idx_2; - int _e306 = idx_2; - s_sasm.Store(_e306*4+0+0+_e302*48+0, asuint(l_u_e_vcv)); - int _e310 = idx_2; - int _e313 = idx_2; - s_sasm.Store(0+_e313*16+0+_e310*48+0, asuint(l_u_e_vvc)); - int _e318 = idx_2; - int _e321 = idx_2; - int _e323 = idx_2; - s_sasm.Store(_e323*4+_e321*16+0+_e318*48+0, asuint(l_u_e_vvv)); + s_sasm.Store3(0+0+0+0, asuint(l_u_c_cc_1)); + int _e250 = idx_3; + s_sasm.Store3(_e250*16+0+0+0, asuint(l_u_c_cv_1)); + int _e254 = idx_3; + s_sasm.Store3(0+0+_e254*48+0, asuint(l_u_c_vc_1)); + int _e260 = idx_3; + int _e263 = idx_3; + s_sasm.Store3(_e263*16+0+_e260*48+0, asuint(l_u_c_vv_1)); + s_sasm.Store(0+0+0+0+0, asuint(l_u_e_ccc_1)); + int _e276 = idx_3; + s_sasm.Store(_e276*4+0+0+0+0, asuint(l_u_e_ccv_1)); + int _e282 = idx_3; + s_sasm.Store(0+_e282*16+0+0+0, asuint(l_u_e_cvc_1)); + int _e289 = idx_3; + int _e291 = idx_3; + s_sasm.Store(_e291*4+_e289*16+0+0+0, asuint(l_u_e_cvv_1)); + int _e295 = idx_3; + s_sasm.Store(0+0+0+_e295*48+0, asuint(l_u_e_vcc_1)); + int _e302 = idx_3; + int _e306 = idx_3; + s_sasm.Store(_e306*4+0+0+_e302*48+0, asuint(l_u_e_vcv_1)); + int _e310 = idx_3; + int _e313 = idx_3; + s_sasm.Store(0+_e313*16+0+_e310*48+0, asuint(l_u_e_vvc_1)); + int _e318 = idx_3; + int _e321 = idx_3; + int _e323 = idx_3; + s_sasm.Store(_e323*4+_e321*16+0+_e318*48+0, asuint(l_u_e_vvv_1)); return; } @@ -345,6 +494,7 @@ void main() { access_m(); access_sm(); + access_am(); access_sasm(); return; } diff --git a/naga/tests/out/spv/wgsl-mat_cx2.spvasm b/naga/tests/out/spv/wgsl-mat_cx2.spvasm index 9236d1595..10fcb1692 100644 --- a/naga/tests/out/spv/wgsl-mat_cx2.spvasm +++ b/naga/tests/out/spv/wgsl-mat_cx2.spvasm @@ -1,13 +1,13 @@ ; SPIR-V ; Version: 1.1 ; Generator: rspirv -; Bound: 446 +; Bound: 629 OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint GLCompute %435 "main" -OpExecutionMode %435 LocalSize 1 1 1 +OpEntryPoint GLCompute %615 "main" +OpExecutionMode %615 LocalSize 1 1 1 %3 = OpString "mat_cx2.wgsl" OpSource Unknown 0 %3 "// Test handling of N-by-2 matrices. // See the doc comments on `naga::back::hlsl` and `naga::back::spv` for details. @@ -111,14 +111,76 @@ fn access_sm() { s_sm.m[idx][idx] = l_u_e_vv; } +@group(2) @binding(0) +var s_am: array; + +@group(2) @binding(1) +var u_am: array; + +fn access_am() { + var idx = 1; + idx--; + + // loads from storage + let l_s_a = s_am; + let l_s_m_c = s_am[0]; + let l_s_m_v = s_am[idx]; + let l_s_c_cc = s_am[0][0]; + let l_s_c_cv = s_am[0][idx]; + let l_s_c_vc = s_am[idx][0]; + let l_s_c_vv = s_am[idx][idx]; + let l_s_e_ccc = s_am[0][0][0]; + let l_s_e_ccv = s_am[0][0][idx]; + let l_s_e_cvc = s_am[0][idx][0]; + let l_s_e_cvv = s_am[0][idx][idx]; + let l_s_e_vcc = s_am[idx][0][0]; + let l_s_e_vcv = s_am[idx][0][idx]; + let l_s_e_vvc = s_am[idx][idx][0]; + let l_s_e_vvv = s_am[idx][idx][idx]; + + // loads from uniform + let l_u_a = u_am; + let l_u_m_c = u_am[0]; + let l_u_m_v = u_am[idx]; + let l_u_c_cc = u_am[0][0]; + let l_u_c_cv = u_am[0][idx]; + let l_u_c_vc = u_am[idx][0]; + let l_u_c_vv = u_am[idx][idx]; + let l_u_e_ccc = u_am[0][0][0]; + let l_u_e_ccv = u_am[0][0][idx]; + let l_u_e_cvc = u_am[0][idx][0]; + let l_u_e_cvv = u_am[0][idx][idx]; + let l_u_e_vcc = u_am[idx][0][0]; + let l_u_e_vcv = u_am[idx][0][idx]; + let l_u_e_vvc = u_am[idx][idx][0]; + let l_u_e_vvv = u_am[idx][idx][idx]; + + // stores to storage + s_am = l_u_a; + s_am[0] = l_u_m_c; + s_am[idx] = l_u_m_v; + s_am[0][0] = l_u_c_cc; + s_am[0][idx] = l_u_c_cv; + s_am[idx][0] = l_u_c_vc; + s_am[idx][idx] = l_u_c_vv; + s_am[0][0][0] = l_u_e_ccc; + s_am[0][0][idx] = l_u_e_ccv; + s_am[0][idx][0] = l_u_e_cvc; + s_am[0][idx][idx] = l_u_e_cvv; + s_am[idx][0][0] = l_u_e_vcc; + s_am[idx][0][idx] = l_u_e_vcv; + s_am[idx][idx][0] = l_u_e_vvc; + s_am[idx][idx][idx] = l_u_e_vvv; +} + struct StructWithArrayOfStructOfMat { a: array, } -@group(2) @binding(0) +@group(3) @binding(0) var s_sasm: StructWithArrayOfStructOfMat; -@group(2) @binding(1) +@group(3) @binding(1) var u_sasm: StructWithArrayOfStructOfMat; fn access_sasm() { @@ -184,78 +246,97 @@ fn access_sasm() { fn main() { access_m(); access_sm(); + access_am(); access_sasm(); } " OpName %4 "Mat" OpMemberName %8 0 "m" OpName %8 "StructWithMat" -OpMemberName %12 0 "a" -OpName %12 "StructWithArrayOfStructOfMat" -OpMemberName %13 0 "col0" -OpMemberName %13 1 "col1" -OpName %13 "std140_mat2x2" -OpMemberName %14 0 "m_col0" -OpMemberName %14 1 "m_col1" -OpName %14 "std140_StructWithMat" -OpName %15 "std140_array" -OpMemberName %16 0 "a" -OpName %16 "std140_StructWithArrayOfStructOfMat" -OpName %17 "s_m" -OpName %20 "u_m" -OpName %23 "s_sm" -OpName %26 "u_sm" -OpName %29 "s_sasm" -OpName %32 "u_sasm" -OpName %35 "mat2x2_from_std140" -OpName %42 "mat2x2_get_column" -OpName %55 "access_m" -OpName %64 "idx" -OpName %129 "StructWithMat_from_std140" -OpName %138 "access_sm" -OpName %144 "idx" -OpName %222 "StructWithArrayOfStructOfMat_from_std140" -OpName %227 "array_from_std140" -OpName %243 "access_sasm" -OpName %249 "idx" -OpName %435 "main" +OpMemberName %13 0 "a" +OpName %13 "StructWithArrayOfStructOfMat" +OpMemberName %14 0 "col0" +OpMemberName %14 1 "col1" +OpName %14 "std140_mat2x2" +OpMemberName %15 0 "m_col0" +OpMemberName %15 1 "m_col1" +OpName %15 "std140_StructWithMat" +OpName %16 "std140_array, 4>" +OpName %17 "std140_array" +OpMemberName %18 0 "a" +OpName %18 "std140_StructWithArrayOfStructOfMat" +OpName %19 "s_m" +OpName %22 "u_m" +OpName %25 "s_sm" +OpName %28 "u_sm" +OpName %31 "s_am" +OpName %34 "u_am" +OpName %37 "s_sasm" +OpName %40 "u_sasm" +OpName %43 "mat2x2_from_std140" +OpName %50 "mat2x2_get_column" +OpName %63 "access_m" +OpName %72 "idx" +OpName %137 "StructWithMat_from_std140" +OpName %146 "access_sm" +OpName %152 "idx" +OpName %230 "array, 4>_from_std140" +OpName %244 "access_am" +OpName %250 "idx" +OpName %402 "StructWithArrayOfStructOfMat_from_std140" +OpName %407 "array_from_std140" +OpName %423 "access_sasm" +OpName %429 "idx" +OpName %615 "main" OpMemberDecorate %8 0 Offset 0 OpMemberDecorate %8 0 ColMajor OpMemberDecorate %8 0 MatrixStride 8 OpDecorate %9 ArrayStride 16 -OpMemberDecorate %12 0 Offset 0 +OpDecorate %12 ArrayStride 16 OpMemberDecorate %13 0 Offset 0 -OpMemberDecorate %13 1 Offset 8 OpMemberDecorate %14 0 Offset 0 OpMemberDecorate %14 1 Offset 8 -OpDecorate %15 ArrayStride 16 -OpMemberDecorate %16 0 Offset 0 -OpDecorate %17 DescriptorSet 0 -OpDecorate %17 Binding 0 -OpDecorate %18 Block +OpMemberDecorate %15 0 Offset 0 +OpMemberDecorate %15 1 Offset 8 +OpDecorate %16 ArrayStride 16 +OpDecorate %17 ArrayStride 16 OpMemberDecorate %18 0 Offset 0 -OpMemberDecorate %18 0 ColMajor -OpMemberDecorate %18 0 MatrixStride 8 -OpDecorate %20 DescriptorSet 0 -OpDecorate %20 Binding 1 -OpDecorate %21 Block -OpMemberDecorate %21 0 Offset 0 -OpDecorate %23 DescriptorSet 1 -OpDecorate %23 Binding 0 -OpDecorate %24 Block -OpMemberDecorate %24 0 Offset 0 -OpDecorate %26 DescriptorSet 1 -OpDecorate %26 Binding 1 -OpDecorate %27 Block -OpMemberDecorate %27 0 Offset 0 -OpDecorate %29 DescriptorSet 2 -OpDecorate %29 Binding 0 -OpDecorate %30 Block -OpMemberDecorate %30 0 Offset 0 -OpDecorate %32 DescriptorSet 2 -OpDecorate %32 Binding 1 -OpDecorate %33 Block -OpMemberDecorate %33 0 Offset 0 +OpDecorate %19 DescriptorSet 0 +OpDecorate %19 Binding 0 +OpDecorate %20 Block +OpMemberDecorate %20 0 Offset 0 +OpMemberDecorate %20 0 ColMajor +OpMemberDecorate %20 0 MatrixStride 8 +OpDecorate %22 DescriptorSet 0 +OpDecorate %22 Binding 1 +OpDecorate %23 Block +OpMemberDecorate %23 0 Offset 0 +OpDecorate %25 DescriptorSet 1 +OpDecorate %25 Binding 0 +OpDecorate %26 Block +OpMemberDecorate %26 0 Offset 0 +OpDecorate %28 DescriptorSet 1 +OpDecorate %28 Binding 1 +OpDecorate %29 Block +OpMemberDecorate %29 0 Offset 0 +OpDecorate %31 DescriptorSet 2 +OpDecorate %31 Binding 0 +OpDecorate %32 Block +OpMemberDecorate %32 0 Offset 0 +OpMemberDecorate %32 0 ColMajor +OpMemberDecorate %32 0 MatrixStride 8 +OpDecorate %34 DescriptorSet 2 +OpDecorate %34 Binding 1 +OpDecorate %35 Block +OpMemberDecorate %35 0 Offset 0 +OpDecorate %37 DescriptorSet 3 +OpDecorate %37 Binding 0 +OpDecorate %38 Block +OpMemberDecorate %38 0 Offset 0 +OpDecorate %40 DescriptorSet 3 +OpDecorate %40 Binding 1 +OpDecorate %41 Block +OpMemberDecorate %41 0 Offset 0 %2 = OpTypeVoid %6 = OpTypeFloat 32 %5 = OpTypeVector %6 2 @@ -264,701 +345,997 @@ OpMemberDecorate %33 0 Offset 0 %8 = OpTypeStruct %4 %11 = OpTypeInt 32 0 %10 = OpConstant %11 4 -%9 = OpTypeArray %8 %10 -%12 = OpTypeStruct %9 -%13 = OpTypeStruct %5 %5 +%9 = OpTypeArray %4 %10 +%12 = OpTypeArray %8 %10 +%13 = OpTypeStruct %12 %14 = OpTypeStruct %5 %5 -%15 = OpTypeArray %14 %10 -%16 = OpTypeStruct %15 -%18 = OpTypeStruct %4 -%19 = OpTypePointer StorageBuffer %18 -%17 = OpVariable %19 StorageBuffer -%21 = OpTypeStruct %13 -%22 = OpTypePointer Uniform %21 -%20 = OpVariable %22 Uniform -%24 = OpTypeStruct %8 -%25 = OpTypePointer StorageBuffer %24 -%23 = OpVariable %25 StorageBuffer -%27 = OpTypeStruct %14 -%28 = OpTypePointer Uniform %27 -%26 = OpVariable %28 Uniform -%30 = OpTypeStruct %12 -%31 = OpTypePointer StorageBuffer %30 -%29 = OpVariable %31 StorageBuffer -%33 = OpTypeStruct %16 -%34 = OpTypePointer Uniform %33 -%32 = OpVariable %34 Uniform -%36 = OpTypeFunction %4 %13 -%45 = OpTypeFunction %5 %4 %11 -%56 = OpTypeFunction %2 -%57 = OpTypePointer StorageBuffer %4 -%58 = OpConstant %11 0 -%60 = OpTypePointer Uniform %13 -%62 = OpConstant %7 1 -%63 = OpTypePointer Uniform %4 -%65 = OpTypePointer Function %7 -%70 = OpTypePointer StorageBuffer %5 -%76 = OpTypePointer StorageBuffer %6 -%91 = OpTypePointer Uniform %5 -%99 = OpTypePointer Uniform %6 -%130 = OpTypeFunction %8 %14 -%139 = OpTypePointer StorageBuffer %8 -%141 = OpTypePointer Uniform %14 -%143 = OpTypePointer Uniform %8 -%170 = OpConstant %11 1 -%223 = OpTypeFunction %12 %16 -%228 = OpTypeFunction %9 %15 -%244 = OpTypePointer StorageBuffer %12 -%246 = OpTypePointer Uniform %16 -%248 = OpTypePointer Uniform %12 -%254 = OpTypePointer StorageBuffer %9 -%304 = OpTypePointer Uniform %9 -%305 = OpTypePointer Uniform %15 -%35 = OpFunction %4 None %36 -%37 = OpFunctionParameter %13 -%38 = OpLabel -%39 = OpCompositeExtract %5 %37 0 -%40 = OpCompositeExtract %5 %37 1 -%41 = OpCompositeConstruct %4 %39 %40 -OpReturnValue %41 -OpFunctionEnd -%42 = OpFunction %5 None %45 -%43 = OpFunctionParameter %4 -%44 = OpFunctionParameter %11 +%15 = OpTypeStruct %5 %5 +%16 = OpTypeArray %14 %10 +%17 = OpTypeArray %15 %10 +%18 = OpTypeStruct %17 +%20 = OpTypeStruct %4 +%21 = OpTypePointer StorageBuffer %20 +%19 = OpVariable %21 StorageBuffer +%23 = OpTypeStruct %14 +%24 = OpTypePointer Uniform %23 +%22 = OpVariable %24 Uniform +%26 = OpTypeStruct %8 +%27 = OpTypePointer StorageBuffer %26 +%25 = OpVariable %27 StorageBuffer +%29 = OpTypeStruct %15 +%30 = OpTypePointer Uniform %29 +%28 = OpVariable %30 Uniform +%32 = OpTypeStruct %9 +%33 = OpTypePointer StorageBuffer %32 +%31 = OpVariable %33 StorageBuffer +%35 = OpTypeStruct %16 +%36 = OpTypePointer Uniform %35 +%34 = OpVariable %36 Uniform +%38 = OpTypeStruct %13 +%39 = OpTypePointer StorageBuffer %38 +%37 = OpVariable %39 StorageBuffer +%41 = OpTypeStruct %18 +%42 = OpTypePointer Uniform %41 +%40 = OpVariable %42 Uniform +%44 = OpTypeFunction %4 %14 +%53 = OpTypeFunction %5 %4 %11 +%64 = OpTypeFunction %2 +%65 = OpTypePointer StorageBuffer %4 +%66 = OpConstant %11 0 +%68 = OpTypePointer Uniform %14 +%70 = OpConstant %7 1 +%71 = OpTypePointer Uniform %4 +%73 = OpTypePointer Function %7 +%78 = OpTypePointer StorageBuffer %5 +%84 = OpTypePointer StorageBuffer %6 +%99 = OpTypePointer Uniform %5 +%107 = OpTypePointer Uniform %6 +%138 = OpTypeFunction %8 %15 +%147 = OpTypePointer StorageBuffer %8 +%149 = OpTypePointer Uniform %15 +%151 = OpTypePointer Uniform %8 +%178 = OpConstant %11 1 +%231 = OpTypeFunction %9 %16 +%245 = OpTypePointer StorageBuffer %9 +%247 = OpTypePointer Uniform %16 +%249 = OpTypePointer Uniform %9 +%403 = OpTypeFunction %13 %18 +%408 = OpTypeFunction %12 %17 +%424 = OpTypePointer StorageBuffer %13 +%426 = OpTypePointer Uniform %18 +%428 = OpTypePointer Uniform %13 +%434 = OpTypePointer StorageBuffer %12 +%484 = OpTypePointer Uniform %12 +%485 = OpTypePointer Uniform %17 +%43 = OpFunction %4 None %44 +%45 = OpFunctionParameter %14 %46 = OpLabel -OpSelectionMerge %47 None -OpSwitch %44 %50 0 %48 1 %49 -%48 = OpLabel -%51 = OpCompositeExtract %5 %43 0 -OpBranch %47 -%49 = OpLabel -%52 = OpCompositeExtract %5 %43 1 -OpBranch %47 -%50 = OpLabel -OpUnreachable -%47 = OpLabel -%53 = OpPhi %5 %51 %48 %52 %49 -OpReturnValue %53 +%47 = OpCompositeExtract %5 %45 0 +%48 = OpCompositeExtract %5 %45 1 +%49 = OpCompositeConstruct %4 %47 %48 +OpReturnValue %49 OpFunctionEnd -%55 = OpFunction %2 None %56 +%50 = OpFunction %5 None %53 +%51 = OpFunctionParameter %4 +%52 = OpFunctionParameter %11 %54 = OpLabel -%64 = OpVariable %65 Function %62 -%59 = OpAccessChain %57 %17 %58 -%61 = OpAccessChain %60 %20 %58 -OpBranch %66 -%66 = OpLabel +OpSelectionMerge %55 None +OpSwitch %52 %58 0 %56 1 %57 +%56 = OpLabel +%59 = OpCompositeExtract %5 %51 0 +OpBranch %55 +%57 = OpLabel +%60 = OpCompositeExtract %5 %51 1 +OpBranch %55 +%58 = OpLabel +OpUnreachable +%55 = OpLabel +%61 = OpPhi %5 %59 %56 %60 %57 +OpReturnValue %61 +OpFunctionEnd +%63 = OpFunction %2 None %64 +%62 = OpLabel +%72 = OpVariable %73 Function %70 +%67 = OpAccessChain %65 %19 %66 +%69 = OpAccessChain %68 %22 %66 +OpBranch %74 +%74 = OpLabel OpLine %3 28 5 -%67 = OpLoad %7 %64 -%68 = OpISub %7 %67 %62 +%75 = OpLoad %7 %72 +%76 = OpISub %7 %75 %70 OpLine %3 28 5 -OpStore %64 %68 +OpStore %72 %76 OpLine %3 31 17 -%69 = OpLoad %4 %59 +%77 = OpLoad %4 %67 OpLine %3 32 19 -%71 = OpAccessChain %70 %59 %58 -%72 = OpLoad %5 %71 +%79 = OpAccessChain %78 %67 %66 +%80 = OpLoad %5 %79 OpLine %3 33 19 -%73 = OpLoad %7 %64 -%74 = OpAccessChain %70 %59 %73 -%75 = OpLoad %5 %74 +%81 = OpLoad %7 %72 +%82 = OpAccessChain %78 %67 %81 +%83 = OpLoad %5 %82 OpLine %3 34 20 OpLine %3 34 20 -%77 = OpAccessChain %76 %59 %58 %58 -%78 = OpLoad %6 %77 +%85 = OpAccessChain %84 %67 %66 %66 +%86 = OpLoad %6 %85 OpLine %3 35 20 -%79 = OpLoad %7 %64 -%80 = OpAccessChain %76 %59 %58 %79 -%81 = OpLoad %6 %80 +%87 = OpLoad %7 %72 +%88 = OpAccessChain %84 %67 %66 %87 +%89 = OpLoad %6 %88 OpLine %3 36 20 -%82 = OpLoad %7 %64 +%90 = OpLoad %7 %72 OpLine %3 36 20 -%83 = OpAccessChain %76 %59 %82 %58 -%84 = OpLoad %6 %83 +%91 = OpAccessChain %84 %67 %90 %66 +%92 = OpLoad %6 %91 OpLine %3 37 20 -%85 = OpLoad %7 %64 -%86 = OpLoad %7 %64 -%87 = OpAccessChain %76 %59 %85 %86 -%88 = OpLoad %6 %87 +%93 = OpLoad %7 %72 +%94 = OpLoad %7 %72 +%95 = OpAccessChain %84 %67 %93 %94 +%96 = OpLoad %6 %95 OpLine %3 40 17 -%89 = OpLoad %13 %61 -%90 = OpFunctionCall %4 %35 %89 +%97 = OpLoad %14 %69 +%98 = OpFunctionCall %4 %43 %97 OpLine %3 41 19 -%92 = OpAccessChain %91 %61 %58 -%93 = OpLoad %5 %92 +%100 = OpAccessChain %99 %69 %66 +%101 = OpLoad %5 %100 OpLine %3 42 19 -%94 = OpLoad %7 %64 -%95 = OpLoad %13 %61 -%96 = OpFunctionCall %4 %35 %95 -%97 = OpBitcast %11 %94 -%98 = OpFunctionCall %5 %42 %96 %97 +%102 = OpLoad %7 %72 +%103 = OpLoad %14 %69 +%104 = OpFunctionCall %4 %43 %103 +%105 = OpBitcast %11 %102 +%106 = OpFunctionCall %5 %50 %104 %105 OpLine %3 43 20 OpLine %3 43 20 -%100 = OpAccessChain %99 %61 %58 %58 -%101 = OpLoad %6 %100 +%108 = OpAccessChain %107 %69 %66 %66 +%109 = OpLoad %6 %108 OpLine %3 44 20 -%102 = OpLoad %7 %64 -%103 = OpAccessChain %99 %61 %58 %102 -%104 = OpLoad %6 %103 +%110 = OpLoad %7 %72 +%111 = OpAccessChain %107 %69 %66 %110 +%112 = OpLoad %6 %111 OpLine %3 45 20 -%105 = OpLoad %7 %64 +%113 = OpLoad %7 %72 OpLine %3 45 20 -%106 = OpLoad %13 %61 -%107 = OpFunctionCall %4 %35 %106 -%108 = OpBitcast %11 %105 -%109 = OpFunctionCall %5 %42 %107 %108 -%110 = OpCompositeExtract %6 %109 0 +%114 = OpLoad %14 %69 +%115 = OpFunctionCall %4 %43 %114 +%116 = OpBitcast %11 %113 +%117 = OpFunctionCall %5 %50 %115 %116 +%118 = OpCompositeExtract %6 %117 0 OpLine %3 46 20 -%111 = OpLoad %7 %64 -%112 = OpLoad %7 %64 -%113 = OpLoad %13 %61 -%114 = OpFunctionCall %4 %35 %113 -%115 = OpBitcast %11 %111 -%116 = OpFunctionCall %5 %42 %114 %115 -%117 = OpVectorExtractDynamic %6 %116 %112 +%119 = OpLoad %7 %72 +%120 = OpLoad %7 %72 +%121 = OpLoad %14 %69 +%122 = OpFunctionCall %4 %43 %121 +%123 = OpBitcast %11 %119 +%124 = OpFunctionCall %5 %50 %122 %123 +%125 = OpVectorExtractDynamic %6 %124 %120 OpLine %3 49 5 -OpStore %59 %90 +OpStore %67 %98 OpLine %3 50 5 OpLine %3 50 5 -%118 = OpAccessChain %70 %59 %58 -OpStore %118 %93 +%126 = OpAccessChain %78 %67 %66 +OpStore %126 %101 OpLine %3 51 5 -%119 = OpLoad %7 %64 +%127 = OpLoad %7 %72 OpLine %3 51 5 -%120 = OpAccessChain %70 %59 %119 -OpStore %120 %98 +%128 = OpAccessChain %78 %67 %127 +OpStore %128 %106 OpLine %3 52 5 OpLine %3 52 5 OpLine %3 52 5 -%121 = OpAccessChain %76 %59 %58 %58 -OpStore %121 %101 +%129 = OpAccessChain %84 %67 %66 %66 +OpStore %129 %109 OpLine %3 53 5 -%122 = OpLoad %7 %64 +%130 = OpLoad %7 %72 OpLine %3 53 5 -%123 = OpAccessChain %76 %59 %58 %122 -OpStore %123 %104 +%131 = OpAccessChain %84 %67 %66 %130 +OpStore %131 %112 OpLine %3 54 5 -%124 = OpLoad %7 %64 +%132 = OpLoad %7 %72 OpLine %3 54 5 OpLine %3 54 5 -%125 = OpAccessChain %76 %59 %124 %58 -OpStore %125 %110 +%133 = OpAccessChain %84 %67 %132 %66 +OpStore %133 %118 OpLine %3 55 5 -%126 = OpLoad %7 %64 -%127 = OpLoad %7 %64 +%134 = OpLoad %7 %72 +%135 = OpLoad %7 %72 OpLine %3 55 5 -%128 = OpAccessChain %76 %59 %126 %127 -OpStore %128 %117 +%136 = OpAccessChain %84 %67 %134 %135 +OpStore %136 %125 OpReturn OpFunctionEnd -%129 = OpFunction %8 None %130 -%131 = OpFunctionParameter %14 -%132 = OpLabel -%134 = OpCompositeExtract %5 %131 0 -%135 = OpCompositeExtract %5 %131 1 -%133 = OpCompositeConstruct %4 %134 %135 -%136 = OpCompositeConstruct %8 %133 -OpReturnValue %136 +%137 = OpFunction %8 None %138 +%139 = OpFunctionParameter %15 +%140 = OpLabel +%142 = OpCompositeExtract %5 %139 0 +%143 = OpCompositeExtract %5 %139 1 +%141 = OpCompositeConstruct %4 %142 %143 +%144 = OpCompositeConstruct %8 %141 +OpReturnValue %144 OpFunctionEnd -%138 = OpFunction %2 None %56 -%137 = OpLabel -%144 = OpVariable %65 Function %62 -%140 = OpAccessChain %139 %23 %58 -%142 = OpAccessChain %141 %26 %58 -OpBranch %145 +%146 = OpFunction %2 None %64 %145 = OpLabel +%152 = OpVariable %73 Function %70 +%148 = OpAccessChain %147 %25 %66 +%150 = OpAccessChain %149 %28 %66 +OpBranch %153 +%153 = OpLabel OpLine %3 70 5 -%146 = OpLoad %7 %144 -%147 = OpISub %7 %146 %62 +%154 = OpLoad %7 %152 +%155 = OpISub %7 %154 %70 OpLine %3 70 5 -OpStore %144 %147 +OpStore %152 %155 OpLine %3 73 17 -%148 = OpLoad %8 %140 +%156 = OpLoad %8 %148 OpLine %3 74 17 -%149 = OpAccessChain %57 %140 %58 -%150 = OpLoad %4 %149 +%157 = OpAccessChain %65 %148 %66 +%158 = OpLoad %4 %157 OpLine %3 75 19 OpLine %3 75 19 -%151 = OpAccessChain %70 %140 %58 %58 -%152 = OpLoad %5 %151 +%159 = OpAccessChain %78 %148 %66 %66 +%160 = OpLoad %5 %159 OpLine %3 76 19 -%153 = OpLoad %7 %144 -%154 = OpAccessChain %70 %140 %58 %153 -%155 = OpLoad %5 %154 +%161 = OpLoad %7 %152 +%162 = OpAccessChain %78 %148 %66 %161 +%163 = OpLoad %5 %162 OpLine %3 77 20 OpLine %3 77 20 OpLine %3 77 20 -%156 = OpAccessChain %76 %140 %58 %58 %58 -%157 = OpLoad %6 %156 +%164 = OpAccessChain %84 %148 %66 %66 %66 +%165 = OpLoad %6 %164 OpLine %3 78 20 OpLine %3 78 20 -%158 = OpLoad %7 %144 -%159 = OpAccessChain %76 %140 %58 %58 %158 -%160 = OpLoad %6 %159 +%166 = OpLoad %7 %152 +%167 = OpAccessChain %84 %148 %66 %66 %166 +%168 = OpLoad %6 %167 OpLine %3 79 20 -%161 = OpLoad %7 %144 +%169 = OpLoad %7 %152 OpLine %3 79 20 -%162 = OpAccessChain %76 %140 %58 %161 %58 -%163 = OpLoad %6 %162 +%170 = OpAccessChain %84 %148 %66 %169 %66 +%171 = OpLoad %6 %170 OpLine %3 80 20 -%164 = OpLoad %7 %144 -%165 = OpLoad %7 %144 -%166 = OpAccessChain %76 %140 %58 %164 %165 -%167 = OpLoad %6 %166 +%172 = OpLoad %7 %152 +%173 = OpLoad %7 %152 +%174 = OpAccessChain %84 %148 %66 %172 %173 +%175 = OpLoad %6 %174 OpLine %3 83 17 -%168 = OpLoad %14 %142 -%169 = OpFunctionCall %8 %129 %168 +%176 = OpLoad %15 %150 +%177 = OpFunctionCall %8 %137 %176 OpLine %3 84 17 -%171 = OpAccessChain %91 %142 %58 -%172 = OpLoad %5 %171 -%173 = OpAccessChain %91 %142 %170 -%174 = OpLoad %5 %173 -%175 = OpCompositeConstruct %4 %172 %174 -OpLine %3 85 19 -OpLine %3 85 19 -%176 = OpAccessChain %91 %142 %58 -%177 = OpLoad %5 %176 -OpLine %3 86 19 -%178 = OpLoad %7 %144 -%179 = OpAccessChain %91 %142 %58 +%179 = OpAccessChain %99 %150 %66 %180 = OpLoad %5 %179 -%181 = OpAccessChain %91 %142 %170 +%181 = OpAccessChain %99 %150 %178 %182 = OpLoad %5 %181 %183 = OpCompositeConstruct %4 %180 %182 -%184 = OpBitcast %11 %178 -%185 = OpFunctionCall %5 %42 %183 %184 +OpLine %3 85 19 +OpLine %3 85 19 +%184 = OpAccessChain %99 %150 %66 +%185 = OpLoad %5 %184 +OpLine %3 86 19 +%186 = OpLoad %7 %152 +%187 = OpAccessChain %99 %150 %66 +%188 = OpLoad %5 %187 +%189 = OpAccessChain %99 %150 %178 +%190 = OpLoad %5 %189 +%191 = OpCompositeConstruct %4 %188 %190 +%192 = OpBitcast %11 %186 +%193 = OpFunctionCall %5 %50 %191 %192 OpLine %3 87 20 OpLine %3 87 20 OpLine %3 87 20 -%186 = OpAccessChain %99 %142 %58 %58 -%187 = OpLoad %6 %186 +%194 = OpAccessChain %107 %150 %66 %66 +%195 = OpLoad %6 %194 OpLine %3 88 20 OpLine %3 88 20 -%188 = OpLoad %7 %144 -%189 = OpAccessChain %99 %142 %58 %188 -%190 = OpLoad %6 %189 +%196 = OpLoad %7 %152 +%197 = OpAccessChain %107 %150 %66 %196 +%198 = OpLoad %6 %197 OpLine %3 89 20 -%191 = OpLoad %7 %144 +%199 = OpLoad %7 %152 OpLine %3 89 20 -%192 = OpAccessChain %91 %142 %58 -%193 = OpLoad %5 %192 -%194 = OpAccessChain %91 %142 %170 -%195 = OpLoad %5 %194 -%196 = OpCompositeConstruct %4 %193 %195 -%197 = OpBitcast %11 %191 -%198 = OpFunctionCall %5 %42 %196 %197 -%199 = OpCompositeExtract %6 %198 0 -OpLine %3 90 20 -%200 = OpLoad %7 %144 -%201 = OpLoad %7 %144 -%202 = OpAccessChain %91 %142 %58 +%200 = OpAccessChain %99 %150 %66 +%201 = OpLoad %5 %200 +%202 = OpAccessChain %99 %150 %178 %203 = OpLoad %5 %202 -%204 = OpAccessChain %91 %142 %170 -%205 = OpLoad %5 %204 -%206 = OpCompositeConstruct %4 %203 %205 -%207 = OpBitcast %11 %200 -%208 = OpFunctionCall %5 %42 %206 %207 -%209 = OpVectorExtractDynamic %6 %208 %201 +%204 = OpCompositeConstruct %4 %201 %203 +%205 = OpBitcast %11 %199 +%206 = OpFunctionCall %5 %50 %204 %205 +%207 = OpCompositeExtract %6 %206 0 +OpLine %3 90 20 +%208 = OpLoad %7 %152 +%209 = OpLoad %7 %152 +%210 = OpAccessChain %99 %150 %66 +%211 = OpLoad %5 %210 +%212 = OpAccessChain %99 %150 %178 +%213 = OpLoad %5 %212 +%214 = OpCompositeConstruct %4 %211 %213 +%215 = OpBitcast %11 %208 +%216 = OpFunctionCall %5 %50 %214 %215 +%217 = OpVectorExtractDynamic %6 %216 %209 OpLine %3 93 5 -OpStore %140 %169 +OpStore %148 %177 OpLine %3 94 5 OpLine %3 94 5 -%210 = OpAccessChain %57 %140 %58 -OpStore %210 %175 +%218 = OpAccessChain %65 %148 %66 +OpStore %218 %183 OpLine %3 95 5 OpLine %3 95 5 OpLine %3 95 5 -%211 = OpAccessChain %70 %140 %58 %58 -OpStore %211 %177 +%219 = OpAccessChain %78 %148 %66 %66 +OpStore %219 %185 OpLine %3 96 5 -%212 = OpLoad %7 %144 +%220 = OpLoad %7 %152 OpLine %3 96 5 -%213 = OpAccessChain %70 %140 %58 %212 -OpStore %213 %185 +%221 = OpAccessChain %78 %148 %66 %220 +OpStore %221 %193 OpLine %3 97 5 OpLine %3 97 5 OpLine %3 97 5 OpLine %3 97 5 -%214 = OpAccessChain %76 %140 %58 %58 %58 -OpStore %214 %187 +%222 = OpAccessChain %84 %148 %66 %66 %66 +OpStore %222 %195 OpLine %3 98 5 OpLine %3 98 5 -%215 = OpLoad %7 %144 +%223 = OpLoad %7 %152 OpLine %3 98 5 -%216 = OpAccessChain %76 %140 %58 %58 %215 -OpStore %216 %190 +%224 = OpAccessChain %84 %148 %66 %66 %223 +OpStore %224 %198 OpLine %3 99 5 -%217 = OpLoad %7 %144 +%225 = OpLoad %7 %152 OpLine %3 99 5 OpLine %3 99 5 -%218 = OpAccessChain %76 %140 %58 %217 %58 -OpStore %218 %199 +%226 = OpAccessChain %84 %148 %66 %225 %66 +OpStore %226 %207 OpLine %3 100 5 -%219 = OpLoad %7 %144 -%220 = OpLoad %7 %144 +%227 = OpLoad %7 %152 +%228 = OpLoad %7 %152 OpLine %3 100 5 -%221 = OpAccessChain %76 %140 %58 %219 %220 -OpStore %221 %209 +%229 = OpAccessChain %84 %148 %66 %227 %228 +OpStore %229 %217 OpReturn OpFunctionEnd -%227 = OpFunction %9 None %228 -%229 = OpFunctionParameter %15 -%230 = OpLabel -%231 = OpCompositeExtract %14 %229 0 -%232 = OpFunctionCall %8 %129 %231 -%233 = OpCompositeExtract %14 %229 1 -%234 = OpFunctionCall %8 %129 %233 -%235 = OpCompositeExtract %14 %229 2 -%236 = OpFunctionCall %8 %129 %235 -%237 = OpCompositeExtract %14 %229 3 -%238 = OpFunctionCall %8 %129 %237 -%239 = OpCompositeConstruct %9 %232 %234 %236 %238 -OpReturnValue %239 +%230 = OpFunction %9 None %231 +%232 = OpFunctionParameter %16 +%233 = OpLabel +%234 = OpCompositeExtract %14 %232 0 +%235 = OpFunctionCall %4 %43 %234 +%236 = OpCompositeExtract %14 %232 1 +%237 = OpFunctionCall %4 %43 %236 +%238 = OpCompositeExtract %14 %232 2 +%239 = OpFunctionCall %4 %43 %238 +%240 = OpCompositeExtract %14 %232 3 +%241 = OpFunctionCall %4 %43 %240 +%242 = OpCompositeConstruct %9 %235 %237 %239 %241 +OpReturnValue %242 OpFunctionEnd -%222 = OpFunction %12 None %223 -%224 = OpFunctionParameter %16 -%225 = OpLabel -%240 = OpCompositeExtract %15 %224 0 -%226 = OpFunctionCall %9 %227 %240 -%241 = OpCompositeConstruct %12 %226 -OpReturnValue %241 -OpFunctionEnd -%243 = OpFunction %2 None %56 -%242 = OpLabel -%249 = OpVariable %65 Function %62 -%245 = OpAccessChain %244 %29 %58 -%247 = OpAccessChain %246 %32 %58 -OpBranch %250 -%250 = OpLabel -OpLine %3 115 5 -%251 = OpLoad %7 %249 -%252 = OpISub %7 %251 %62 -OpLine %3 115 5 -OpStore %249 %252 -OpLine %3 118 17 -%253 = OpLoad %12 %245 -OpLine %3 119 17 -%255 = OpAccessChain %254 %245 %58 -%256 = OpLoad %9 %255 -OpLine %3 120 19 -OpLine %3 120 19 -%257 = OpAccessChain %57 %245 %58 %58 %58 -%258 = OpLoad %4 %257 -OpLine %3 121 19 -%259 = OpLoad %7 %249 -%260 = OpAccessChain %57 %245 %58 %259 %58 -%261 = OpLoad %4 %260 -OpLine %3 122 20 -OpLine %3 122 20 -OpLine %3 122 20 -%262 = OpAccessChain %70 %245 %58 %58 %58 %58 -%263 = OpLoad %5 %262 -OpLine %3 123 20 -OpLine %3 123 20 -%264 = OpLoad %7 %249 -%265 = OpAccessChain %70 %245 %58 %58 %58 %264 -%266 = OpLoad %5 %265 -OpLine %3 124 20 -%267 = OpLoad %7 %249 -OpLine %3 124 20 -%268 = OpAccessChain %70 %245 %58 %267 %58 %58 -%269 = OpLoad %5 %268 -OpLine %3 125 20 -%270 = OpLoad %7 %249 -%271 = OpLoad %7 %249 -%272 = OpAccessChain %70 %245 %58 %270 %58 %271 -%273 = OpLoad %5 %272 +%244 = OpFunction %2 None %64 +%243 = OpLabel +%250 = OpVariable %73 Function %70 +%246 = OpAccessChain %245 %31 %66 +%248 = OpAccessChain %247 %34 %66 +OpBranch %251 +%251 = OpLabel +OpLine %3 111 5 +%252 = OpLoad %7 %250 +%253 = OpISub %7 %252 %70 +OpLine %3 111 5 +OpStore %250 %253 +OpLine %3 114 17 +%254 = OpLoad %9 %246 +OpLine %3 115 19 +%255 = OpAccessChain %65 %246 %66 +%256 = OpLoad %4 %255 +OpLine %3 116 19 +%257 = OpLoad %7 %250 +%258 = OpAccessChain %65 %246 %257 +%259 = OpLoad %4 %258 +OpLine %3 117 20 +OpLine %3 117 20 +%260 = OpAccessChain %78 %246 %66 %66 +%261 = OpLoad %5 %260 +OpLine %3 118 20 +%262 = OpLoad %7 %250 +%263 = OpAccessChain %78 %246 %66 %262 +%264 = OpLoad %5 %263 +OpLine %3 119 20 +%265 = OpLoad %7 %250 +OpLine %3 119 20 +%266 = OpAccessChain %78 %246 %265 %66 +%267 = OpLoad %5 %266 +OpLine %3 120 20 +%268 = OpLoad %7 %250 +%269 = OpLoad %7 %250 +%270 = OpAccessChain %78 %246 %268 %269 +%271 = OpLoad %5 %270 +OpLine %3 121 21 +OpLine %3 121 21 +OpLine %3 121 21 +%272 = OpAccessChain %84 %246 %66 %66 %66 +%273 = OpLoad %6 %272 +OpLine %3 122 21 +OpLine %3 122 21 +%274 = OpLoad %7 %250 +%275 = OpAccessChain %84 %246 %66 %66 %274 +%276 = OpLoad %6 %275 +OpLine %3 123 21 +%277 = OpLoad %7 %250 +OpLine %3 123 21 +%278 = OpAccessChain %84 %246 %66 %277 %66 +%279 = OpLoad %6 %278 +OpLine %3 124 21 +%280 = OpLoad %7 %250 +%281 = OpLoad %7 %250 +%282 = OpAccessChain %84 %246 %66 %280 %281 +%283 = OpLoad %6 %282 +OpLine %3 125 21 +%284 = OpLoad %7 %250 +OpLine %3 125 21 +OpLine %3 125 21 +%285 = OpAccessChain %84 %246 %284 %66 %66 +%286 = OpLoad %6 %285 OpLine %3 126 21 +%287 = OpLoad %7 %250 OpLine %3 126 21 -OpLine %3 126 21 -OpLine %3 126 21 -%274 = OpAccessChain %76 %245 %58 %58 %58 %58 %58 -%275 = OpLoad %6 %274 +%288 = OpLoad %7 %250 +%289 = OpAccessChain %84 %246 %287 %66 %288 +%290 = OpLoad %6 %289 OpLine %3 127 21 +%291 = OpLoad %7 %250 +%292 = OpLoad %7 %250 OpLine %3 127 21 -OpLine %3 127 21 -%276 = OpLoad %7 %249 -%277 = OpAccessChain %76 %245 %58 %58 %58 %58 %276 -%278 = OpLoad %6 %277 +%293 = OpAccessChain %84 %246 %291 %292 %66 +%294 = OpLoad %6 %293 OpLine %3 128 21 -OpLine %3 128 21 -%279 = OpLoad %7 %249 -OpLine %3 128 21 -%280 = OpAccessChain %76 %245 %58 %58 %58 %279 %58 -%281 = OpLoad %6 %280 -OpLine %3 129 21 -OpLine %3 129 21 -%282 = OpLoad %7 %249 -%283 = OpLoad %7 %249 -%284 = OpAccessChain %76 %245 %58 %58 %58 %282 %283 -%285 = OpLoad %6 %284 -OpLine %3 130 21 -%286 = OpLoad %7 %249 -OpLine %3 130 21 -OpLine %3 130 21 -%287 = OpAccessChain %76 %245 %58 %286 %58 %58 %58 -%288 = OpLoad %6 %287 -OpLine %3 131 21 -%289 = OpLoad %7 %249 -OpLine %3 131 21 -%290 = OpLoad %7 %249 -%291 = OpAccessChain %76 %245 %58 %289 %58 %58 %290 -%292 = OpLoad %6 %291 -OpLine %3 132 21 -%293 = OpLoad %7 %249 -%294 = OpLoad %7 %249 -OpLine %3 132 21 -%295 = OpAccessChain %76 %245 %58 %293 %58 %294 %58 -%296 = OpLoad %6 %295 -OpLine %3 133 21 -%297 = OpLoad %7 %249 -%298 = OpLoad %7 %249 -%299 = OpLoad %7 %249 -%300 = OpAccessChain %76 %245 %58 %297 %58 %298 %299 -%301 = OpLoad %6 %300 -OpLine %3 136 17 -%302 = OpLoad %16 %247 -%303 = OpFunctionCall %12 %222 %302 -OpLine %3 137 17 -%306 = OpAccessChain %305 %247 %58 -%307 = OpLoad %15 %306 -%308 = OpFunctionCall %9 %227 %307 -OpLine %3 138 19 -OpLine %3 138 19 -%309 = OpAccessChain %141 %247 %58 %58 -%310 = OpAccessChain %91 %309 %58 -%311 = OpLoad %5 %310 -%312 = OpAccessChain %91 %309 %170 -%313 = OpLoad %5 %312 -%314 = OpCompositeConstruct %4 %311 %313 -OpLine %3 139 19 -%315 = OpLoad %7 %249 -%316 = OpAccessChain %141 %247 %58 %315 -%317 = OpAccessChain %91 %316 %58 -%318 = OpLoad %5 %317 -%319 = OpAccessChain %91 %316 %170 -%320 = OpLoad %5 %319 -%321 = OpCompositeConstruct %4 %318 %320 -OpLine %3 140 20 -OpLine %3 140 20 -OpLine %3 140 20 -%322 = OpAccessChain %91 %247 %58 %58 %58 -%323 = OpLoad %5 %322 -OpLine %3 141 20 -OpLine %3 141 20 -%324 = OpLoad %7 %249 -%325 = OpAccessChain %141 %247 %58 %58 -%326 = OpAccessChain %91 %325 %58 -%327 = OpLoad %5 %326 -%328 = OpAccessChain %91 %325 %170 -%329 = OpLoad %5 %328 -%330 = OpCompositeConstruct %4 %327 %329 -%331 = OpBitcast %11 %324 -%332 = OpFunctionCall %5 %42 %330 %331 -OpLine %3 142 20 -%333 = OpLoad %7 %249 -OpLine %3 142 20 -%334 = OpAccessChain %91 %247 %58 %333 %58 -%335 = OpLoad %5 %334 -OpLine %3 143 20 -%336 = OpLoad %7 %249 -%337 = OpLoad %7 %249 -%338 = OpAccessChain %141 %247 %58 %336 -%339 = OpAccessChain %91 %338 %58 -%340 = OpLoad %5 %339 -%341 = OpAccessChain %91 %338 %170 -%342 = OpLoad %5 %341 -%343 = OpCompositeConstruct %4 %340 %342 -%344 = OpBitcast %11 %337 -%345 = OpFunctionCall %5 %42 %343 %344 +%295 = OpLoad %7 %250 +%296 = OpLoad %7 %250 +%297 = OpLoad %7 %250 +%298 = OpAccessChain %84 %246 %295 %296 %297 +%299 = OpLoad %6 %298 +OpLine %3 131 17 +%300 = OpLoad %16 %248 +%301 = OpFunctionCall %9 %230 %300 +OpLine %3 132 19 +%302 = OpAccessChain %68 %248 %66 +%303 = OpLoad %14 %302 +%304 = OpFunctionCall %4 %43 %303 +OpLine %3 133 19 +%305 = OpLoad %7 %250 +%306 = OpAccessChain %68 %248 %305 +%307 = OpLoad %14 %306 +%308 = OpFunctionCall %4 %43 %307 +OpLine %3 134 20 +OpLine %3 134 20 +%309 = OpAccessChain %99 %248 %66 %66 +%310 = OpLoad %5 %309 +OpLine %3 135 20 +%311 = OpLoad %7 %250 +%312 = OpAccessChain %68 %248 %66 +%313 = OpLoad %14 %312 +%314 = OpFunctionCall %4 %43 %313 +%315 = OpBitcast %11 %311 +%316 = OpFunctionCall %5 %50 %314 %315 +OpLine %3 136 20 +%317 = OpLoad %7 %250 +OpLine %3 136 20 +%318 = OpAccessChain %99 %248 %317 %66 +%319 = OpLoad %5 %318 +OpLine %3 137 20 +%320 = OpLoad %7 %250 +%321 = OpLoad %7 %250 +%322 = OpAccessChain %68 %248 %320 +%323 = OpLoad %14 %322 +%324 = OpFunctionCall %4 %43 %323 +%325 = OpBitcast %11 %321 +%326 = OpFunctionCall %5 %50 %324 %325 +OpLine %3 138 21 +OpLine %3 138 21 +OpLine %3 138 21 +%327 = OpAccessChain %107 %248 %66 %66 %66 +%328 = OpLoad %6 %327 +OpLine %3 139 21 +OpLine %3 139 21 +%329 = OpLoad %7 %250 +%330 = OpAccessChain %107 %248 %66 %66 %329 +%331 = OpLoad %6 %330 +OpLine %3 140 21 +%332 = OpLoad %7 %250 +OpLine %3 140 21 +%333 = OpAccessChain %68 %248 %66 +%334 = OpLoad %14 %333 +%335 = OpFunctionCall %4 %43 %334 +%336 = OpBitcast %11 %332 +%337 = OpFunctionCall %5 %50 %335 %336 +%338 = OpCompositeExtract %6 %337 0 +OpLine %3 141 21 +%339 = OpLoad %7 %250 +%340 = OpLoad %7 %250 +%341 = OpAccessChain %68 %248 %66 +%342 = OpLoad %14 %341 +%343 = OpFunctionCall %4 %43 %342 +%344 = OpBitcast %11 %339 +%345 = OpFunctionCall %5 %50 %343 %344 +%346 = OpVectorExtractDynamic %6 %345 %340 +OpLine %3 142 21 +%347 = OpLoad %7 %250 +OpLine %3 142 21 +OpLine %3 142 21 +%348 = OpAccessChain %107 %248 %347 %66 %66 +%349 = OpLoad %6 %348 +OpLine %3 143 21 +%350 = OpLoad %7 %250 +OpLine %3 143 21 +%351 = OpLoad %7 %250 +%352 = OpAccessChain %107 %248 %350 %66 %351 +%353 = OpLoad %6 %352 OpLine %3 144 21 +%354 = OpLoad %7 %250 +%355 = OpLoad %7 %250 OpLine %3 144 21 -OpLine %3 144 21 -OpLine %3 144 21 -%346 = OpAccessChain %99 %247 %58 %58 %58 %58 -%347 = OpLoad %6 %346 +%356 = OpAccessChain %68 %248 %354 +%357 = OpLoad %14 %356 +%358 = OpFunctionCall %4 %43 %357 +%359 = OpBitcast %11 %355 +%360 = OpFunctionCall %5 %50 %358 %359 +%361 = OpCompositeExtract %6 %360 0 OpLine %3 145 21 -OpLine %3 145 21 -OpLine %3 145 21 -%348 = OpLoad %7 %249 -%349 = OpAccessChain %99 %247 %58 %58 %58 %348 -%350 = OpLoad %6 %349 -OpLine %3 146 21 -OpLine %3 146 21 -%351 = OpLoad %7 %249 -OpLine %3 146 21 -%352 = OpAccessChain %141 %247 %58 %58 -%353 = OpAccessChain %91 %352 %58 -%354 = OpLoad %5 %353 -%355 = OpAccessChain %91 %352 %170 -%356 = OpLoad %5 %355 -%357 = OpCompositeConstruct %4 %354 %356 -%358 = OpBitcast %11 %351 -%359 = OpFunctionCall %5 %42 %357 %358 -%360 = OpCompositeExtract %6 %359 0 -OpLine %3 147 21 -OpLine %3 147 21 -%361 = OpLoad %7 %249 -%362 = OpLoad %7 %249 -%363 = OpAccessChain %141 %247 %58 %58 -%364 = OpAccessChain %91 %363 %58 -%365 = OpLoad %5 %364 -%366 = OpAccessChain %91 %363 %170 -%367 = OpLoad %5 %366 -%368 = OpCompositeConstruct %4 %365 %367 -%369 = OpBitcast %11 %361 -%370 = OpFunctionCall %5 %42 %368 %369 -%371 = OpVectorExtractDynamic %6 %370 %362 -OpLine %3 148 21 -%372 = OpLoad %7 %249 -OpLine %3 148 21 -OpLine %3 148 21 -%373 = OpAccessChain %99 %247 %58 %372 %58 %58 -%374 = OpLoad %6 %373 -OpLine %3 149 21 -%375 = OpLoad %7 %249 -OpLine %3 149 21 -%376 = OpLoad %7 %249 -%377 = OpAccessChain %99 %247 %58 %375 %58 %376 -%378 = OpLoad %6 %377 -OpLine %3 150 21 -%379 = OpLoad %7 %249 -%380 = OpLoad %7 %249 -OpLine %3 150 21 -%381 = OpAccessChain %141 %247 %58 %379 -%382 = OpAccessChain %91 %381 %58 -%383 = OpLoad %5 %382 -%384 = OpAccessChain %91 %381 %170 -%385 = OpLoad %5 %384 -%386 = OpCompositeConstruct %4 %383 %385 -%387 = OpBitcast %11 %380 -%388 = OpFunctionCall %5 %42 %386 %387 -%389 = OpCompositeExtract %6 %388 0 -OpLine %3 151 21 -%390 = OpLoad %7 %249 -%391 = OpLoad %7 %249 -%392 = OpLoad %7 %249 -%393 = OpAccessChain %141 %247 %58 %390 -%394 = OpAccessChain %91 %393 %58 -%395 = OpLoad %5 %394 -%396 = OpAccessChain %91 %393 %170 -%397 = OpLoad %5 %396 -%398 = OpCompositeConstruct %4 %395 %397 -%399 = OpBitcast %11 %391 -%400 = OpFunctionCall %5 %42 %398 %399 -%401 = OpVectorExtractDynamic %6 %400 %392 +%362 = OpLoad %7 %250 +%363 = OpLoad %7 %250 +%364 = OpLoad %7 %250 +%365 = OpAccessChain %68 %248 %362 +%366 = OpLoad %14 %365 +%367 = OpFunctionCall %4 %43 %366 +%368 = OpBitcast %11 %363 +%369 = OpFunctionCall %5 %50 %367 %368 +%370 = OpVectorExtractDynamic %6 %369 %364 +OpLine %3 148 5 +OpStore %246 %301 +OpLine %3 149 5 +OpLine %3 149 5 +%371 = OpAccessChain %65 %246 %66 +OpStore %371 %304 +OpLine %3 150 5 +%372 = OpLoad %7 %250 +OpLine %3 150 5 +%373 = OpAccessChain %65 %246 %372 +OpStore %373 %308 +OpLine %3 151 5 +OpLine %3 151 5 +OpLine %3 151 5 +%374 = OpAccessChain %78 %246 %66 %66 +OpStore %374 %310 +OpLine %3 152 5 +%375 = OpLoad %7 %250 +OpLine %3 152 5 +%376 = OpAccessChain %78 %246 %66 %375 +OpStore %376 %316 +OpLine %3 153 5 +%377 = OpLoad %7 %250 +OpLine %3 153 5 +OpLine %3 153 5 +%378 = OpAccessChain %78 %246 %377 %66 +OpStore %378 %319 OpLine %3 154 5 -OpStore %245 %303 +%379 = OpLoad %7 %250 +%380 = OpLoad %7 %250 +OpLine %3 154 5 +%381 = OpAccessChain %78 %246 %379 %380 +OpStore %381 %326 OpLine %3 155 5 OpLine %3 155 5 -%402 = OpAccessChain %254 %245 %58 -OpStore %402 %308 +OpLine %3 155 5 +OpLine %3 155 5 +%382 = OpAccessChain %84 %246 %66 %66 %66 +OpStore %382 %328 OpLine %3 156 5 OpLine %3 156 5 +%383 = OpLoad %7 %250 OpLine %3 156 5 -%403 = OpAccessChain %57 %245 %58 %58 %58 -OpStore %403 %314 +%384 = OpAccessChain %84 %246 %66 %66 %383 +OpStore %384 %331 OpLine %3 157 5 -%404 = OpLoad %7 %249 +%385 = OpLoad %7 %250 OpLine %3 157 5 -%405 = OpAccessChain %57 %245 %58 %404 %58 -OpStore %405 %321 +OpLine %3 157 5 +%386 = OpAccessChain %84 %246 %66 %385 %66 +OpStore %386 %338 OpLine %3 158 5 +%387 = OpLoad %7 %250 +%388 = OpLoad %7 %250 OpLine %3 158 5 -OpLine %3 158 5 -OpLine %3 158 5 -%406 = OpAccessChain %70 %245 %58 %58 %58 %58 -OpStore %406 %323 +%389 = OpAccessChain %84 %246 %66 %387 %388 +OpStore %389 %346 +OpLine %3 159 5 +%390 = OpLoad %7 %250 OpLine %3 159 5 OpLine %3 159 5 -%407 = OpLoad %7 %249 OpLine %3 159 5 -%408 = OpAccessChain %70 %245 %58 %58 %58 %407 -OpStore %408 %332 +%391 = OpAccessChain %84 %246 %390 %66 %66 +OpStore %391 %349 OpLine %3 160 5 -%409 = OpLoad %7 %249 +%392 = OpLoad %7 %250 OpLine %3 160 5 +%393 = OpLoad %7 %250 OpLine %3 160 5 -%410 = OpAccessChain %70 %245 %58 %409 %58 %58 -OpStore %410 %335 +%394 = OpAccessChain %84 %246 %392 %66 %393 +OpStore %394 %353 OpLine %3 161 5 -%411 = OpLoad %7 %249 -%412 = OpLoad %7 %249 +%395 = OpLoad %7 %250 +%396 = OpLoad %7 %250 OpLine %3 161 5 -%413 = OpAccessChain %70 %245 %58 %411 %58 %412 -OpStore %413 %345 +OpLine %3 161 5 +%397 = OpAccessChain %84 %246 %395 %396 %66 +OpStore %397 %361 OpLine %3 162 5 +%398 = OpLoad %7 %250 +%399 = OpLoad %7 %250 +%400 = OpLoad %7 %250 OpLine %3 162 5 -OpLine %3 162 5 -OpLine %3 162 5 -OpLine %3 162 5 -%414 = OpAccessChain %76 %245 %58 %58 %58 %58 %58 -OpStore %414 %347 -OpLine %3 163 5 -OpLine %3 163 5 -OpLine %3 163 5 -%415 = OpLoad %7 %249 -OpLine %3 163 5 -%416 = OpAccessChain %76 %245 %58 %58 %58 %58 %415 -OpStore %416 %350 -OpLine %3 164 5 -OpLine %3 164 5 -%417 = OpLoad %7 %249 -OpLine %3 164 5 -OpLine %3 164 5 -%418 = OpAccessChain %76 %245 %58 %58 %58 %417 %58 -OpStore %418 %360 -OpLine %3 165 5 -OpLine %3 165 5 -%419 = OpLoad %7 %249 -%420 = OpLoad %7 %249 -OpLine %3 165 5 -%421 = OpAccessChain %76 %245 %58 %58 %58 %419 %420 -OpStore %421 %371 -OpLine %3 166 5 -%422 = OpLoad %7 %249 -OpLine %3 166 5 -OpLine %3 166 5 -OpLine %3 166 5 -%423 = OpAccessChain %76 %245 %58 %422 %58 %58 %58 -OpStore %423 %374 -OpLine %3 167 5 -%424 = OpLoad %7 %249 -OpLine %3 167 5 -%425 = OpLoad %7 %249 -OpLine %3 167 5 -%426 = OpAccessChain %76 %245 %58 %424 %58 %58 %425 -OpStore %426 %378 -OpLine %3 168 5 -%427 = OpLoad %7 %249 -%428 = OpLoad %7 %249 -OpLine %3 168 5 -OpLine %3 168 5 -%429 = OpAccessChain %76 %245 %58 %427 %58 %428 %58 -OpStore %429 %389 -OpLine %3 169 5 -%430 = OpLoad %7 %249 -%431 = OpLoad %7 %249 -%432 = OpLoad %7 %249 -OpLine %3 169 5 -%433 = OpAccessChain %76 %245 %58 %430 %58 %431 %432 -OpStore %433 %401 +%401 = OpAccessChain %84 %246 %398 %399 %400 +OpStore %401 %370 OpReturn OpFunctionEnd -%435 = OpFunction %2 None %56 -%434 = OpLabel -%436 = OpAccessChain %57 %17 %58 -%437 = OpAccessChain %60 %20 %58 -%438 = OpAccessChain %139 %23 %58 -%439 = OpAccessChain %141 %26 %58 -%440 = OpAccessChain %244 %29 %58 -%441 = OpAccessChain %246 %32 %58 -OpBranch %442 -%442 = OpLabel -OpLine %3 174 5 -%443 = OpFunctionCall %2 %55 -OpLine %3 175 5 -%444 = OpFunctionCall %2 %138 -OpLine %3 176 5 -%445 = OpFunctionCall %2 %243 +%407 = OpFunction %12 None %408 +%409 = OpFunctionParameter %17 +%410 = OpLabel +%411 = OpCompositeExtract %15 %409 0 +%412 = OpFunctionCall %8 %137 %411 +%413 = OpCompositeExtract %15 %409 1 +%414 = OpFunctionCall %8 %137 %413 +%415 = OpCompositeExtract %15 %409 2 +%416 = OpFunctionCall %8 %137 %415 +%417 = OpCompositeExtract %15 %409 3 +%418 = OpFunctionCall %8 %137 %417 +%419 = OpCompositeConstruct %12 %412 %414 %416 %418 +OpReturnValue %419 +OpFunctionEnd +%402 = OpFunction %13 None %403 +%404 = OpFunctionParameter %18 +%405 = OpLabel +%420 = OpCompositeExtract %17 %404 0 +%406 = OpFunctionCall %12 %407 %420 +%421 = OpCompositeConstruct %13 %406 +OpReturnValue %421 +OpFunctionEnd +%423 = OpFunction %2 None %64 +%422 = OpLabel +%429 = OpVariable %73 Function %70 +%425 = OpAccessChain %424 %37 %66 +%427 = OpAccessChain %426 %40 %66 +OpBranch %430 +%430 = OpLabel +OpLine %3 177 5 +%431 = OpLoad %7 %429 +%432 = OpISub %7 %431 %70 +OpLine %3 177 5 +OpStore %429 %432 +OpLine %3 180 17 +%433 = OpLoad %13 %425 +OpLine %3 181 17 +%435 = OpAccessChain %434 %425 %66 +%436 = OpLoad %12 %435 +OpLine %3 182 19 +OpLine %3 182 19 +%437 = OpAccessChain %65 %425 %66 %66 %66 +%438 = OpLoad %4 %437 +OpLine %3 183 19 +%439 = OpLoad %7 %429 +%440 = OpAccessChain %65 %425 %66 %439 %66 +%441 = OpLoad %4 %440 +OpLine %3 184 20 +OpLine %3 184 20 +OpLine %3 184 20 +%442 = OpAccessChain %78 %425 %66 %66 %66 %66 +%443 = OpLoad %5 %442 +OpLine %3 185 20 +OpLine %3 185 20 +%444 = OpLoad %7 %429 +%445 = OpAccessChain %78 %425 %66 %66 %66 %444 +%446 = OpLoad %5 %445 +OpLine %3 186 20 +%447 = OpLoad %7 %429 +OpLine %3 186 20 +%448 = OpAccessChain %78 %425 %66 %447 %66 %66 +%449 = OpLoad %5 %448 +OpLine %3 187 20 +%450 = OpLoad %7 %429 +%451 = OpLoad %7 %429 +%452 = OpAccessChain %78 %425 %66 %450 %66 %451 +%453 = OpLoad %5 %452 +OpLine %3 188 21 +OpLine %3 188 21 +OpLine %3 188 21 +OpLine %3 188 21 +%454 = OpAccessChain %84 %425 %66 %66 %66 %66 %66 +%455 = OpLoad %6 %454 +OpLine %3 189 21 +OpLine %3 189 21 +OpLine %3 189 21 +%456 = OpLoad %7 %429 +%457 = OpAccessChain %84 %425 %66 %66 %66 %66 %456 +%458 = OpLoad %6 %457 +OpLine %3 190 21 +OpLine %3 190 21 +%459 = OpLoad %7 %429 +OpLine %3 190 21 +%460 = OpAccessChain %84 %425 %66 %66 %66 %459 %66 +%461 = OpLoad %6 %460 +OpLine %3 191 21 +OpLine %3 191 21 +%462 = OpLoad %7 %429 +%463 = OpLoad %7 %429 +%464 = OpAccessChain %84 %425 %66 %66 %66 %462 %463 +%465 = OpLoad %6 %464 +OpLine %3 192 21 +%466 = OpLoad %7 %429 +OpLine %3 192 21 +OpLine %3 192 21 +%467 = OpAccessChain %84 %425 %66 %466 %66 %66 %66 +%468 = OpLoad %6 %467 +OpLine %3 193 21 +%469 = OpLoad %7 %429 +OpLine %3 193 21 +%470 = OpLoad %7 %429 +%471 = OpAccessChain %84 %425 %66 %469 %66 %66 %470 +%472 = OpLoad %6 %471 +OpLine %3 194 21 +%473 = OpLoad %7 %429 +%474 = OpLoad %7 %429 +OpLine %3 194 21 +%475 = OpAccessChain %84 %425 %66 %473 %66 %474 %66 +%476 = OpLoad %6 %475 +OpLine %3 195 21 +%477 = OpLoad %7 %429 +%478 = OpLoad %7 %429 +%479 = OpLoad %7 %429 +%480 = OpAccessChain %84 %425 %66 %477 %66 %478 %479 +%481 = OpLoad %6 %480 +OpLine %3 198 17 +%482 = OpLoad %18 %427 +%483 = OpFunctionCall %13 %402 %482 +OpLine %3 199 17 +%486 = OpAccessChain %485 %427 %66 +%487 = OpLoad %17 %486 +%488 = OpFunctionCall %12 %407 %487 +OpLine %3 200 19 +OpLine %3 200 19 +%489 = OpAccessChain %149 %427 %66 %66 +%490 = OpAccessChain %99 %489 %66 +%491 = OpLoad %5 %490 +%492 = OpAccessChain %99 %489 %178 +%493 = OpLoad %5 %492 +%494 = OpCompositeConstruct %4 %491 %493 +OpLine %3 201 19 +%495 = OpLoad %7 %429 +%496 = OpAccessChain %149 %427 %66 %495 +%497 = OpAccessChain %99 %496 %66 +%498 = OpLoad %5 %497 +%499 = OpAccessChain %99 %496 %178 +%500 = OpLoad %5 %499 +%501 = OpCompositeConstruct %4 %498 %500 +OpLine %3 202 20 +OpLine %3 202 20 +OpLine %3 202 20 +%502 = OpAccessChain %99 %427 %66 %66 %66 +%503 = OpLoad %5 %502 +OpLine %3 203 20 +OpLine %3 203 20 +%504 = OpLoad %7 %429 +%505 = OpAccessChain %149 %427 %66 %66 +%506 = OpAccessChain %99 %505 %66 +%507 = OpLoad %5 %506 +%508 = OpAccessChain %99 %505 %178 +%509 = OpLoad %5 %508 +%510 = OpCompositeConstruct %4 %507 %509 +%511 = OpBitcast %11 %504 +%512 = OpFunctionCall %5 %50 %510 %511 +OpLine %3 204 20 +%513 = OpLoad %7 %429 +OpLine %3 204 20 +%514 = OpAccessChain %99 %427 %66 %513 %66 +%515 = OpLoad %5 %514 +OpLine %3 205 20 +%516 = OpLoad %7 %429 +%517 = OpLoad %7 %429 +%518 = OpAccessChain %149 %427 %66 %516 +%519 = OpAccessChain %99 %518 %66 +%520 = OpLoad %5 %519 +%521 = OpAccessChain %99 %518 %178 +%522 = OpLoad %5 %521 +%523 = OpCompositeConstruct %4 %520 %522 +%524 = OpBitcast %11 %517 +%525 = OpFunctionCall %5 %50 %523 %524 +OpLine %3 206 21 +OpLine %3 206 21 +OpLine %3 206 21 +OpLine %3 206 21 +%526 = OpAccessChain %107 %427 %66 %66 %66 %66 +%527 = OpLoad %6 %526 +OpLine %3 207 21 +OpLine %3 207 21 +OpLine %3 207 21 +%528 = OpLoad %7 %429 +%529 = OpAccessChain %107 %427 %66 %66 %66 %528 +%530 = OpLoad %6 %529 +OpLine %3 208 21 +OpLine %3 208 21 +%531 = OpLoad %7 %429 +OpLine %3 208 21 +%532 = OpAccessChain %149 %427 %66 %66 +%533 = OpAccessChain %99 %532 %66 +%534 = OpLoad %5 %533 +%535 = OpAccessChain %99 %532 %178 +%536 = OpLoad %5 %535 +%537 = OpCompositeConstruct %4 %534 %536 +%538 = OpBitcast %11 %531 +%539 = OpFunctionCall %5 %50 %537 %538 +%540 = OpCompositeExtract %6 %539 0 +OpLine %3 209 21 +OpLine %3 209 21 +%541 = OpLoad %7 %429 +%542 = OpLoad %7 %429 +%543 = OpAccessChain %149 %427 %66 %66 +%544 = OpAccessChain %99 %543 %66 +%545 = OpLoad %5 %544 +%546 = OpAccessChain %99 %543 %178 +%547 = OpLoad %5 %546 +%548 = OpCompositeConstruct %4 %545 %547 +%549 = OpBitcast %11 %541 +%550 = OpFunctionCall %5 %50 %548 %549 +%551 = OpVectorExtractDynamic %6 %550 %542 +OpLine %3 210 21 +%552 = OpLoad %7 %429 +OpLine %3 210 21 +OpLine %3 210 21 +%553 = OpAccessChain %107 %427 %66 %552 %66 %66 +%554 = OpLoad %6 %553 +OpLine %3 211 21 +%555 = OpLoad %7 %429 +OpLine %3 211 21 +%556 = OpLoad %7 %429 +%557 = OpAccessChain %107 %427 %66 %555 %66 %556 +%558 = OpLoad %6 %557 +OpLine %3 212 21 +%559 = OpLoad %7 %429 +%560 = OpLoad %7 %429 +OpLine %3 212 21 +%561 = OpAccessChain %149 %427 %66 %559 +%562 = OpAccessChain %99 %561 %66 +%563 = OpLoad %5 %562 +%564 = OpAccessChain %99 %561 %178 +%565 = OpLoad %5 %564 +%566 = OpCompositeConstruct %4 %563 %565 +%567 = OpBitcast %11 %560 +%568 = OpFunctionCall %5 %50 %566 %567 +%569 = OpCompositeExtract %6 %568 0 +OpLine %3 213 21 +%570 = OpLoad %7 %429 +%571 = OpLoad %7 %429 +%572 = OpLoad %7 %429 +%573 = OpAccessChain %149 %427 %66 %570 +%574 = OpAccessChain %99 %573 %66 +%575 = OpLoad %5 %574 +%576 = OpAccessChain %99 %573 %178 +%577 = OpLoad %5 %576 +%578 = OpCompositeConstruct %4 %575 %577 +%579 = OpBitcast %11 %571 +%580 = OpFunctionCall %5 %50 %578 %579 +%581 = OpVectorExtractDynamic %6 %580 %572 +OpLine %3 216 5 +OpStore %425 %483 +OpLine %3 217 5 +OpLine %3 217 5 +%582 = OpAccessChain %434 %425 %66 +OpStore %582 %488 +OpLine %3 218 5 +OpLine %3 218 5 +OpLine %3 218 5 +%583 = OpAccessChain %65 %425 %66 %66 %66 +OpStore %583 %494 +OpLine %3 219 5 +%584 = OpLoad %7 %429 +OpLine %3 219 5 +%585 = OpAccessChain %65 %425 %66 %584 %66 +OpStore %585 %501 +OpLine %3 220 5 +OpLine %3 220 5 +OpLine %3 220 5 +OpLine %3 220 5 +%586 = OpAccessChain %78 %425 %66 %66 %66 %66 +OpStore %586 %503 +OpLine %3 221 5 +OpLine %3 221 5 +%587 = OpLoad %7 %429 +OpLine %3 221 5 +%588 = OpAccessChain %78 %425 %66 %66 %66 %587 +OpStore %588 %512 +OpLine %3 222 5 +%589 = OpLoad %7 %429 +OpLine %3 222 5 +OpLine %3 222 5 +%590 = OpAccessChain %78 %425 %66 %589 %66 %66 +OpStore %590 %515 +OpLine %3 223 5 +%591 = OpLoad %7 %429 +%592 = OpLoad %7 %429 +OpLine %3 223 5 +%593 = OpAccessChain %78 %425 %66 %591 %66 %592 +OpStore %593 %525 +OpLine %3 224 5 +OpLine %3 224 5 +OpLine %3 224 5 +OpLine %3 224 5 +OpLine %3 224 5 +%594 = OpAccessChain %84 %425 %66 %66 %66 %66 %66 +OpStore %594 %527 +OpLine %3 225 5 +OpLine %3 225 5 +OpLine %3 225 5 +%595 = OpLoad %7 %429 +OpLine %3 225 5 +%596 = OpAccessChain %84 %425 %66 %66 %66 %66 %595 +OpStore %596 %530 +OpLine %3 226 5 +OpLine %3 226 5 +%597 = OpLoad %7 %429 +OpLine %3 226 5 +OpLine %3 226 5 +%598 = OpAccessChain %84 %425 %66 %66 %66 %597 %66 +OpStore %598 %540 +OpLine %3 227 5 +OpLine %3 227 5 +%599 = OpLoad %7 %429 +%600 = OpLoad %7 %429 +OpLine %3 227 5 +%601 = OpAccessChain %84 %425 %66 %66 %66 %599 %600 +OpStore %601 %551 +OpLine %3 228 5 +%602 = OpLoad %7 %429 +OpLine %3 228 5 +OpLine %3 228 5 +OpLine %3 228 5 +%603 = OpAccessChain %84 %425 %66 %602 %66 %66 %66 +OpStore %603 %554 +OpLine %3 229 5 +%604 = OpLoad %7 %429 +OpLine %3 229 5 +%605 = OpLoad %7 %429 +OpLine %3 229 5 +%606 = OpAccessChain %84 %425 %66 %604 %66 %66 %605 +OpStore %606 %558 +OpLine %3 230 5 +%607 = OpLoad %7 %429 +%608 = OpLoad %7 %429 +OpLine %3 230 5 +OpLine %3 230 5 +%609 = OpAccessChain %84 %425 %66 %607 %66 %608 %66 +OpStore %609 %569 +OpLine %3 231 5 +%610 = OpLoad %7 %429 +%611 = OpLoad %7 %429 +%612 = OpLoad %7 %429 +OpLine %3 231 5 +%613 = OpAccessChain %84 %425 %66 %610 %66 %611 %612 +OpStore %613 %581 +OpReturn +OpFunctionEnd +%615 = OpFunction %2 None %64 +%614 = OpLabel +%616 = OpAccessChain %65 %19 %66 +%617 = OpAccessChain %68 %22 %66 +%618 = OpAccessChain %147 %25 %66 +%619 = OpAccessChain %149 %28 %66 +%620 = OpAccessChain %245 %31 %66 +%621 = OpAccessChain %247 %34 %66 +%622 = OpAccessChain %424 %37 %66 +%623 = OpAccessChain %426 %40 %66 +OpBranch %624 +%624 = OpLabel +OpLine %3 236 5 +%625 = OpFunctionCall %2 %63 +OpLine %3 237 5 +%626 = OpFunctionCall %2 %146 +OpLine %3 238 5 +%627 = OpFunctionCall %2 %244 +OpLine %3 239 5 +%628 = OpFunctionCall %2 %423 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/naga/tests/out/spv/wgsl-mat_cx3.spvasm b/naga/tests/out/spv/wgsl-mat_cx3.spvasm index 3fe4bee6c..341a52b5c 100644 --- a/naga/tests/out/spv/wgsl-mat_cx3.spvasm +++ b/naga/tests/out/spv/wgsl-mat_cx3.spvasm @@ -1,46 +1,59 @@ ; SPIR-V ; Version: 1.1 ; Generator: rspirv -; Bound: 309 +; Bound: 452 OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint GLCompute %298 "main" -OpExecutionMode %298 LocalSize 1 1 1 +OpEntryPoint GLCompute %438 "main" +OpExecutionMode %438 LocalSize 1 1 1 OpMemberDecorate %7 0 Offset 0 OpMemberDecorate %7 0 ColMajor OpMemberDecorate %7 0 MatrixStride 16 OpDecorate %8 ArrayStride 48 -OpMemberDecorate %11 0 Offset 0 -OpDecorate %12 DescriptorSet 0 -OpDecorate %12 Binding 0 -OpDecorate %13 Block -OpMemberDecorate %13 0 Offset 0 -OpMemberDecorate %13 0 ColMajor -OpMemberDecorate %13 0 MatrixStride 16 -OpDecorate %15 DescriptorSet 0 -OpDecorate %15 Binding 1 -OpDecorate %16 Block -OpMemberDecorate %16 0 Offset 0 -OpMemberDecorate %16 0 ColMajor -OpMemberDecorate %16 0 MatrixStride 16 -OpDecorate %18 DescriptorSet 1 -OpDecorate %18 Binding 0 -OpDecorate %19 Block -OpMemberDecorate %19 0 Offset 0 -OpDecorate %21 DescriptorSet 1 -OpDecorate %21 Binding 1 -OpDecorate %22 Block -OpMemberDecorate %22 0 Offset 0 -OpDecorate %24 DescriptorSet 2 -OpDecorate %24 Binding 0 -OpDecorate %25 Block -OpMemberDecorate %25 0 Offset 0 -OpDecorate %27 DescriptorSet 2 -OpDecorate %27 Binding 1 -OpDecorate %28 Block -OpMemberDecorate %28 0 Offset 0 +OpDecorate %11 ArrayStride 48 +OpMemberDecorate %12 0 Offset 0 +OpDecorate %13 DescriptorSet 0 +OpDecorate %13 Binding 0 +OpDecorate %14 Block +OpMemberDecorate %14 0 Offset 0 +OpMemberDecorate %14 0 ColMajor +OpMemberDecorate %14 0 MatrixStride 16 +OpDecorate %16 DescriptorSet 0 +OpDecorate %16 Binding 1 +OpDecorate %17 Block +OpMemberDecorate %17 0 Offset 0 +OpMemberDecorate %17 0 ColMajor +OpMemberDecorate %17 0 MatrixStride 16 +OpDecorate %19 DescriptorSet 1 +OpDecorate %19 Binding 0 +OpDecorate %20 Block +OpMemberDecorate %20 0 Offset 0 +OpDecorate %22 DescriptorSet 1 +OpDecorate %22 Binding 1 +OpDecorate %23 Block +OpMemberDecorate %23 0 Offset 0 +OpDecorate %25 DescriptorSet 2 +OpDecorate %25 Binding 0 +OpDecorate %26 Block +OpMemberDecorate %26 0 Offset 0 +OpMemberDecorate %26 0 ColMajor +OpMemberDecorate %26 0 MatrixStride 16 +OpDecorate %28 DescriptorSet 2 +OpDecorate %28 Binding 1 +OpDecorate %29 Block +OpMemberDecorate %29 0 Offset 0 +OpMemberDecorate %29 0 ColMajor +OpMemberDecorate %29 0 MatrixStride 16 +OpDecorate %31 DescriptorSet 3 +OpDecorate %31 Binding 0 +OpDecorate %32 Block +OpMemberDecorate %32 0 Offset 0 +OpDecorate %34 DescriptorSet 3 +OpDecorate %34 Binding 1 +OpDecorate %35 Block +OpMemberDecorate %35 0 Offset 0 %2 = OpTypeVoid %5 = OpTypeFloat 32 %4 = OpTypeVector %5 3 @@ -49,348 +62,510 @@ OpMemberDecorate %28 0 Offset 0 %7 = OpTypeStruct %3 %10 = OpTypeInt 32 0 %9 = OpConstant %10 4 -%8 = OpTypeArray %7 %9 -%11 = OpTypeStruct %8 -%13 = OpTypeStruct %3 -%14 = OpTypePointer StorageBuffer %13 -%12 = OpVariable %14 StorageBuffer -%16 = OpTypeStruct %3 -%17 = OpTypePointer Uniform %16 -%15 = OpVariable %17 Uniform -%19 = OpTypeStruct %7 -%20 = OpTypePointer StorageBuffer %19 -%18 = OpVariable %20 StorageBuffer -%22 = OpTypeStruct %7 -%23 = OpTypePointer Uniform %22 -%21 = OpVariable %23 Uniform -%25 = OpTypeStruct %11 -%26 = OpTypePointer StorageBuffer %25 -%24 = OpVariable %26 StorageBuffer -%28 = OpTypeStruct %11 -%29 = OpTypePointer Uniform %28 -%27 = OpVariable %29 Uniform -%32 = OpTypeFunction %2 -%33 = OpTypePointer StorageBuffer %3 -%34 = OpConstant %10 0 -%36 = OpTypePointer Uniform %3 -%38 = OpConstant %6 1 -%40 = OpTypePointer Function %6 -%45 = OpTypePointer StorageBuffer %4 -%51 = OpTypePointer StorageBuffer %5 -%65 = OpTypePointer Uniform %4 -%71 = OpTypePointer Uniform %5 -%97 = OpTypePointer StorageBuffer %7 -%99 = OpTypePointer Uniform %7 -%159 = OpTypePointer StorageBuffer %11 -%161 = OpTypePointer Uniform %11 -%168 = OpTypePointer StorageBuffer %8 -%217 = OpTypePointer Uniform %8 -%31 = OpFunction %2 None %32 -%30 = OpLabel -%39 = OpVariable %40 Function %38 -%35 = OpAccessChain %33 %12 %34 -%37 = OpAccessChain %36 %15 %34 -OpBranch %41 -%41 = OpLabel -%42 = OpLoad %6 %39 -%43 = OpISub %6 %42 %38 -OpStore %39 %43 -%44 = OpLoad %3 %35 -%46 = OpAccessChain %45 %35 %34 -%47 = OpLoad %4 %46 -%48 = OpLoad %6 %39 -%49 = OpAccessChain %45 %35 %48 -%50 = OpLoad %4 %49 -%52 = OpAccessChain %51 %35 %34 %34 -%53 = OpLoad %5 %52 -%54 = OpLoad %6 %39 -%55 = OpAccessChain %51 %35 %34 %54 -%56 = OpLoad %5 %55 -%57 = OpLoad %6 %39 -%58 = OpAccessChain %51 %35 %57 %34 -%59 = OpLoad %5 %58 -%60 = OpLoad %6 %39 -%61 = OpLoad %6 %39 -%62 = OpAccessChain %51 %35 %60 %61 +%8 = OpTypeArray %3 %9 +%11 = OpTypeArray %7 %9 +%12 = OpTypeStruct %11 +%14 = OpTypeStruct %3 +%15 = OpTypePointer StorageBuffer %14 +%13 = OpVariable %15 StorageBuffer +%17 = OpTypeStruct %3 +%18 = OpTypePointer Uniform %17 +%16 = OpVariable %18 Uniform +%20 = OpTypeStruct %7 +%21 = OpTypePointer StorageBuffer %20 +%19 = OpVariable %21 StorageBuffer +%23 = OpTypeStruct %7 +%24 = OpTypePointer Uniform %23 +%22 = OpVariable %24 Uniform +%26 = OpTypeStruct %8 +%27 = OpTypePointer StorageBuffer %26 +%25 = OpVariable %27 StorageBuffer +%29 = OpTypeStruct %8 +%30 = OpTypePointer Uniform %29 +%28 = OpVariable %30 Uniform +%32 = OpTypeStruct %12 +%33 = OpTypePointer StorageBuffer %32 +%31 = OpVariable %33 StorageBuffer +%35 = OpTypeStruct %12 +%36 = OpTypePointer Uniform %35 +%34 = OpVariable %36 Uniform +%39 = OpTypeFunction %2 +%40 = OpTypePointer StorageBuffer %3 +%41 = OpConstant %10 0 +%43 = OpTypePointer Uniform %3 +%45 = OpConstant %6 1 +%47 = OpTypePointer Function %6 +%52 = OpTypePointer StorageBuffer %4 +%58 = OpTypePointer StorageBuffer %5 +%72 = OpTypePointer Uniform %4 +%78 = OpTypePointer Uniform %5 +%104 = OpTypePointer StorageBuffer %7 +%106 = OpTypePointer Uniform %7 +%166 = OpTypePointer StorageBuffer %8 +%168 = OpTypePointer Uniform %8 +%299 = OpTypePointer StorageBuffer %12 +%301 = OpTypePointer Uniform %12 +%308 = OpTypePointer StorageBuffer %11 +%357 = OpTypePointer Uniform %11 +%38 = OpFunction %2 None %39 +%37 = OpLabel +%46 = OpVariable %47 Function %45 +%42 = OpAccessChain %40 %13 %41 +%44 = OpAccessChain %43 %16 %41 +OpBranch %48 +%48 = OpLabel +%49 = OpLoad %6 %46 +%50 = OpISub %6 %49 %45 +OpStore %46 %50 +%51 = OpLoad %3 %42 +%53 = OpAccessChain %52 %42 %41 +%54 = OpLoad %4 %53 +%55 = OpLoad %6 %46 +%56 = OpAccessChain %52 %42 %55 +%57 = OpLoad %4 %56 +%59 = OpAccessChain %58 %42 %41 %41 +%60 = OpLoad %5 %59 +%61 = OpLoad %6 %46 +%62 = OpAccessChain %58 %42 %41 %61 %63 = OpLoad %5 %62 -%64 = OpLoad %3 %37 -%66 = OpAccessChain %65 %37 %34 -%67 = OpLoad %4 %66 -%68 = OpLoad %6 %39 -%69 = OpAccessChain %65 %37 %68 -%70 = OpLoad %4 %69 -%72 = OpAccessChain %71 %37 %34 %34 -%73 = OpLoad %5 %72 -%74 = OpLoad %6 %39 -%75 = OpAccessChain %71 %37 %34 %74 -%76 = OpLoad %5 %75 -%77 = OpLoad %6 %39 -%78 = OpAccessChain %71 %37 %77 %34 -%79 = OpLoad %5 %78 -%80 = OpLoad %6 %39 -%81 = OpLoad %6 %39 -%82 = OpAccessChain %71 %37 %80 %81 +%64 = OpLoad %6 %46 +%65 = OpAccessChain %58 %42 %64 %41 +%66 = OpLoad %5 %65 +%67 = OpLoad %6 %46 +%68 = OpLoad %6 %46 +%69 = OpAccessChain %58 %42 %67 %68 +%70 = OpLoad %5 %69 +%71 = OpLoad %3 %44 +%73 = OpAccessChain %72 %44 %41 +%74 = OpLoad %4 %73 +%75 = OpLoad %6 %46 +%76 = OpAccessChain %72 %44 %75 +%77 = OpLoad %4 %76 +%79 = OpAccessChain %78 %44 %41 %41 +%80 = OpLoad %5 %79 +%81 = OpLoad %6 %46 +%82 = OpAccessChain %78 %44 %41 %81 %83 = OpLoad %5 %82 -OpStore %35 %64 -%84 = OpAccessChain %45 %35 %34 -OpStore %84 %67 -%85 = OpLoad %6 %39 -%86 = OpAccessChain %45 %35 %85 -OpStore %86 %70 -%87 = OpAccessChain %51 %35 %34 %34 -OpStore %87 %73 -%88 = OpLoad %6 %39 -%89 = OpAccessChain %51 %35 %34 %88 -OpStore %89 %76 -%90 = OpLoad %6 %39 -%91 = OpAccessChain %51 %35 %90 %34 -OpStore %91 %79 -%92 = OpLoad %6 %39 -%93 = OpLoad %6 %39 -%94 = OpAccessChain %51 %35 %92 %93 -OpStore %94 %83 +%84 = OpLoad %6 %46 +%85 = OpAccessChain %78 %44 %84 %41 +%86 = OpLoad %5 %85 +%87 = OpLoad %6 %46 +%88 = OpLoad %6 %46 +%89 = OpAccessChain %78 %44 %87 %88 +%90 = OpLoad %5 %89 +OpStore %42 %71 +%91 = OpAccessChain %52 %42 %41 +OpStore %91 %74 +%92 = OpLoad %6 %46 +%93 = OpAccessChain %52 %42 %92 +OpStore %93 %77 +%94 = OpAccessChain %58 %42 %41 %41 +OpStore %94 %80 +%95 = OpLoad %6 %46 +%96 = OpAccessChain %58 %42 %41 %95 +OpStore %96 %83 +%97 = OpLoad %6 %46 +%98 = OpAccessChain %58 %42 %97 %41 +OpStore %98 %86 +%99 = OpLoad %6 %46 +%100 = OpLoad %6 %46 +%101 = OpAccessChain %58 %42 %99 %100 +OpStore %101 %90 OpReturn OpFunctionEnd -%96 = OpFunction %2 None %32 -%95 = OpLabel -%101 = OpVariable %40 Function %38 -%98 = OpAccessChain %97 %18 %34 -%100 = OpAccessChain %99 %21 %34 -OpBranch %102 +%103 = OpFunction %2 None %39 %102 = OpLabel -%103 = OpLoad %6 %101 -%104 = OpISub %6 %103 %38 -OpStore %101 %104 -%105 = OpLoad %7 %98 -%106 = OpAccessChain %33 %98 %34 -%107 = OpLoad %3 %106 -%108 = OpAccessChain %45 %98 %34 %34 -%109 = OpLoad %4 %108 -%110 = OpLoad %6 %101 -%111 = OpAccessChain %45 %98 %34 %110 -%112 = OpLoad %4 %111 -%113 = OpAccessChain %51 %98 %34 %34 %34 -%114 = OpLoad %5 %113 -%115 = OpLoad %6 %101 -%116 = OpAccessChain %51 %98 %34 %34 %115 -%117 = OpLoad %5 %116 -%118 = OpLoad %6 %101 -%119 = OpAccessChain %51 %98 %34 %118 %34 -%120 = OpLoad %5 %119 -%121 = OpLoad %6 %101 -%122 = OpLoad %6 %101 -%123 = OpAccessChain %51 %98 %34 %121 %122 +%108 = OpVariable %47 Function %45 +%105 = OpAccessChain %104 %19 %41 +%107 = OpAccessChain %106 %22 %41 +OpBranch %109 +%109 = OpLabel +%110 = OpLoad %6 %108 +%111 = OpISub %6 %110 %45 +OpStore %108 %111 +%112 = OpLoad %7 %105 +%113 = OpAccessChain %40 %105 %41 +%114 = OpLoad %3 %113 +%115 = OpAccessChain %52 %105 %41 %41 +%116 = OpLoad %4 %115 +%117 = OpLoad %6 %108 +%118 = OpAccessChain %52 %105 %41 %117 +%119 = OpLoad %4 %118 +%120 = OpAccessChain %58 %105 %41 %41 %41 +%121 = OpLoad %5 %120 +%122 = OpLoad %6 %108 +%123 = OpAccessChain %58 %105 %41 %41 %122 %124 = OpLoad %5 %123 -%125 = OpLoad %7 %100 -%126 = OpAccessChain %36 %100 %34 -%127 = OpLoad %3 %126 -%128 = OpAccessChain %65 %100 %34 %34 -%129 = OpLoad %4 %128 -%130 = OpLoad %6 %101 -%131 = OpAccessChain %65 %100 %34 %130 -%132 = OpLoad %4 %131 -%133 = OpAccessChain %71 %100 %34 %34 %34 -%134 = OpLoad %5 %133 -%135 = OpLoad %6 %101 -%136 = OpAccessChain %71 %100 %34 %34 %135 -%137 = OpLoad %5 %136 -%138 = OpLoad %6 %101 -%139 = OpAccessChain %71 %100 %34 %138 %34 -%140 = OpLoad %5 %139 -%141 = OpLoad %6 %101 -%142 = OpLoad %6 %101 -%143 = OpAccessChain %71 %100 %34 %141 %142 +%125 = OpLoad %6 %108 +%126 = OpAccessChain %58 %105 %41 %125 %41 +%127 = OpLoad %5 %126 +%128 = OpLoad %6 %108 +%129 = OpLoad %6 %108 +%130 = OpAccessChain %58 %105 %41 %128 %129 +%131 = OpLoad %5 %130 +%132 = OpLoad %7 %107 +%133 = OpAccessChain %43 %107 %41 +%134 = OpLoad %3 %133 +%135 = OpAccessChain %72 %107 %41 %41 +%136 = OpLoad %4 %135 +%137 = OpLoad %6 %108 +%138 = OpAccessChain %72 %107 %41 %137 +%139 = OpLoad %4 %138 +%140 = OpAccessChain %78 %107 %41 %41 %41 +%141 = OpLoad %5 %140 +%142 = OpLoad %6 %108 +%143 = OpAccessChain %78 %107 %41 %41 %142 %144 = OpLoad %5 %143 -OpStore %98 %125 -%145 = OpAccessChain %33 %98 %34 -OpStore %145 %127 -%146 = OpAccessChain %45 %98 %34 %34 -OpStore %146 %129 -%147 = OpLoad %6 %101 -%148 = OpAccessChain %45 %98 %34 %147 -OpStore %148 %132 -%149 = OpAccessChain %51 %98 %34 %34 %34 -OpStore %149 %134 -%150 = OpLoad %6 %101 -%151 = OpAccessChain %51 %98 %34 %34 %150 -OpStore %151 %137 -%152 = OpLoad %6 %101 -%153 = OpAccessChain %51 %98 %34 %152 %34 -OpStore %153 %140 -%154 = OpLoad %6 %101 -%155 = OpLoad %6 %101 -%156 = OpAccessChain %51 %98 %34 %154 %155 -OpStore %156 %144 +%145 = OpLoad %6 %108 +%146 = OpAccessChain %78 %107 %41 %145 %41 +%147 = OpLoad %5 %146 +%148 = OpLoad %6 %108 +%149 = OpLoad %6 %108 +%150 = OpAccessChain %78 %107 %41 %148 %149 +%151 = OpLoad %5 %150 +OpStore %105 %132 +%152 = OpAccessChain %40 %105 %41 +OpStore %152 %134 +%153 = OpAccessChain %52 %105 %41 %41 +OpStore %153 %136 +%154 = OpLoad %6 %108 +%155 = OpAccessChain %52 %105 %41 %154 +OpStore %155 %139 +%156 = OpAccessChain %58 %105 %41 %41 %41 +OpStore %156 %141 +%157 = OpLoad %6 %108 +%158 = OpAccessChain %58 %105 %41 %41 %157 +OpStore %158 %144 +%159 = OpLoad %6 %108 +%160 = OpAccessChain %58 %105 %41 %159 %41 +OpStore %160 %147 +%161 = OpLoad %6 %108 +%162 = OpLoad %6 %108 +%163 = OpAccessChain %58 %105 %41 %161 %162 +OpStore %163 %151 OpReturn OpFunctionEnd -%158 = OpFunction %2 None %32 -%157 = OpLabel -%163 = OpVariable %40 Function %38 -%160 = OpAccessChain %159 %24 %34 -%162 = OpAccessChain %161 %27 %34 -OpBranch %164 +%165 = OpFunction %2 None %39 %164 = OpLabel -%165 = OpLoad %6 %163 -%166 = OpISub %6 %165 %38 -OpStore %163 %166 -%167 = OpLoad %11 %160 -%169 = OpAccessChain %168 %160 %34 -%170 = OpLoad %8 %169 -%171 = OpAccessChain %33 %160 %34 %34 %34 -%172 = OpLoad %3 %171 -%173 = OpLoad %6 %163 -%174 = OpAccessChain %33 %160 %34 %173 %34 -%175 = OpLoad %3 %174 -%176 = OpAccessChain %45 %160 %34 %34 %34 %34 -%177 = OpLoad %4 %176 -%178 = OpLoad %6 %163 -%179 = OpAccessChain %45 %160 %34 %34 %34 %178 -%180 = OpLoad %4 %179 -%181 = OpLoad %6 %163 -%182 = OpAccessChain %45 %160 %34 %181 %34 %34 -%183 = OpLoad %4 %182 -%184 = OpLoad %6 %163 -%185 = OpLoad %6 %163 -%186 = OpAccessChain %45 %160 %34 %184 %34 %185 +%170 = OpVariable %47 Function %45 +%167 = OpAccessChain %166 %25 %41 +%169 = OpAccessChain %168 %28 %41 +OpBranch %171 +%171 = OpLabel +%172 = OpLoad %6 %170 +%173 = OpISub %6 %172 %45 +OpStore %170 %173 +%174 = OpLoad %8 %167 +%175 = OpAccessChain %40 %167 %41 +%176 = OpLoad %3 %175 +%177 = OpLoad %6 %170 +%178 = OpAccessChain %40 %167 %177 +%179 = OpLoad %3 %178 +%180 = OpAccessChain %52 %167 %41 %41 +%181 = OpLoad %4 %180 +%182 = OpLoad %6 %170 +%183 = OpAccessChain %52 %167 %41 %182 +%184 = OpLoad %4 %183 +%185 = OpLoad %6 %170 +%186 = OpAccessChain %52 %167 %185 %41 %187 = OpLoad %4 %186 -%188 = OpAccessChain %51 %160 %34 %34 %34 %34 %34 -%189 = OpLoad %5 %188 -%190 = OpLoad %6 %163 -%191 = OpAccessChain %51 %160 %34 %34 %34 %34 %190 -%192 = OpLoad %5 %191 -%193 = OpLoad %6 %163 -%194 = OpAccessChain %51 %160 %34 %34 %34 %193 %34 -%195 = OpLoad %5 %194 -%196 = OpLoad %6 %163 -%197 = OpLoad %6 %163 -%198 = OpAccessChain %51 %160 %34 %34 %34 %196 %197 +%188 = OpLoad %6 %170 +%189 = OpLoad %6 %170 +%190 = OpAccessChain %52 %167 %188 %189 +%191 = OpLoad %4 %190 +%192 = OpAccessChain %58 %167 %41 %41 %41 +%193 = OpLoad %5 %192 +%194 = OpLoad %6 %170 +%195 = OpAccessChain %58 %167 %41 %41 %194 +%196 = OpLoad %5 %195 +%197 = OpLoad %6 %170 +%198 = OpAccessChain %58 %167 %41 %197 %41 %199 = OpLoad %5 %198 -%200 = OpLoad %6 %163 -%201 = OpAccessChain %51 %160 %34 %200 %34 %34 %34 -%202 = OpLoad %5 %201 -%203 = OpLoad %6 %163 -%204 = OpLoad %6 %163 -%205 = OpAccessChain %51 %160 %34 %203 %34 %34 %204 +%200 = OpLoad %6 %170 +%201 = OpLoad %6 %170 +%202 = OpAccessChain %58 %167 %41 %200 %201 +%203 = OpLoad %5 %202 +%204 = OpLoad %6 %170 +%205 = OpAccessChain %58 %167 %204 %41 %41 %206 = OpLoad %5 %205 -%207 = OpLoad %6 %163 -%208 = OpLoad %6 %163 -%209 = OpAccessChain %51 %160 %34 %207 %34 %208 %34 +%207 = OpLoad %6 %170 +%208 = OpLoad %6 %170 +%209 = OpAccessChain %58 %167 %207 %41 %208 %210 = OpLoad %5 %209 -%211 = OpLoad %6 %163 -%212 = OpLoad %6 %163 -%213 = OpLoad %6 %163 -%214 = OpAccessChain %51 %160 %34 %211 %34 %212 %213 -%215 = OpLoad %5 %214 -%216 = OpLoad %11 %162 -%218 = OpAccessChain %217 %162 %34 -%219 = OpLoad %8 %218 -%220 = OpAccessChain %36 %162 %34 %34 %34 -%221 = OpLoad %3 %220 -%222 = OpLoad %6 %163 -%223 = OpAccessChain %36 %162 %34 %222 %34 -%224 = OpLoad %3 %223 -%225 = OpAccessChain %65 %162 %34 %34 %34 %34 -%226 = OpLoad %4 %225 -%227 = OpLoad %6 %163 -%228 = OpAccessChain %65 %162 %34 %34 %34 %227 -%229 = OpLoad %4 %228 -%230 = OpLoad %6 %163 -%231 = OpAccessChain %65 %162 %34 %230 %34 %34 -%232 = OpLoad %4 %231 -%233 = OpLoad %6 %163 -%234 = OpLoad %6 %163 -%235 = OpAccessChain %65 %162 %34 %233 %34 %234 -%236 = OpLoad %4 %235 -%237 = OpAccessChain %71 %162 %34 %34 %34 %34 %34 -%238 = OpLoad %5 %237 -%239 = OpLoad %6 %163 -%240 = OpAccessChain %71 %162 %34 %34 %34 %34 %239 -%241 = OpLoad %5 %240 -%242 = OpLoad %6 %163 -%243 = OpAccessChain %71 %162 %34 %34 %34 %242 %34 -%244 = OpLoad %5 %243 -%245 = OpLoad %6 %163 -%246 = OpLoad %6 %163 -%247 = OpAccessChain %71 %162 %34 %34 %34 %245 %246 -%248 = OpLoad %5 %247 -%249 = OpLoad %6 %163 -%250 = OpAccessChain %71 %162 %34 %249 %34 %34 %34 -%251 = OpLoad %5 %250 -%252 = OpLoad %6 %163 -%253 = OpLoad %6 %163 -%254 = OpAccessChain %71 %162 %34 %252 %34 %34 %253 -%255 = OpLoad %5 %254 -%256 = OpLoad %6 %163 -%257 = OpLoad %6 %163 -%258 = OpAccessChain %71 %162 %34 %256 %34 %257 %34 -%259 = OpLoad %5 %258 -%260 = OpLoad %6 %163 -%261 = OpLoad %6 %163 -%262 = OpLoad %6 %163 -%263 = OpAccessChain %71 %162 %34 %260 %34 %261 %262 -%264 = OpLoad %5 %263 -OpStore %160 %216 -%265 = OpAccessChain %168 %160 %34 -OpStore %265 %219 -%266 = OpAccessChain %33 %160 %34 %34 %34 -OpStore %266 %221 -%267 = OpLoad %6 %163 -%268 = OpAccessChain %33 %160 %34 %267 %34 -OpStore %268 %224 -%269 = OpAccessChain %45 %160 %34 %34 %34 %34 -OpStore %269 %226 -%270 = OpLoad %6 %163 -%271 = OpAccessChain %45 %160 %34 %34 %34 %270 -OpStore %271 %229 -%272 = OpLoad %6 %163 -%273 = OpAccessChain %45 %160 %34 %272 %34 %34 -OpStore %273 %232 -%274 = OpLoad %6 %163 -%275 = OpLoad %6 %163 -%276 = OpAccessChain %45 %160 %34 %274 %34 %275 -OpStore %276 %236 -%277 = OpAccessChain %51 %160 %34 %34 %34 %34 %34 -OpStore %277 %238 -%278 = OpLoad %6 %163 -%279 = OpAccessChain %51 %160 %34 %34 %34 %34 %278 -OpStore %279 %241 -%280 = OpLoad %6 %163 -%281 = OpAccessChain %51 %160 %34 %34 %34 %280 %34 -OpStore %281 %244 -%282 = OpLoad %6 %163 -%283 = OpLoad %6 %163 -%284 = OpAccessChain %51 %160 %34 %34 %34 %282 %283 -OpStore %284 %248 -%285 = OpLoad %6 %163 -%286 = OpAccessChain %51 %160 %34 %285 %34 %34 %34 -OpStore %286 %251 -%287 = OpLoad %6 %163 -%288 = OpLoad %6 %163 -%289 = OpAccessChain %51 %160 %34 %287 %34 %34 %288 -OpStore %289 %255 -%290 = OpLoad %6 %163 -%291 = OpLoad %6 %163 -%292 = OpAccessChain %51 %160 %34 %290 %34 %291 %34 -OpStore %292 %259 -%293 = OpLoad %6 %163 -%294 = OpLoad %6 %163 -%295 = OpLoad %6 %163 -%296 = OpAccessChain %51 %160 %34 %293 %34 %294 %295 -OpStore %296 %264 +%211 = OpLoad %6 %170 +%212 = OpLoad %6 %170 +%213 = OpAccessChain %58 %167 %211 %212 %41 +%214 = OpLoad %5 %213 +%215 = OpLoad %6 %170 +%216 = OpLoad %6 %170 +%217 = OpLoad %6 %170 +%218 = OpAccessChain %58 %167 %215 %216 %217 +%219 = OpLoad %5 %218 +%220 = OpLoad %8 %169 +%221 = OpAccessChain %43 %169 %41 +%222 = OpLoad %3 %221 +%223 = OpLoad %6 %170 +%224 = OpAccessChain %43 %169 %223 +%225 = OpLoad %3 %224 +%226 = OpAccessChain %72 %169 %41 %41 +%227 = OpLoad %4 %226 +%228 = OpLoad %6 %170 +%229 = OpAccessChain %72 %169 %41 %228 +%230 = OpLoad %4 %229 +%231 = OpLoad %6 %170 +%232 = OpAccessChain %72 %169 %231 %41 +%233 = OpLoad %4 %232 +%234 = OpLoad %6 %170 +%235 = OpLoad %6 %170 +%236 = OpAccessChain %72 %169 %234 %235 +%237 = OpLoad %4 %236 +%238 = OpAccessChain %78 %169 %41 %41 %41 +%239 = OpLoad %5 %238 +%240 = OpLoad %6 %170 +%241 = OpAccessChain %78 %169 %41 %41 %240 +%242 = OpLoad %5 %241 +%243 = OpLoad %6 %170 +%244 = OpAccessChain %78 %169 %41 %243 %41 +%245 = OpLoad %5 %244 +%246 = OpLoad %6 %170 +%247 = OpLoad %6 %170 +%248 = OpAccessChain %78 %169 %41 %246 %247 +%249 = OpLoad %5 %248 +%250 = OpLoad %6 %170 +%251 = OpAccessChain %78 %169 %250 %41 %41 +%252 = OpLoad %5 %251 +%253 = OpLoad %6 %170 +%254 = OpLoad %6 %170 +%255 = OpAccessChain %78 %169 %253 %41 %254 +%256 = OpLoad %5 %255 +%257 = OpLoad %6 %170 +%258 = OpLoad %6 %170 +%259 = OpAccessChain %78 %169 %257 %258 %41 +%260 = OpLoad %5 %259 +%261 = OpLoad %6 %170 +%262 = OpLoad %6 %170 +%263 = OpLoad %6 %170 +%264 = OpAccessChain %78 %169 %261 %262 %263 +%265 = OpLoad %5 %264 +OpStore %167 %220 +%266 = OpAccessChain %40 %167 %41 +OpStore %266 %222 +%267 = OpLoad %6 %170 +%268 = OpAccessChain %40 %167 %267 +OpStore %268 %225 +%269 = OpAccessChain %52 %167 %41 %41 +OpStore %269 %227 +%270 = OpLoad %6 %170 +%271 = OpAccessChain %52 %167 %41 %270 +OpStore %271 %230 +%272 = OpLoad %6 %170 +%273 = OpAccessChain %52 %167 %272 %41 +OpStore %273 %233 +%274 = OpLoad %6 %170 +%275 = OpLoad %6 %170 +%276 = OpAccessChain %52 %167 %274 %275 +OpStore %276 %237 +%277 = OpAccessChain %58 %167 %41 %41 %41 +OpStore %277 %239 +%278 = OpLoad %6 %170 +%279 = OpAccessChain %58 %167 %41 %41 %278 +OpStore %279 %242 +%280 = OpLoad %6 %170 +%281 = OpAccessChain %58 %167 %41 %280 %41 +OpStore %281 %245 +%282 = OpLoad %6 %170 +%283 = OpLoad %6 %170 +%284 = OpAccessChain %58 %167 %41 %282 %283 +OpStore %284 %249 +%285 = OpLoad %6 %170 +%286 = OpAccessChain %58 %167 %285 %41 %41 +OpStore %286 %252 +%287 = OpLoad %6 %170 +%288 = OpLoad %6 %170 +%289 = OpAccessChain %58 %167 %287 %41 %288 +OpStore %289 %256 +%290 = OpLoad %6 %170 +%291 = OpLoad %6 %170 +%292 = OpAccessChain %58 %167 %290 %291 %41 +OpStore %292 %260 +%293 = OpLoad %6 %170 +%294 = OpLoad %6 %170 +%295 = OpLoad %6 %170 +%296 = OpAccessChain %58 %167 %293 %294 %295 +OpStore %296 %265 OpReturn OpFunctionEnd -%298 = OpFunction %2 None %32 +%298 = OpFunction %2 None %39 %297 = OpLabel -%299 = OpAccessChain %33 %12 %34 -%300 = OpAccessChain %36 %15 %34 -%301 = OpAccessChain %97 %18 %34 -%302 = OpAccessChain %99 %21 %34 -%303 = OpAccessChain %159 %24 %34 -%304 = OpAccessChain %161 %27 %34 -OpBranch %305 -%305 = OpLabel -%306 = OpFunctionCall %2 %31 -%307 = OpFunctionCall %2 %96 -%308 = OpFunctionCall %2 %158 +%303 = OpVariable %47 Function %45 +%300 = OpAccessChain %299 %31 %41 +%302 = OpAccessChain %301 %34 %41 +OpBranch %304 +%304 = OpLabel +%305 = OpLoad %6 %303 +%306 = OpISub %6 %305 %45 +OpStore %303 %306 +%307 = OpLoad %12 %300 +%309 = OpAccessChain %308 %300 %41 +%310 = OpLoad %11 %309 +%311 = OpAccessChain %40 %300 %41 %41 %41 +%312 = OpLoad %3 %311 +%313 = OpLoad %6 %303 +%314 = OpAccessChain %40 %300 %41 %313 %41 +%315 = OpLoad %3 %314 +%316 = OpAccessChain %52 %300 %41 %41 %41 %41 +%317 = OpLoad %4 %316 +%318 = OpLoad %6 %303 +%319 = OpAccessChain %52 %300 %41 %41 %41 %318 +%320 = OpLoad %4 %319 +%321 = OpLoad %6 %303 +%322 = OpAccessChain %52 %300 %41 %321 %41 %41 +%323 = OpLoad %4 %322 +%324 = OpLoad %6 %303 +%325 = OpLoad %6 %303 +%326 = OpAccessChain %52 %300 %41 %324 %41 %325 +%327 = OpLoad %4 %326 +%328 = OpAccessChain %58 %300 %41 %41 %41 %41 %41 +%329 = OpLoad %5 %328 +%330 = OpLoad %6 %303 +%331 = OpAccessChain %58 %300 %41 %41 %41 %41 %330 +%332 = OpLoad %5 %331 +%333 = OpLoad %6 %303 +%334 = OpAccessChain %58 %300 %41 %41 %41 %333 %41 +%335 = OpLoad %5 %334 +%336 = OpLoad %6 %303 +%337 = OpLoad %6 %303 +%338 = OpAccessChain %58 %300 %41 %41 %41 %336 %337 +%339 = OpLoad %5 %338 +%340 = OpLoad %6 %303 +%341 = OpAccessChain %58 %300 %41 %340 %41 %41 %41 +%342 = OpLoad %5 %341 +%343 = OpLoad %6 %303 +%344 = OpLoad %6 %303 +%345 = OpAccessChain %58 %300 %41 %343 %41 %41 %344 +%346 = OpLoad %5 %345 +%347 = OpLoad %6 %303 +%348 = OpLoad %6 %303 +%349 = OpAccessChain %58 %300 %41 %347 %41 %348 %41 +%350 = OpLoad %5 %349 +%351 = OpLoad %6 %303 +%352 = OpLoad %6 %303 +%353 = OpLoad %6 %303 +%354 = OpAccessChain %58 %300 %41 %351 %41 %352 %353 +%355 = OpLoad %5 %354 +%356 = OpLoad %12 %302 +%358 = OpAccessChain %357 %302 %41 +%359 = OpLoad %11 %358 +%360 = OpAccessChain %43 %302 %41 %41 %41 +%361 = OpLoad %3 %360 +%362 = OpLoad %6 %303 +%363 = OpAccessChain %43 %302 %41 %362 %41 +%364 = OpLoad %3 %363 +%365 = OpAccessChain %72 %302 %41 %41 %41 %41 +%366 = OpLoad %4 %365 +%367 = OpLoad %6 %303 +%368 = OpAccessChain %72 %302 %41 %41 %41 %367 +%369 = OpLoad %4 %368 +%370 = OpLoad %6 %303 +%371 = OpAccessChain %72 %302 %41 %370 %41 %41 +%372 = OpLoad %4 %371 +%373 = OpLoad %6 %303 +%374 = OpLoad %6 %303 +%375 = OpAccessChain %72 %302 %41 %373 %41 %374 +%376 = OpLoad %4 %375 +%377 = OpAccessChain %78 %302 %41 %41 %41 %41 %41 +%378 = OpLoad %5 %377 +%379 = OpLoad %6 %303 +%380 = OpAccessChain %78 %302 %41 %41 %41 %41 %379 +%381 = OpLoad %5 %380 +%382 = OpLoad %6 %303 +%383 = OpAccessChain %78 %302 %41 %41 %41 %382 %41 +%384 = OpLoad %5 %383 +%385 = OpLoad %6 %303 +%386 = OpLoad %6 %303 +%387 = OpAccessChain %78 %302 %41 %41 %41 %385 %386 +%388 = OpLoad %5 %387 +%389 = OpLoad %6 %303 +%390 = OpAccessChain %78 %302 %41 %389 %41 %41 %41 +%391 = OpLoad %5 %390 +%392 = OpLoad %6 %303 +%393 = OpLoad %6 %303 +%394 = OpAccessChain %78 %302 %41 %392 %41 %41 %393 +%395 = OpLoad %5 %394 +%396 = OpLoad %6 %303 +%397 = OpLoad %6 %303 +%398 = OpAccessChain %78 %302 %41 %396 %41 %397 %41 +%399 = OpLoad %5 %398 +%400 = OpLoad %6 %303 +%401 = OpLoad %6 %303 +%402 = OpLoad %6 %303 +%403 = OpAccessChain %78 %302 %41 %400 %41 %401 %402 +%404 = OpLoad %5 %403 +OpStore %300 %356 +%405 = OpAccessChain %308 %300 %41 +OpStore %405 %359 +%406 = OpAccessChain %40 %300 %41 %41 %41 +OpStore %406 %361 +%407 = OpLoad %6 %303 +%408 = OpAccessChain %40 %300 %41 %407 %41 +OpStore %408 %364 +%409 = OpAccessChain %52 %300 %41 %41 %41 %41 +OpStore %409 %366 +%410 = OpLoad %6 %303 +%411 = OpAccessChain %52 %300 %41 %41 %41 %410 +OpStore %411 %369 +%412 = OpLoad %6 %303 +%413 = OpAccessChain %52 %300 %41 %412 %41 %41 +OpStore %413 %372 +%414 = OpLoad %6 %303 +%415 = OpLoad %6 %303 +%416 = OpAccessChain %52 %300 %41 %414 %41 %415 +OpStore %416 %376 +%417 = OpAccessChain %58 %300 %41 %41 %41 %41 %41 +OpStore %417 %378 +%418 = OpLoad %6 %303 +%419 = OpAccessChain %58 %300 %41 %41 %41 %41 %418 +OpStore %419 %381 +%420 = OpLoad %6 %303 +%421 = OpAccessChain %58 %300 %41 %41 %41 %420 %41 +OpStore %421 %384 +%422 = OpLoad %6 %303 +%423 = OpLoad %6 %303 +%424 = OpAccessChain %58 %300 %41 %41 %41 %422 %423 +OpStore %424 %388 +%425 = OpLoad %6 %303 +%426 = OpAccessChain %58 %300 %41 %425 %41 %41 %41 +OpStore %426 %391 +%427 = OpLoad %6 %303 +%428 = OpLoad %6 %303 +%429 = OpAccessChain %58 %300 %41 %427 %41 %41 %428 +OpStore %429 %395 +%430 = OpLoad %6 %303 +%431 = OpLoad %6 %303 +%432 = OpAccessChain %58 %300 %41 %430 %41 %431 %41 +OpStore %432 %399 +%433 = OpLoad %6 %303 +%434 = OpLoad %6 %303 +%435 = OpLoad %6 %303 +%436 = OpAccessChain %58 %300 %41 %433 %41 %434 %435 +OpStore %436 %404 +OpReturn +OpFunctionEnd +%438 = OpFunction %2 None %39 +%437 = OpLabel +%439 = OpAccessChain %40 %13 %41 +%440 = OpAccessChain %43 %16 %41 +%441 = OpAccessChain %104 %19 %41 +%442 = OpAccessChain %106 %22 %41 +%443 = OpAccessChain %166 %25 %41 +%444 = OpAccessChain %168 %28 %41 +%445 = OpAccessChain %299 %31 %41 +%446 = OpAccessChain %301 %34 %41 +OpBranch %447 +%447 = OpLabel +%448 = OpFunctionCall %2 %38 +%449 = OpFunctionCall %2 %103 +%450 = OpFunctionCall %2 %165 +%451 = OpFunctionCall %2 %298 OpReturn OpFunctionEnd \ No newline at end of file