blob: 3ccba4ea0a0dd36d4182f909628d8fa9558fe185 [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" %gl_FragCoord_param_1 %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %gl_FragCoord_param_1 "gl_FragCoord_param_1"
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
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 %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 %main_inner "main_inner"
OpName %gl_FragCoord_param "gl_FragCoord_param"
OpName %main "main"
OpDecorate %gl_FragCoord_param_1 BuiltIn FragCoord
OpDecorate %x_GLF_color_1_1 Location 0
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
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord_param_1 = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%7 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %7
%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
%_ptr_Private_v4float = OpTypePointer Private %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %7
%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
%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 %main_out %v4float
%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
%main_inner = OpFunction %main_out None %91
%gl_FragCoord_param = OpFunctionParameter %v4float
%95 = OpLabel
OpStore %gl_FragCoord %gl_FragCoord_param
%96 = OpFunctionCall %void %main_1
%97 = OpLoad %v4float %x_GLF_color
%98 = OpCompositeConstruct %main_out %97
OpReturnValue %98
OpFunctionEnd
%main = OpFunction %void None %63
%100 = OpLabel
%102 = OpLoad %v4float %gl_FragCoord_param_1
%101 = OpFunctionCall %main_out %main_inner %102
%103 = OpCompositeExtract %v4float %101 0
OpStore %x_GLF_color_1_1 %103
OpReturn
OpFunctionEnd