blob: c5af5adb7e7b371d206aaef448e8d961c8e83e81 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 106
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
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 %x_51 "x_51"
OpName %x_12_phi "x_12_phi"
OpName %S "S"
OpMemberName %S 0 "f0"
OpMemberName %S 1 "f1"
OpName %x_45 "x_45"
OpName %x_45_phi "x_45_phi"
OpName %x_11_phi "x_11_phi"
OpName %x_46 "x_46"
OpName %x_9 "x_9"
OpName %x_6 "x_6"
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 %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %S 1 Offset 16
OpMemberDecorate %S 1 ColMajor
OpMemberDecorate %S 1 MatrixStride 16
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%5 = OpConstantNull %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %5
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%_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 %5
%void = OpTypeVoid
%11 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%18 = OpConstantNull %int
%v3float = OpTypeVector %float 3
%mat4v3float = OpTypeMatrix %v3float 4
%S = OpTypeStruct %int %mat4v3float
%_ptr_Function_S = OpTypePointer Function %S
%29 = OpConstantNull %S
%int_0 = OpConstant %int 0
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%35 = OpConstantComposite %v3float %float_1 %float_0 %float_0
%36 = OpConstantComposite %v3float %float_0 %float_1 %float_0
%37 = OpConstantComposite %v3float %float_0 %float_0 %float_1
%38 = OpConstantComposite %v3float %float_0 %float_0 %float_0
%39 = OpConstantComposite %mat4v3float %35 %36 %37 %38
%40 = OpConstantComposite %S %int_0 %39
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Private_float = OpTypePointer Private %float
%bool = OpTypeBool
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%64 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%int_1000 = OpConstant %int 1000
%90 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
%93 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %11
%14 = OpLabel
%x_51 = OpVariable %_ptr_Function_int Function %18
%x_12_phi = OpVariable %_ptr_Function_int Function %18
%x_45 = OpVariable %_ptr_Function_S Function %29
%x_45_phi = OpVariable %_ptr_Function_S Function %29
%x_11_phi = OpVariable %_ptr_Function_int Function %18
%x_46 = OpVariable %_ptr_Function_S Function %29
%x_9 = OpVariable %_ptr_Function_int Function %18
%x_6 = OpVariable %_ptr_Function_int Function %18
OpBranch %20
%20 = OpLabel
OpLoopMerge %21 %22 None
OpBranch %23
%23 = OpLabel
OpStore %x_45_phi %40
OpStore %x_11_phi %int_0
OpBranch %41
%41 = OpLabel
OpLoopMerge %42 %43 None
OpBranch %44
%44 = OpLabel
%47 = OpLoad %S %x_45_phi
OpStore %x_45 %47
%48 = OpLoad %int %x_11_phi
%52 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%53 = OpLoad %float %52
%55 = OpFOrdEqual %bool %53 %float_0
%54 = OpSelect %int %55 %int_1 %int_2
OpStore %x_51 %54
%59 = OpLoad %int %x_51
%60 = OpSLessThan %bool %48 %59
OpSelectionMerge %61 None
OpBranchConditional %60 %62 %63
%62 = OpLabel
OpBranch %61
%63 = OpLabel
OpBranch %42
%61 = OpLabel
OpBranch %43
%43 = OpLabel
OpStore %x_GLF_color %64
%65 = OpLoad %S %x_45
OpStore %x_46 %65
%66 = OpAccessChain %_ptr_Function_int %x_46 %uint_0
%67 = OpAccessChain %_ptr_Function_int %x_45 %uint_0
%68 = OpLoad %int %67
%69 = OpIAdd %int %68 %int_1
OpStore %66 %69
%70 = OpIAdd %int %48 %int_1
OpStore %x_9 %70
%71 = OpLoad %S %x_46
OpStore %x_45_phi %71
%72 = OpLoad %int %x_9
OpStore %x_11_phi %72
OpBranch %41
%42 = OpLabel
%73 = OpAccessChain %_ptr_Function_int %x_45 %uint_0
%74 = OpLoad %int %73
%76 = OpSLessThan %bool %74 %int_1000
OpSelectionMerge %77 None
OpBranchConditional %76 %78 %77
%78 = OpLabel
OpBranch %21
%77 = OpLabel
OpBranch %21
%22 = OpLabel
OpBranch %20
%21 = OpLabel
OpStore %x_12_phi %int_0
OpBranch %79
%79 = OpLabel
OpLoopMerge %80 %81 None
OpBranch %82
%82 = OpLabel
%84 = OpLoad %int %x_12_phi
%85 = OpLoad %int %x_51
%86 = OpSLessThan %bool %84 %85
OpSelectionMerge %87 None
OpBranchConditional %86 %88 %89
%88 = OpLabel
OpBranch %87
%89 = OpLabel
OpBranch %80
%87 = OpLabel
OpBranch %81
%81 = OpLabel
OpStore %x_GLF_color %90
%91 = OpIAdd %int %84 %int_1
OpStore %x_6 %91
%92 = OpLoad %int %x_6
OpStore %x_12_phi %92
OpBranch %79
%80 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %93
%tint_symbol_1 = OpFunctionParameter %main_out
%97 = OpLabel
%98 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %98
OpReturn
OpFunctionEnd
%main = OpFunction %void None %11
%100 = OpLabel
%101 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %101
%102 = OpFunctionCall %void %main_1
%104 = OpLoad %v4float %x_GLF_color
%105 = OpCompositeConstruct %main_out %104
%103 = OpFunctionCall %void %tint_symbol_3 %105
OpReturn
OpFunctionEnd