blob: 7ea0ec05871eef05377ec5ebfce7155befe693e0 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 41
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpMemberName %buffer_block 0 "inner"
OpName %buffer_block "buffer_block"
OpName %main "main"
OpName %i "i"
OpMemberDecorate %buffer_block 0 Offset 0
OpDecorate %buffer_block Block
OpDecorate %1 DescriptorSet 0
OpDecorate %1 Binding 0
OpDecorate %1 Coherent
%int = OpTypeInt 32 1
%buffer_block = OpTypeStruct %int
%_ptr_StorageBuffer_buffer_block = OpTypePointer StorageBuffer %buffer_block
%1 = OpVariable %_ptr_StorageBuffer_buffer_block StorageBuffer
%void = OpTypeVoid
%7 = OpTypeFunction %void
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Function_int = OpTypePointer Function %int
%int_5 = OpConstant %int 5
%bool = OpTypeBool
%int_2 = OpConstant %int 2
%int_10 = OpConstant %int 10
%main = OpFunction %void None %7
%8 = OpLabel
%i = OpVariable %_ptr_Function_int Function
%9 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0
%13 = OpLoad %int %9 None
OpStore %i %13
OpBranch %18
%18 = OpLabel
OpLoopMerge %19 %17 None
OpBranch %16
%16 = OpLabel
OpBranch %17
%17 = OpLabel
OpBranch %22
%22 = OpLabel
OpLoopMerge %23 %21 None
OpBranch %20
%20 = OpLabel
%24 = OpLoad %int %i None
%25 = OpSGreaterThan %bool %24 %int_5
OpSelectionMerge %28 None
OpBranchConditional %25 %29 %30
%29 = OpLabel
%31 = OpLoad %int %i None
%32 = OpIMul %int %31 %int_2
OpStore %i %32 None
OpBranch %23
%30 = OpLabel
%34 = OpLoad %int %i None
%35 = OpIMul %int %34 %int_2
OpStore %i %35 None
OpBranch %23
%28 = OpLabel
OpBranch %23
%21 = OpLabel
OpBranch %22
%23 = OpLabel
%36 = OpLoad %int %i None
%37 = OpSGreaterThan %bool %36 %int_10
OpBranchConditional %37 %19 %18
%19 = OpLabel
%39 = OpLoad %int %i None
%40 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0
OpStore %40 %39 None
OpReturn
OpFunctionEnd