blob: 25ac71de9ebcb9f0cba70572f0fc22be59c979ba [file] [log] [blame]
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %_GLF_color
OpExecutionMode %main OriginUpperLeft
OpSource ESSL 310
OpName %main "main"
OpName %a "a"
OpName %i "i"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "injectionSwitch"
OpName %_ ""
OpName %_GLF_color "_GLF_color"
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %buf0 Block
OpDecorate %_ DescriptorSet 0
OpDecorate %_ Binding 0
OpDecorate %_GLF_color Location 0
%void = OpTypeVoid
%9 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%int_0 = OpConstant %int 0
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Uniform_float = OpTypePointer Uniform %float
%bool = OpTypeBool
%int_2 = OpConstant %int 2
%int_1 = OpConstant %int 1
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_GLF_color = OpVariable %_ptr_Output_v4float Output
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%26 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%27 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main = OpFunction %void None %9
%28 = OpLabel
%a = OpVariable %_ptr_Function_int Function
%i = OpVariable %_ptr_Function_int Function
OpStore %a %int_0
OpStore %i %int_0
OpBranch %29
%29 = OpLabel
OpLoopMerge %30 %31 None
OpBranch %32
%32 = OpLabel
%33 = OpLoad %int %i
%34 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %uint_1
%35 = OpLoad %float %34
%36 = OpConvertFToS %int %35
%37 = OpSLessThan %bool %33 %36
OpBranchConditional %37 %38 %30
%38 = OpLabel
%39 = OpLoad %int %a
%40 = OpSGreaterThan %bool %39 %int_0
OpSelectionMerge %41 None
OpBranchConditional %40 %42 %41
%42 = OpLabel
OpBranch %30
%41 = OpLabel
%43 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %uint_1
%44 = OpLoad %float %43
%45 = OpConvertFToS %int %44
%46 = OpIMul %int %45 %int_2
%47 = OpSDiv %int %46 %int_2
OpStore %a %47
OpBranch %31
%31 = OpLabel
%48 = OpLoad %int %i
%49 = OpIAdd %int %48 %int_1
OpStore %i %49
OpBranch %29
%30 = OpLabel
%50 = OpLoad %int %a
%51 = OpIEqual %bool %50 %int_1
OpSelectionMerge %52 None
OpBranchConditional %51 %53 %54
%53 = OpLabel
OpStore %_GLF_color %26
OpBranch %52
%54 = OpLabel
OpStore %_GLF_color %27
OpBranch %52
%52 = OpLabel
OpReturn
OpFunctionEnd