blob: 102efd2e6b636e6368684c74c154e41f94889faf [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 86
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
OpName %x_GLF_global_loop_count "x_GLF_global_loop_count"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
OpName %x_6 "x_6"
OpName %x_GLF_color "x_GLF_color"
OpName %main_1 "main_1"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %main_inner "main_inner"
OpName %main "main"
OpDecorate %x_GLF_color_1_1 Location 0
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_int_uint_2 ArrayStride 16
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %5
%int = OpTypeInt 32 1
%_ptr_Private_int = OpTypePointer Private %int
%9 = OpConstantNull %int
%x_GLF_global_loop_count = OpVariable %_ptr_Private_int Private %9
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%buf0 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%void = OpTypeVoid
%18 = OpTypeFunction %void
%int_0 = OpConstant %int 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%bool = OpTypeBool
%true = OpConstantTrue %bool
%int_1 = OpConstant %int 1
%false = OpConstantFalse %bool
%int_100 = OpConstant %int 100
%main_out = OpTypeStruct %v4float
%75 = OpTypeFunction %main_out
%main_1 = OpFunction %void None %18
%21 = OpLabel
OpStore %x_GLF_global_loop_count %int_0
%25 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%26 = OpLoad %int %25
OpSelectionMerge %27 None
OpSwitch %26 %28 0 %29 1 %30
%29 = OpLabel
OpSelectionMerge %33 None
OpBranchConditional %true %34 %33
%34 = OpLabel
%36 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%37 = OpLoad %int %36
%38 = OpConvertSToF %float %37
%39 = OpCompositeConstruct %v4float %38 %38 %38 %38
OpStore %x_GLF_color %39
OpReturn
%33 = OpLabel
OpBranch %30
%30 = OpLabel
OpSelectionMerge %40 None
OpBranchConditional %true %41 %40
%41 = OpLabel
%42 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%43 = OpLoad %int %42
%44 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%45 = OpLoad %int %44
%46 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%47 = OpLoad %int %46
%48 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%49 = OpLoad %int %48
%50 = OpConvertSToF %float %43
%51 = OpConvertSToF %float %45
%52 = OpConvertSToF %float %47
%53 = OpConvertSToF %float %49
%54 = OpCompositeConstruct %v4float %50 %51 %52 %53
OpStore %x_GLF_color %54
OpSelectionMerge %56 None
OpBranchConditional %false %57 %56
%57 = OpLabel
%58 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%59 = OpLoad %int %58
%60 = OpConvertSToF %float %59
%61 = OpCompositeConstruct %v4float %60 %60 %60 %60
OpStore %x_GLF_color %61
OpBranch %62
%62 = OpLabel
OpLoopMerge %63 %64 None
OpBranch %65
%65 = OpLabel
%66 = OpLoad %int %x_GLF_global_loop_count
%67 = OpIAdd %int %66 %int_1
OpStore %x_GLF_global_loop_count %67
OpSelectionMerge %68 None
OpBranchConditional %false %69 %68
%69 = OpLabel
OpReturn
%68 = OpLabel
OpSelectionMerge %70 None
OpBranchConditional %true %71 %70
%71 = OpLabel
OpReturn
%70 = OpLabel
OpBranch %64
%64 = OpLabel
%72 = OpLoad %int %x_GLF_global_loop_count
%74 = OpSLessThan %bool %72 %int_100
OpBranchConditional %74 %62 %63
%63 = OpLabel
OpBranch %56
%56 = OpLabel
OpBranch %40
%40 = OpLabel
OpBranch %27
%28 = OpLabel
OpBranch %27
%27 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %75
%78 = OpLabel
%79 = OpFunctionCall %void %main_1
%80 = OpLoad %v4float %x_GLF_color
%81 = OpCompositeConstruct %main_out %80
OpReturnValue %81
OpFunctionEnd
%main = OpFunction %void None %18
%83 = OpLabel
%84 = OpFunctionCall %main_out %main_inner
%85 = OpCompositeExtract %v4float %84 0
OpStore %x_GLF_color_1_1 %85
OpReturn
OpFunctionEnd