blob: b02dd2e695d3a951348a034c8bf3e8ef0ec0bb8e [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 %i "i"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "_GLF_uniform_int_values"
OpName %_ ""
OpName %A "A"
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
%10 = 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_4 = OpConstant %int 4
%bool = OpTypeBool
%uint_4 = OpConstant %uint 4
%_arr_int_uint_4 = OpTypeArray %int %uint_4
%_ptr_Function__arr_int_uint_4 = OpTypePointer Function %_arr_int_uint_4
%int_2 = OpConstant %int 2
%int_3 = OpConstant %int 3
%int_1 = OpConstant %int 1
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_GLF_color = OpVariable %_ptr_Output_v4float Output
%float_1 = OpConstant %float 1
%30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%main = OpFunction %void None %10
%31 = OpLabel
%i = OpVariable %_ptr_Function_int Function
%A = OpVariable %_ptr_Function__arr_int_uint_4 Function
%32 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%33 = OpLoad %int %32
OpStore %i %33
OpBranch %34
%34 = OpLabel
OpLoopMerge %35 %36 None
OpBranch %37
%37 = OpLabel
%38 = OpLoad %int %i
%39 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_4
%40 = OpLoad %int %39
%41 = OpSLessThan %bool %38 %40
OpBranchConditional %41 %42 %35
%42 = OpLabel
%43 = OpLoad %int %i
%44 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%45 = OpLoad %int %44
%46 = OpAccessChain %_ptr_Function_int %A %43
OpStore %46 %45
%47 = OpLoad %int %i
%48 = OpIMul %int %int_2 %47
%49 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_3
%50 = OpLoad %int %49
%51 = OpIMul %int %int_2 %50
%52 = OpExtInst %int %1 SMax %48 %51
%53 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
%54 = OpLoad %int %53
%55 = OpIEqual %bool %52 %54
OpSelectionMerge %56 None
OpBranchConditional %55 %57 %56
%57 = OpLabel
%58 = OpLoad %int %i
%59 = OpAccessChain %_ptr_Function_int %A %58
OpStore %59 %int_1
OpBranch %56
%56 = OpLabel
OpBranch %36
%36 = OpLabel
%60 = OpLoad %int %i
%61 = OpIAdd %int %60 %int_1
OpStore %i %61
OpBranch %34
%35 = OpLabel
%62 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%63 = OpLoad %int %62
%64 = OpAccessChain %_ptr_Function_int %A %63
%65 = OpLoad %int %64
%66 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_3
%67 = OpLoad %int %66
%68 = OpIEqual %bool %65 %67
OpSelectionMerge %69 None
OpBranchConditional %68 %70 %69
%70 = OpLabel
%71 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_3
%72 = OpLoad %int %71
%73 = OpAccessChain %_ptr_Function_int %A %72
%74 = OpLoad %int %73
%75 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_3
%76 = OpLoad %int %75
%77 = OpIEqual %bool %74 %76
OpBranch %69
%69 = OpLabel
%78 = OpPhi %bool %68 %35 %77 %70
OpSelectionMerge %79 None
OpBranchConditional %78 %80 %79
%80 = OpLabel
%81 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
%82 = OpLoad %int %81
%83 = OpAccessChain %_ptr_Function_int %A %82
%84 = OpLoad %int %83
%85 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%86 = OpLoad %int %85
%87 = OpIEqual %bool %84 %86
OpBranch %79
%79 = OpLabel
%88 = OpPhi %bool %78 %69 %87 %80
OpSelectionMerge %89 None
OpBranchConditional %88 %90 %89
%90 = OpLabel
%91 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
%92 = OpLoad %int %91
%93 = OpAccessChain %_ptr_Function_int %A %92
%94 = OpLoad %int %93
%95 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%96 = OpLoad %int %95
%97 = OpIEqual %bool %94 %96
OpBranch %89
%89 = OpLabel
%98 = OpPhi %bool %88 %79 %97 %90
OpSelectionMerge %99 None
OpBranchConditional %98 %100 %101
%100 = OpLabel
%102 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_3
%103 = OpLoad %int %102
%104 = OpConvertSToF %float %103
%105 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%106 = OpLoad %int %105
%107 = OpConvertSToF %float %106
%108 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%109 = OpLoad %int %108
%110 = OpConvertSToF %float %109
%111 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_3
%112 = OpLoad %int %111
%113 = OpConvertSToF %float %112
%114 = OpCompositeConstruct %v4float %104 %107 %110 %113
OpStore %_GLF_color %114
OpBranch %99
%101 = OpLabel
OpStore %_GLF_color %30
OpBranch %99
%99 = OpLabel
OpReturn
OpFunctionEnd