blob: ed58ead90397fc65a1890105de2544bdaa35cca5 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 121
; 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_int_values"
OpName %x_8 "x_8"
OpName %gl_FragCoord "gl_FragCoord"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_float_values"
OpName %x_12 "x_12"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %f1_ "f1_"
OpName %i "i"
OpName %A "A"
OpName %a "a"
OpName %main_1 "main_1"
OpName %i_1 "i_1"
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_int_uint_3 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_float_uint_1 ArrayStride 16
OpDecorate %x_12 NonWritable
OpDecorate %x_12 DescriptorSet 0
OpDecorate %x_12 Binding 0
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
OpDecorate %_arr_int_uint_10 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_3 = OpConstant %uint 3
%_arr_int_uint_3 = OpTypeArray %int %uint_3
%buf1 = OpTypeStruct %_arr_int_uint_3
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_8 = OpVariable %_ptr_Uniform_buf1 Uniform
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%12 = OpConstantNull %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %12
%uint_1 = OpConstant %uint 1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%buf0 = OpTypeStruct %_arr_float_uint_1
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_12 = OpVariable %_ptr_Uniform_buf0 Uniform
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %12
%_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 %12
%23 = OpTypeFunction %int
%_ptr_Function_int = OpTypePointer Function %int
%28 = OpConstantNull %int
%uint_10 = OpConstant %uint 10
%_arr_int_uint_10 = OpTypeArray %int %uint_10
%_ptr_Function__arr_int_uint_10 = OpTypePointer Function %_arr_int_uint_10
%33 = OpConstantNull %_arr_int_uint_10
%uint_0 = OpConstant %uint 0
%int_2 = OpConstant %int 2
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_0 = OpConstant %int 0
%bool = OpTypeBool
%int_1 = OpConstant %int 1
%int_n1 = OpConstant %int -1
%_ptr_Private_float = OpTypePointer Private %float
%_ptr_Uniform_float = OpTypePointer Uniform %float
%void = OpTypeVoid
%91 = OpTypeFunction %void
%main_out = OpTypeStruct %v4float
%108 = OpTypeFunction %void %main_out
%f1_ = OpFunction %int None %23
%25 = OpLabel
%i = OpVariable %_ptr_Function_int Function %28
%A = OpVariable %_ptr_Function__arr_int_uint_10 Function %33
%a = OpVariable %_ptr_Function_int Function %28
%38 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_2
%39 = OpLoad %int %38
OpStore %i %39
OpBranch %40
%40 = OpLabel
OpLoopMerge %41 %42 None
OpBranch %43
%43 = OpLabel
%44 = OpLoad %int %i
%46 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%47 = OpLoad %int %46
%48 = OpSLessThan %bool %44 %47
OpSelectionMerge %50 None
OpBranchConditional %48 %51 %52
%51 = OpLabel
OpBranch %50
%52 = OpLabel
OpBranch %41
%50 = OpLabel
%53 = OpLoad %int %i
%54 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_2
%55 = OpLoad %int %54
%56 = OpAccessChain %_ptr_Function_int %A %53
OpStore %56 %55
OpBranch %42
%42 = OpLabel
%57 = OpLoad %int %i
%59 = OpIAdd %int %57 %int_1
OpStore %i %59
OpBranch %40
%41 = OpLabel
OpStore %a %int_n1
%62 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%63 = OpLoad %float %62
%65 = OpAccessChain %_ptr_Uniform_float %x_12 %uint_0 %int_0
%66 = OpLoad %float %65
%67 = OpFOrdGreaterThanEqual %bool %63 %66
OpSelectionMerge %68 None
OpBranchConditional %67 %69 %68
%69 = OpLabel
%70 = OpLoad %int %a
%71 = OpIAdd %int %70 %int_1
OpStore %a %71
%72 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%73 = OpLoad %int %72
%74 = OpAccessChain %_ptr_Function_int %A %71
OpStore %74 %73
OpBranch %68
%68 = OpLabel
%75 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_2
%76 = OpLoad %int %75
%77 = OpAccessChain %_ptr_Function_int %A %76
%78 = OpLoad %int %77
%79 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%80 = OpLoad %int %79
%81 = OpIEqual %bool %78 %80
OpSelectionMerge %82 None
OpBranchConditional %81 %83 %84
%83 = OpLabel
%85 = OpLoad %int %a
%86 = OpIAdd %int %85 %int_1
OpStore %a %86
%87 = OpAccessChain %_ptr_Function_int %A %86
%88 = OpLoad %int %87
OpReturnValue %88
%84 = OpLabel
%89 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%90 = OpLoad %int %89
OpReturnValue %90
%82 = OpLabel
OpReturnValue %int_0
OpFunctionEnd
%main_1 = OpFunction %void None %91
%94 = OpLabel
%i_1 = OpVariable %_ptr_Function_int Function %28
%96 = OpFunctionCall %int %f1_
OpStore %i_1 %96
%97 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%98 = OpLoad %int %97
%99 = OpLoad %int %i_1
%100 = OpLoad %int %i_1
%101 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%102 = OpLoad %int %101
%103 = OpConvertSToF %float %98
%104 = OpConvertSToF %float %99
%105 = OpConvertSToF %float %100
%106 = OpConvertSToF %float %102
%107 = OpCompositeConstruct %v4float %103 %104 %105 %106
OpStore %x_GLF_color %107
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %108
%tint_symbol_1 = OpFunctionParameter %main_out
%112 = OpLabel
%113 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %113
OpReturn
OpFunctionEnd
%main = OpFunction %void None %91
%115 = OpLabel
%116 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %116
%117 = OpFunctionCall %void %main_1
%119 = OpLoad %v4float %x_GLF_color
%120 = OpCompositeConstruct %main_out %119
%118 = OpFunctionCall %void %tint_symbol_3 %120
OpReturn
OpFunctionEnd