blob: e9a94b6b2bdd129fbd7624487ff3721df4726ad2 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 113
; Schema: 0
OpCapability Shader
%62 = 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 %f "f"
OpName %i "i"
OpName %x_66 "x_66"
OpName %x_67_phi "x_67_phi"
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
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
%_ptr_Function_float = OpTypePointer Function %float
%26 = OpConstantNull %float
%_ptr_Function_int = OpTypePointer Function %int
%29 = OpConstantNull %int
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%33 = OpConstantNull %bool
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_3 = OpConstant %int 3
%int_2 = OpConstant %int 2
%main_out = OpTypeStruct %v4float
%101 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %20
%23 = OpLabel
%f = OpVariable %_ptr_Function_float Function %26
%i = OpVariable %_ptr_Function_int Function %29
%x_66 = OpVariable %_ptr_Function_bool Function %33
%x_67_phi = OpVariable %_ptr_Function_bool Function %33
%38 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%39 = OpLoad %float %38
OpStore %f %39
%42 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%43 = OpLoad %int %42
OpStore %i %43
OpBranch %44
%44 = OpLabel
OpLoopMerge %45 %46 None
OpBranch %47
%47 = OpLabel
%48 = OpLoad %int %i
%49 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%50 = OpLoad %int %49
%51 = OpSLessThan %bool %48 %50
OpSelectionMerge %52 None
OpBranchConditional %51 %53 %54
%53 = OpLabel
OpBranch %52
%54 = OpLabel
OpBranch %45
%52 = OpLabel
%56 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_3
%57 = OpLoad %float %56
%58 = OpLoad %float %f
%59 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%60 = OpLoad %float %59
%63 = OpFNegate %float %57
%64 = OpFMul %float %63 %58
%61 = OpExtInst %float %62 FAbs %64
%65 = OpFAdd %float %61 %60
OpStore %f %65
OpBranch %46
%46 = OpLabel
%66 = OpLoad %int %i
%67 = OpIAdd %int %66 %int_1
OpStore %i %67
OpBranch %44
%45 = OpLabel
%68 = OpLoad %float %f
%69 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
%70 = OpLoad %float %69
%71 = OpFOrdGreaterThan %bool %68 %70
OpStore %x_67_phi %71
OpSelectionMerge %72 None
OpBranchConditional %71 %73 %72
%73 = OpLabel
%74 = OpLoad %float %f
%76 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_2
%77 = OpLoad %float %76
%78 = OpFOrdLessThan %bool %74 %77
OpStore %x_66 %78
%79 = OpLoad %bool %x_66
OpStore %x_67_phi %79
OpBranch %72
%72 = OpLabel
%80 = OpLoad %bool %x_67_phi
OpSelectionMerge %81 None
OpBranchConditional %80 %82 %83
%82 = OpLabel
%84 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_2
%85 = OpLoad %int %84
%86 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%87 = OpLoad %int %86
%88 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%89 = OpLoad %int %88
%90 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_2
%91 = OpLoad %int %90
%92 = OpConvertSToF %float %85
%93 = OpConvertSToF %float %87
%94 = OpConvertSToF %float %89
%95 = OpConvertSToF %float %91
%96 = OpCompositeConstruct %v4float %92 %93 %94 %95
OpStore %x_GLF_color %96
OpBranch %81
%83 = OpLabel
%97 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%98 = OpLoad %int %97
%99 = OpConvertSToF %float %98
%100 = OpCompositeConstruct %v4float %99 %99 %99 %99
OpStore %x_GLF_color %100
OpBranch %81
%81 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %101
%tint_symbol = OpFunctionParameter %main_out
%105 = OpLabel
%106 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %106
OpReturn
OpFunctionEnd
%main = OpFunction %void None %20
%108 = OpLabel
%109 = OpFunctionCall %void %main_1
%111 = OpLoad %v4float %x_GLF_color
%112 = OpCompositeConstruct %main_out %111
%110 = OpFunctionCall %void %tint_symbol_2 %112
OpReturn
OpFunctionEnd