blob: c2016858185754bbacf58137bc262035a9b3849a [file] [log] [blame]
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %_GLF_color
OpExecutionMode %main OriginUpperLeft
OpSource ESSL 320
OpName %main "main"
OpName %a "a"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "_GLF_uniform_int_values"
OpName %_ ""
OpName %b "b"
OpName %c "c"
OpName %_GLF_color "_GLF_color"
OpDecorate %_arr_int_uint_4 ArrayStride 16
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %buf0 Block
OpDecorate %_ DescriptorSet 0
OpDecorate %_ Binding 0
OpDecorate %_GLF_color Location 0
%void = OpTypeVoid
%11 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_int_uint_4 = OpTypeArray %int %uint_4
%buf0 = OpTypeStruct %_arr_int_uint_4
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%bool = OpTypeBool
%int_3 = OpConstant %int 3
%true = OpConstantTrue %bool
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_GLF_color = OpVariable %_ptr_Output_v4float Output
%main = OpFunction %void None %11
%27 = OpLabel
%a = OpVariable %_ptr_Function_int Function
%b = OpVariable %_ptr_Function_int Function
%c = OpVariable %_ptr_Function_int Function
%28 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%29 = OpLoad %int %28
OpStore %a %29
%30 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
%31 = OpLoad %int %30
OpStore %b %31
%32 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
%33 = OpLoad %int %32
OpStore %c %33
OpBranch %34
%34 = OpLabel
OpLoopMerge %35 %36 None
OpBranch %37
%37 = OpLabel
%38 = OpLoad %int %a
%39 = OpLoad %int %b
%40 = OpSLessThan %bool %38 %39
OpBranchConditional %40 %41 %35
%41 = OpLabel
%42 = OpLoad %int %a
%43 = OpIAdd %int %42 %int_1
OpStore %a %43
%44 = OpLoad %int %c
%45 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
%46 = OpLoad %int %45
%47 = OpIEqual %bool %44 %46
OpSelectionMerge %48 None
OpBranchConditional %47 %49 %50
%49 = OpLabel
%51 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_3
%52 = OpLoad %int %51
%53 = OpLoad %int %c
%54 = OpIMul %int %53 %52
OpStore %c %54
OpBranch %48
%50 = OpLabel
OpSelectionMerge %55 None
OpBranchConditional %true %56 %55
%56 = OpLabel
OpBranch %36
%55 = OpLabel
OpBranch %48
%48 = OpLabel
OpBranch %36
%36 = OpLabel
OpBranch %34
%35 = OpLabel
%57 = OpLoad %int %a
%58 = OpLoad %int %b
%59 = OpIEqual %bool %57 %58
OpSelectionMerge %60 None
OpBranchConditional %59 %61 %60
%61 = OpLabel
%62 = OpLoad %int %c
%63 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_3
%64 = OpLoad %int %63
%65 = OpIEqual %bool %62 %64
OpBranch %60
%60 = OpLabel
%66 = OpPhi %bool %59 %35 %65 %61
OpSelectionMerge %67 None
OpBranchConditional %66 %68 %69
%68 = OpLabel
%70 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
%71 = OpLoad %int %70
%72 = OpConvertSToF %float %71
%73 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%74 = OpLoad %int %73
%75 = OpConvertSToF %float %74
%76 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%77 = OpLoad %int %76
%78 = OpConvertSToF %float %77
%79 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
%80 = OpLoad %int %79
%81 = OpConvertSToF %float %80
%82 = OpCompositeConstruct %v4float %72 %75 %78 %81
OpStore %_GLF_color %82
OpBranch %67
%69 = OpLabel
%83 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%84 = OpLoad %int %83
%85 = OpConvertSToF %float %84
%86 = OpCompositeConstruct %v4float %85 %85 %85 %85
OpStore %_GLF_color %86
OpBranch %67
%67 = OpLabel
OpReturn
OpFunctionEnd