blob: 2fee22e0d82febcc107e7d8110e87e357ed2b445 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 42
; 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 %main "main"
OpName %i "i"
OpDecorate %buffer_block Block
OpMemberDecorate %buffer_block 0 Offset 0
OpDecorate %buffer DescriptorSet 0
OpDecorate %buffer Binding 0
%int = OpTypeInt 32 1
%buffer_block = OpTypeStruct %int
%_ptr_StorageBuffer_buffer_block = OpTypePointer StorageBuffer %buffer_block
%buffer = OpVariable %_ptr_StorageBuffer_buffer_block StorageBuffer
%void = OpTypeVoid
%5 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%_ptr_Function_int = OpTypePointer Function %int
%16 = OpConstantNull %int
%int_5 = OpConstant %int 5
%bool = OpTypeBool
%int_2 = OpConstant %int 2
%int_10 = OpConstant %int 10
%main = OpFunction %void None %5
%8 = OpLabel
%i = OpVariable %_ptr_Function_int Function %16
%12 = OpAccessChain %_ptr_StorageBuffer_int %buffer %uint_0
%13 = OpLoad %int %12
OpStore %i %13
OpBranch %17
%17 = OpLabel
OpLoopMerge %18 %19 None
OpBranch %20
%20 = OpLabel
OpBranch %19
%19 = OpLabel
OpBranch %21
%21 = OpLabel
OpLoopMerge %22 %23 None
OpBranch %24
%24 = OpLabel
%25 = OpLoad %int %i
%27 = OpSGreaterThan %bool %25 %int_5
OpSelectionMerge %29 None
OpBranchConditional %27 %30 %31
%30 = OpLabel
%32 = OpLoad %int %i
%34 = OpIMul %int %32 %int_2
OpStore %i %34
OpBranch %22
%31 = OpLabel
%35 = OpLoad %int %i
%36 = OpIMul %int %35 %int_2
OpStore %i %36
OpBranch %22
%29 = OpLabel
OpBranch %23
%23 = OpLabel
OpBranch %21
%22 = OpLabel
%37 = OpLoad %int %i
%39 = OpSGreaterThan %bool %37 %int_10
OpBranchConditional %39 %18 %17
%18 = OpLabel
%40 = OpAccessChain %_ptr_StorageBuffer_int %buffer %uint_0
%41 = OpLoad %int %i
OpStore %40 %41
OpReturn
OpFunctionEnd