blob: 66c0a8ca61023eb0917f557ebeb63d730334f092 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 104
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_float_values"
OpName %x_8 "x_8"
OpName %buf2 "buf2"
OpMemberName %buf2 0 "zero"
OpName %x_10 "x_10"
OpName %gl_FragCoord "gl_FragCoord"
OpName %x_GLF_color "x_GLF_color"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
OpName %x_13 "x_13"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %func_vf2_ "func_vf2_"
OpName %pos "pos"
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_2 ArrayStride 16
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 Binding 1
OpDecorate %buf2 Block
OpMemberDecorate %buf2 0 Offset 0
OpDecorate %x_10 NonWritable
OpDecorate %x_10 DescriptorSet 0
OpDecorate %x_10 Binding 2
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_int_uint_2 ArrayStride 16
OpDecorate %x_13 NonWritable
OpDecorate %x_13 DescriptorSet 0
OpDecorate %x_13 Binding 0
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_float_uint_2 = OpTypeArray %float %uint_2
%buf1 = OpTypeStruct %_arr_float_uint_2
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_8 = OpVariable %_ptr_Uniform_buf1 Uniform
%buf2 = OpTypeStruct %float
%_ptr_Uniform_buf2 = OpTypePointer Uniform %buf2
%x_10 = OpVariable %_ptr_Uniform_buf2 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%14 = OpConstantNull %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %14
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %14
%int = OpTypeInt 32 1
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%buf0 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_13 = 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 %14
%bool = OpTypeBool
%v2float = OpTypeVector %float 2
%_ptr_Function_v2float = OpTypePointer Function %v2float
%25 = OpTypeFunction %bool %_ptr_Function_v2float
%uint_0 = OpConstant %uint 0
%_ptr_Function_float = OpTypePointer Function %float
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%true = OpConstantTrue %bool
%uint_1 = OpConstant %uint 1
%false = OpConstantFalse %bool
%int_1 = OpConstant %int 1
%void = OpTypeVoid
%63 = OpTypeFunction %void
%68 = OpConstantNull %v2float
%_ptr_Uniform_int = OpTypePointer Uniform %int
%main_out = OpTypeStruct %v4float
%91 = OpTypeFunction %void %main_out
%func_vf2_ = OpFunction %bool None %25
%pos = OpFunctionParameter %_ptr_Function_v2float
%31 = OpLabel
%35 = OpAccessChain %_ptr_Function_float %pos %uint_0
%36 = OpLoad %float %35
%39 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%40 = OpLoad %float %39
%41 = OpFOrdLessThan %bool %36 %40
OpSelectionMerge %42 None
OpBranchConditional %41 %43 %42
%43 = OpLabel
OpReturnValue %true
%42 = OpLabel
%47 = OpAccessChain %_ptr_Function_float %pos %uint_1
%48 = OpLoad %float %47
%49 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%50 = OpLoad %float %49
%51 = OpFOrdGreaterThan %bool %48 %50
OpSelectionMerge %52 None
OpBranchConditional %51 %53 %52
%53 = OpLabel
OpReturnValue %false
%52 = OpLabel
%55 = OpAccessChain %_ptr_Uniform_float %x_10 %uint_0
%56 = OpLoad %float %55
%58 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_1
%59 = OpLoad %float %58
%60 = OpFOrdGreaterThan %bool %56 %59
OpSelectionMerge %61 None
OpBranchConditional %60 %62 %61
%62 = OpLabel
OpReturnValue %true
%61 = OpLabel
OpReturnValue %true
OpFunctionEnd
%main_1 = OpFunction %void None %63
%66 = OpLabel
%param = OpVariable %_ptr_Function_v2float Function %68
%69 = OpLoad %v4float %gl_FragCoord
%70 = OpCompositeExtract %float %69 0
%71 = OpCompositeExtract %float %69 1
%72 = OpCompositeConstruct %v2float %70 %71
OpStore %param %72
%73 = OpFunctionCall %bool %func_vf2_ %param
OpSelectionMerge %75 None
OpBranchConditional %73 %76 %75
%76 = OpLabel
OpKill
%75 = OpLabel
%78 = OpAccessChain %_ptr_Uniform_int %x_13 %uint_0 %int_0
%79 = OpLoad %int %78
%80 = OpAccessChain %_ptr_Uniform_int %x_13 %uint_0 %int_1
%81 = OpLoad %int %80
%82 = OpAccessChain %_ptr_Uniform_int %x_13 %uint_0 %int_1
%83 = OpLoad %int %82
%84 = OpAccessChain %_ptr_Uniform_int %x_13 %uint_0 %int_0
%85 = OpLoad %int %84
%86 = OpConvertSToF %float %79
%87 = OpConvertSToF %float %81
%88 = OpConvertSToF %float %83
%89 = OpConvertSToF %float %85
%90 = OpCompositeConstruct %v4float %86 %87 %88 %89
OpStore %x_GLF_color %90
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %91
%tint_symbol_1 = OpFunctionParameter %main_out
%95 = OpLabel
%96 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %96
OpReturn
OpFunctionEnd
%main = OpFunction %void None %63
%98 = OpLabel
%99 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %99
%100 = OpFunctionCall %void %main_1
%102 = OpLoad %v4float %x_GLF_color
%103 = OpCompositeConstruct %main_out %102
%101 = OpFunctionCall %void %tint_symbol_3 %103
OpReturn
OpFunctionEnd