blob: 46ff9ef08a659dc95abcd0f39c58fc1651a0276f [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 122
; Schema: 0
OpCapability Shader
%56 = OpExtInstImport "GLSL.std.450"
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 %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_float_values"
OpName %x_6 "x_6"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_int_values"
OpName %x_9 "x_9"
OpName %x_GLF_color "x_GLF_color"
OpName %main_1 "main_1"
OpName %sums "sums"
OpName %i "i"
OpName %indexable "indexable"
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 %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_float_uint_2 ArrayStride 16
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 0
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_int_uint_3 ArrayStride 16
OpDecorate %x_9 NonWritable
OpDecorate %x_9 DescriptorSet 0
OpDecorate %x_9 Binding 1
OpDecorate %_arr_float_uint_3 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
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_float_uint_2 = OpTypeArray %float %uint_2
%buf0 = OpTypeStruct %_arr_float_uint_2
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = 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_9 = OpVariable %_ptr_Uniform_buf1 Uniform
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%void = OpTypeVoid
%20 = OpTypeFunction %void
%_arr_float_uint_3 = OpTypeArray %float %uint_3
%_ptr_Function__arr_float_uint_3 = OpTypePointer Function %_arr_float_uint_3
%27 = OpConstantNull %_arr_float_uint_3
%_ptr_Function_int = OpTypePointer Function %int
%30 = OpConstantNull %int
%mat2v4float = OpTypeMatrix %v4float 2
%_ptr_Function_mat2v4float = OpTypePointer Function %mat2v4float
%34 = OpConstantNull %mat2v4float
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_2 = OpConstant %int 2
%bool = OpTypeBool
%int_1 = OpConstant %int 1
%float_0 = OpConstant %float 0
%_ptr_Function_float = OpTypePointer Function %float
%main_out = OpTypeStruct %v4float
%111 = OpTypeFunction %main_out
%main_1 = OpFunction %void None %20
%23 = OpLabel
%sums = OpVariable %_ptr_Function__arr_float_uint_3 Function %27
%i = OpVariable %_ptr_Function_int Function %30
%indexable = OpVariable %_ptr_Function_mat2v4float Function %34
%38 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%39 = OpLoad %float %38
%40 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%41 = OpLoad %float %40
%42 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%43 = OpLoad %float %42
%44 = OpCompositeConstruct %_arr_float_uint_3 %39 %41 %43
OpStore %sums %44
OpStore %i %int_0
OpBranch %45
%45 = OpLabel
OpLoopMerge %46 %47 None
OpBranch %48
%48 = OpLabel
%49 = OpLoad %int %i
%51 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%52 = OpLoad %int %51
%53 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%54 = OpLoad %int %53
%55 = OpExtInst %int %56 SClamp %52 %54 %int_2
%58 = OpSLessThan %bool %49 %55
OpSelectionMerge %60 None
OpBranchConditional %58 %61 %62
%61 = OpLabel
OpBranch %60
%62 = OpLabel
OpBranch %46
%60 = OpLabel
%63 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_2
%64 = OpLoad %int %63
%65 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%66 = OpLoad %float %65
%67 = OpLoad %int %i
%69 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%70 = OpLoad %int %69
%72 = OpCompositeConstruct %v4float %66 %float_0 %float_0 %float_0
%73 = OpCompositeConstruct %v4float %float_0 %66 %float_0 %float_0
%74 = OpCompositeConstruct %mat2v4float %72 %73
OpStore %indexable %74
%76 = OpAccessChain %_ptr_Function_float %indexable %67 %70
%77 = OpLoad %float %76
%78 = OpAccessChain %_ptr_Function_float %sums %64
%79 = OpLoad %float %78
%80 = OpAccessChain %_ptr_Function_float %sums %64
%81 = OpFAdd %float %79 %77
OpStore %80 %81
OpBranch %47
%47 = OpLabel
%82 = OpLoad %int %i
%83 = OpIAdd %int %82 %int_1
OpStore %i %83
OpBranch %45
%46 = OpLabel
%84 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_2
%85 = OpLoad %int %84
%86 = OpAccessChain %_ptr_Function_float %sums %85
%87 = OpLoad %float %86
%88 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
%89 = OpLoad %float %88
%90 = OpFOrdEqual %bool %87 %89
OpSelectionMerge %91 None
OpBranchConditional %90 %92 %93
%92 = OpLabel
%94 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%95 = OpLoad %int %94
%96 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%97 = OpLoad %int %96
%98 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%99 = OpLoad %int %98
%100 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%101 = OpLoad %int %100
%102 = OpConvertSToF %float %95
%103 = OpConvertSToF %float %97
%104 = OpConvertSToF %float %99
%105 = OpConvertSToF %float %101
%106 = OpCompositeConstruct %v4float %102 %103 %104 %105
OpStore %x_GLF_color %106
OpBranch %91
%93 = OpLabel
%107 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%108 = OpLoad %int %107
%109 = OpConvertSToF %float %108
%110 = OpCompositeConstruct %v4float %109 %109 %109 %109
OpStore %x_GLF_color %110
OpBranch %91
%91 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %111
%114 = OpLabel
%115 = OpFunctionCall %void %main_1
%116 = OpLoad %v4float %x_GLF_color
%117 = OpCompositeConstruct %main_out %116
OpReturnValue %117
OpFunctionEnd
%main = OpFunction %void None %20
%119 = OpLabel
%120 = OpFunctionCall %main_out %main_inner
%121 = OpCompositeExtract %v4float %120 0
OpStore %x_GLF_color_1_1 %121
OpReturn
OpFunctionEnd