blob: cb59323ee7bc6021063148a2c6a47ee39dbccd06 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 96
; 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 %gl_FragCoord "gl_FragCoord"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_float_values"
OpName %x_7 "x_7"
OpName %x_GLF_color "x_GLF_color"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_int_values"
OpName %x_10 "x_10"
OpName %main_1 "main_1"
OpName %a "a"
OpName %b "b"
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 %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_float_uint_4 ArrayStride 16
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 0
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_int_uint_2 ArrayStride 16
OpDecorate %x_10 NonWritable
OpDecorate %x_10 DescriptorSet 0
OpDecorate %x_10 Binding 1
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
%_ptr_Private_v4float = OpTypePointer Private %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_float_uint_4 = OpTypeArray %float %uint_4
%buf0 = OpTypeStruct %_arr_float_uint_4
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %7
%int = OpTypeInt 32 1
%uint_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%buf1 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_10 = OpVariable %_ptr_Uniform_buf1 Uniform
%void = OpTypeVoid
%23 = OpTypeFunction %void
%_ptr_Function_int = OpTypePointer Function %int
%29 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
%32 = OpConstantNull %float
%uint_1 = OpConstant %uint 1
%_ptr_Private_float = OpTypePointer Private %float
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%bool = OpTypeBool
%int_2 = OpConstant %int 2
%int_1 = OpConstant %int 1
%int_3 = OpConstant %int 3
%v3float = OpTypeVector %float 3
%_ptr_Uniform_int = OpTypePointer Uniform %int
%main_out = OpTypeStruct %v4float
%83 = OpTypeFunction %main_out %v4float
%main_1 = OpFunction %void None %23
%26 = OpLabel
%a = OpVariable %_ptr_Function_int Function %29
%b = OpVariable %_ptr_Function_float Function %32
%35 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%36 = OpLoad %float %35
%40 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%41 = OpLoad %float %40
%43 = OpFOrdGreaterThanEqual %bool %36 %41
%42 = OpSelect %int %43 %int_0 %int_2
OpStore %a %42
%47 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
%48 = OpLoad %float %47
%49 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_2
%50 = OpLoad %float %49
%52 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_3
%53 = OpLoad %float %52
%54 = OpLoad %int %a
%56 = OpCompositeConstruct %v3float %48 %50 %53
%57 = OpVectorExtractDynamic %float %56 %54
OpStore %b %57
%58 = OpLoad %float %b
%59 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
%60 = OpLoad %float %59
%61 = OpFOrdEqual %bool %58 %60
OpSelectionMerge %62 None
OpBranchConditional %61 %63 %64
%63 = OpLabel
%66 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%67 = OpLoad %int %66
%68 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%69 = OpLoad %int %68
%70 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%71 = OpLoad %int %70
%72 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%73 = OpLoad %int %72
%74 = OpConvertSToF %float %67
%75 = OpConvertSToF %float %69
%76 = OpConvertSToF %float %71
%77 = OpConvertSToF %float %73
%78 = OpCompositeConstruct %v4float %74 %75 %76 %77
OpStore %x_GLF_color %78
OpBranch %62
%64 = OpLabel
%79 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%80 = OpLoad %int %79
%81 = OpConvertSToF %float %80
%82 = OpCompositeConstruct %v4float %81 %81 %81 %81
OpStore %x_GLF_color %82
OpBranch %62
%62 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %83
%gl_FragCoord_param = OpFunctionParameter %v4float
%87 = OpLabel
OpStore %gl_FragCoord %gl_FragCoord_param
%88 = OpFunctionCall %void %main_1
%89 = OpLoad %v4float %x_GLF_color
%90 = OpCompositeConstruct %main_out %89
OpReturnValue %90
OpFunctionEnd
%main = OpFunction %void None %23
%92 = OpLabel
%94 = OpLoad %v4float %gl_FragCoord_param_1
%93 = OpFunctionCall %main_out %main_inner %94
%95 = OpCompositeExtract %v4float %93 0
OpStore %x_GLF_color_1_1 %95
OpReturn
OpFunctionEnd