blob: 3c4cb670a6274b5c21e19e1fcc438a67fa044884 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 115
; Schema: 0
OpCapability Shader
%64 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
OpName %gl_FragCoord "gl_FragCoord"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_float_values"
OpName %x_9 "x_9"
OpName %x_GLF_color "x_GLF_color"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_int_values"
OpName %x_14 "x_14"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %f1_f1_ "f1_f1_"
OpName %a "a"
OpName %b "b"
OpName %c "c"
OpName %main_1 "main_1"
OpName %a_1 "a_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 %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_float_uint_3 ArrayStride 16
OpDecorate %x_9 NonWritable
OpDecorate %x_9 DescriptorSet 0
OpDecorate %x_9 Binding 0
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_int_uint_2 ArrayStride 16
OpDecorate %x_14 NonWritable
OpDecorate %x_14 DescriptorSet 0
OpDecorate %x_14 Binding 1
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_3 = OpConstant %uint 3
%_arr_float_uint_3 = OpTypeArray %float %uint_3
%buf0 = OpTypeStruct %_arr_float_uint_3
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_9 = OpVariable %_ptr_Uniform_buf0 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
%buf1 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_14 = OpVariable %_ptr_Uniform_buf1 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
%_ptr_Function_int = OpTypePointer Function %int
%30 = OpConstantNull %int
%32 = OpConstantNull %float
%int_8 = OpConstant %int 8
%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_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%void = OpTypeVoid
%67 = OpTypeFunction %void
%_ptr_Uniform_int = OpTypePointer Uniform %int
%main_out = OpTypeStruct %v4float
%102 = OpTypeFunction %void %main_out
%f1_f1_ = OpFunction %float None %23
%a = OpFunctionParameter %_ptr_Function_float
%27 = OpLabel
%b = OpVariable %_ptr_Function_int Function %30
%c = OpVariable %_ptr_Function_float Function %32
OpStore %b %int_8
%36 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%37 = OpLoad %float %36
%41 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %int_0
%42 = OpLoad %float %41
%43 = OpFOrdGreaterThanEqual %bool %37 %42
OpSelectionMerge %45 None
OpBranchConditional %43 %46 %45
%46 = OpLabel
%47 = OpLoad %int %b
%49 = OpIAdd %int %47 %int_1
OpStore %b %49
%50 = OpLoad %int %b
%51 = OpIAdd %int %50 %int_1
OpStore %b %51
OpBranch %45
%45 = OpLabel
%53 = OpLoad %float %a
%54 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %int_1
%55 = OpLoad %float %54
%56 = OpFOrdLessThan %bool %53 %55
OpSelectionMerge %57 None
OpBranchConditional %56 %58 %57
%58 = OpLabel
%59 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %int_1
%60 = OpLoad %float %59
OpReturnValue %60
%57 = OpLabel
%61 = OpLoad %int %b
%63 = OpExtInst %int %64 SClamp %61 %int_0 %int_2
%62 = OpConvertSToF %float %63
OpStore %c %62
%66 = OpLoad %float %c
OpReturnValue %66
OpFunctionEnd
%main_1 = OpFunction %void None %67
%70 = OpLabel
%a_1 = OpVariable %_ptr_Function_float Function %32
%param = OpVariable %_ptr_Function_float Function %32
%73 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %int_1
%74 = OpLoad %float %73
OpStore %param %74
%75 = OpFunctionCall %float %f1_f1_ %param
OpStore %a_1 %75
%77 = OpLoad %float %a_1
%78 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %int_2
%79 = OpLoad %float %78
%80 = OpFOrdEqual %bool %77 %79
OpSelectionMerge %81 None
OpBranchConditional %80 %82 %83
%82 = OpLabel
%85 = OpAccessChain %_ptr_Uniform_int %x_14 %uint_0 %int_1
%86 = OpLoad %int %85
%87 = OpAccessChain %_ptr_Uniform_int %x_14 %uint_0 %int_0
%88 = OpLoad %int %87
%89 = OpAccessChain %_ptr_Uniform_int %x_14 %uint_0 %int_0
%90 = OpLoad %int %89
%91 = OpAccessChain %_ptr_Uniform_int %x_14 %uint_0 %int_1
%92 = OpLoad %int %91
%93 = OpConvertSToF %float %86
%94 = OpConvertSToF %float %88
%95 = OpConvertSToF %float %90
%96 = OpConvertSToF %float %92
%97 = OpCompositeConstruct %v4float %93 %94 %95 %96
OpStore %x_GLF_color %97
OpBranch %81
%83 = OpLabel
%98 = OpAccessChain %_ptr_Uniform_int %x_14 %uint_0 %int_0
%99 = OpLoad %int %98
%100 = OpConvertSToF %float %99
%101 = OpCompositeConstruct %v4float %100 %100 %100 %100
OpStore %x_GLF_color %101
OpBranch %81
%81 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %102
%tint_symbol_1 = OpFunctionParameter %main_out
%106 = OpLabel
%107 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %107
OpReturn
OpFunctionEnd
%main = OpFunction %void None %67
%109 = OpLabel
%110 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %110
%111 = OpFunctionCall %void %main_1
%113 = OpLoad %v4float %x_GLF_color
%114 = OpCompositeConstruct %main_out %113
%112 = OpFunctionCall %void %tint_symbol_3 %114
OpReturn
OpFunctionEnd