blob: ddaaf9279aabb42eb06ce27bbdf2e033e6b15e6f [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 100
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "injectionSwitch"
OpName %x_7 "x_7"
OpName %gl_FragCoord "gl_FragCoord"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %main_1 "main_1"
OpName %loop_count "loop_count"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_3 "tint_symbol_3"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main "main"
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 0
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%9 = OpConstantNull %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %9
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %9
%_ptr_Input_v4float = OpTypePointer Input %v4float
%tint_symbol = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_2 = OpVariable %_ptr_Output_v4float Output %9
%void = OpTypeVoid
%15 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%22 = OpConstantNull %int
%int_0 = OpConstant %int 0
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%uint_1 = OpConstant %uint 1
%bool = OpTypeBool
%_ptr_Private_float = OpTypePointer Private %float
%float_0 = OpConstant %float 0
%int_100 = OpConstant %int 100
%float_1 = OpConstant %float 1
%57 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%63 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%int_1 = OpConstant %int 1
%main_out = OpTypeStruct %v4float
%87 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15
%18 = OpLabel
%loop_count = OpVariable %_ptr_Function_int Function %22
OpStore %loop_count %int_0
%27 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %uint_0
%28 = OpLoad %float %27
%30 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %uint_1
%31 = OpLoad %float %30
%32 = OpFOrdGreaterThan %bool %28 %31
OpSelectionMerge %34 None
OpBranchConditional %32 %35 %34
%35 = OpLabel
OpReturn
%34 = OpLabel
%37 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%38 = OpLoad %float %37
%40 = OpFOrdLessThan %bool %38 %float_0
OpBranch %41
%41 = OpLabel
OpLoopMerge %42 %43 None
OpBranch %44
%44 = OpLabel
%45 = OpLoad %int %loop_count
%47 = OpSLessThan %bool %45 %int_100
OpSelectionMerge %48 None
OpBranchConditional %47 %49 %50
%49 = OpLabel
OpBranch %48
%50 = OpLabel
OpBranch %42
%48 = OpLabel
OpSelectionMerge %51 None
OpBranchConditional %32 %52 %51
%52 = OpLabel
OpBranch %42
%51 = OpLabel
OpSelectionMerge %53 None
OpBranchConditional %32 %54 %55
%54 = OpLabel
OpStore %x_GLF_color %57
OpBranch %53
%55 = OpLabel
OpSelectionMerge %58 None
OpBranchConditional %40 %59 %58
%59 = OpLabel
OpReturn
%58 = OpLabel
OpBranch %53
%53 = OpLabel
OpSelectionMerge %60 None
OpBranchConditional %32 %61 %62
%61 = OpLabel
OpStore %x_GLF_color %57
OpBranch %60
%62 = OpLabel
OpStore %x_GLF_color %63
OpBranch %60
%60 = OpLabel
OpSelectionMerge %64 None
OpBranchConditional %32 %65 %64
%65 = OpLabel
OpReturn
%64 = OpLabel
OpSelectionMerge %66 None
OpBranchConditional %40 %67 %66
%67 = OpLabel
OpBranch %68
%68 = OpLabel
OpLoopMerge %69 %70 None
OpBranch %71
%71 = OpLabel
%72 = OpLoad %int %loop_count
%73 = OpSLessThan %bool %72 %int_100
OpSelectionMerge %74 None
OpBranchConditional %73 %75 %76
%75 = OpLabel
OpBranch %74
%76 = OpLabel
OpBranch %69
%74 = OpLabel
OpBranch %70
%70 = OpLabel
%77 = OpLoad %int %loop_count
%79 = OpIAdd %int %77 %int_1
OpStore %loop_count %79
OpBranch %68
%69 = OpLabel
OpBranch %66
%66 = OpLabel
OpBranch %43
%43 = OpLabel
%80 = OpLoad %int %loop_count
%81 = OpIAdd %int %80 %int_1
OpStore %loop_count %81
OpBranch %41
%42 = OpLabel
%82 = OpLoad %int %loop_count
%83 = OpSGreaterThanEqual %bool %82 %int_100
OpSelectionMerge %84 None
OpBranchConditional %83 %85 %86
%85 = OpLabel
OpStore %x_GLF_color %63
OpBranch %84
%86 = OpLabel
OpStore %x_GLF_color %57
OpBranch %84
%84 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %87
%tint_symbol_1 = OpFunctionParameter %main_out
%91 = OpLabel
%92 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %92
OpReturn
OpFunctionEnd
%main = OpFunction %void None %15
%94 = OpLabel
%95 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %95
%96 = OpFunctionCall %void %main_1
%98 = OpLoad %v4float %x_GLF_color
%99 = OpCompositeConstruct %main_out %98
%97 = OpFunctionCall %void %tint_symbol_3 %99
OpReturn
OpFunctionEnd