blob: acba4e08609ff12be70d2431300b5b60a1e6346f [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 131
; 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_7 "x_7"
OpName %gl_FragCoord "gl_FragCoord"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_float_values"
OpName %x_11 "x_11"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %main_1 "main_1"
OpName %a "a"
OpName %i "i"
OpName %j "j"
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_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 1
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_float_uint_1 ArrayStride 16
OpDecorate %x_11 NonWritable
OpDecorate %x_11 DescriptorSet 0
OpDecorate %x_11 Binding 0
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
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_7 = 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_11 = 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
%void = OpTypeVoid
%23 = OpTypeFunction %void
%_ptr_Function_int = OpTypePointer Function %int
%29 = OpConstantNull %int
%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
%_ptr_Private_float = OpTypePointer Private %float
%_ptr_Uniform_float = OpTypePointer Uniform %float
%main_out = OpTypeStruct %v4float
%118 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %23
%26 = OpLabel
%a = OpVariable %_ptr_Function_int Function %29
%i = OpVariable %_ptr_Function_int Function %29
%j = OpVariable %_ptr_Function_int Function %29
%35 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_2
%36 = OpLoad %int %35
OpStore %a %36
%37 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_2
%38 = OpLoad %int %37
OpStore %i %38
OpBranch %39
%39 = OpLabel
OpLoopMerge %40 %41 None
OpBranch %42
%42 = OpLabel
%43 = OpLoad %int %i
%45 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_0
%46 = OpLoad %int %45
%47 = OpSLessThan %bool %43 %46
OpSelectionMerge %49 None
OpBranchConditional %47 %50 %51
%50 = OpLabel
OpBranch %49
%51 = OpLabel
OpBranch %40
%49 = OpLabel
%52 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_2
%53 = OpLoad %int %52
OpStore %j %53
OpBranch %54
%54 = OpLabel
OpLoopMerge %55 %56 None
OpBranch %57
%57 = OpLabel
%58 = OpLoad %int %j
%59 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_0
%60 = OpLoad %int %59
%61 = OpSLessThan %bool %58 %60
OpSelectionMerge %62 None
OpBranchConditional %61 %63 %64
%63 = OpLabel
OpBranch %62
%64 = OpLabel
OpBranch %55
%62 = OpLabel
OpBranch %65
%65 = OpLabel
OpLoopMerge %66 %67 None
OpBranch %68
%68 = OpLabel
%70 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
%71 = OpLoad %int %70
OpStore %a %71
%73 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%74 = OpLoad %float %73
%76 = OpAccessChain %_ptr_Uniform_float %x_11 %uint_0 %int_0
%77 = OpLoad %float %76
%78 = OpFOrdLessThan %bool %74 %77
OpSelectionMerge %79 None
OpBranchConditional %78 %80 %79
%80 = OpLabel
OpKill
%79 = OpLabel
OpBranch %67
%67 = OpLabel
%81 = OpLoad %int %a
%82 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
%83 = OpLoad %int %82
%84 = OpSLessThan %bool %81 %83
OpBranchConditional %84 %65 %66
%66 = OpLabel
%85 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%86 = OpLoad %float %85
%87 = OpAccessChain %_ptr_Uniform_float %x_11 %uint_0 %int_0
%88 = OpLoad %float %87
%89 = OpFOrdLessThan %bool %86 %88
OpSelectionMerge %90 None
OpBranchConditional %89 %91 %90
%91 = OpLabel
OpBranch %55
%90 = OpLabel
OpBranch %56
%56 = OpLabel
%92 = OpLoad %int %j
%93 = OpIAdd %int %92 %int_1
OpStore %j %93
OpBranch %54
%55 = OpLabel
OpBranch %41
%41 = OpLabel
%94 = OpLoad %int %i
%95 = OpIAdd %int %94 %int_1
OpStore %i %95
OpBranch %39
%40 = OpLabel
%96 = OpLoad %int %a
%97 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
%98 = OpLoad %int %97
%99 = OpIEqual %bool %96 %98
OpSelectionMerge %100 None
OpBranchConditional %99 %101 %102
%101 = OpLabel
%103 = OpLoad %int %a
%104 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_2
%105 = OpLoad %int %104
%106 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_2
%107 = OpLoad %int %106
%108 = OpLoad %int %a
%109 = OpConvertSToF %float %103
%110 = OpConvertSToF %float %105
%111 = OpConvertSToF %float %107
%112 = OpConvertSToF %float %108
%113 = OpCompositeConstruct %v4float %109 %110 %111 %112
OpStore %x_GLF_color %113
OpBranch %100
%102 = OpLabel
%114 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_2
%115 = OpLoad %int %114
%116 = OpConvertSToF %float %115
%117 = OpCompositeConstruct %v4float %116 %116 %116 %116
OpStore %x_GLF_color %117
OpBranch %100
%100 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %118
%tint_symbol_1 = OpFunctionParameter %main_out
%122 = OpLabel
%123 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %123
OpReturn
OpFunctionEnd
%main = OpFunction %void None %23
%125 = OpLabel
%126 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %126
%127 = OpFunctionCall %void %main_1
%129 = OpLoad %v4float %x_GLF_color
%130 = OpCompositeConstruct %main_out %129
%128 = OpFunctionCall %void %tint_symbol_3 %130
OpReturn
OpFunctionEnd