blob: 8524015cf0fd7003e75c1ce6e261cbdad73de89b [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_5 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_5 = OpConstant %uint 5
%_arr_int_uint_5 = OpTypeArray %int %uint_5
%buf0 = OpTypeStruct %_arr_int_uint_5
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_2 = OpConstant %int 2
%int_1 = OpConstant %int 1
%int_4 = OpConstant %int 4
%bool = OpTypeBool
%int_10 = OpConstant %int 10
%int_5 = OpConstant %int 5
%int_3 = OpConstant %int 3
%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
%29 = OpLabel
%a = OpVariable %_ptr_Function_int Function
%b = OpVariable %_ptr_Function_int Function
%c = OpVariable %_ptr_Function_int Function
%30 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%31 = OpLoad %int %30
OpStore %a %31
%32 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
%33 = OpLoad %int %32
OpStore %b %33
OpStore %c %int_1
OpBranch %34
%34 = OpLabel
OpLoopMerge %35 %36 None
OpBranch %37
%37 = OpLabel
%38 = OpLoad %int %b
%39 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_4
%40 = OpLoad %int %39
%41 = OpSLessThan %bool %38 %40
%42 = OpLoad %int %a
%43 = OpSLessThan %bool %42 %int_10
%44 = OpLogicalAnd %bool %41 %43
OpBranchConditional %44 %45 %35
%45 = OpLabel
%46 = OpLoad %int %c
%47 = OpSGreaterThan %bool %46 %int_5
OpSelectionMerge %48 None
OpBranchConditional %47 %49 %48
%49 = OpLabel
OpBranch %35
%48 = OpLabel
%50 = OpLoad %int %a
%51 = OpIAdd %int %50 %int_1
OpStore %a %51
%52 = OpLoad %int %c
%53 = OpIAdd %int %52 %int_1
OpStore %c %53
%54 = OpLoad %int %b
%55 = OpIAdd %int %54 %int_1
OpStore %b %55
OpBranch %36
%36 = OpLabel
OpBranch %34
%35 = OpLabel
OpBranch %56
%56 = OpLabel
OpLoopMerge %57 %58 None
OpBranch %59
%59 = OpLabel
%60 = OpLoad %int %a
%61 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
%62 = OpLoad %int %61
%63 = OpSLessThan %bool %60 %62
OpBranchConditional %63 %64 %57
%64 = OpLabel
OpBranch %58
%58 = OpLabel
%65 = OpLoad %int %a
%66 = OpIAdd %int %65 %int_1
OpStore %a %66
OpBranch %56
%57 = OpLabel
%67 = OpLoad %int %a
%68 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
%69 = OpLoad %int %68
%70 = OpIEqual %bool %67 %69
OpSelectionMerge %71 None
OpBranchConditional %70 %72 %71
%72 = OpLabel
%73 = OpLoad %int %b
%74 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_3
%75 = OpLoad %int %74
%76 = OpIEqual %bool %73 %75
OpBranch %71
%71 = OpLabel
%77 = OpPhi %bool %70 %57 %76 %72
OpSelectionMerge %78 None
OpBranchConditional %77 %79 %78
%79 = OpLabel
%80 = OpLoad %int %c
%81 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_3
%82 = OpLoad %int %81
%83 = OpIEqual %bool %80 %82
OpBranch %78
%78 = OpLabel
%84 = OpPhi %bool %77 %71 %83 %79
OpSelectionMerge %85 None
OpBranchConditional %84 %86 %87
%86 = OpLabel
%88 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
%89 = OpLoad %int %88
%90 = OpConvertSToF %float %89
%91 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%92 = OpLoad %int %91
%93 = OpConvertSToF %float %92
%94 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%95 = OpLoad %int %94
%96 = OpConvertSToF %float %95
%97 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
%98 = OpLoad %int %97
%99 = OpConvertSToF %float %98
%100 = OpCompositeConstruct %v4float %90 %93 %96 %99
OpStore %_GLF_color %100
OpBranch %85
%87 = OpLabel
%101 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%102 = OpLoad %int %101
%103 = OpConvertSToF %float %102
%104 = OpCompositeConstruct %v4float %103 %103 %103 %103
OpStore %_GLF_color %104
OpBranch %85
%85 = OpLabel
OpReturn
OpFunctionEnd