blob: 7d9d490a556e3b2a863b4e93ab719961d5a337c0 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 111
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_int_values"
OpName %x_6 "x_6"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_float_values"
OpName %x_9 "x_9"
OpName %x_GLF_color "x_GLF_color"
OpName %main_1 "main_1"
OpName %numbers "numbers"
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 %main "main"
OpDecorate %x_GLF_color_1_1 Location 0
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_int_uint_3 ArrayStride 16
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 1
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 %_arr_int_uint_3_0 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %5
%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_6 = OpVariable %_ptr_Uniform_buf1 Uniform
%_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
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%void = OpTypeVoid
%19 = OpTypeFunction %void
%_arr_int_uint_3_0 = OpTypeArray %int %uint_3
%_ptr_Function__arr_int_uint_3_0 = OpTypePointer Function %_arr_int_uint_3_0
%26 = OpConstantNull %_arr_int_uint_3_0
%v2float = OpTypeVector %float 2
%_ptr_Function_v2float = OpTypePointer Function %v2float
%30 = OpConstantNull %v2float
%_ptr_Function_float = OpTypePointer Function %float
%33 = OpConstantNull %float
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%_ptr_Function_int = OpTypePointer Function %int
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_0 = OpConstant %float 0
%bool = OpTypeBool
%main_out = OpTypeStruct %v4float
%100 = OpTypeFunction %main_out
%main_1 = OpFunction %void None %19
%22 = OpLabel
%numbers = OpVariable %_ptr_Function__arr_int_uint_3_0 Function %26
%a = OpVariable %_ptr_Function_v2float Function %30
%b = OpVariable %_ptr_Function_float Function %33
%37 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%38 = OpLoad %int %37
%39 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%40 = OpLoad %int %39
%42 = OpAccessChain %_ptr_Function_int %numbers %38
OpStore %42 %40
%44 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%45 = OpLoad %int %44
%46 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%47 = OpLoad %int %46
%48 = OpAccessChain %_ptr_Function_int %numbers %45
OpStore %48 %47
%50 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%51 = OpLoad %int %50
%52 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%53 = OpLoad %int %52
%54 = OpAccessChain %_ptr_Function_int %numbers %51
OpStore %54 %53
%55 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%56 = OpLoad %int %55
%58 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %int_2
%59 = OpLoad %float %58
%62 = OpFOrdLessThan %bool %float_0 %59
%60 = OpSelect %int %62 %int_1 %int_2
%64 = OpAccessChain %_ptr_Function_int %numbers %60
%65 = OpLoad %int %64
%66 = OpConvertSToF %float %56
%67 = OpConvertSToF %float %65
%68 = OpCompositeConstruct %v2float %66 %67
OpStore %a %68
%69 = OpLoad %v2float %a
%70 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %int_1
%71 = OpLoad %float %70
%72 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %int_1
%73 = OpLoad %float %72
%75 = OpCompositeConstruct %v2float %71 %73
%74 = OpDot %float %69 %75
OpStore %b %74
%76 = OpLoad %float %b
%77 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %int_0
%78 = OpLoad %float %77
%79 = OpFOrdEqual %bool %76 %78
OpSelectionMerge %80 None
OpBranchConditional %79 %81 %82
%81 = OpLabel
%83 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%84 = OpLoad %int %83
%85 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%86 = OpLoad %int %85
%87 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%88 = OpLoad %int %87
%89 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%90 = OpLoad %int %89
%91 = OpConvertSToF %float %84
%92 = OpConvertSToF %float %86
%93 = OpConvertSToF %float %88
%94 = OpConvertSToF %float %90
%95 = OpCompositeConstruct %v4float %91 %92 %93 %94
OpStore %x_GLF_color %95
OpBranch %80
%82 = OpLabel
%96 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%97 = OpLoad %int %96
%98 = OpConvertSToF %float %97
%99 = OpCompositeConstruct %v4float %98 %98 %98 %98
OpStore %x_GLF_color %99
OpBranch %80
%80 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %100
%103 = OpLabel
%104 = OpFunctionCall %void %main_1
%105 = OpLoad %v4float %x_GLF_color
%106 = OpCompositeConstruct %main_out %105
OpReturnValue %106
OpFunctionEnd
%main = OpFunction %void None %19
%108 = OpLabel
%109 = OpFunctionCall %main_out %main_inner
%110 = OpCompositeExtract %v4float %109 0
OpStore %x_GLF_color_1_1 %110
OpReturn
OpFunctionEnd