blob: 594fd2e7e12d78c65fdec0e727b6e78fb4240a05 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 117
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "one"
OpName %x_6 "x_6"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %f "f"
OpName %a "a"
OpName %b "b"
OpName %c "c"
OpName %i "i"
OpName %v "v"
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 %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%buf0 = OpTypeStruct %float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%8 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %8
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %8
%void = OpTypeVoid
%11 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%17 = OpConstantNull %float
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%21 = OpConstantNull %int
%v3float = OpTypeVector %float 3
%_ptr_Function_v3float = OpTypePointer Function %v3float
%28 = OpConstantNull %v3float
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_1 = OpConstant %int 1
%int_0 = OpConstant %int 0
%int_3 = OpConstant %int 3
%bool = OpTypeBool
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%66 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%78 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%uint_1 = OpConstant %uint 1
%uint_2 = OpConstant %uint 2
%float_2 = OpConstant %float 2
%float_3 = OpConstant %float 3
%uint_3 = OpConstant %uint 3
%_ptr_Private_float = OpTypePointer Private %float
%main_out = OpTypeStruct %v4float
%105 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %11
%14 = OpLabel
%f = OpVariable %_ptr_Function_float Function %17
%a = OpVariable %_ptr_Function_int Function %21
%b = OpVariable %_ptr_Function_int Function %21
%c = OpVariable %_ptr_Function_int Function %21
%i = OpVariable %_ptr_Function_int Function %21
%v = OpVariable %_ptr_Function_v3float Function %28
%32 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0
%33 = OpLoad %float %32
OpStore %f %33
OpStore %a %int_1
OpStore %b %int_0
OpStore %c %int_1
OpStore %i %int_0
OpBranch %36
%36 = OpLabel
OpLoopMerge %37 %38 None
OpBranch %39
%39 = OpLabel
%40 = OpLoad %int %i
%42 = OpSLessThan %bool %40 %int_3
OpSelectionMerge %44 None
OpBranchConditional %42 %45 %46
%45 = OpLabel
OpBranch %44
%46 = OpLabel
OpBranch %37
%44 = OpLabel
%47 = OpLoad %int %i
%48 = OpLoad %float %f
%49 = OpLoad %int %i
%50 = OpAccessChain %_ptr_Function_float %v %47
%51 = OpConvertSToF %float %49
%52 = OpFAdd %float %48 %51
OpStore %50 %52
OpBranch %38
%38 = OpLabel
%53 = OpLoad %int %i
%54 = OpIAdd %int %53 %int_1
OpStore %i %54
OpBranch %36
%37 = OpLabel
%55 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0
%56 = OpLoad %float %55
%58 = OpFOrdEqual %bool %56 %float_1
OpSelectionMerge %59 None
OpBranchConditional %58 %60 %59
%60 = OpLabel
OpBranch %61
%61 = OpLabel
OpLoopMerge %62 %63 None
OpBranch %64
%64 = OpLabel
OpStore %x_GLF_color %66
OpBranch %63
%63 = OpLabel
%67 = OpLoad %int %c
%68 = OpLoad %int %a
%69 = OpLoad %int %b
%70 = OpBitwiseOr %int %68 %69
%71 = OpBitwiseAnd %int %67 %70
%72 = OpIEqual %bool %71 %int_0
OpBranchConditional %72 %61 %62
%62 = OpLabel
%73 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0
%74 = OpLoad %float %73
%75 = OpFOrdEqual %bool %74 %float_1
OpSelectionMerge %76 None
OpBranchConditional %75 %77 %76
%77 = OpLabel
OpStore %x_GLF_color %78
OpBranch %76
%76 = OpLabel
OpBranch %59
%59 = OpLabel
%79 = OpAccessChain %_ptr_Function_float %v %uint_0
%80 = OpLoad %float %79
%82 = OpAccessChain %_ptr_Function_float %v %uint_1
%83 = OpLoad %float %82
%85 = OpAccessChain %_ptr_Function_float %v %uint_2
%86 = OpLoad %float %85
%88 = OpFOrdEqual %bool %80 %float_1
%87 = OpSelect %float %88 %float_1 %float_0
%91 = OpFOrdEqual %bool %83 %float_2
%89 = OpSelect %float %91 %float_0 %float_1
%94 = OpFOrdEqual %bool %86 %float_3
%92 = OpSelect %float %94 %float_0 %float_1
%95 = OpCompositeConstruct %v3float %87 %89 %92
%96 = OpLoad %v4float %x_GLF_color
%97 = OpCompositeExtract %float %95 0
%98 = OpCompositeExtract %float %95 1
%99 = OpCompositeExtract %float %95 2
%100 = OpCompositeExtract %float %96 3
%101 = OpCompositeConstruct %v4float %97 %98 %99 %100
OpStore %x_GLF_color %101
%104 = OpAccessChain %_ptr_Private_float %x_GLF_color %uint_3
OpStore %104 %float_1
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %105
%tint_symbol = OpFunctionParameter %main_out
%109 = OpLabel
%110 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %110
OpReturn
OpFunctionEnd
%main = OpFunction %void None %11
%112 = OpLabel
%113 = OpFunctionCall %void %main_1
%115 = OpLoad %v4float %x_GLF_color
%116 = OpCompositeConstruct %main_out %115
%114 = OpFunctionCall %void %tint_symbol_2 %116
OpReturn
OpFunctionEnd