; SPIR-V ; Version: 1.1 ; Generator: rspirv ; Bound: 402 OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %311 "foo_vert" %306 %309 OpEntryPoint Fragment %363 "foo_frag" %362 OpEntryPoint GLCompute %381 "assign_through_ptr" OpEntryPoint GLCompute %392 "assign_to_ptr_components" OpExecutionMode %363 OriginUpperLeft OpExecutionMode %381 LocalSize 1 1 1 OpExecutionMode %392 LocalSize 1 1 1 %3 = OpString "access.wgsl" OpSource Unknown 0 %3 "// This snapshot tests accessing various containers, dereferencing pointers. struct GlobalConst { a: u32, b: vec3, c: i32, } // tests msl padding insertion for global constants var global_const: GlobalConst = GlobalConst(0u, vec3(0u, 0u, 0u), 0); struct AlignedWrapper { \t@align(8) value: i32 } struct Bar { \t_matrix: mat4x3, \tmatrix_array: array, 2>, \tatom: atomic, \tatom_arr: array, 10>, \tarr: array, 2>, \tdata: array, } @group(0) @binding(0) var bar: Bar; struct Baz { \tm: mat3x2, } @group(0) @binding(1) var baz: Baz; @group(0) @binding(2) var qux: vec2; fn test_matrix_within_struct_accesses() { \tvar idx = 1; idx--; \t// loads let l0 = baz.m; let l1 = baz.m[0]; let l2 = baz.m[idx]; let l3 = baz.m[0][1]; let l4 = baz.m[0][idx]; let l5 = baz.m[idx][1]; let l6 = baz.m[idx][idx]; var t = Baz(mat3x2(vec2(1.0), vec2(2.0), vec2(3.0))); idx++; \t// stores t.m = mat3x2(vec2(6.0), vec2(5.0), vec2(4.0)); t.m[0] = vec2(9.0); t.m[idx] = vec2(90.0); t.m[0][1] = 10.0; t.m[0][idx] = 20.0; t.m[idx][1] = 30.0; t.m[idx][idx] = 40.0; } struct MatCx2InArray { \tam: array, 2>, } @group(0) @binding(3) var nested_mat_cx2: MatCx2InArray; fn test_matrix_within_array_within_struct_accesses() { \tvar idx = 1; idx--; \t// loads let l0 = nested_mat_cx2.am; let l1 = nested_mat_cx2.am[0]; let l2 = nested_mat_cx2.am[0][0]; let l3 = nested_mat_cx2.am[0][idx]; let l4 = nested_mat_cx2.am[0][0][1]; let l5 = nested_mat_cx2.am[0][0][idx]; let l6 = nested_mat_cx2.am[0][idx][1]; let l7 = nested_mat_cx2.am[0][idx][idx]; var t = MatCx2InArray(array, 2>()); idx++; \t// stores t.am = array, 2>(); t.am[0] = mat4x2(vec2(8.0), vec2(7.0), vec2(6.0), vec2(5.0)); t.am[0][0] = vec2(9.0); t.am[0][idx] = vec2(90.0); t.am[0][0][1] = 10.0; t.am[0][0][idx] = 20.0; t.am[0][idx][1] = 30.0; t.am[0][idx][idx] = 40.0; } fn read_from_private(foo: ptr) -> f32 { return *foo; } fn test_arr_as_arg(a: array, 5>) -> f32 { return a[4][9]; } @vertex fn foo_vert(@builtin(vertex_index) vi: u32) -> @builtin(position) vec4 { var foo: f32 = 0.0; // We should check that backed doesn't skip this expression let baz: f32 = foo; foo = 1.0; \ttest_matrix_within_struct_accesses(); \ttest_matrix_within_array_within_struct_accesses(); // test storage loads \tlet _matrix = bar._matrix; \tlet arr = bar.arr; \tlet index = 3u; \tlet b = bar._matrix[index].x; \tlet a = bar.data[arrayLength(&bar.data) - 2u].value; \tlet c = qux; \t// test pointer types \tlet data_pointer: ptr = &bar.data[0].value; \tlet foo_value = read_from_private(&foo); \t// test array indexing \tvar c2 = array(a, i32(b), 3, 4, 5); \tc2[vi + 1u] = 42; \tlet value = c2[vi]; \ttest_arr_as_arg(array, 5>()); \treturn vec4(_matrix * vec4(vec4(value)), 2.0); } @fragment fn foo_frag() -> @location(0) vec4 { \t// test storage stores \tbar._matrix[1].z = 1.0; \tbar._matrix = mat4x3(vec3(0.0), vec3(1.0), vec3(2.0), vec3(3.0)); \tbar.arr = array, 2>(vec2(0u), vec2(1u)); \tbar.data[1].value = 1; \tqux = vec2(); \treturn vec4(0.0); } fn assign_through_ptr_fn(p: ptr) { *p = 42u; } fn assign_array_through_ptr_fn(foo: ptr, 2>>) { *foo = array, 2>(vec4(1.0), vec4(2.0)); } @compute @workgroup_size(1) fn assign_through_ptr() { var val = 33u; assign_through_ptr_fn(&val); \tvar arr = array, 2>(vec4(6.0), vec4(7.0)); assign_array_through_ptr_fn(&arr); } struct AssignToMember { x: u32, } fn fetch_arg_ptr_member(p: ptr) -> u32 { return (*p).x; } fn assign_to_arg_ptr_member(p: ptr) { (*p).x = 10u; } fn fetch_arg_ptr_array_element(p: ptr>) -> u32 { return (*p)[1]; } fn assign_to_arg_ptr_array_element(p: ptr>) { (*p)[1] = 10u; } @compute @workgroup_size(1) fn assign_to_ptr_components() { var s1: AssignToMember; assign_to_arg_ptr_member(&s1); fetch_arg_ptr_member(&s1); var a1: array; assign_to_arg_ptr_array_element(&a1); fetch_arg_ptr_array_element(&a1); } fn index_ptr(value: bool) -> bool { var a = array(value); let p = &a; return p[0]; } struct S { m: i32 }; fn member_ptr() -> i32 { var s: S = S(42); let p = &s; return p.m; } struct Inner { delicious: i32 } struct Outer { om_nom_nom: Inner, thing: u32 } fn let_members_of_members() -> i32 { let thing = Outer(); let inner = thing.om_nom_nom; let delishus = inner.delicious; if (thing.thing != u32(delishus)) { // LOL } return thing.om_nom_nom.delicious; } fn var_members_of_members() -> i32 { var thing = Outer(); var inner = thing.om_nom_nom; var delishus = inner.delicious; if (thing.thing != u32(delishus)) { // LOL } return thing.om_nom_nom.delicious; } " OpMemberName %7 0 "a" OpMemberName %7 1 "b" OpMemberName %7 2 "c" OpName %7 "GlobalConst" OpMemberName %8 0 "value" OpName %8 "AlignedWrapper" OpMemberName %21 0 "_matrix" OpMemberName %21 1 "matrix_array" OpMemberName %21 2 "atom" OpMemberName %21 3 "atom_arr" OpMemberName %21 4 "arr" OpMemberName %21 5 "data" OpName %21 "Bar" OpMemberName %23 0 "m" OpName %23 "Baz" OpMemberName %27 0 "am" OpName %27 "MatCx2InArray" OpMemberName %37 0 "x" OpName %37 "AssignToMember" OpMemberName %45 0 "m" OpName %45 "S" OpMemberName %46 0 "delicious" OpName %46 "Inner" OpMemberName %47 0 "om_nom_nom" OpMemberName %47 1 "thing" OpName %47 "Outer" OpName %52 "global_const" OpName %54 "bar" OpName %56 "baz" OpName %59 "qux" OpName %62 "nested_mat_cx2" OpName %66 "test_matrix_within_struct_accesses" OpName %94 "idx" OpName %96 "t" OpName %140 "test_matrix_within_array_within_struct_accesses" OpName %150 "idx" OpName %151 "t" OpName %197 "foo" OpName %198 "read_from_private" OpName %203 "a" OpName %204 "test_arr_as_arg" OpName %210 "p" OpName %211 "assign_through_ptr_fn" OpName %216 "foo" OpName %217 "assign_array_through_ptr_fn" OpName %224 "p" OpName %225 "fetch_arg_ptr_member" OpName %231 "p" OpName %232 "assign_to_arg_ptr_member" OpName %237 "p" OpName %238 "fetch_arg_ptr_array_element" OpName %244 "p" OpName %245 "assign_to_arg_ptr_array_element" OpName %250 "value" OpName %251 "index_ptr" OpName %253 "a" OpName %262 "member_ptr" OpName %266 "s" OpName %272 "let_members_of_members" OpName %284 "var_members_of_members" OpName %285 "thing" OpName %287 "inner" OpName %290 "delishus" OpName %306 "vi" OpName %311 "foo_vert" OpName %322 "foo" OpName %323 "c2" OpName %363 "foo_frag" OpName %381 "assign_through_ptr" OpName %386 "val" OpName %387 "arr" OpName %392 "assign_to_ptr_components" OpName %393 "s1" OpName %395 "a1" OpMemberDecorate %7 0 Offset 0 OpMemberDecorate %7 1 Offset 16 OpMemberDecorate %7 2 Offset 28 OpMemberDecorate %8 0 Offset 0 OpDecorate %14 ArrayStride 16 OpDecorate %16 ArrayStride 4 OpDecorate %19 ArrayStride 8 OpDecorate %20 ArrayStride 8 OpMemberDecorate %21 0 Offset 0 OpMemberDecorate %21 0 ColMajor OpMemberDecorate %21 0 MatrixStride 16 OpMemberDecorate %21 1 Offset 64 OpMemberDecorate %21 1 ColMajor OpMemberDecorate %21 1 MatrixStride 8 OpMemberDecorate %21 2 Offset 96 OpMemberDecorate %21 3 Offset 100 OpMemberDecorate %21 4 Offset 144 OpMemberDecorate %21 5 Offset 160 OpDecorate %21 Block OpMemberDecorate %23 0 Offset 0 OpMemberDecorate %23 0 ColMajor OpMemberDecorate %23 0 MatrixStride 8 OpDecorate %26 ArrayStride 32 OpMemberDecorate %27 0 Offset 0 OpMemberDecorate %27 0 ColMajor OpMemberDecorate %27 0 MatrixStride 8 OpDecorate %29 ArrayStride 4 OpDecorate %30 ArrayStride 40 OpDecorate %33 ArrayStride 4 OpDecorate %35 ArrayStride 16 OpMemberDecorate %37 0 Offset 0 OpDecorate %39 ArrayStride 4 OpDecorate %43 ArrayStride 1 OpMemberDecorate %45 0 Offset 0 OpMemberDecorate %46 0 Offset 0 OpMemberDecorate %47 0 Offset 0 OpMemberDecorate %47 1 Offset 4 OpDecorate %54 DescriptorSet 0 OpDecorate %54 Binding 0 OpDecorate %56 DescriptorSet 0 OpDecorate %56 Binding 1 OpDecorate %57 Block OpMemberDecorate %57 0 Offset 0 OpDecorate %59 DescriptorSet 0 OpDecorate %59 Binding 2 OpDecorate %60 Block OpMemberDecorate %60 0 Offset 0 OpDecorate %62 DescriptorSet 0 OpDecorate %62 Binding 3 OpDecorate %63 Block OpMemberDecorate %63 0 Offset 0 OpDecorate %306 BuiltIn VertexIndex OpDecorate %309 BuiltIn Position OpDecorate %362 Location 0 %2 = OpTypeVoid %4 = OpTypeInt 32 0 %5 = OpTypeVector %4 3 %6 = OpTypeInt 32 1 %7 = OpTypeStruct %4 %5 %6 %8 = OpTypeStruct %6 %9 = OpTypeFloat 32 %11 = OpTypeVector %9 3 %10 = OpTypeMatrix %11 4 %13 = OpTypeVector %9 2 %12 = OpTypeMatrix %13 2 %15 = OpConstant %4 2 %14 = OpTypeArray %12 %15 %17 = OpConstant %4 10 %16 = OpTypeArray %6 %17 %18 = OpTypeVector %4 2 %19 = OpTypeArray %18 %15 %20 = OpTypeRuntimeArray %8 %21 = OpTypeStruct %10 %14 %6 %16 %19 %20 %22 = OpTypeMatrix %13 3 %23 = OpTypeStruct %22 %24 = OpTypeVector %6 2 %25 = OpTypeMatrix %13 4 %26 = OpTypeArray %25 %15 %27 = OpTypeStruct %26 %28 = OpTypePointer Function %9 %29 = OpTypeArray %9 %17 %31 = OpConstant %4 5 %30 = OpTypeArray %29 %31 %32 = OpTypeVector %9 4 %33 = OpTypeArray %6 %31 %34 = OpTypePointer Function %4 %35 = OpTypeArray %32 %15 %36 = OpTypePointer Function %35 %37 = OpTypeStruct %4 %38 = OpTypePointer Function %37 %40 = OpConstant %4 4 %39 = OpTypeArray %4 %40 %41 = OpTypePointer Function %39 %42 = OpTypeBool %44 = OpConstant %4 1 %43 = OpTypeArray %42 %44 %45 = OpTypeStruct %6 %46 = OpTypeStruct %6 %47 = OpTypeStruct %46 %4 %48 = OpConstant %4 0 %49 = OpConstantComposite %5 %48 %48 %48 %50 = OpConstant %6 0 %51 = OpConstantComposite %7 %48 %49 %50 %53 = OpTypePointer Private %7 %52 = OpVariable %53 Private %51 %55 = OpTypePointer StorageBuffer %21 %54 = OpVariable %55 StorageBuffer %57 = OpTypeStruct %23 %58 = OpTypePointer Uniform %57 %56 = OpVariable %58 Uniform %60 = OpTypeStruct %24 %61 = OpTypePointer StorageBuffer %60 %59 = OpVariable %61 StorageBuffer %63 = OpTypeStruct %27 %64 = OpTypePointer Uniform %63 %62 = OpVariable %64 Uniform %67 = OpTypeFunction %2 %68 = OpTypePointer Uniform %23 %70 = OpConstant %6 1 %71 = OpConstant %9 1.0 %72 = OpConstantComposite %13 %71 %71 %73 = OpConstant %9 2.0 %74 = OpConstantComposite %13 %73 %73 %75 = OpConstant %9 3.0 %76 = OpConstantComposite %13 %75 %75 %77 = OpConstantComposite %22 %72 %74 %76 %78 = OpConstantComposite %23 %77 %79 = OpConstant %9 6.0 %80 = OpConstantComposite %13 %79 %79 %81 = OpConstant %9 5.0 %82 = OpConstantComposite %13 %81 %81 %83 = OpConstant %9 4.0 %84 = OpConstantComposite %13 %83 %83 %85 = OpConstantComposite %22 %80 %82 %84 %86 = OpConstant %9 9.0 %87 = OpConstantComposite %13 %86 %86 %88 = OpConstant %9 90.0 %89 = OpConstantComposite %13 %88 %88 %90 = OpConstant %9 10.0 %91 = OpConstant %9 20.0 %92 = OpConstant %9 30.0 %93 = OpConstant %9 40.0 %95 = OpTypePointer Function %6 %97 = OpTypePointer Function %23 %101 = OpTypePointer Uniform %22 %104 = OpTypePointer Uniform %13 %110 = OpTypePointer Uniform %9 %125 = OpTypePointer Function %22 %127 = OpTypePointer Function %13 %141 = OpTypePointer Uniform %27 %143 = OpConstantNull %26 %144 = OpConstantComposite %27 %143 %145 = OpConstant %9 8.0 %146 = OpConstantComposite %13 %145 %145 %147 = OpConstant %9 7.0 %148 = OpConstantComposite %13 %147 %147 %149 = OpConstantComposite %25 %146 %148 %80 %82 %152 = OpTypePointer Function %27 %156 = OpTypePointer Uniform %26 %159 = OpTypePointer Uniform %25 %181 = OpTypePointer Function %26 %183 = OpTypePointer Function %25 %199 = OpTypeFunction %9 %28 %205 = OpTypeFunction %9 %30 %212 = OpTypeFunction %2 %34 %213 = OpConstant %4 42 %218 = OpTypeFunction %2 %36 %219 = OpConstantComposite %32 %71 %71 %71 %71 %220 = OpConstantComposite %32 %73 %73 %73 %73 %221 = OpConstantComposite %35 %219 %220 %226 = OpTypeFunction %4 %38 %233 = OpTypeFunction %2 %38 %239 = OpTypeFunction %4 %41 %246 = OpTypeFunction %2 %41 %252 = OpTypeFunction %42 %42 %254 = OpTypePointer Function %43 %255 = OpConstantNull %43 %258 = OpTypePointer Function %42 %263 = OpTypeFunction %6 %264 = OpConstant %6 42 %265 = OpConstantComposite %45 %264 %267 = OpTypePointer Function %45 %273 = OpConstantNull %47 %286 = OpTypePointer Function %47 %288 = OpTypePointer Function %46 %289 = OpConstantNull %46 %291 = OpConstantNull %6 %307 = OpTypePointer Input %4 %306 = OpVariable %307 Input %310 = OpTypePointer Output %32 %309 = OpVariable %310 Output %313 = OpTypePointer StorageBuffer %24 %316 = OpConstant %9 0.0 %317 = OpConstant %4 3 %318 = OpConstant %6 3 %319 = OpConstant %6 4 %320 = OpConstant %6 5 %321 = OpConstantNull %30 %324 = OpTypePointer Function %33 %325 = OpConstantNull %33 %330 = OpTypePointer StorageBuffer %10 %333 = OpTypePointer StorageBuffer %19 %336 = OpTypePointer StorageBuffer %11 %337 = OpTypePointer StorageBuffer %9 %340 = OpTypePointer StorageBuffer %20 %343 = OpTypePointer StorageBuffer %8 %344 = OpTypePointer StorageBuffer %6 %356 = OpTypeVector %6 4 %362 = OpVariable %310 Output %365 = OpConstantComposite %11 %316 %316 %316 %366 = OpConstantComposite %11 %71 %71 %71 %367 = OpConstantComposite %11 %73 %73 %73 %368 = OpConstantComposite %11 %75 %75 %75 %369 = OpConstantComposite %10 %365 %366 %367 %368 %370 = OpConstantComposite %18 %48 %48 %371 = OpConstantComposite %18 %44 %44 %372 = OpConstantComposite %19 %370 %371 %373 = OpConstantNull %24 %374 = OpConstantComposite %32 %316 %316 %316 %316 %382 = OpConstant %4 33 %383 = OpConstantComposite %32 %79 %79 %79 %79 %384 = OpConstantComposite %32 %147 %147 %147 %147 %385 = OpConstantComposite %35 %383 %384 %394 = OpConstantNull %37 %396 = OpConstantNull %39 %66 = OpFunction %2 None %67 %65 = OpLabel %94 = OpVariable %95 Function %70 %96 = OpVariable %97 Function %78 %69 = OpAccessChain %68 %56 %48 OpBranch %98 %98 = OpLabel OpLine %3 40 5 %99 = OpLoad %6 %94 %100 = OpISub %6 %99 %70 OpLine %3 40 5 OpStore %94 %100 OpLine %3 43 14 %102 = OpAccessChain %101 %69 %48 %103 = OpLoad %22 %102 OpLine %3 44 14 OpLine %3 44 14 %105 = OpAccessChain %104 %69 %48 %48 %106 = OpLoad %13 %105 OpLine %3 45 14 %107 = OpLoad %6 %94 %108 = OpAccessChain %104 %69 %48 %107 %109 = OpLoad %13 %108 OpLine %3 46 14 OpLine %3 46 14 OpLine %3 46 14 %111 = OpAccessChain %110 %69 %48 %48 %44 %112 = OpLoad %9 %111 OpLine %3 47 14 OpLine %3 47 14 %113 = OpLoad %6 %94 %114 = OpAccessChain %110 %69 %48 %48 %113 %115 = OpLoad %9 %114 OpLine %3 48 14 %116 = OpLoad %6 %94 OpLine %3 48 14 %117 = OpAccessChain %110 %69 %48 %116 %44 %118 = OpLoad %9 %117 OpLine %3 49 14 %119 = OpLoad %6 %94 %120 = OpLoad %6 %94 %121 = OpAccessChain %110 %69 %48 %119 %120 %122 = OpLoad %9 %121 OpLine %3 51 29 OpLine %3 51 45 OpLine %3 51 13 OpLine %3 53 5 %123 = OpLoad %6 %94 %124 = OpIAdd %6 %123 %70 OpLine %3 53 5 OpStore %94 %124 OpLine %3 56 5 OpLine %3 56 23 OpLine %3 56 39 OpLine %3 56 11 OpLine %3 56 5 %126 = OpAccessChain %125 %96 %48 OpStore %126 %85 OpLine %3 57 5 OpLine %3 57 5 OpLine %3 57 14 OpLine %3 57 5 %128 = OpAccessChain %127 %96 %48 %48 OpStore %128 %87 OpLine %3 58 5 %129 = OpLoad %6 %94 OpLine %3 58 16 OpLine %3 58 5 %130 = OpAccessChain %127 %96 %48 %129 OpStore %130 %89 OpLine %3 59 5 OpLine %3 59 5 OpLine %3 59 5 OpLine %3 59 5 %131 = OpAccessChain %28 %96 %48 %48 %44 OpStore %131 %90 OpLine %3 60 5 OpLine %3 60 5 %132 = OpLoad %6 %94 OpLine %3 60 5 %133 = OpAccessChain %28 %96 %48 %48 %132 OpStore %133 %91 OpLine %3 61 5 %134 = OpLoad %6 %94 OpLine %3 61 5 OpLine %3 61 5 %135 = OpAccessChain %28 %96 %48 %134 %44 OpStore %135 %92 OpLine %3 62 5 %136 = OpLoad %6 %94 %137 = OpLoad %6 %94 OpLine %3 62 5 %138 = OpAccessChain %28 %96 %48 %136 %137 OpStore %138 %93 OpReturn OpFunctionEnd %140 = OpFunction %2 None %67 %139 = OpLabel %150 = OpVariable %95 Function %70 %151 = OpVariable %152 Function %144 %142 = OpAccessChain %141 %62 %48 OpBranch %153 %153 = OpLabel OpLine %3 75 5 %154 = OpLoad %6 %150 %155 = OpISub %6 %154 %70 OpLine %3 75 5 OpStore %150 %155 OpLine %3 78 14 %157 = OpAccessChain %156 %142 %48 %158 = OpLoad %26 %157 OpLine %3 79 14 OpLine %3 79 14 %160 = OpAccessChain %159 %142 %48 %48 %161 = OpLoad %25 %160 OpLine %3 80 14 OpLine %3 80 14 OpLine %3 80 14 %162 = OpAccessChain %104 %142 %48 %48 %48 %163 = OpLoad %13 %162 OpLine %3 81 14 OpLine %3 81 14 %164 = OpLoad %6 %150 %165 = OpAccessChain %104 %142 %48 %48 %164 %166 = OpLoad %13 %165 OpLine %3 82 14 OpLine %3 82 14 OpLine %3 82 14 OpLine %3 82 14 %167 = OpAccessChain %110 %142 %48 %48 %48 %44 %168 = OpLoad %9 %167 OpLine %3 83 14 OpLine %3 83 14 OpLine %3 83 14 %169 = OpLoad %6 %150 %170 = OpAccessChain %110 %142 %48 %48 %48 %169 %171 = OpLoad %9 %170 OpLine %3 84 14 OpLine %3 84 14 %172 = OpLoad %6 %150 OpLine %3 84 14 %173 = OpAccessChain %110 %142 %48 %48 %172 %44 %174 = OpLoad %9 %173 OpLine %3 85 14 OpLine %3 85 14 %175 = OpLoad %6 %150 %176 = OpLoad %6 %150 %177 = OpAccessChain %110 %142 %48 %48 %175 %176 %178 = OpLoad %9 %177 OpLine %3 87 13 OpLine %3 89 5 %179 = OpLoad %6 %150 %180 = OpIAdd %6 %179 %70 OpLine %3 89 5 OpStore %150 %180 OpLine %3 92 5 OpLine %3 92 5 %182 = OpAccessChain %181 %151 %48 OpStore %182 %143 OpLine %3 93 5 OpLine %3 93 5 OpLine %3 93 27 OpLine %3 93 43 OpLine %3 93 59 OpLine %3 93 15 OpLine %3 93 5 %184 = OpAccessChain %183 %151 %48 %48 OpStore %184 %149 OpLine %3 94 5 OpLine %3 94 5 OpLine %3 94 5 OpLine %3 94 18 OpLine %3 94 5 %185 = OpAccessChain %127 %151 %48 %48 %48 OpStore %185 %87 OpLine %3 95 5 OpLine %3 95 5 %186 = OpLoad %6 %150 OpLine %3 95 20 OpLine %3 95 5 %187 = OpAccessChain %127 %151 %48 %48 %186 OpStore %187 %89 OpLine %3 96 5 OpLine %3 96 5 OpLine %3 96 5 OpLine %3 96 5 OpLine %3 96 5 %188 = OpAccessChain %28 %151 %48 %48 %48 %44 OpStore %188 %90 OpLine %3 97 5 OpLine %3 97 5 OpLine %3 97 5 %189 = OpLoad %6 %150 OpLine %3 97 5 %190 = OpAccessChain %28 %151 %48 %48 %48 %189 OpStore %190 %91 OpLine %3 98 5 OpLine %3 98 5 %191 = OpLoad %6 %150 OpLine %3 98 5 OpLine %3 98 5 %192 = OpAccessChain %28 %151 %48 %48 %191 %44 OpStore %192 %92 OpLine %3 99 5 OpLine %3 99 5 %193 = OpLoad %6 %150 %194 = OpLoad %6 %150 OpLine %3 99 5 %195 = OpAccessChain %28 %151 %48 %48 %193 %194 OpStore %195 %93 OpReturn OpFunctionEnd %198 = OpFunction %9 None %199 %197 = OpFunctionParameter %28 %196 = OpLabel OpBranch %200 %200 = OpLabel OpLine %3 102 22 %201 = OpLoad %9 %197 OpReturnValue %201 OpFunctionEnd %204 = OpFunction %9 None %205 %203 = OpFunctionParameter %30 %202 = OpLabel OpBranch %206 %206 = OpLabel OpLine %3 107 12 %207 = OpCompositeExtract %29 %203 4 OpLine %3 107 12 %208 = OpCompositeExtract %9 %207 9 OpReturnValue %208 OpFunctionEnd %211 = OpFunction %2 None %212 %210 = OpFunctionParameter %34 %209 = OpLabel OpBranch %214 %214 = OpLabel OpLine %3 155 5 OpStore %210 %213 OpReturn OpFunctionEnd %217 = OpFunction %2 None %218 %216 = OpFunctionParameter %36 %215 = OpLabel OpBranch %222 %222 = OpLabel OpLine %3 159 32 OpLine %3 159 43 OpLine %3 159 32 OpLine %3 159 12 OpLine %3 159 5 OpStore %216 %221 OpReturn OpFunctionEnd %225 = OpFunction %4 None %226 %224 = OpFunctionParameter %38 %223 = OpLabel OpBranch %227 %227 = OpLabel OpLine %3 176 10 %228 = OpAccessChain %34 %224 %48 %229 = OpLoad %4 %228 OpReturnValue %229 OpFunctionEnd %232 = OpFunction %2 None %233 %231 = OpFunctionParameter %38 %230 = OpLabel OpBranch %234 %234 = OpLabel OpLine %3 180 3 OpLine %3 180 3 %235 = OpAccessChain %34 %231 %48 OpStore %235 %17 OpReturn OpFunctionEnd %238 = OpFunction %4 None %239 %237 = OpFunctionParameter %41 %236 = OpLabel OpBranch %240 %240 = OpLabel OpLine %3 184 10 %241 = OpAccessChain %34 %237 %44 %242 = OpLoad %4 %241 OpReturnValue %242 OpFunctionEnd %245 = OpFunction %2 None %246 %244 = OpFunctionParameter %41 %243 = OpLabel OpBranch %247 %247 = OpLabel OpLine %3 188 3 OpLine %3 188 3 %248 = OpAccessChain %34 %244 %44 OpStore %248 %17 OpReturn OpFunctionEnd %251 = OpFunction %42 None %252 %250 = OpFunctionParameter %42 %249 = OpLabel %253 = OpVariable %254 Function %255 OpBranch %256 %256 = OpLabel OpLine %3 203 13 %257 = OpCompositeConstruct %43 %250 OpLine %3 203 5 OpStore %253 %257 OpLine %3 205 12 %259 = OpAccessChain %258 %253 %48 %260 = OpLoad %42 %259 OpReturnValue %260 OpFunctionEnd %262 = OpFunction %6 None %263 %261 = OpLabel %266 = OpVariable %267 Function %265 OpBranch %268 %268 = OpLabel OpLine %3 211 16 OpLine %3 213 12 %269 = OpAccessChain %95 %266 %48 %270 = OpLoad %6 %269 OpReturnValue %270 OpFunctionEnd %272 = OpFunction %6 None %263 %271 = OpLabel OpBranch %274 %274 = OpLabel OpLine %3 223 17 %275 = OpCompositeExtract %46 %273 0 OpLine %3 224 20 %276 = OpCompositeExtract %6 %275 0 OpLine %3 226 9 %277 = OpCompositeExtract %4 %273 1 %278 = OpBitcast %4 %276 %279 = OpINotEqual %42 %277 %278 OpLine %3 226 5 OpSelectionMerge %280 None OpBranchConditional %279 %280 %280 %280 = OpLabel OpLine %3 230 12 %281 = OpCompositeExtract %46 %273 0 %282 = OpCompositeExtract %6 %281 0 OpReturnValue %282 OpFunctionEnd %284 = OpFunction %6 None %263 %283 = OpLabel %285 = OpVariable %286 Function %273 %287 = OpVariable %288 Function %289 %290 = OpVariable %95 Function %291 OpBranch %292 %292 = OpLabel OpLine %3 236 17 %293 = OpAccessChain %288 %285 %48 %294 = OpLoad %46 %293 OpLine %3 236 5 OpStore %287 %294 OpLine %3 237 20 %295 = OpAccessChain %95 %287 %48 %296 = OpLoad %6 %295 OpLine %3 237 5 OpStore %290 %296 OpLine %3 239 9 %297 = OpAccessChain %34 %285 %44 %298 = OpLoad %4 %297 %299 = OpLoad %6 %290 %300 = OpBitcast %4 %299 %301 = OpINotEqual %42 %298 %300 OpLine %3 239 5 OpSelectionMerge %302 None OpBranchConditional %301 %302 %302 %302 = OpLabel OpLine %3 243 12 %303 = OpAccessChain %95 %285 %48 %48 %304 = OpLoad %6 %303 OpReturnValue %304 OpFunctionEnd %311 = OpFunction %2 None %67 %305 = OpLabel %322 = OpVariable %28 Function %316 %323 = OpVariable %324 Function %325 %308 = OpLoad %4 %306 %312 = OpAccessChain %68 %56 %48 %314 = OpAccessChain %313 %59 %48 %315 = OpAccessChain %141 %62 %48 OpBranch %326 %326 = OpLabel OpLine %3 1 1 %327 = OpLoad %9 %322 OpLine %3 115 5 OpStore %322 %71 OpLine %3 117 2 %328 = OpFunctionCall %2 %66 OpLine %3 118 2 %329 = OpFunctionCall %2 %140 OpLine %3 121 16 %331 = OpAccessChain %330 %54 %48 %332 = OpLoad %10 %331 OpLine %3 122 12 %334 = OpAccessChain %333 %54 %40 %335 = OpLoad %19 %334 OpLine %3 124 10 %338 = OpAccessChain %337 %54 %48 %317 %48 %339 = OpLoad %9 %338 OpLine %3 125 10 OpLine %3 125 19 %341 = OpArrayLength %4 %54 5 OpLine %3 125 10 %342 = OpISub %4 %341 %15 %345 = OpAccessChain %344 %54 %31 %342 %48 %346 = OpLoad %6 %345 OpLine %3 126 10 %347 = OpLoad %24 %314 OpLine %3 129 53 OpLine %3 129 53 OpLine %3 130 18 %348 = OpFunctionCall %9 %198 %322 OpLine %3 133 28 %349 = OpConvertFToS %6 %339 OpLine %3 133 11 %350 = OpCompositeConstruct %33 %346 %349 %318 %319 %320 OpLine %3 133 2 OpStore %323 %350 OpLine %3 134 2 %351 = OpIAdd %4 %308 %44 OpLine %3 134 2 %352 = OpAccessChain %95 %323 %351 OpStore %352 %264 OpLine %3 135 14 %353 = OpAccessChain %95 %323 %308 %354 = OpLoad %6 %353 OpLine %3 137 2 %355 = OpFunctionCall %9 %204 %321 OpLine %3 139 19 %357 = OpCompositeConstruct %356 %354 %354 %354 %354 %358 = OpConvertSToF %32 %357 %359 = OpMatrixTimesVector %11 %332 %358 OpLine %3 139 9 %360 = OpCompositeConstruct %32 %359 %73 OpStore %309 %360 OpReturn OpFunctionEnd %363 = OpFunction %2 None %67 %361 = OpLabel %364 = OpAccessChain %313 %59 %48 OpBranch %375 %375 = OpLabel OpLine %3 145 2 OpLine %3 145 2 OpLine %3 145 2 %376 = OpAccessChain %337 %54 %48 %44 %15 OpStore %376 %71 OpLine %3 146 2 OpLine %3 146 28 OpLine %3 146 44 OpLine %3 146 60 OpLine %3 146 16 OpLine %3 146 2 %377 = OpAccessChain %330 %54 %48 OpStore %377 %369 OpLine %3 147 2 OpLine %3 147 32 OpLine %3 147 12 OpLine %3 147 2 %378 = OpAccessChain %333 %54 %40 OpStore %378 %372 OpLine %3 148 2 OpLine %3 148 2 OpLine %3 148 2 %379 = OpAccessChain %344 %54 %31 %44 %48 OpStore %379 %70 OpLine %3 149 2 OpStore %364 %373 OpLine %3 151 9 OpStore %362 %374 OpReturn OpFunctionEnd %381 = OpFunction %2 None %67 %380 = OpLabel %386 = OpVariable %34 Function %382 %387 = OpVariable %36 Function %385 OpBranch %388 %388 = OpLabel OpLine %3 165 5 %389 = OpFunctionCall %2 %211 %386 OpLine %3 167 32 OpLine %3 167 43 OpLine %3 167 32 OpLine %3 167 12 OpLine %3 168 5 %390 = OpFunctionCall %2 %217 %387 OpReturn OpFunctionEnd %392 = OpFunction %2 None %67 %391 = OpLabel %393 = OpVariable %38 Function %394 %395 = OpVariable %41 Function %396 OpBranch %397 %397 = OpLabel OpLine %3 194 4 %398 = OpFunctionCall %2 %232 %393 OpLine %3 195 4 %399 = OpFunctionCall %4 %225 %393 OpLine %3 198 4 %400 = OpFunctionCall %2 %245 %395 OpLine %3 199 4 %401 = OpFunctionCall %4 %238 %395 OpReturn OpFunctionEnd