blob: 0d506da531c65f0bd7c69912113ba15fab88b3e8 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 72
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "injectionSwitch"
OpName %x_7 "x_7"
OpName %x_GLF_color "x_GLF_color"
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 %main_inner "main_inner"
OpName %main "main"
OpDecorate %x_GLF_color_1_1 Location 0
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %5
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%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 %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
%main_inner = OpFunction %main_out None %61
%64 = OpLabel
%65 = OpFunctionCall %void %main_1
%66 = OpLoad %v4float %x_GLF_color
%67 = OpCompositeConstruct %main_out %66
OpReturnValue %67
OpFunctionEnd
%main = OpFunction %void None %12
%69 = OpLabel
%70 = OpFunctionCall %main_out %main_inner
%71 = OpCompositeExtract %v4float %70 0
OpStore %x_GLF_color_1_1 %71
OpReturn
OpFunctionEnd