blob: 4323c1e0d1d2a5c447b768e483c66ac064d1c358 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 109
; Schema: 0
OpCapability Shader
%52 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
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 %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %arr "arr"
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 %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_float_uint_4 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 %tint_symbol_1 Location 0
OpDecorate %_arr_float_uint_3 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_float_uint_4 = OpTypeArray %float %uint_4
%buf0 = OpTypeStruct %_arr_float_uint_4
%_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
%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
%_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
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_3 = OpConstant %int 3
%bool = OpTypeBool
%_ptr_Function_float = OpTypePointer Function %float
%main_out = OpTypeStruct %v4float
%97 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %20
%23 = OpLabel
%arr = OpVariable %_ptr_Function__arr_float_uint_3 Function %27
%i = OpVariable %_ptr_Function_int Function %30
%34 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%35 = OpLoad %float %34
%37 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
%38 = OpLoad %float %37
%40 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_2
%41 = OpLoad %float %40
%42 = OpCompositeConstruct %_arr_float_uint_3 %35 %38 %41
OpStore %arr %42
OpStore %i %int_1
OpBranch %43
%43 = OpLabel
OpLoopMerge %44 %45 None
OpBranch %46
%46 = OpLabel
%47 = OpLoad %int %i
%49 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_2
%50 = OpLoad %int %49
%51 = OpExtInst %int %52 SMin %50 %int_3
%54 = OpSLessThan %bool %47 %51
OpSelectionMerge %56 None
OpBranchConditional %54 %57 %58
%57 = OpLabel
OpBranch %56
%58 = OpLabel
OpBranch %44
%56 = OpLabel
%59 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_2
%60 = OpLoad %int %59
%61 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%62 = OpLoad %float %61
%64 = OpAccessChain %_ptr_Function_float %arr %60
%65 = OpLoad %float %64
%66 = OpAccessChain %_ptr_Function_float %arr %60
%67 = OpFAdd %float %65 %62
OpStore %66 %67
OpBranch %45
%45 = OpLabel
%68 = OpLoad %int %i
%69 = OpIAdd %int %68 %int_1
OpStore %i %69
OpBranch %43
%44 = OpLabel
%70 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_2
%71 = OpLoad %int %70
%72 = OpAccessChain %_ptr_Function_float %arr %71
%73 = OpLoad %float %72
%74 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_3
%75 = OpLoad %float %74
%76 = OpFOrdEqual %bool %73 %75
OpSelectionMerge %77 None
OpBranchConditional %76 %78 %79
%78 = OpLabel
%80 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%81 = OpLoad %int %80
%82 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%83 = OpLoad %int %82
%84 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%85 = OpLoad %int %84
%86 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%87 = OpLoad %int %86
%88 = OpConvertSToF %float %81
%89 = OpConvertSToF %float %83
%90 = OpConvertSToF %float %85
%91 = OpConvertSToF %float %87
%92 = OpCompositeConstruct %v4float %88 %89 %90 %91
OpStore %x_GLF_color %92
OpBranch %77
%79 = OpLabel
%93 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%94 = OpLoad %int %93
%95 = OpConvertSToF %float %94
%96 = OpCompositeConstruct %v4float %95 %95 %95 %95
OpStore %x_GLF_color %96
OpBranch %77
%77 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %97
%tint_symbol = OpFunctionParameter %main_out
%101 = OpLabel
%102 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %102
OpReturn
OpFunctionEnd
%main = OpFunction %void None %20
%104 = OpLabel
%105 = OpFunctionCall %void %main_1
%107 = OpLoad %v4float %x_GLF_color
%108 = OpCompositeConstruct %main_out %107
%106 = OpFunctionCall %void %tint_symbol_2 %108
OpReturn
OpFunctionEnd