blob: 7b6efef4aa6a90e9f74977988c9fcb13a77e7dc2 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 128
; 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 %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_float_values"
OpName %x_8 "x_8"
OpName %x_GLF_color "x_GLF_color"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
OpName %x_11 "x_11"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %func_f1_ "func_f1_"
OpName %x "x"
OpName %main_1 "main_1"
OpName %param "param"
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 %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_float_uint_4 ArrayStride 16
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 Binding 1
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_int_uint_2 ArrayStride 16
OpDecorate %x_11 NonWritable
OpDecorate %x_11 DescriptorSet 0
OpDecorate %x_11 Binding 0
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
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
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_float_uint_4 = OpTypeArray %float %uint_4
%buf1 = OpTypeStruct %_arr_float_uint_4
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_8 = OpVariable %_ptr_Uniform_buf1 Uniform
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%int = OpTypeInt 32 1
%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_11 = OpVariable %_ptr_Uniform_buf0 Uniform
%_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
%_ptr_Function_float = OpTypePointer Function %float
%23 = OpTypeFunction %float %_ptr_Function_float
%bool = OpTypeBool
%true = OpConstantTrue %bool
%uint_1 = OpConstant %uint 1
%_ptr_Private_float = OpTypePointer Private %float
%uint_0 = OpConstant %uint 0
%int_2 = OpConstant %int 2
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_3 = OpConstant %int 3
%int_1 = OpConstant %int 1
%int_0 = OpConstant %int 0
%void = OpTypeVoid
%81 = OpTypeFunction %void
%86 = OpConstantNull %float
%_ptr_Uniform_int = OpTypePointer Uniform %int
%main_out = OpTypeStruct %v4float
%115 = OpTypeFunction %void %main_out
%func_f1_ = OpFunction %float None %23
%x = OpFunctionParameter %_ptr_Function_float
%27 = OpLabel
OpBranch %28
%28 = OpLabel
OpLoopMerge %29 %30 None
OpBranch %31
%31 = OpLabel
OpSelectionMerge %34 None
OpBranchConditional %true %35 %36
%35 = OpLabel
OpBranch %34
%36 = OpLabel
OpBranch %29
%34 = OpLabel
OpBranch %37
%37 = OpLabel
OpLoopMerge %38 %39 None
OpBranch %40
%40 = OpLabel
%43 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%44 = OpLoad %float %43
%48 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_2
%49 = OpLoad %float %48
%50 = OpFOrdLessThan %bool %44 %49
OpSelectionMerge %51 None
OpBranchConditional %50 %52 %51
%52 = OpLabel
OpBranch %53
%53 = OpLabel
OpLoopMerge %54 %55 None
OpBranch %56
%56 = OpLabel
OpBranch %55
%55 = OpLabel
%57 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%58 = OpLoad %float %57
%59 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_2
%60 = OpLoad %float %59
%61 = OpFOrdLessThan %bool %58 %60
OpBranchConditional %61 %53 %54
%54 = OpLabel
OpBranch %51
%51 = OpLabel
%63 = OpLoad %float %x
%65 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_3
%66 = OpLoad %float %65
%67 = OpFOrdLessThan %bool %63 %66
OpSelectionMerge %68 None
OpBranchConditional %67 %69 %68
%69 = OpLabel
%71 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_1
%72 = OpLoad %float %71
OpReturnValue %72
%68 = OpLabel
OpBranch %39
%39 = OpLabel
%73 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%74 = OpLoad %float %73
%75 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_2
%76 = OpLoad %float %75
%77 = OpFOrdLessThan %bool %74 %76
OpBranchConditional %77 %37 %38
%38 = OpLabel
OpBranch %30
%30 = OpLabel
OpBranch %28
%29 = OpLabel
%79 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%80 = OpLoad %float %79
OpReturnValue %80
OpFunctionEnd
%main_1 = OpFunction %void None %81
%84 = OpLabel
%param = OpVariable %_ptr_Function_float Function %86
%87 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%88 = OpLoad %float %87
OpStore %param %88
%89 = OpFunctionCall %float %func_f1_ %param
%91 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_1
%92 = OpLoad %float %91
%93 = OpFOrdEqual %bool %89 %92
OpSelectionMerge %94 None
OpBranchConditional %93 %95 %96
%95 = OpLabel
%98 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_0
%99 = OpLoad %int %98
%100 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_1
%101 = OpLoad %int %100
%102 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_1
%103 = OpLoad %int %102
%104 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_0
%105 = OpLoad %int %104
%106 = OpConvertSToF %float %99
%107 = OpConvertSToF %float %101
%108 = OpConvertSToF %float %103
%109 = OpConvertSToF %float %105
%110 = OpCompositeConstruct %v4float %106 %107 %108 %109
OpStore %x_GLF_color %110
OpBranch %94
%96 = OpLabel
%111 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_1
%112 = OpLoad %int %111
%113 = OpConvertSToF %float %112
%114 = OpCompositeConstruct %v4float %113 %113 %113 %113
OpStore %x_GLF_color %114
OpBranch %94
%94 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %115
%tint_symbol_1 = OpFunctionParameter %main_out
%119 = OpLabel
%120 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %120
OpReturn
OpFunctionEnd
%main = OpFunction %void None %81
%122 = OpLabel
%123 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %123
%124 = OpFunctionCall %void %main_1
%126 = OpLoad %v4float %x_GLF_color
%127 = OpCompositeConstruct %main_out %126
%125 = OpFunctionCall %void %tint_symbol_3 %127
OpReturn
OpFunctionEnd