blob: fa87ce80278a2693921d0b6b12bc4f819bdd1e1c [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 155
; Schema: 0
OpCapability Shader
%109 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
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 %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %v "v"
OpName %i "i"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %tint_symbol "tint_symbol"
OpName %main "main"
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_int_uint_5 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_2 ArrayStride 16
OpDecorate %x_9 NonWritable
OpDecorate %x_9 DescriptorSet 0
OpDecorate %x_9 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_5 = OpConstant %uint 5
%_arr_int_uint_5 = OpTypeArray %int %uint_5
%buf1 = OpTypeStruct %_arr_int_uint_5
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_6 = OpVariable %_ptr_Uniform_buf1 Uniform
%float = OpTypeFloat 32
%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_9 = OpVariable %_ptr_Uniform_buf0 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%17 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %17
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %17
%void = OpTypeVoid
%20 = OpTypeFunction %void
%_ptr_Function_v4float = OpTypePointer Function %v4float
%_ptr_Function_int = OpTypePointer Function %int
%28 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_2 = OpConstant %int 2
%int_3 = OpConstant %int 3
%int_0 = OpConstant %int 0
%int_4 = OpConstant %int 4
%bool = OpTypeBool
%_ptr_Uniform_float = OpTypePointer Uniform %float
%mat4v4float = OpTypeMatrix %v4float 4
%_ptr_Function_float = OpTypePointer Function %float
%v4bool = OpTypeVector %bool 4
%main_out = OpTypeStruct %v4float
%143 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %20
%23 = OpLabel
%v = OpVariable %_ptr_Function_v4float Function %17
%i = OpVariable %_ptr_Function_int Function %28
%32 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%33 = OpLoad %int %32
%35 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%36 = OpLoad %int %35
%38 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%39 = OpLoad %int %38
%41 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%42 = OpLoad %int %41
%43 = OpConvertSToF %float %33
%44 = OpConvertSToF %float %36
%45 = OpConvertSToF %float %39
%46 = OpConvertSToF %float %42
%47 = OpCompositeConstruct %v4float %43 %44 %45 %46
OpStore %v %47
%49 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%50 = OpLoad %int %49
OpStore %i %50
OpBranch %51
%51 = OpLabel
OpLoopMerge %52 %53 None
OpBranch %54
%54 = OpLabel
%55 = OpLoad %int %i
%56 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%57 = OpLoad %int %56
%58 = OpSLessThan %bool %55 %57
OpSelectionMerge %60 None
OpBranchConditional %58 %61 %62
%61 = OpLabel
OpBranch %60
%62 = OpLabel
OpBranch %52
%60 = OpLabel
%63 = OpLoad %v4float %v
%64 = OpLoad %v4float %v
%65 = OpLoad %v4float %v
%66 = OpLoad %v4float %v
%67 = OpLoad %int %i
%69 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %int_0
%70 = OpLoad %float %69
%72 = OpCompositeExtract %float %63 0
%73 = OpCompositeExtract %float %63 1
%74 = OpCompositeExtract %float %63 2
%75 = OpCompositeExtract %float %63 3
%76 = OpCompositeConstruct %v4float %72 %73 %74 %75
%77 = OpCompositeExtract %float %64 0
%78 = OpCompositeExtract %float %64 1
%79 = OpCompositeExtract %float %64 2
%80 = OpCompositeExtract %float %64 3
%81 = OpCompositeConstruct %v4float %77 %78 %79 %80
%82 = OpCompositeExtract %float %65 0
%83 = OpCompositeExtract %float %65 1
%84 = OpCompositeExtract %float %65 2
%85 = OpCompositeExtract %float %65 3
%86 = OpCompositeConstruct %v4float %82 %83 %84 %85
%87 = OpCompositeExtract %float %66 0
%88 = OpCompositeExtract %float %66 1
%89 = OpCompositeExtract %float %66 2
%90 = OpCompositeExtract %float %66 3
%91 = OpCompositeConstruct %v4float %87 %88 %89 %90
%92 = OpCompositeConstruct %mat4v4float %76 %81 %86 %91
%93 = OpCompositeExtract %v4float %92 0
%94 = OpVectorExtractDynamic %float %93 %67
%95 = OpFOrdGreaterThan %bool %94 %70
OpSelectionMerge %96 None
OpBranchConditional %95 %97 %96
%97 = OpLabel
%98 = OpLoad %int %i
%99 = OpLoad %v4float %v
%100 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %int_1
%101 = OpLoad %float %100
%102 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %int_0
%103 = OpLoad %float %102
%104 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%105 = OpLoad %int %104
%107 = OpAccessChain %_ptr_Function_float %v %98
%110 = OpCompositeConstruct %v4float %101 %101 %101 %101
%111 = OpCompositeConstruct %v4float %103 %103 %103 %103
%108 = OpExtInst %v4float %109 NClamp %99 %110 %111
%112 = OpVectorExtractDynamic %float %108 %105
OpStore %107 %112
OpBranch %96
%96 = OpLabel
OpBranch %53
%53 = OpLabel
%113 = OpLoad %int %i
%114 = OpIAdd %int %113 %int_1
OpStore %i %114
OpBranch %51
%52 = OpLabel
%115 = OpLoad %v4float %v
%116 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%117 = OpLoad %int %116
%118 = OpConvertSToF %float %117
%120 = OpCompositeConstruct %v4float %118 %118 %118 %118
%121 = OpFOrdEqual %v4bool %115 %120
%119 = OpAll %bool %121
OpSelectionMerge %123 None
OpBranchConditional %119 %124 %125
%124 = OpLabel
%126 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%127 = OpLoad %int %126
%128 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%129 = OpLoad %int %128
%130 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%131 = OpLoad %int %130
%132 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%133 = OpLoad %int %132
%134 = OpConvertSToF %float %127
%135 = OpConvertSToF %float %129
%136 = OpConvertSToF %float %131
%137 = OpConvertSToF %float %133
%138 = OpCompositeConstruct %v4float %134 %135 %136 %137
OpStore %x_GLF_color %138
OpBranch %123
%125 = OpLabel
%139 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%140 = OpLoad %int %139
%141 = OpConvertSToF %float %140
%142 = OpCompositeConstruct %v4float %141 %141 %141 %141
OpStore %x_GLF_color %142
OpBranch %123
%123 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %143
%tint_symbol = OpFunctionParameter %main_out
%147 = OpLabel
%148 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %148
OpReturn
OpFunctionEnd
%main = OpFunction %void None %20
%150 = OpLabel
%151 = OpFunctionCall %void %main_1
%153 = OpLoad %v4float %x_GLF_color
%154 = OpCompositeConstruct %main_out %153
%152 = OpFunctionCall %void %tint_symbol_2 %154
OpReturn
OpFunctionEnd