blob: f6ad90124e0dcab4011a55118b05bd3da7734e97 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 102
; Schema: 0
OpCapability Shader
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_8 "x_8"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_int_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 %f1_ "f1_"
OpName %a "a"
OpName %i "i"
OpName %main_1 "main_1"
OpName %a_1 "a_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 %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_float_uint_1 ArrayStride 16
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 Binding 0
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_int_uint_3 ArrayStride 16
OpDecorate %x_11 NonWritable
OpDecorate %x_11 DescriptorSet 0
OpDecorate %x_11 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_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_8 = OpVariable %_ptr_Uniform_buf0 Uniform
%int = OpTypeInt 32 1
%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_11 = OpVariable %_ptr_Uniform_buf1 Uniform
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%_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
%23 = OpTypeFunction %int
%_ptr_Function_int = OpTypePointer Function %int
%28 = OpConstantNull %int
%int_256 = OpConstant %int 256
%_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
%_ptr_Uniform_int = OpTypePointer Uniform %int
%void = OpTypeVoid
%58 = OpTypeFunction %void
%int_2 = OpConstant %int 2
%main_out = OpTypeStruct %v4float
%89 = OpTypeFunction %void %main_out
%f1_ = OpFunction %int None %23
%25 = OpLabel
%a = OpVariable %_ptr_Function_int Function %28
%i = OpVariable %_ptr_Function_int Function %28
OpStore %a %int_256
%32 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%33 = OpLoad %float %32
%37 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%38 = OpLoad %float %37
%39 = OpFOrdGreaterThan %bool %33 %38
OpSelectionMerge %41 None
OpBranchConditional %39 %42 %41
%42 = OpLabel
%43 = OpLoad %int %a
%45 = OpIAdd %int %43 %int_1
OpStore %a %45
OpBranch %41
%41 = OpLabel
%46 = OpLoad %int %a
%47 = OpBitCount %int %46
OpStore %i %47
%48 = OpLoad %int %i
%50 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_0
%51 = OpLoad %int %50
%52 = OpSLessThan %bool %48 %51
OpSelectionMerge %53 None
OpBranchConditional %52 %54 %53
%54 = OpLabel
%55 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_0
%56 = OpLoad %int %55
OpReturnValue %56
%53 = OpLabel
%57 = OpLoad %int %i
OpReturnValue %57
OpFunctionEnd
%main_1 = OpFunction %void None %58
%61 = OpLabel
%a_1 = OpVariable %_ptr_Function_int Function %28
%63 = OpFunctionCall %int %f1_
OpStore %a_1 %63
%64 = OpLoad %int %a_1
%66 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_2
%67 = OpLoad %int %66
%68 = OpIEqual %bool %64 %67
OpSelectionMerge %69 None
OpBranchConditional %68 %70 %71
%70 = OpLabel
%72 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_0
%73 = OpLoad %int %72
%74 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_1
%75 = OpLoad %int %74
%76 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_1
%77 = OpLoad %int %76
%78 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_0
%79 = OpLoad %int %78
%80 = OpConvertSToF %float %73
%81 = OpConvertSToF %float %75
%82 = OpConvertSToF %float %77
%83 = OpConvertSToF %float %79
%84 = OpCompositeConstruct %v4float %80 %81 %82 %83
OpStore %x_GLF_color %84
OpBranch %69
%71 = OpLabel
%85 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_1
%86 = OpLoad %int %85
%87 = OpConvertSToF %float %86
%88 = OpCompositeConstruct %v4float %87 %87 %87 %87
OpStore %x_GLF_color %88
OpBranch %69
%69 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %89
%tint_symbol_1 = OpFunctionParameter %main_out
%93 = OpLabel
%94 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %94
OpReturn
OpFunctionEnd
%main = OpFunction %void None %58
%96 = OpLabel
%97 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %97
%98 = OpFunctionCall %void %main_1
%100 = OpLoad %v4float %x_GLF_color
%101 = OpCompositeConstruct %main_out %100
%99 = OpFunctionCall %void %tint_symbol_3 %101
OpReturn
OpFunctionEnd