| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 36 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %main "main" |
| OpExecutionMode %main LocalSize 1 1 1 |
| OpName %buffer_block "buffer_block" |
| OpMemberName %buffer_block 0 "inner" |
| OpName %buffer "buffer" |
| OpName %foo "foo" |
| OpName %var_for_index "var_for_index" |
| OpName %main "main" |
| OpName %var_for_index_1 "var_for_index_1" |
| OpDecorate %buffer_block Block |
| OpMemberDecorate %buffer_block 0 Offset 0 |
| OpDecorate %buffer DescriptorSet 0 |
| OpDecorate %buffer Binding 0 |
| OpDecorate %_arr_uint_uint_4 ArrayStride 4 |
| %uint = OpTypeInt 32 0 |
| %buffer_block = OpTypeStruct %uint |
| %_ptr_StorageBuffer_buffer_block = OpTypePointer StorageBuffer %buffer_block |
| %buffer = OpVariable %_ptr_StorageBuffer_buffer_block StorageBuffer |
| %5 = OpTypeFunction %uint |
| %uint_4 = OpConstant %uint 4 |
| %_arr_uint_uint_4 = OpTypeArray %uint %uint_4 |
| %10 = OpConstantNull %uint |
| %uint_1 = OpConstant %uint 1 |
| %uint_2 = OpConstant %uint 2 |
| %13 = OpConstantComposite %_arr_uint_uint_4 %10 %uint_1 %uint_2 %uint_4 |
| %_ptr_Function__arr_uint_uint_4 = OpTypePointer Function %_arr_uint_uint_4 |
| %16 = OpConstantNull %_arr_uint_uint_4 |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint |
| %_ptr_Function_uint = OpTypePointer Function %uint |
| %void = OpTypeVoid |
| %24 = OpTypeFunction %void |
| %foo = OpFunction %uint None %5 |
| %7 = OpLabel |
| %var_for_index = OpVariable %_ptr_Function__arr_uint_uint_4 Function %16 |
| OpStore %var_for_index %13 |
| %19 = OpAccessChain %_ptr_StorageBuffer_uint %buffer %uint_0 |
| %20 = OpLoad %uint %19 |
| %22 = OpAccessChain %_ptr_Function_uint %var_for_index %20 |
| %23 = OpLoad %uint %22 |
| OpReturnValue %23 |
| OpFunctionEnd |
| %main = OpFunction %void None %24 |
| %27 = OpLabel |
| %var_for_index_1 = OpVariable %_ptr_Function__arr_uint_uint_4 Function %16 |
| OpStore %var_for_index_1 %13 |
| %29 = OpAccessChain %_ptr_StorageBuffer_uint %buffer %uint_0 |
| %30 = OpLoad %uint %29 |
| %31 = OpAccessChain %_ptr_Function_uint %var_for_index_1 %30 |
| %32 = OpLoad %uint %31 |
| %33 = OpFunctionCall %uint %foo |
| %34 = OpAccessChain %_ptr_StorageBuffer_uint %buffer %uint_0 |
| %35 = OpIAdd %uint %32 %33 |
| OpStore %34 %35 |
| OpReturn |
| OpFunctionEnd |