1spv.debugInfo.frag 2// Module Version 10300 3// Generated by (magic number): 80007 4// Id's are bound by 124 5 6 Capability Shader 7 2: ExtInstImport "GLSL.std.450" 8 MemoryModel Logical GLSL450 9 EntryPoint Fragment 5 "main" 24 52 10 ExecutionMode 5 OriginLowerLeft 11 1: String "spv.debugInfo.frag" 12 Source GLSL 450 1 "#version 450 13 14struct S { 15 int a; 16}; 17 18uniform ubuf { 19 S s; 20}; 21 22uniform sampler2D s2d; 23 24layout(location = 0) in vec4 inv; 25layout(location = 0) out vec4 outv; 26 27vec4 foo(S s) 28{ 29 vec4 r = s.a * inv; 30 ++r; 31 if (r.x > 3.0) 32 --r; 33 else 34 r *= 2; 35 36 return r; 37} 38 39void main() 40{ 41 outv = foo(s); 42 outv += texture(s2d, vec2(0.5)); 43 44 switch (s.a) { 45 case 10: 46 ++outv; 47 break; 48 case 20: 49 outv = 2 * outv; 50 ++outv; 51 break; 52 default: 53 --outv; 54 break; 55 } 56 57 for (int i = 0; i < 10; ++i) 58 outv *= 3.0; 59 60 outv.x < 10.0 ? 61 outv = sin(outv) : 62 outv = cos(outv); 63}" 64 Name 5 "main" 65 Name 8 "S" 66 MemberName 8(S) 0 "a" 67 Name 14 "foo(struct-S-i11;" 68 Name 13 "s" 69 Name 17 "r" 70 Name 24 "inv" 71 Name 52 "outv" 72 Name 53 "S" 73 MemberName 53(S) 0 "a" 74 Name 54 "ubuf" 75 MemberName 54(ubuf) 0 "s" 76 Name 56 "" 77 Name 57 "param" 78 Name 67 "s2d" 79 Name 97 "i" 80 ModuleProcessed "no-storage-format" 81 ModuleProcessed "resource-set-binding 3" 82 ModuleProcessed "auto-map-locations" 83 ModuleProcessed "client opengl100" 84 ModuleProcessed "target-env opengl" 85 ModuleProcessed "relaxed-errors" 86 ModuleProcessed "suppress-warnings" 87 ModuleProcessed "hlsl-offsets" 88 ModuleProcessed "entry-point main" 89 Decorate 24(inv) Location 0 90 Decorate 52(outv) Location 0 91 MemberDecorate 53(S) 0 Offset 0 92 MemberDecorate 54(ubuf) 0 Offset 0 93 Decorate 54(ubuf) Block 94 Decorate 56 DescriptorSet 3 95 Decorate 67(s2d) Location 0 96 Decorate 67(s2d) DescriptorSet 3 97 3: TypeVoid 98 4: TypeFunction 3 99 7: TypeInt 32 1 100 8(S): TypeStruct 7(int) 101 9: TypePointer Function 8(S) 102 10: TypeFloat 32 103 11: TypeVector 10(float) 4 104 12: TypeFunction 11(fvec4) 9(ptr) 105 16: TypePointer Function 11(fvec4) 106 18: 7(int) Constant 0 107 19: TypePointer Function 7(int) 108 23: TypePointer Input 11(fvec4) 109 24(inv): 23(ptr) Variable Input 110 28: 10(float) Constant 1065353216 111 31: TypeInt 32 0 112 32: 31(int) Constant 0 113 33: TypePointer Function 10(float) 114 36: 10(float) Constant 1077936128 115 37: TypeBool 116 45: 10(float) Constant 1073741824 117 51: TypePointer Output 11(fvec4) 118 52(outv): 51(ptr) Variable Output 119 53(S): TypeStruct 7(int) 120 54(ubuf): TypeStruct 53(S) 121 55: TypePointer Uniform 54(ubuf) 122 56: 55(ptr) Variable Uniform 123 58: TypePointer Uniform 53(S) 124 64: TypeImage 10(float) 2D sampled format:Unknown 125 65: TypeSampledImage 64 126 66: TypePointer UniformConstant 65 127 67(s2d): 66(ptr) Variable UniformConstant 128 69: TypeVector 10(float) 2 129 70: 10(float) Constant 1056964608 130 71: 69(fvec2) ConstantComposite 70 70 131 75: TypePointer Uniform 7(int) 132 104: 7(int) Constant 10 133 109: 7(int) Constant 1 134 111: TypePointer Output 10(float) 135 114: 10(float) Constant 1092616192 136 5(main): 3 Function None 4 137 6: Label 138 57(param): 9(ptr) Variable Function 139 97(i): 19(ptr) Variable Function 140 116: 16(ptr) Variable Function 141 Line 1 30 0 142 59: 58(ptr) AccessChain 56 18 143 60: 53(S) Load 59 144 61: 7(int) CompositeExtract 60 0 145 62: 19(ptr) AccessChain 57(param) 18 146 Store 62 61 147 63: 11(fvec4) FunctionCall 14(foo(struct-S-i11;) 57(param) 148 Store 52(outv) 63 149 Line 1 31 0 150 68: 65 Load 67(s2d) 151 72: 11(fvec4) ImageSampleImplicitLod 68 71 152 73: 11(fvec4) Load 52(outv) 153 74: 11(fvec4) FAdd 73 72 154 Store 52(outv) 74 155 Line 1 33 0 156 76: 75(ptr) AccessChain 56 18 18 157 77: 7(int) Load 76 158 SelectionMerge 81 None 159 Switch 77 80 160 case 10: 78 161 case 20: 79 162 80: Label 163 Line 1 42 0 164 92: 11(fvec4) Load 52(outv) 165 93: 11(fvec4) CompositeConstruct 28 28 28 28 166 94: 11(fvec4) FSub 92 93 167 Store 52(outv) 94 168 Line 1 43 0 169 Branch 81 170 78: Label 171 Line 1 35 0 172 82: 11(fvec4) Load 52(outv) 173 83: 11(fvec4) CompositeConstruct 28 28 28 28 174 84: 11(fvec4) FAdd 82 83 175 Store 52(outv) 84 176 Line 1 36 0 177 Branch 81 178 79: Label 179 Line 1 38 0 180 86: 11(fvec4) Load 52(outv) 181 87: 11(fvec4) VectorTimesScalar 86 45 182 Store 52(outv) 87 183 Line 1 39 0 184 88: 11(fvec4) Load 52(outv) 185 89: 11(fvec4) CompositeConstruct 28 28 28 28 186 90: 11(fvec4) FAdd 88 89 187 Store 52(outv) 90 188 Line 1 40 0 189 Branch 81 190 81: Label 191 Line 1 46 0 192 Store 97(i) 18 193 Branch 98 194 98: Label 195 LoopMerge 100 101 None 196 Branch 102 197 102: Label 198 103: 7(int) Load 97(i) 199 105: 37(bool) SLessThan 103 104 200 BranchConditional 105 99 100 201 99: Label 202 Line 1 47 0 203 106: 11(fvec4) Load 52(outv) 204 107: 11(fvec4) VectorTimesScalar 106 36 205 Store 52(outv) 107 206 Branch 101 207 101: Label 208 Line 1 46 0 209 108: 7(int) Load 97(i) 210 110: 7(int) IAdd 108 109 211 Store 97(i) 110 212 Branch 98 213 100: Label 214 Line 1 49 0 215 112: 111(ptr) AccessChain 52(outv) 32 216 113: 10(float) Load 112 217 115: 37(bool) FOrdLessThan 113 114 218 SelectionMerge 118 None 219 BranchConditional 115 117 121 220 117: Label 221 Line 1 50 0 222 119: 11(fvec4) Load 52(outv) 223 120: 11(fvec4) ExtInst 2(GLSL.std.450) 13(Sin) 119 224 Store 52(outv) 120 225 Store 116 120 226 Branch 118 227 121: Label 228 Line 1 51 0 229 122: 11(fvec4) Load 52(outv) 230 123: 11(fvec4) ExtInst 2(GLSL.std.450) 14(Cos) 122 231 Store 52(outv) 123 232 Store 116 123 233 Branch 118 234 118: Label 235 Return 236 FunctionEnd 23714(foo(struct-S-i11;): 11(fvec4) Function None 12 238 13(s): 9(ptr) FunctionParameter 239 15: Label 240 17(r): 16(ptr) Variable Function 241 Line 1 18 0 242 20: 19(ptr) AccessChain 13(s) 18 243 21: 7(int) Load 20 244 22: 10(float) ConvertSToF 21 245 25: 11(fvec4) Load 24(inv) 246 26: 11(fvec4) VectorTimesScalar 25 22 247 Store 17(r) 26 248 Line 1 19 0 249 27: 11(fvec4) Load 17(r) 250 29: 11(fvec4) CompositeConstruct 28 28 28 28 251 30: 11(fvec4) FAdd 27 29 252 Store 17(r) 30 253 Line 1 20 0 254 34: 33(ptr) AccessChain 17(r) 32 255 35: 10(float) Load 34 256 38: 37(bool) FOrdGreaterThan 35 36 257 SelectionMerge 40 None 258 BranchConditional 38 39 44 259 39: Label 260 Line 1 21 0 261 41: 11(fvec4) Load 17(r) 262 42: 11(fvec4) CompositeConstruct 28 28 28 28 263 43: 11(fvec4) FSub 41 42 264 Store 17(r) 43 265 Branch 40 266 44: Label 267 Line 1 23 0 268 46: 11(fvec4) Load 17(r) 269 47: 11(fvec4) VectorTimesScalar 46 45 270 Store 17(r) 47 271 Branch 40 272 40: Label 273 Line 1 25 0 274 48: 11(fvec4) Load 17(r) 275 ReturnValue 48 276 FunctionEnd 277