blob: 7798efe386af51119745458b330ff9c4c025b8a7 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 78
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %buffer_block "buffer_block"
OpMemberName %buffer_block 0 "inner"
OpName %S "S"
OpMemberName %S 0 "a"
OpName %buffer "buffer"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %idx1 "idx1"
OpName %idx2 "idx2"
OpName %idx3 "idx3"
OpName %idx4 "idx4"
OpName %idx5 "idx5"
OpName %idx6 "idx6"
OpName %main "main"
OpDecorate %buffer_block Block
OpMemberDecorate %buffer_block 0 Offset 0
OpMemberDecorate %S 0 Offset 0
OpDecorate %_arr_v4int_uint_4 ArrayStride 16
OpDecorate %_runtimearr_S ArrayStride 64
OpDecorate %buffer DescriptorSet 0
OpDecorate %buffer Binding 0
%int = OpTypeInt 32 1
%v4int = OpTypeVector %int 4
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_v4int_uint_4 = OpTypeArray %v4int %uint_4
%S = OpTypeStruct %_arr_v4int_uint_4
%_runtimearr_S = OpTypeRuntimeArray %S
%buffer_block = OpTypeStruct %_runtimearr_S
%_ptr_StorageBuffer_buffer_block = OpTypePointer StorageBuffer %buffer_block
%buffer = OpVariable %_ptr_StorageBuffer_buffer_block StorageBuffer
%_ptr_Private_uint = OpTypePointer Private %uint
%13 = OpConstantNull %uint
%v = OpVariable %_ptr_Private_uint Private %13
%void = OpTypeVoid
%14 = OpTypeFunction %void
%18 = OpTypeFunction %int
%uint_1 = OpConstant %uint 1
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%int_3 = OpConstant %int 3
%int_4 = OpConstant %int 4
%int_0 = OpConstant %int 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%uint_10 = OpConstant %uint 10
%bool = OpTypeBool
%unused_entry_point = OpFunction %void None %14
%17 = OpLabel
OpReturn
OpFunctionEnd
%idx1 = OpFunction %int None %18
%20 = OpLabel
%21 = OpLoad %uint %v
%23 = OpISub %uint %21 %uint_1
OpStore %v %23
OpReturnValue %int_1
OpFunctionEnd
%idx2 = OpFunction %int None %18
%26 = OpLabel
%27 = OpLoad %uint %v
%28 = OpISub %uint %27 %uint_1
OpStore %v %28
OpReturnValue %int_2
OpFunctionEnd
%idx3 = OpFunction %int None %18
%31 = OpLabel
%32 = OpLoad %uint %v
%33 = OpISub %uint %32 %uint_1
OpStore %v %33
OpReturnValue %int_3
OpFunctionEnd
%idx4 = OpFunction %int None %18
%36 = OpLabel
%37 = OpLoad %uint %v
%38 = OpISub %uint %37 %uint_1
OpStore %v %38
OpReturnValue %int_4
OpFunctionEnd
%idx5 = OpFunction %int None %18
%41 = OpLabel
%42 = OpLoad %uint %v
%43 = OpISub %uint %42 %uint_1
OpStore %v %43
OpReturnValue %int_0
OpFunctionEnd
%idx6 = OpFunction %int None %18
%46 = OpLabel
%47 = OpLoad %uint %v
%48 = OpISub %uint %47 %uint_1
OpStore %v %48
OpReturnValue %int_2
OpFunctionEnd
%main = OpFunction %void None %14
%50 = OpLabel
%51 = OpFunctionCall %int %idx1
%52 = OpFunctionCall %int %idx2
%53 = OpFunctionCall %int %idx3
%56 = OpAccessChain %_ptr_StorageBuffer_int %buffer %uint_0 %51 %uint_0 %52 %53
%57 = OpAccessChain %_ptr_StorageBuffer_int %buffer %uint_0 %51 %uint_0 %52 %53
%58 = OpLoad %int %57
%59 = OpISub %int %58 %int_1
OpStore %56 %59
OpBranch %60
%60 = OpLabel
OpLoopMerge %61 %62 None
OpBranch %63
%63 = OpLabel
%65 = OpLoad %uint %v
%67 = OpULessThan %bool %65 %uint_10
%64 = OpLogicalNot %bool %67
OpSelectionMerge %69 None
OpBranchConditional %64 %70 %69
%70 = OpLabel
OpBranch %61
%69 = OpLabel
OpBranch %62
%62 = OpLabel
%71 = OpFunctionCall %int %idx4
%72 = OpFunctionCall %int %idx5
%73 = OpFunctionCall %int %idx6
%74 = OpAccessChain %_ptr_StorageBuffer_int %buffer %uint_0 %71 %uint_0 %72 %73
%75 = OpAccessChain %_ptr_StorageBuffer_int %buffer %uint_0 %71 %uint_0 %72 %73
%76 = OpLoad %int %75
%77 = OpISub %int %76 %int_1
OpStore %74 %77
OpBranch %60
%61 = OpLabel
OpReturn
OpFunctionEnd