Don't emit debug instructions before an OpPhi

Nonsemantic instructions aren't allowed before an OpPhi, so don't emit
line and debug scope instructions when the instruction being emitted is
an OpPhi.
This commit is contained in:
Arcady Goldmints-Orlov 2024-07-22 17:20:14 -04:00 committed by arcady-lunarg
parent 74d448cc15
commit 592aed9c20
3 changed files with 228 additions and 224 deletions

View file

@ -2131,6 +2131,12 @@ void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decorat
} }
void Builder::addInstruction(std::unique_ptr<Instruction> inst) { void Builder::addInstruction(std::unique_ptr<Instruction> inst) {
// Phis must appear first in their block, don't insert line tracking instructions
// in front of them, just add the OpPhi and return.
if (inst->getOpCode() == OpPhi) {
buildPoint->addInstruction(std::move(inst));
return;
}
// Optionally insert OpDebugScope // Optionally insert OpDebugScope
if (emitNonSemanticShaderDebugInfo && dirtyScopeTracker) { if (emitNonSemanticShaderDebugInfo && dirtyScopeTracker) {
if (buildPoint->updateDebugScope(currentDebugScopeId.top())) { if (buildPoint->updateDebugScope(currentDebugScopeId.top())) {

View file

@ -1,5 +1,4 @@
spv.debuginfo.glsl.comp spv.debuginfo.glsl.comp
Validation failed
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 8000b // Generated by (magic number): 8000b
// Id's are bound by 975 // Id's are bound by 975
@ -283,18 +282,18 @@ void main()
Name 383 "param" Name 383 "param"
Name 387 "param" Name 387 "param"
Name 389 "param" Name 389 "param"
Name 426 "param" Name 425 "param"
Name 430 "param" Name 429 "param"
Name 432 "param" Name 431 "param"
Name 464 "param" Name 463 "param"
Name 468 "param" Name 467 "param"
Name 470 "param" Name 469 "param"
Name 510 "param" Name 509 "param"
Name 514 "param" Name 513 "param"
Name 516 "param" Name 515 "param"
Name 552 "param" Name 551 "param"
Name 556 "param" Name 555 "param"
Name 558 "param" Name 557 "param"
Name 575 "f" Name 575 "f"
Name 624 "sphereDist" Name 624 "sphereDist"
Name 675 "PushConsts" Name 675 "PushConsts"
@ -482,14 +481,14 @@ void main()
370: 7(int) Constant 107 370: 7(int) Constant 107
378: 7(int) Constant 108 378: 7(int) Constant 108
398: 7(int) Constant 111 398: 7(int) Constant 111
419: 7(int) Constant 112 418: 7(int) Constant 112
425: 73(int) Constant 6 424: 73(int) Constant 6
441: 7(int) Constant 115 441: 7(int) Constant 115
458: 7(int) Constant 116 457: 7(int) Constant 116
479: 7(int) Constant 119 479: 7(int) Constant 119
504: 7(int) Constant 120 503: 7(int) Constant 120
525: 7(int) Constant 123 525: 7(int) Constant 123
546: 7(int) Constant 124 545: 7(int) Constant 124
564: 73(int) Constant 3 564: 73(int) Constant 3
568: 7(int) Constant 127 568: 7(int) Constant 127
578: 7(int) Constant 130 578: 7(int) Constant 130
@ -567,18 +566,18 @@ void main()
383(param): 21(ptr) Variable Function 383(param): 21(ptr) Variable Function
387(param): 21(ptr) Variable Function 387(param): 21(ptr) Variable Function
389(param): 24(ptr) Variable Function 389(param): 24(ptr) Variable Function
426(param): 21(ptr) Variable Function 425(param): 21(ptr) Variable Function
430(param): 21(ptr) Variable Function 429(param): 21(ptr) Variable Function
432(param): 24(ptr) Variable Function 431(param): 24(ptr) Variable Function
464(param): 21(ptr) Variable Function 463(param): 21(ptr) Variable Function
468(param): 21(ptr) Variable Function 467(param): 21(ptr) Variable Function
470(param): 24(ptr) Variable Function 469(param): 24(ptr) Variable Function
510(param): 21(ptr) Variable Function 509(param): 21(ptr) Variable Function
514(param): 21(ptr) Variable Function 513(param): 21(ptr) Variable Function
516(param): 24(ptr) Variable Function 515(param): 24(ptr) Variable Function
552(param): 21(ptr) Variable Function 551(param): 21(ptr) Variable Function
556(param): 21(ptr) Variable Function 555(param): 21(ptr) Variable Function
558(param): 24(ptr) Variable Function 557(param): 24(ptr) Variable Function
575(f): 21(ptr) Variable Function 575(f): 21(ptr) Variable Function
624(sphereDist): 21(ptr) Variable Function 624(sphereDist): 21(ptr) Variable Function
697(normal): 21(ptr) Variable Function 697(normal): 21(ptr) Variable Function
@ -808,34 +807,34 @@ void main()
411: 166(bool) ULessThan 406 410 411: 166(bool) ULessThan 406 410
Branch 402 Branch 402
402: Label 402: Label
413: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55
412: 166(bool) Phi 400 374 411 401 412: 166(bool) Phi 400 374 411 401
SelectionMerge 415 None 437: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55
BranchConditional 412 414 415 SelectionMerge 414 None
414: Label BranchConditional 412 413 414
417: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 413: Label
418: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 419 419 12 12 416: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55
416: 7(int) Load 139(index) 417: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 418 418 12 12
420: 148(ptr) AccessChain 101(params) 147 12 415: 7(int) Load 139(index)
421: 73(int) Load 420 419: 148(ptr) AccessChain 101(params) 147 12
422: 7(int) Bitcast 421 420: 73(int) Load 419
423: 7(int) IAdd 416 422 421: 7(int) Bitcast 420
424: 7(int) ISub 423 39 422: 7(int) IAdd 415 421
427: 231(ptr) AccessChain 200 203 424 203 423: 7(int) ISub 422 39
428: 71(fvec4) Load 427 426: 231(ptr) AccessChain 200 203 423 203
429: 19(fvec3) VectorShuffle 428 428 0 1 2 427: 71(fvec4) Load 426
Store 426(param) 429 428: 19(fvec3) VectorShuffle 427 427 0 1 2
431: 19(fvec3) Load 261(pos) Store 425(param) 428
Store 430(param) 431 430: 19(fvec3) Load 261(pos)
433: 105(ptr) AccessChain 101(params) 425 Store 429(param) 430
434: 16(float) Load 433 432: 105(ptr) AccessChain 101(params) 424
Store 432(param) 434 433: 16(float) Load 432
435: 19(fvec3) FunctionCall 31(springForce(vf3;vf3;f1;) 426(param) 430(param) 432(param) Store 431(param) 433
436: 19(fvec3) Load 247(force) 434: 19(fvec3) FunctionCall 31(springForce(vf3;vf3;f1;) 425(param) 429(param) 431(param)
437: 19(fvec3) FAdd 436 435 435: 19(fvec3) Load 247(force)
Store 247(force) 437 436: 19(fvec3) FAdd 435 434
Branch 415 Store 247(force) 436
415: Label Branch 414
414: Label
439: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 439: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55
440: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 441 441 12 12 440: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 441 441 12 12
438: 137(ptr) AccessChain 125(id) 12 438: 137(ptr) AccessChain 125(id) 12
@ -851,34 +850,34 @@ void main()
450: 166(bool) UGreaterThan 449 12 450: 166(bool) UGreaterThan 449 12
Branch 445 Branch 445
445: Label 445: Label
452: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 451: 166(bool) Phi 443 414 450 444
451: 166(bool) Phi 443 415 450 444 475: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55
SelectionMerge 454 None SelectionMerge 453 None
BranchConditional 451 453 454 BranchConditional 451 452 453
453: Label 452: Label
456: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 455: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55
457: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 458 458 12 12 456: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 457 457 12 12
455: 7(int) Load 139(index) 454: 7(int) Load 139(index)
459: 148(ptr) AccessChain 101(params) 147 12 458: 148(ptr) AccessChain 101(params) 147 12
460: 73(int) Load 459 459: 73(int) Load 458
461: 7(int) Bitcast 460 460: 7(int) Bitcast 459
462: 7(int) ISub 455 461 461: 7(int) ISub 454 460
463: 7(int) ISub 462 39 462: 7(int) ISub 461 39
465: 231(ptr) AccessChain 200 203 463 203 464: 231(ptr) AccessChain 200 203 462 203
466: 71(fvec4) Load 465 465: 71(fvec4) Load 464
467: 19(fvec3) VectorShuffle 466 466 0 1 2 466: 19(fvec3) VectorShuffle 465 465 0 1 2
Store 464(param) 467 Store 463(param) 466
469: 19(fvec3) Load 261(pos) 468: 19(fvec3) Load 261(pos)
Store 468(param) 469 Store 467(param) 468
471: 105(ptr) AccessChain 101(params) 425 470: 105(ptr) AccessChain 101(params) 424
472: 16(float) Load 471 471: 16(float) Load 470
Store 470(param) 472 Store 469(param) 471
473: 19(fvec3) FunctionCall 31(springForce(vf3;vf3;f1;) 464(param) 468(param) 470(param) 472: 19(fvec3) FunctionCall 31(springForce(vf3;vf3;f1;) 463(param) 467(param) 469(param)
474: 19(fvec3) Load 247(force) 473: 19(fvec3) Load 247(force)
475: 19(fvec3) FAdd 474 473 474: 19(fvec3) FAdd 473 472
Store 247(force) 475 Store 247(force) 474
Branch 454 Branch 453
454: Label 453: Label
477: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 477: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55
478: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 479 479 12 12 478: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 479 479 12 12
476: 137(ptr) AccessChain 125(id) 12 476: 137(ptr) AccessChain 125(id) 12
@ -902,34 +901,34 @@ void main()
496: 166(bool) ULessThan 491 495 496: 166(bool) ULessThan 491 495
Branch 487 Branch 487
487: Label 487: Label
498: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 497: 166(bool) Phi 485 453 496 486
497: 166(bool) Phi 485 454 496 486 521: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55
SelectionMerge 500 None SelectionMerge 499 None
BranchConditional 497 499 500 BranchConditional 497 498 499
499: Label 498: Label
502: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 501: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55
503: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 504 504 12 12 502: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 503 503 12 12
501: 7(int) Load 139(index) 500: 7(int) Load 139(index)
505: 148(ptr) AccessChain 101(params) 147 12 504: 148(ptr) AccessChain 101(params) 147 12
506: 73(int) Load 505 505: 73(int) Load 504
507: 7(int) Bitcast 506 506: 7(int) Bitcast 505
508: 7(int) IAdd 501 507 507: 7(int) IAdd 500 506
509: 7(int) IAdd 508 39 508: 7(int) IAdd 507 39
511: 231(ptr) AccessChain 200 203 509 203 510: 231(ptr) AccessChain 200 203 508 203
512: 71(fvec4) Load 511 511: 71(fvec4) Load 510
513: 19(fvec3) VectorShuffle 512 512 0 1 2 512: 19(fvec3) VectorShuffle 511 511 0 1 2
Store 510(param) 513 Store 509(param) 512
515: 19(fvec3) Load 261(pos) 514: 19(fvec3) Load 261(pos)
Store 514(param) 515 Store 513(param) 514
517: 105(ptr) AccessChain 101(params) 425 516: 105(ptr) AccessChain 101(params) 424
518: 16(float) Load 517 517: 16(float) Load 516
Store 516(param) 518 Store 515(param) 517
519: 19(fvec3) FunctionCall 31(springForce(vf3;vf3;f1;) 510(param) 514(param) 516(param) 518: 19(fvec3) FunctionCall 31(springForce(vf3;vf3;f1;) 509(param) 513(param) 515(param)
520: 19(fvec3) Load 247(force) 519: 19(fvec3) Load 247(force)
521: 19(fvec3) FAdd 520 519 520: 19(fvec3) FAdd 519 518
Store 247(force) 521 Store 247(force) 520
Branch 500 Branch 499
500: Label 499: Label
523: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 523: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55
524: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 525 525 12 12 524: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 525 525 12 12
522: 137(ptr) AccessChain 125(id) 12 522: 137(ptr) AccessChain 125(id) 12
@ -949,34 +948,34 @@ void main()
538: 166(bool) UGreaterThan 537 12 538: 166(bool) UGreaterThan 537 12
Branch 533 Branch 533
533: Label 533: Label
540: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 539: 166(bool) Phi 531 499 538 532
539: 166(bool) Phi 531 500 538 532 563: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55
SelectionMerge 542 None SelectionMerge 541 None
BranchConditional 539 541 542 BranchConditional 539 540 541
541: Label 540: Label
544: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 543: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55
545: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 546 546 12 12 544: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 545 545 12 12
543: 7(int) Load 139(index) 542: 7(int) Load 139(index)
547: 148(ptr) AccessChain 101(params) 147 12 546: 148(ptr) AccessChain 101(params) 147 12
548: 73(int) Load 547 547: 73(int) Load 546
549: 7(int) Bitcast 548 548: 7(int) Bitcast 547
550: 7(int) ISub 543 549 549: 7(int) ISub 542 548
551: 7(int) IAdd 550 39 550: 7(int) IAdd 549 39
553: 231(ptr) AccessChain 200 203 551 203 552: 231(ptr) AccessChain 200 203 550 203
554: 71(fvec4) Load 553 553: 71(fvec4) Load 552
555: 19(fvec3) VectorShuffle 554 554 0 1 2 554: 19(fvec3) VectorShuffle 553 553 0 1 2
Store 552(param) 555 Store 551(param) 554
557: 19(fvec3) Load 261(pos) 556: 19(fvec3) Load 261(pos)
Store 556(param) 557 Store 555(param) 556
559: 105(ptr) AccessChain 101(params) 425 558: 105(ptr) AccessChain 101(params) 424
560: 16(float) Load 559 559: 16(float) Load 558
Store 558(param) 560 Store 557(param) 559
561: 19(fvec3) FunctionCall 31(springForce(vf3;vf3;f1;) 552(param) 556(param) 558(param) 560: 19(fvec3) FunctionCall 31(springForce(vf3;vf3;f1;) 551(param) 555(param) 557(param)
562: 19(fvec3) Load 247(force) 561: 19(fvec3) Load 247(force)
563: 19(fvec3) FAdd 562 561 562: 19(fvec3) FAdd 561 560
Store 247(force) 563 Store 247(force) 562
Branch 542 Branch 541
542: Label 541: Label
566: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 566: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55
567: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 568 568 12 12 567: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 568 568 12 12
565: 105(ptr) AccessChain 101(params) 564 565: 105(ptr) AccessChain 101(params) 564

View file

@ -1,5 +1,4 @@
spv.debuginfo.glsl.frag spv.debuginfo.glsl.frag
Validation failed
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 8000b // Generated by (magic number): 8000b
// Id's are bound by 877 // Id's are bound by 877
@ -231,12 +230,12 @@ void main()
105: String "global_var" 105: String "global_var"
120: String "shadowCoord" 120: String "shadowCoord"
142: String "bool" 142: String "bool"
163: String "dist" 162: String "dist"
170: String "type.2d.image" 169: String "type.2d.image"
171: String "@type.2d.image" 170: String "@type.2d.image"
175: String "type.sampled.image" 174: String "type.sampled.image"
176: String "@type.sampled.image" 175: String "@type.sampled.image"
181: String "samplerShadowMap" 180: String "samplerShadowMap"
230: String "texDim" 230: String "texDim"
242: String "scale" 242: String "scale"
249: String "dx" 249: String "dx"
@ -292,8 +291,8 @@ void main()
Name 103 "global_var" Name 103 "global_var"
Name 112 "shadow" Name 112 "shadow"
Name 118 "shadowCoord" Name 118 "shadowCoord"
Name 161 "dist" Name 160 "dist"
Name 179 "samplerShadowMap" Name 178 "samplerShadowMap"
Name 228 "texDim" Name 228 "texDim"
Name 240 "scale" Name 240 "scale"
Name 247 "dx" Name 247 "dx"
@ -352,8 +351,8 @@ void main()
Name 814 "spec" Name 814 "spec"
Name 861 "param" Name 861 "param"
Name 866 "param" Name 866 "param"
Decorate 179(samplerShadowMap) Binding 5 Decorate 178(samplerShadowMap) Binding 5
Decorate 179(samplerShadowMap) DescriptorSet 0 Decorate 178(samplerShadowMap) DescriptorSet 0
MemberDecorate 405(Light) 0 Offset 0 MemberDecorate 405(Light) 0 Offset 0
MemberDecorate 405(Light) 1 Offset 16 MemberDecorate 405(Light) 1 Offset 16
MemberDecorate 405(Light) 2 Offset 32 MemberDecorate 405(Light) 2 Offset 32
@ -449,21 +448,21 @@ void main()
143: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 142 10 28 12 143: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 142 10 28 12
146: 7(int) Constant 65 146: 7(int) Constant 65
148: 16(float) Constant 3212836864 148: 16(float) Constant 3212836864
164: 7(int) Constant 67 163: 7(int) Constant 67
162: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 163 18 41 164 12 40 20 161: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 162 18 41 163 12 40 20
168: TypeImage 16(float) 2D array sampled format:Unknown 167: TypeImage 16(float) 2D array sampled format:Unknown
172: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone) 171: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone)
169: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 170 12 41 164 12 44 171 172 13 168: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 169 12 41 163 12 44 170 171 13
173: TypeSampledImage 168 172: TypeSampledImage 167
174: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 175 12 41 164 12 44 176 172 13 173: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 174 12 41 163 12 44 175 171 13
177: TypePointer UniformConstant 173 176: TypePointer UniformConstant 172
178: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 174 12 12 177: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 173 12 12
179(samplerShadowMap): 177(ptr) Variable UniformConstant 178(samplerShadowMap): 176(ptr) Variable UniformConstant
180: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 181 174 41 164 12 44 181 179(samplerShadowMap) 107 179: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 180 173 41 163 12 44 180 178(samplerShadowMap) 107
195: 7(int) Constant 68 194: 7(int) Constant 68
197: 16(float) Constant 0 196: 16(float) Constant 0
211: 16(float) Constant 1048576000 209: 16(float) Constant 1048576000
214: 7(int) Constant 70 212: 7(int) Constant 70
219: 7(int) Constant 73 219: 7(int) Constant 73
224: TypeVector 98(int) 2 224: TypeVector 98(int) 2
225: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 100 28 225: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 100 28
@ -535,9 +534,9 @@ void main()
478: 7(int) Constant 119 478: 7(int) Constant 119
476: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 477 75 41 478 12 96 20 476: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 477 75 41 478 12 96 20
481: TypeImage 16(float) 2D sampled format:Unknown 481: TypeImage 16(float) 2D sampled format:Unknown
482: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 170 12 41 478 12 44 171 172 13 482: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 169 12 41 478 12 44 170 171 13
483: TypeSampledImage 481 483: TypeSampledImage 481
484: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 175 12 41 478 12 44 176 172 13 484: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 174 12 41 478 12 44 175 171 13
485: TypePointer UniformConstant 483 485: TypePointer UniformConstant 483
486: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 484 12 12 486: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 484 12 12
487(samplerposition): 485(ptr) Variable UniformConstant 487(samplerposition): 485(ptr) Variable UniformConstant
@ -589,7 +588,7 @@ void main()
678: TypePointer Uniform 19(fvec4) 678: TypePointer Uniform 19(fvec4)
679: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 21 28 12 679: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 21 28 12
687: 7(int) Constant 156 687: 7(int) Constant 156
686: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 163 18 41 687 12 96 20 686: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 162 18 41 687 12 96 20
694: 7(int) Constant 157 694: 7(int) Constant 157
699: 7(int) Constant 160 699: 7(int) Constant 160
697: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 698 75 41 699 12 96 20 697: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 698 75 41 699 12 96 20
@ -885,14 +884,14 @@ void main()
771: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 768 767(heightAttenuation) 49 771: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 768 767(heightAttenuation) 49
773: 16(float) Load 725(lightRange) 773: 16(float) Load 725(lightRange)
774: 16(float) Load 685(dist) 774: 16(float) Load 685(dist)
775: 16(float) ExtInst 3(GLSL.std.450) 49(SmoothStep) 773 197 774 775: 16(float) ExtInst 3(GLSL.std.450) 49(SmoothStep) 773 196 774
Store 767(heightAttenuation) 775 Store 767(heightAttenuation) 775
781: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 779 779 12 12 781: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 779 779 12 12
780: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 777 776(NdotL) 49 780: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 777 776(NdotL) 49
782: 74(fvec3) Load 646(N) 782: 74(fvec3) Load 646(N)
783: 74(fvec3) Load 670(L) 783: 74(fvec3) Load 670(L)
784: 16(float) Dot 782 783 784: 16(float) Dot 782 783
785: 16(float) ExtInst 3(GLSL.std.450) 40(FMax) 197 784 785: 16(float) ExtInst 3(GLSL.std.450) 40(FMax) 196 784
Store 776(NdotL) 785 Store 776(NdotL) 785
791: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 789 789 12 12 791: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 789 789 12 12
790: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 787 786(diff) 49 790: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 787 786(diff) 49
@ -911,7 +910,7 @@ void main()
810: 74(fvec3) Load 794(R) 810: 74(fvec3) Load 794(R)
811: 74(fvec3) Load 696(V) 811: 74(fvec3) Load 696(V)
812: 16(float) Dot 810 811 812: 16(float) Dot 810 811
813: 16(float) ExtInst 3(GLSL.std.450) 40(FMax) 197 812 813: 16(float) ExtInst 3(GLSL.std.450) 40(FMax) 196 812
Store 804(NdotR) 813 Store 804(NdotR) 813
819: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 817 817 12 12 819: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 817 817 12 12
818: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 815 814(spec) 49 818: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 815 814(spec) 49
@ -986,7 +985,7 @@ void main()
38: Label 38: Label
112(shadow): 25(ptr) Variable Function 112(shadow): 25(ptr) Variable Function
118(shadowCoord): 22(ptr) Variable Function 118(shadowCoord): 22(ptr) Variable Function
161(dist): 25(ptr) Variable Function 160(dist): 25(ptr) Variable Function
50: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 50: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
51: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 43 43 12 12 51: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 43 43 12 12
48: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 46 34(P) 49 48: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 46 34(P) 49
@ -1030,54 +1029,54 @@ void main()
156: 141(bool) FOrdLessThan 155 117 156: 141(bool) FOrdLessThan 155 117
Branch 151 Branch 151
151: Label 151: Label
158: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
157: 141(bool) Phi 149 38 156 150 157: 141(bool) Phi 149 38 156 150
SelectionMerge 160 None 215: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
BranchConditional 157 159 160 SelectionMerge 159 None
159: Label BranchConditional 157 158 159
166: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 158: Label
167: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 164 164 12 12 165: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
165: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 162 161(dist) 49 166: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 163 163 12 12
182: 173 Load 179(samplerShadowMap) 164: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 161 160(dist) 49
183: 19(fvec4) Load 118(shadowCoord) 181: 172 Load 178(samplerShadowMap)
184: 27(fvec2) VectorShuffle 183 183 0 1 182: 19(fvec4) Load 118(shadowCoord)
185: 27(fvec2) Load 36(offset) 183: 27(fvec2) VectorShuffle 182 182 0 1
186: 27(fvec2) FAdd 184 185 184: 27(fvec2) Load 36(offset)
187: 16(float) Load 35(layer) 185: 27(fvec2) FAdd 183 184
188: 16(float) CompositeExtract 186 0 186: 16(float) Load 35(layer)
189: 16(float) CompositeExtract 186 1 187: 16(float) CompositeExtract 185 0
190: 74(fvec3) CompositeConstruct 188 189 187 188: 16(float) CompositeExtract 185 1
191: 19(fvec4) ImageSampleImplicitLod 182 190 189: 74(fvec3) CompositeConstruct 187 188 186
192: 16(float) CompositeExtract 191 0 190: 19(fvec4) ImageSampleImplicitLod 181 189
Store 161(dist) 192 191: 16(float) CompositeExtract 190 0
194: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 195 195 12 12 Store 160(dist) 191
193: 25(ptr) AccessChain 118(shadowCoord) 13 193: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 194 194 12 12
196: 16(float) Load 193 192: 25(ptr) AccessChain 118(shadowCoord) 13
198: 141(bool) FOrdGreaterThan 196 197 195: 16(float) Load 192
SelectionMerge 200 None 197: 141(bool) FOrdGreaterThan 195 196
BranchConditional 198 199 200 SelectionMerge 199 None
199: Label BranchConditional 197 198 199
202: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 198: Label
203: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 195 195 12 12 201: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
201: 16(float) Load 161(dist) 202: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 194 194 12 12
204: 25(ptr) AccessChain 118(shadowCoord) 28 200: 16(float) Load 160(dist)
205: 16(float) Load 204 203: 25(ptr) AccessChain 118(shadowCoord) 28
206: 141(bool) FOrdLessThan 201 205 204: 16(float) Load 203
Branch 200 205: 141(bool) FOrdLessThan 200 204
200: Label Branch 199
208: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 199: Label
207: 141(bool) Phi 198 159 206 199 206: 141(bool) Phi 197 158 205 198
SelectionMerge 210 None 213: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
BranchConditional 207 209 210 SelectionMerge 208 None
209: Label BranchConditional 206 207 208
212: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 207: Label
213: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 214 214 12 12 210: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
Store 112(shadow) 211 211: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 212 212 12 12
Branch 210 Store 112(shadow) 209
210: Label Branch 208
215: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 208: Label
Branch 160 214: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
160: Label Branch 159
159: Label
217: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 217: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
218: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 219 219 12 12 218: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 219 219 12 12
216: 16(float) Load 112(shadow) 216: 16(float) Load 112(shadow)
@ -1106,8 +1105,8 @@ void main()
223: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 65 62(filterPCF(vf4;f1;) 223: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 65 62(filterPCF(vf4;f1;)
233: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 231 231 12 12 233: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 231 231 12 12
232: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 229 228(texDim) 49 232: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 229 228(texDim) 49
234: 173 Load 179(samplerShadowMap) 234: 172 Load 178(samplerShadowMap)
235: 168 Image 234 235: 167 Image 234
238: 236(ivec3) ImageQuerySizeLod 235 108 238: 236(ivec3) ImageQuerySizeLod 235 108
239: 224(ivec2) VectorShuffle 238 238 0 1 239: 224(ivec2) VectorShuffle 238 238 0 1
Store 228(texDim) 239 Store 228(texDim) 239
@ -1134,7 +1133,7 @@ void main()
Store 261(dy) 272 Store 261(dy) 272
278: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 276 276 12 12 278: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 276 276 12 12
277: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 274 273(shadowFactor) 49 277: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 274 273(shadowFactor) 49
Store 273(shadowFactor) 197 Store 273(shadowFactor) 196
284: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 282 282 12 12 284: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 282 282 12 12
283: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 280 279(count) 49 283: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 280 279(count) 49
Store 279(count) 108 Store 279(count) 108