blob: db5634e1bbd7000bfe655f6b4cda775148dbaf40 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 101
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_global_loop_count "x_GLF_global_loop_count"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
OpName %x_7 "x_7"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %func_ "func_"
OpName %main_1 "main_1"
OpName %a "a"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %tint_symbol "tint_symbol"
OpName %main "main"
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_int_uint_3 ArrayStride 16
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%_ptr_Private_int = OpTypePointer Private %int
%4 = OpConstantNull %int
%x_GLF_global_loop_count = OpVariable %_ptr_Private_int Private %4
%uint = OpTypeInt 32 0
%uint_3 = OpConstant %uint 3
%_arr_int_uint_3 = OpTypeArray %int %uint_3
%buf0 = OpTypeStruct %_arr_int_uint_3
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%15 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %15
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %15
%18 = OpTypeFunction %int
%int_100 = OpConstant %int 100
%bool = OpTypeBool
%int_1 = OpConstant %int 1
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_2 = OpConstant %int 2
%void = OpTypeVoid
%43 = OpTypeFunction %void
%_ptr_Function_int = OpTypePointer Function %int
%false = OpConstantFalse %bool
%true = OpConstantTrue %bool
%main_out = OpTypeStruct %v4float
%89 = OpTypeFunction %void %main_out
%func_ = OpFunction %int None %18
%20 = OpLabel
OpBranch %21
%21 = OpLabel
OpLoopMerge %22 %23 None
OpBranch %24
%24 = OpLabel
%25 = OpLoad %int %x_GLF_global_loop_count
%27 = OpSLessThan %bool %25 %int_100
OpSelectionMerge %29 None
OpBranchConditional %27 %30 %31
%30 = OpLabel
OpBranch %29
%31 = OpLabel
OpBranch %22
%29 = OpLabel
%32 = OpLoad %int %x_GLF_global_loop_count
%34 = OpIAdd %int %32 %int_1
OpStore %x_GLF_global_loop_count %34
%38 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_0
%39 = OpLoad %int %38
OpReturnValue %39
%23 = OpLabel
OpBranch %21
%22 = OpLabel
%41 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_2
%42 = OpLoad %int %41
OpReturnValue %42
OpFunctionEnd
%main_1 = OpFunction %void None %43
%46 = OpLabel
%a = OpVariable %_ptr_Function_int Function %4
OpStore %x_GLF_global_loop_count %int_0
OpBranch %49
%49 = OpLabel
OpLoopMerge %50 %51 None
OpBranch %52
%52 = OpLabel
%53 = OpLoad %int %x_GLF_global_loop_count
%54 = OpIAdd %int %53 %int_1
OpStore %x_GLF_global_loop_count %54
OpSelectionMerge %56 None
OpBranchConditional %false %57 %56
%57 = OpLabel
OpReturn
%56 = OpLabel
OpBranch %51
%51 = OpLabel
%58 = OpLoad %int %x_GLF_global_loop_count
OpSelectionMerge %60 None
OpBranchConditional %true %61 %60
%61 = OpLabel
%62 = OpSLessThan %bool %58 %int_100
OpBranch %60
%60 = OpLabel
%63 = OpPhi %bool %true %51 %62 %61
OpBranchConditional %63 %49 %50
%50 = OpLabel
%64 = OpFunctionCall %int %func_
OpStore %a %64
%65 = OpLoad %int %a
%66 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_2
%67 = OpLoad %int %66
%68 = OpIEqual %bool %65 %67
OpSelectionMerge %69 None
OpBranchConditional %68 %70 %71
%70 = OpLabel
%72 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_0
%73 = OpLoad %int %72
%74 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
%75 = OpLoad %int %74
%76 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
%77 = OpLoad %int %76
%78 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_0
%79 = OpLoad %int %78
%80 = OpConvertSToF %float %73
%81 = OpConvertSToF %float %75
%82 = OpConvertSToF %float %77
%83 = OpConvertSToF %float %79
%84 = OpCompositeConstruct %v4float %80 %81 %82 %83
OpStore %x_GLF_color %84
OpBranch %69
%71 = OpLabel
%85 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
%86 = OpLoad %int %85
%87 = OpConvertSToF %float %86
%88 = OpCompositeConstruct %v4float %87 %87 %87 %87
OpStore %x_GLF_color %88
OpBranch %69
%69 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %89
%tint_symbol = OpFunctionParameter %main_out
%93 = OpLabel
%94 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %94
OpReturn
OpFunctionEnd
%main = OpFunction %void None %43
%96 = OpLabel
%97 = OpFunctionCall %void %main_1
%99 = OpLoad %v4float %x_GLF_color
%100 = OpCompositeConstruct %main_out %99
%98 = OpFunctionCall %void %tint_symbol_2 %100
OpReturn
OpFunctionEnd