steve-lunarg | 5da1f03 | 2017-02-12 17:50:28 -0700 | [diff] [blame^] | 1 | hlsl.structbuffer.frag |
| 2 | Shader version: 450 |
| 3 | gl_FragCoord origin is upper left |
| 4 | 0:? Sequence |
| 5 | 0:12 Function Definition: @main(u1; (temp 4-component vector of float) |
| 6 | 0:12 Function Parameters: |
| 7 | 0:12 'pos' (in uint) |
| 8 | 0:? Sequence |
| 9 | 0:13 Sequence |
| 10 | 0:13 move second child to first child (temp structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 11 | 0:13 'mydata' (temp structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 12 | 0:13 indirect index (layout(binding=10 row_major std430 ) readonly buffer structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 13 | 0:13 sbuf: direct index for structure (layout(binding=10 row_major std430 ) readonly buffer implicitly-sized array of structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 14 | 0:13 'anon@0' (layout(binding=10 row_major std430 ) readonly buffer block{layout(binding=10 row_major std430 ) readonly buffer implicitly-sized array of structure{temp 3-component vector of float color, temp bool test, temp bool test2} sbuf}) |
| 15 | 0:13 Constant: |
| 16 | 0:13 0 (const uint) |
| 17 | 0:13 'pos' (in uint) |
| 18 | 0:17 Sequence |
| 19 | 0:17 move second child to first child (temp uint) |
| 20 | 0:17 'size' (temp uint) |
| 21 | 0:17 array length (temp uint) |
| 22 | 0:17 sbuf: direct index for structure (layout(binding=10 row_major std430 ) readonly buffer implicitly-sized array of structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 23 | 0:17 'anon@0' (layout(binding=10 row_major std430 ) readonly buffer block{layout(binding=10 row_major std430 ) readonly buffer implicitly-sized array of structure{temp 3-component vector of float color, temp bool test, temp bool test2} sbuf}) |
| 24 | 0:17 Constant: |
| 25 | 0:17 0 (const uint) |
| 26 | 0:17 move second child to first child (temp uint) |
| 27 | 0:17 'stride' (temp uint) |
| 28 | 0:17 Constant: |
| 29 | 0:17 32 (const uint) |
| 30 | 0:19 Test condition and select (temp void) |
| 31 | 0:19 Condition |
| 32 | 0:19 test: direct index for structure (temp bool) |
| 33 | 0:19 indirect index (layout(binding=10 row_major std430 ) readonly temp structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 34 | 0:19 sbuf: direct index for structure (layout(binding=10 row_major std430 ) readonly buffer implicitly-sized array of structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 35 | 0:19 'anon@0' (layout(binding=10 row_major std430 ) readonly buffer block{layout(binding=10 row_major std430 ) readonly buffer implicitly-sized array of structure{temp 3-component vector of float color, temp bool test, temp bool test2} sbuf}) |
| 36 | 0:19 Constant: |
| 37 | 0:19 0 (const uint) |
| 38 | 0:19 'pos' (in uint) |
| 39 | 0:19 Constant: |
| 40 | 0:19 1 (const int) |
| 41 | 0:19 true case |
| 42 | 0:20 Branch: Return with expression |
| 43 | 0:? Construct vec4 (temp 4-component vector of float) |
| 44 | 0:20 add (temp 3-component vector of float) |
| 45 | 0:20 color: direct index for structure (temp 3-component vector of float) |
| 46 | 0:20 indirect index (layout(binding=10 row_major std430 ) readonly temp structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 47 | 0:20 sbuf: direct index for structure (layout(binding=10 row_major std430 ) readonly buffer implicitly-sized array of structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 48 | 0:20 'anon@0' (layout(binding=10 row_major std430 ) readonly buffer block{layout(binding=10 row_major std430 ) readonly buffer implicitly-sized array of structure{temp 3-component vector of float color, temp bool test, temp bool test2} sbuf}) |
| 49 | 0:20 Constant: |
| 50 | 0:20 0 (const uint) |
| 51 | 0:20 'pos' (in uint) |
| 52 | 0:20 Constant: |
| 53 | 0:20 0 (const int) |
| 54 | 0:20 indirect index (layout(row_major std430 ) readonly temp float) |
| 55 | 0:20 sbuf2: direct index for structure (layout(row_major std430 ) readonly buffer implicitly-sized array of float) |
| 56 | 0:20 'anon@1' (layout(row_major std430 ) readonly buffer block{layout(row_major std430 ) readonly buffer implicitly-sized array of float sbuf2}) |
| 57 | 0:20 Constant: |
| 58 | 0:20 0 (const uint) |
| 59 | 0:20 'pos' (in uint) |
| 60 | 0:20 Constant: |
| 61 | 0:20 0.000000 |
| 62 | 0:19 false case |
| 63 | 0:22 Branch: Return with expression |
| 64 | 0:22 Construct vec4 (temp 4-component vector of float) |
| 65 | 0:22 add (temp float) |
| 66 | 0:22 add (temp float) |
| 67 | 0:22 direct index (temp float) |
| 68 | 0:22 color: direct index for structure (temp 3-component vector of float) |
| 69 | 0:22 'mydata' (temp structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 70 | 0:22 Constant: |
| 71 | 0:22 0 (const int) |
| 72 | 0:22 Constant: |
| 73 | 0:22 0 (const int) |
| 74 | 0:22 Convert uint to float (temp float) |
| 75 | 0:22 'size' (temp uint) |
| 76 | 0:22 Convert uint to float (temp float) |
| 77 | 0:22 'stride' (temp uint) |
| 78 | 0:12 Function Definition: main( (temp void) |
| 79 | 0:12 Function Parameters: |
| 80 | 0:? Sequence |
| 81 | 0:12 move second child to first child (temp uint) |
| 82 | 0:? 'pos' (temp uint) |
| 83 | 0:? 'pos' (layout(location=0 ) in uint) |
| 84 | 0:12 move second child to first child (temp 4-component vector of float) |
| 85 | 0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float) |
| 86 | 0:12 Function Call: @main(u1; (temp 4-component vector of float) |
| 87 | 0:? 'pos' (temp uint) |
| 88 | 0:? Linker Objects |
| 89 | 0:? 'anon@0' (layout(binding=10 row_major std430 ) readonly buffer block{layout(binding=10 row_major std430 ) readonly buffer implicitly-sized array of structure{temp 3-component vector of float color, temp bool test, temp bool test2} sbuf}) |
| 90 | 0:? 'anon@1' (layout(row_major std430 ) readonly buffer block{layout(row_major std430 ) readonly buffer implicitly-sized array of float sbuf2}) |
| 91 | 0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float) |
| 92 | 0:? 'pos' (layout(location=0 ) in uint) |
| 93 | |
| 94 | |
| 95 | Linked fragment stage: |
| 96 | |
| 97 | |
| 98 | Shader version: 450 |
| 99 | gl_FragCoord origin is upper left |
| 100 | 0:? Sequence |
| 101 | 0:12 Function Definition: @main(u1; (temp 4-component vector of float) |
| 102 | 0:12 Function Parameters: |
| 103 | 0:12 'pos' (in uint) |
| 104 | 0:? Sequence |
| 105 | 0:13 Sequence |
| 106 | 0:13 move second child to first child (temp structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 107 | 0:13 'mydata' (temp structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 108 | 0:13 indirect index (layout(binding=10 row_major std430 ) readonly buffer structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 109 | 0:13 sbuf: direct index for structure (layout(binding=10 row_major std430 ) readonly buffer implicitly-sized array of structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 110 | 0:13 'anon@0' (layout(binding=10 row_major std430 ) readonly buffer block{layout(binding=10 row_major std430 ) readonly buffer implicitly-sized array of structure{temp 3-component vector of float color, temp bool test, temp bool test2} sbuf}) |
| 111 | 0:13 Constant: |
| 112 | 0:13 0 (const uint) |
| 113 | 0:13 'pos' (in uint) |
| 114 | 0:17 Sequence |
| 115 | 0:17 move second child to first child (temp uint) |
| 116 | 0:17 'size' (temp uint) |
| 117 | 0:17 array length (temp uint) |
| 118 | 0:17 sbuf: direct index for structure (layout(binding=10 row_major std430 ) readonly buffer implicitly-sized array of structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 119 | 0:17 'anon@0' (layout(binding=10 row_major std430 ) readonly buffer block{layout(binding=10 row_major std430 ) readonly buffer implicitly-sized array of structure{temp 3-component vector of float color, temp bool test, temp bool test2} sbuf}) |
| 120 | 0:17 Constant: |
| 121 | 0:17 0 (const uint) |
| 122 | 0:17 move second child to first child (temp uint) |
| 123 | 0:17 'stride' (temp uint) |
| 124 | 0:17 Constant: |
| 125 | 0:17 32 (const uint) |
| 126 | 0:19 Test condition and select (temp void) |
| 127 | 0:19 Condition |
| 128 | 0:19 test: direct index for structure (temp bool) |
| 129 | 0:19 indirect index (layout(binding=10 row_major std430 ) readonly temp structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 130 | 0:19 sbuf: direct index for structure (layout(binding=10 row_major std430 ) readonly buffer implicitly-sized array of structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 131 | 0:19 'anon@0' (layout(binding=10 row_major std430 ) readonly buffer block{layout(binding=10 row_major std430 ) readonly buffer implicitly-sized array of structure{temp 3-component vector of float color, temp bool test, temp bool test2} sbuf}) |
| 132 | 0:19 Constant: |
| 133 | 0:19 0 (const uint) |
| 134 | 0:19 'pos' (in uint) |
| 135 | 0:19 Constant: |
| 136 | 0:19 1 (const int) |
| 137 | 0:19 true case |
| 138 | 0:20 Branch: Return with expression |
| 139 | 0:? Construct vec4 (temp 4-component vector of float) |
| 140 | 0:20 add (temp 3-component vector of float) |
| 141 | 0:20 color: direct index for structure (temp 3-component vector of float) |
| 142 | 0:20 indirect index (layout(binding=10 row_major std430 ) readonly temp structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 143 | 0:20 sbuf: direct index for structure (layout(binding=10 row_major std430 ) readonly buffer implicitly-sized array of structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 144 | 0:20 'anon@0' (layout(binding=10 row_major std430 ) readonly buffer block{layout(binding=10 row_major std430 ) readonly buffer implicitly-sized array of structure{temp 3-component vector of float color, temp bool test, temp bool test2} sbuf}) |
| 145 | 0:20 Constant: |
| 146 | 0:20 0 (const uint) |
| 147 | 0:20 'pos' (in uint) |
| 148 | 0:20 Constant: |
| 149 | 0:20 0 (const int) |
| 150 | 0:20 indirect index (layout(row_major std430 ) readonly temp float) |
| 151 | 0:20 sbuf2: direct index for structure (layout(row_major std430 ) readonly buffer implicitly-sized array of float) |
| 152 | 0:20 'anon@1' (layout(row_major std430 ) readonly buffer block{layout(row_major std430 ) readonly buffer implicitly-sized array of float sbuf2}) |
| 153 | 0:20 Constant: |
| 154 | 0:20 0 (const uint) |
| 155 | 0:20 'pos' (in uint) |
| 156 | 0:20 Constant: |
| 157 | 0:20 0.000000 |
| 158 | 0:19 false case |
| 159 | 0:22 Branch: Return with expression |
| 160 | 0:22 Construct vec4 (temp 4-component vector of float) |
| 161 | 0:22 add (temp float) |
| 162 | 0:22 add (temp float) |
| 163 | 0:22 direct index (temp float) |
| 164 | 0:22 color: direct index for structure (temp 3-component vector of float) |
| 165 | 0:22 'mydata' (temp structure{temp 3-component vector of float color, temp bool test, temp bool test2}) |
| 166 | 0:22 Constant: |
| 167 | 0:22 0 (const int) |
| 168 | 0:22 Constant: |
| 169 | 0:22 0 (const int) |
| 170 | 0:22 Convert uint to float (temp float) |
| 171 | 0:22 'size' (temp uint) |
| 172 | 0:22 Convert uint to float (temp float) |
| 173 | 0:22 'stride' (temp uint) |
| 174 | 0:12 Function Definition: main( (temp void) |
| 175 | 0:12 Function Parameters: |
| 176 | 0:? Sequence |
| 177 | 0:12 move second child to first child (temp uint) |
| 178 | 0:? 'pos' (temp uint) |
| 179 | 0:? 'pos' (layout(location=0 ) in uint) |
| 180 | 0:12 move second child to first child (temp 4-component vector of float) |
| 181 | 0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float) |
| 182 | 0:12 Function Call: @main(u1; (temp 4-component vector of float) |
| 183 | 0:? 'pos' (temp uint) |
| 184 | 0:? Linker Objects |
| 185 | 0:? 'anon@0' (layout(binding=10 row_major std430 ) readonly buffer block{layout(binding=10 row_major std430 ) readonly buffer implicitly-sized array of structure{temp 3-component vector of float color, temp bool test, temp bool test2} sbuf}) |
| 186 | 0:? 'anon@1' (layout(row_major std430 ) readonly buffer block{layout(row_major std430 ) readonly buffer implicitly-sized array of float sbuf2}) |
| 187 | 0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float) |
| 188 | 0:? 'pos' (layout(location=0 ) in uint) |
| 189 | |
| 190 | // Module Version 10000 |
| 191 | // Generated by (magic number): 80001 |
| 192 | // Id's are bound by 94 |
| 193 | |
| 194 | Capability Shader |
| 195 | 1: ExtInstImport "GLSL.std.450" |
| 196 | MemoryModel Logical GLSL450 |
| 197 | EntryPoint Fragment 4 "main" 87 90 |
| 198 | ExecutionMode 4 OriginUpperLeft |
| 199 | Name 4 "main" |
| 200 | Name 12 "@main(u1;" |
| 201 | Name 11 "pos" |
| 202 | Name 16 "sb_t" |
| 203 | MemberName 16(sb_t) 0 "color" |
| 204 | MemberName 16(sb_t) 1 "test" |
| 205 | MemberName 16(sb_t) 2 "test2" |
| 206 | Name 18 "mydata" |
| 207 | Name 19 "sb_t" |
| 208 | MemberName 19(sb_t) 0 "color" |
| 209 | MemberName 19(sb_t) 1 "test" |
| 210 | MemberName 19(sb_t) 2 "test2" |
| 211 | Name 21 "sbuf" |
| 212 | MemberName 21(sbuf) 0 "sbuf" |
| 213 | Name 23 "" |
| 214 | Name 40 "size" |
| 215 | Name 42 "stride" |
| 216 | Name 57 "sbuf2" |
| 217 | MemberName 57(sbuf2) 0 "sbuf2" |
| 218 | Name 59 "" |
| 219 | Name 85 "pos" |
| 220 | Name 87 "pos" |
| 221 | Name 90 "@entryPointOutput" |
| 222 | Name 91 "param" |
| 223 | MemberDecorate 19(sb_t) 0 NonWritable |
| 224 | MemberDecorate 19(sb_t) 0 Offset 0 |
| 225 | MemberDecorate 19(sb_t) 1 NonWritable |
| 226 | MemberDecorate 19(sb_t) 1 Offset 12 |
| 227 | MemberDecorate 19(sb_t) 2 NonWritable |
| 228 | MemberDecorate 19(sb_t) 2 Offset 16 |
| 229 | Decorate 20 ArrayStride 32 |
| 230 | MemberDecorate 21(sbuf) 0 NonWritable |
| 231 | MemberDecorate 21(sbuf) 0 Offset 0 |
| 232 | Decorate 21(sbuf) BufferBlock |
| 233 | Decorate 23 DescriptorSet 0 |
| 234 | Decorate 23 Binding 10 |
| 235 | Decorate 56 ArrayStride 4 |
| 236 | MemberDecorate 57(sbuf2) 0 NonWritable |
| 237 | MemberDecorate 57(sbuf2) 0 Offset 0 |
| 238 | Decorate 57(sbuf2) BufferBlock |
| 239 | Decorate 59 DescriptorSet 0 |
| 240 | Decorate 87(pos) Location 0 |
| 241 | Decorate 90(@entryPointOutput) Location 0 |
| 242 | 2: TypeVoid |
| 243 | 3: TypeFunction 2 |
| 244 | 6: TypeInt 32 0 |
| 245 | 7: TypePointer Function 6(int) |
| 246 | 8: TypeFloat 32 |
| 247 | 9: TypeVector 8(float) 4 |
| 248 | 10: TypeFunction 9(fvec4) 7(ptr) |
| 249 | 14: TypeVector 8(float) 3 |
| 250 | 15: TypeBool |
| 251 | 16(sb_t): TypeStruct 14(fvec3) 15(bool) 15(bool) |
| 252 | 17: TypePointer Function 16(sb_t) |
| 253 | 19(sb_t): TypeStruct 14(fvec3) 6(int) 6(int) |
| 254 | 20: TypeRuntimeArray 19(sb_t) |
| 255 | 21(sbuf): TypeStruct 20 |
| 256 | 22: TypePointer Uniform 21(sbuf) |
| 257 | 23: 22(ptr) Variable Uniform |
| 258 | 24: TypeInt 32 1 |
| 259 | 25: 24(int) Constant 0 |
| 260 | 27: TypePointer Uniform 19(sb_t) |
| 261 | 31: TypePointer Function 14(fvec3) |
| 262 | 34: 24(int) Constant 1 |
| 263 | 35: TypePointer Function 15(bool) |
| 264 | 38: 24(int) Constant 2 |
| 265 | 43: 6(int) Constant 32 |
| 266 | 45: TypePointer Uniform 6(int) |
| 267 | 48: 6(int) Constant 0 |
| 268 | 53: TypePointer Uniform 14(fvec3) |
| 269 | 56: TypeRuntimeArray 8(float) |
| 270 | 57(sbuf2): TypeStruct 56 |
| 271 | 58: TypePointer Uniform 57(sbuf2) |
| 272 | 59: 58(ptr) Variable Uniform |
| 273 | 61: TypePointer Uniform 8(float) |
| 274 | 66: 8(float) Constant 0 |
| 275 | 73: TypePointer Function 8(float) |
| 276 | 86: TypePointer Input 6(int) |
| 277 | 87(pos): 86(ptr) Variable Input |
| 278 | 89: TypePointer Output 9(fvec4) |
| 279 | 90(@entryPointOutput): 89(ptr) Variable Output |
| 280 | 4(main): 2 Function None 3 |
| 281 | 5: Label |
| 282 | 85(pos): 7(ptr) Variable Function |
| 283 | 91(param): 7(ptr) Variable Function |
| 284 | 88: 6(int) Load 87(pos) |
| 285 | Store 85(pos) 88 |
| 286 | 92: 6(int) Load 85(pos) |
| 287 | Store 91(param) 92 |
| 288 | 93: 9(fvec4) FunctionCall 12(@main(u1;) 91(param) |
| 289 | Store 90(@entryPointOutput) 93 |
| 290 | Return |
| 291 | FunctionEnd |
| 292 | 12(@main(u1;): 9(fvec4) Function None 10 |
| 293 | 11(pos): 7(ptr) FunctionParameter |
| 294 | 13: Label |
| 295 | 18(mydata): 17(ptr) Variable Function |
| 296 | 40(size): 7(ptr) Variable Function |
| 297 | 42(stride): 7(ptr) Variable Function |
| 298 | 26: 6(int) Load 11(pos) |
| 299 | 28: 27(ptr) AccessChain 23 25 26 |
| 300 | 29: 19(sb_t) Load 28 |
| 301 | 30: 14(fvec3) CompositeExtract 29 0 |
| 302 | 32: 31(ptr) AccessChain 18(mydata) 25 |
| 303 | Store 32 30 |
| 304 | 33: 6(int) CompositeExtract 29 1 |
| 305 | 36: 35(ptr) AccessChain 18(mydata) 34 |
| 306 | Store 36 33 |
| 307 | 37: 6(int) CompositeExtract 29 2 |
| 308 | 39: 35(ptr) AccessChain 18(mydata) 38 |
| 309 | Store 39 37 |
| 310 | 41: 24(int) ArrayLength 23 0 |
| 311 | Store 40(size) 41 |
| 312 | Store 42(stride) 43 |
| 313 | 44: 6(int) Load 11(pos) |
| 314 | 46: 45(ptr) AccessChain 23 25 44 34 |
| 315 | 47: 6(int) Load 46 |
| 316 | 49: 15(bool) INotEqual 47 48 |
| 317 | SelectionMerge 51 None |
| 318 | BranchConditional 49 50 72 |
| 319 | 50: Label |
| 320 | 52: 6(int) Load 11(pos) |
| 321 | 54: 53(ptr) AccessChain 23 25 52 25 |
| 322 | 55: 14(fvec3) Load 54 |
| 323 | 60: 6(int) Load 11(pos) |
| 324 | 62: 61(ptr) AccessChain 59 25 60 |
| 325 | 63: 8(float) Load 62 |
| 326 | 64: 14(fvec3) CompositeConstruct 63 63 63 |
| 327 | 65: 14(fvec3) FAdd 55 64 |
| 328 | 67: 8(float) CompositeExtract 65 0 |
| 329 | 68: 8(float) CompositeExtract 65 1 |
| 330 | 69: 8(float) CompositeExtract 65 2 |
| 331 | 70: 9(fvec4) CompositeConstruct 67 68 69 66 |
| 332 | ReturnValue 70 |
| 333 | 72: Label |
| 334 | 74: 73(ptr) AccessChain 18(mydata) 25 48 |
| 335 | 75: 8(float) Load 74 |
| 336 | 76: 6(int) Load 40(size) |
| 337 | 77: 8(float) ConvertUToF 76 |
| 338 | 78: 8(float) FAdd 75 77 |
| 339 | 79: 6(int) Load 42(stride) |
| 340 | 80: 8(float) ConvertUToF 79 |
| 341 | 81: 8(float) FAdd 78 80 |
| 342 | 82: 9(fvec4) CompositeConstruct 81 81 81 81 |
| 343 | ReturnValue 82 |
| 344 | 51: Label |
| 345 | 84: 9(fvec4) Undef |
| 346 | ReturnValue 84 |
| 347 | FunctionEnd |