| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 39 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %main "main" |
| OpExecutionMode %main LocalSize 1 1 1 |
| OpName %nextIndex "nextIndex" |
| OpName %Uniforms "Uniforms" |
| OpMemberName %Uniforms 0 "i" |
| OpMemberName %Uniforms 1 "j" |
| OpName %uniforms "uniforms" |
| OpName %getNextIndex "getNextIndex" |
| OpName %main "main" |
| OpName %InnerS "InnerS" |
| OpMemberName %InnerS 0 "v" |
| OpName %v "v" |
| OpName %OuterS "OuterS" |
| OpMemberName %OuterS 0 "a1" |
| OpName %S1 "S1" |
| OpMemberName %S1 0 "a2" |
| OpName %s "s" |
| OpDecorate %Uniforms Block |
| OpMemberDecorate %Uniforms 0 Offset 0 |
| OpMemberDecorate %Uniforms 1 Offset 4 |
| OpDecorate %uniforms NonWritable |
| OpDecorate %uniforms DescriptorSet 1 |
| OpDecorate %uniforms Binding 4 |
| OpMemberDecorate %InnerS 0 Offset 0 |
| OpMemberDecorate %OuterS 0 Offset 0 |
| OpMemberDecorate %S1 0 Offset 0 |
| OpDecorate %_arr_InnerS_uint_8 ArrayStride 4 |
| OpDecorate %_arr_S1_uint_8 ArrayStride 32 |
| %uint = OpTypeInt 32 0 |
| %_ptr_Private_uint = OpTypePointer Private %uint |
| %4 = OpConstantNull %uint |
| %nextIndex = OpVariable %_ptr_Private_uint Private %4 |
| %Uniforms = OpTypeStruct %uint %uint |
| %_ptr_Uniform_Uniforms = OpTypePointer Uniform %Uniforms |
| %uniforms = OpVariable %_ptr_Uniform_Uniforms Uniform |
| %8 = OpTypeFunction %uint |
| %uint_1 = OpConstant %uint 1 |
| %void = OpTypeVoid |
| %15 = OpTypeFunction %void |
| %int = OpTypeInt 32 1 |
| %InnerS = OpTypeStruct %int |
| %_ptr_Function_InnerS = OpTypePointer Function %InnerS |
| %23 = OpConstantNull %InnerS |
| %uint_8 = OpConstant %uint 8 |
| %_arr_InnerS_uint_8 = OpTypeArray %InnerS %uint_8 |
| %S1 = OpTypeStruct %_arr_InnerS_uint_8 |
| %_arr_S1_uint_8 = OpTypeArray %S1 %uint_8 |
| %OuterS = OpTypeStruct %_arr_S1_uint_8 |
| %_ptr_Function_OuterS = OpTypePointer Function %OuterS |
| %31 = OpConstantNull %OuterS |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform_uint = OpTypePointer Uniform %uint |
| %getNextIndex = OpFunction %uint None %8 |
| %10 = OpLabel |
| %11 = OpLoad %uint %nextIndex |
| %13 = OpIAdd %uint %11 %uint_1 |
| OpStore %nextIndex %13 |
| %14 = OpLoad %uint %nextIndex |
| OpReturnValue %14 |
| OpFunctionEnd |
| %main = OpFunction %void None %15 |
| %18 = OpLabel |
| %v = OpVariable %_ptr_Function_InnerS Function %23 |
| %s = OpVariable %_ptr_Function_OuterS Function %31 |
| %33 = OpFunctionCall %uint %getNextIndex |
| %35 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_1 |
| %36 = OpLoad %uint %35 |
| %37 = OpAccessChain %_ptr_Function_InnerS %s %uint_0 %33 %uint_0 %36 |
| %38 = OpLoad %InnerS %v |
| OpStore %37 %38 |
| OpReturn |
| OpFunctionEnd |