blob: dce179a9e78d031a1d1b43fb6fce5d8275bcc20a [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 60
; 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 %b "b"
OpName %func_3 "func_3"
OpName %tint_return_flag "tint_return_flag"
OpName %tint_return_value "tint_return_value"
OpName %i "i"
OpName %j "j"
OpName %main "main"
OpDecorate %b_block Block
OpMemberDecorate %b_block 0 Offset 0
OpDecorate %b NonWritable
OpDecorate %b DescriptorSet 0
OpDecorate %b Binding 0
%int = OpTypeInt 32 1
%b_block = OpTypeStruct %int
%_ptr_Uniform_b_block = OpTypePointer Uniform %b_block
%b = OpVariable %_ptr_Uniform_b_block Uniform
%bool = OpTypeBool
%5 = OpTypeFunction %bool
%_ptr_Function_bool = OpTypePointer Function %bool
%11 = OpConstantNull %bool
%13 = OpConstantNull %int
%_ptr_Function_int = OpTypePointer Function %int
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_n1 = OpConstant %int -1
%int_1 = OpConstant %int 1
%true = OpConstantTrue %bool
%void = OpTypeVoid
%55 = OpTypeFunction %void
%func_3 = OpFunction %bool None %5
%8 = OpLabel
%tint_return_flag = OpVariable %_ptr_Function_bool Function %11
%tint_return_value = OpVariable %_ptr_Function_bool Function %11
%i = OpVariable %_ptr_Function_int Function %13
%j = OpVariable %_ptr_Function_int Function %13
OpStore %i %13
OpBranch %16
%16 = OpLabel
OpLoopMerge %17 %18 None
OpBranch %19
%19 = OpLabel
%21 = OpLoad %int %i
%25 = OpAccessChain %_ptr_Uniform_int %b %uint_0
%26 = OpLoad %int %25
%27 = OpSLessThan %bool %21 %26
%20 = OpLogicalNot %bool %27
OpSelectionMerge %28 None
OpBranchConditional %20 %29 %28
%29 = OpLabel
OpBranch %17
%28 = OpLabel
OpStore %j %int_n1
OpBranch %32
%32 = OpLabel
OpLoopMerge %33 %34 None
OpBranch %35
%35 = OpLabel
%37 = OpLoad %int %j
%39 = OpIEqual %bool %37 %int_1
%36 = OpLogicalNot %bool %39
OpSelectionMerge %40 None
OpBranchConditional %36 %41 %40
%41 = OpLabel
OpBranch %33
%40 = OpLabel
OpStore %tint_return_flag %true
OpStore %tint_return_value %11
OpBranch %33
%34 = OpLabel
%43 = OpLoad %int %j
%44 = OpIAdd %int %43 %int_1
OpStore %j %44
OpBranch %32
%33 = OpLabel
%45 = OpLoad %bool %tint_return_flag
OpSelectionMerge %46 None
OpBranchConditional %45 %47 %46
%47 = OpLabel
OpBranch %17
%46 = OpLabel
OpBranch %18
%18 = OpLabel
%48 = OpLoad %int %i
%49 = OpIAdd %int %48 %int_1
OpStore %i %49
OpBranch %16
%17 = OpLabel
%51 = OpLoad %bool %tint_return_flag
%50 = OpLogicalNot %bool %51
OpSelectionMerge %52 None
OpBranchConditional %50 %53 %52
%53 = OpLabel
OpStore %tint_return_flag %true
OpStore %tint_return_value %11
OpBranch %52
%52 = OpLabel
%54 = OpLoad %bool %tint_return_value
OpReturnValue %54
OpFunctionEnd
%main = OpFunction %void None %55
%58 = OpLabel
%59 = OpFunctionCall %bool %func_3
OpReturn
OpFunctionEnd