blob: abd2c6bfa0bab1cd5d9e21fd33ca735e1641976a [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 73
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "injectionSwitch"
OpName %x_7 "x_7"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %a "a"
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 %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%9 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %9
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %9
%void = OpTypeVoid
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%19 = OpConstantNull %int
%int_0 = OpConstant %int 0
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%uint_1 = OpConstant %uint 1
%_ptr_Uniform_float = OpTypePointer Uniform %float
%bool = OpTypeBool
%int_2 = OpConstant %int 2
%int_1 = OpConstant %int 1
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%59 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%60 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%61 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %12
%15 = OpLabel
%a = OpVariable %_ptr_Function_int Function %19
%i = OpVariable %_ptr_Function_int Function %19
OpStore %a %int_0
OpStore %i %int_0
OpBranch %22
%22 = OpLabel
OpLoopMerge %23 %24 None
OpBranch %25
%25 = OpLabel
%26 = OpLoad %int %i
%31 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %uint_1
%32 = OpLoad %float %31
%33 = OpConvertFToS %int %32
%34 = OpSLessThan %bool %26 %33
OpSelectionMerge %36 None
OpBranchConditional %34 %37 %38
%37 = OpLabel
OpBranch %36
%38 = OpLabel
OpBranch %23
%36 = OpLabel
%39 = OpLoad %int %a
%40 = OpSGreaterThan %bool %39 %int_0
OpSelectionMerge %41 None
OpBranchConditional %40 %42 %41
%42 = OpLabel
OpBranch %23
%41 = OpLabel
%43 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %uint_1
%44 = OpLoad %float %43
%45 = OpConvertFToS %int %44
%47 = OpIMul %int %45 %int_2
%48 = OpSDiv %int %47 %int_2
OpStore %a %48
OpBranch %24
%24 = OpLabel
%49 = OpLoad %int %i
%51 = OpIAdd %int %49 %int_1
OpStore %i %51
OpBranch %22
%23 = OpLabel
%52 = OpLoad %int %a
%53 = OpIEqual %bool %52 %int_1
OpSelectionMerge %54 None
OpBranchConditional %53 %55 %56
%55 = OpLabel
OpStore %x_GLF_color %59
OpBranch %54
%56 = OpLabel
OpStore %x_GLF_color %60
OpBranch %54
%54 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %61
%tint_symbol = OpFunctionParameter %main_out
%65 = OpLabel
%66 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %66
OpReturn
OpFunctionEnd
%main = OpFunction %void None %12
%68 = OpLabel
%69 = OpFunctionCall %void %main_1
%71 = OpLoad %v4float %x_GLF_color
%72 = OpCompositeConstruct %main_out %71
%70 = OpFunctionCall %void %tint_symbol_2 %72
OpReturn
OpFunctionEnd