blob: 45ee7a76ea6d005672d9bc349707ea07cfad6c5c [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 43
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %b_block "b_block"
OpMemberName %b_block 0 "inner"
OpName %Buf "Buf"
OpMemberName %Buf 0 "count"
OpMemberName %Buf 1 "data"
OpName %b "b"
OpName %main "main"
OpName %i "i"
OpDecorate %b_block Block
OpMemberDecorate %b_block 0 Offset 0
OpMemberDecorate %Buf 0 Offset 0
OpMemberDecorate %Buf 1 Offset 4
OpDecorate %_arr_uint_uint_50 ArrayStride 4
OpDecorate %b DescriptorSet 0
OpDecorate %b Binding 0
%uint = OpTypeInt 32 0
%uint_50 = OpConstant %uint 50
%_arr_uint_uint_50 = OpTypeArray %uint %uint_50
%Buf = OpTypeStruct %uint %_arr_uint_uint_50
%b_block = OpTypeStruct %Buf
%_ptr_StorageBuffer_b_block = OpTypePointer StorageBuffer %b_block
%b = OpVariable %_ptr_StorageBuffer_b_block StorageBuffer
%void = OpTypeVoid
%8 = OpTypeFunction %void
%12 = OpConstantNull %uint
%_ptr_Function_uint = OpTypePointer Function %uint
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%bool = OpTypeBool
%uint_2 = OpConstant %uint 2
%uint_1 = OpConstant %uint 1
%main = OpFunction %void None %8
%11 = OpLabel
%i = OpVariable %_ptr_Function_uint Function %12
OpStore %i %12
OpBranch %15
%15 = OpLabel
OpLoopMerge %16 %17 None
OpBranch %18
%18 = OpLabel
%19 = OpLoad %uint %i
%22 = OpAccessChain %_ptr_StorageBuffer_uint %b %uint_0 %uint_0
%23 = OpLoad %uint %22
%24 = OpUGreaterThanEqual %bool %19 %23
OpSelectionMerge %26 None
OpBranchConditional %24 %27 %26
%27 = OpLabel
OpBranch %16
%26 = OpLabel
%28 = OpLoad %uint %i
%29 = OpLoad %uint %i
%31 = OpUMod %uint %29 %uint_2
%32 = OpIEqual %bool %31 %12
OpSelectionMerge %33 None
OpBranchConditional %32 %34 %33
%34 = OpLabel
OpBranch %17
%33 = OpLabel
%36 = OpAccessChain %_ptr_StorageBuffer_uint %b %uint_0 %uint_1 %28
OpStore %36 %12
OpBranch %17
%17 = OpLabel
%37 = OpAccessChain %_ptr_StorageBuffer_uint %b %uint_0 %uint_1 %28
%38 = OpAccessChain %_ptr_StorageBuffer_uint %b %uint_0 %uint_1 %28
%39 = OpLoad %uint %38
%40 = OpIMul %uint %39 %uint_2
OpStore %37 %40
%41 = OpLoad %uint %i
%42 = OpIAdd %uint %41 %uint_1
OpStore %i %42
OpBranch %15
%16 = OpLabel
OpReturn
OpFunctionEnd