diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index def3fa2e..caff5c11 100644 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -2131,6 +2131,12 @@ void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decorat } void Builder::addInstruction(std::unique_ptr 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 if (emitNonSemanticShaderDebugInfo && dirtyScopeTracker) { if (buildPoint->updateDebugScope(currentDebugScopeId.top())) { diff --git a/Test/baseResults/spv.debuginfo.glsl.comp.out b/Test/baseResults/spv.debuginfo.glsl.comp.out index 2a3505fb..177054ca 100644 --- a/Test/baseResults/spv.debuginfo.glsl.comp.out +++ b/Test/baseResults/spv.debuginfo.glsl.comp.out @@ -1,5 +1,4 @@ spv.debuginfo.glsl.comp -Validation failed // Module Version 10000 // Generated by (magic number): 8000b // Id's are bound by 975 @@ -283,18 +282,18 @@ void main() Name 383 "param" Name 387 "param" Name 389 "param" - Name 426 "param" - Name 430 "param" - Name 432 "param" - Name 464 "param" - Name 468 "param" - Name 470 "param" - Name 510 "param" - Name 514 "param" - Name 516 "param" - Name 552 "param" - Name 556 "param" - Name 558 "param" + Name 425 "param" + Name 429 "param" + Name 431 "param" + Name 463 "param" + Name 467 "param" + Name 469 "param" + Name 509 "param" + Name 513 "param" + Name 515 "param" + Name 551 "param" + Name 555 "param" + Name 557 "param" Name 575 "f" Name 624 "sphereDist" Name 675 "PushConsts" @@ -482,14 +481,14 @@ void main() 370: 7(int) Constant 107 378: 7(int) Constant 108 398: 7(int) Constant 111 - 419: 7(int) Constant 112 - 425: 73(int) Constant 6 + 418: 7(int) Constant 112 + 424: 73(int) Constant 6 441: 7(int) Constant 115 - 458: 7(int) Constant 116 + 457: 7(int) Constant 116 479: 7(int) Constant 119 - 504: 7(int) Constant 120 + 503: 7(int) Constant 120 525: 7(int) Constant 123 - 546: 7(int) Constant 124 + 545: 7(int) Constant 124 564: 73(int) Constant 3 568: 7(int) Constant 127 578: 7(int) Constant 130 @@ -567,18 +566,18 @@ void main() 383(param): 21(ptr) Variable Function 387(param): 21(ptr) Variable Function 389(param): 24(ptr) Variable Function - 426(param): 21(ptr) Variable Function - 430(param): 21(ptr) Variable Function - 432(param): 24(ptr) Variable Function - 464(param): 21(ptr) Variable Function - 468(param): 21(ptr) Variable Function - 470(param): 24(ptr) Variable Function - 510(param): 21(ptr) Variable Function - 514(param): 21(ptr) Variable Function - 516(param): 24(ptr) Variable Function - 552(param): 21(ptr) Variable Function - 556(param): 21(ptr) Variable Function - 558(param): 24(ptr) Variable Function + 425(param): 21(ptr) Variable Function + 429(param): 21(ptr) Variable Function + 431(param): 24(ptr) Variable Function + 463(param): 21(ptr) Variable Function + 467(param): 21(ptr) Variable Function + 469(param): 24(ptr) Variable Function + 509(param): 21(ptr) Variable Function + 513(param): 21(ptr) Variable Function + 515(param): 24(ptr) Variable Function + 551(param): 21(ptr) Variable Function + 555(param): 21(ptr) Variable Function + 557(param): 24(ptr) Variable Function 575(f): 21(ptr) Variable Function 624(sphereDist): 21(ptr) Variable Function 697(normal): 21(ptr) Variable Function @@ -808,34 +807,34 @@ void main() 411: 166(bool) ULessThan 406 410 Branch 402 402: Label - 413: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 412: 166(bool) Phi 400 374 411 401 - SelectionMerge 415 None - BranchConditional 412 414 415 - 414: Label - 417: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 - 418: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 419 419 12 12 - 416: 7(int) Load 139(index) - 420: 148(ptr) AccessChain 101(params) 147 12 - 421: 73(int) Load 420 - 422: 7(int) Bitcast 421 - 423: 7(int) IAdd 416 422 - 424: 7(int) ISub 423 39 - 427: 231(ptr) AccessChain 200 203 424 203 - 428: 71(fvec4) Load 427 - 429: 19(fvec3) VectorShuffle 428 428 0 1 2 - Store 426(param) 429 - 431: 19(fvec3) Load 261(pos) - Store 430(param) 431 - 433: 105(ptr) AccessChain 101(params) 425 - 434: 16(float) Load 433 - Store 432(param) 434 - 435: 19(fvec3) FunctionCall 31(springForce(vf3;vf3;f1;) 426(param) 430(param) 432(param) - 436: 19(fvec3) Load 247(force) - 437: 19(fvec3) FAdd 436 435 - Store 247(force) 437 - Branch 415 - 415: Label + 437: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 + SelectionMerge 414 None + BranchConditional 412 413 414 + 413: Label + 416: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 + 417: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 418 418 12 12 + 415: 7(int) Load 139(index) + 419: 148(ptr) AccessChain 101(params) 147 12 + 420: 73(int) Load 419 + 421: 7(int) Bitcast 420 + 422: 7(int) IAdd 415 421 + 423: 7(int) ISub 422 39 + 426: 231(ptr) AccessChain 200 203 423 203 + 427: 71(fvec4) Load 426 + 428: 19(fvec3) VectorShuffle 427 427 0 1 2 + Store 425(param) 428 + 430: 19(fvec3) Load 261(pos) + Store 429(param) 430 + 432: 105(ptr) AccessChain 101(params) 424 + 433: 16(float) Load 432 + Store 431(param) 433 + 434: 19(fvec3) FunctionCall 31(springForce(vf3;vf3;f1;) 425(param) 429(param) 431(param) + 435: 19(fvec3) Load 247(force) + 436: 19(fvec3) FAdd 435 434 + Store 247(force) 436 + Branch 414 + 414: Label 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 438: 137(ptr) AccessChain 125(id) 12 @@ -851,34 +850,34 @@ void main() 450: 166(bool) UGreaterThan 449 12 Branch 445 445: Label - 452: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 - 451: 166(bool) Phi 443 415 450 444 - SelectionMerge 454 None - BranchConditional 451 453 454 - 453: Label - 456: 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 - 455: 7(int) Load 139(index) - 459: 148(ptr) AccessChain 101(params) 147 12 - 460: 73(int) Load 459 - 461: 7(int) Bitcast 460 - 462: 7(int) ISub 455 461 - 463: 7(int) ISub 462 39 - 465: 231(ptr) AccessChain 200 203 463 203 - 466: 71(fvec4) Load 465 - 467: 19(fvec3) VectorShuffle 466 466 0 1 2 - Store 464(param) 467 - 469: 19(fvec3) Load 261(pos) - Store 468(param) 469 - 471: 105(ptr) AccessChain 101(params) 425 - 472: 16(float) Load 471 - Store 470(param) 472 - 473: 19(fvec3) FunctionCall 31(springForce(vf3;vf3;f1;) 464(param) 468(param) 470(param) - 474: 19(fvec3) Load 247(force) - 475: 19(fvec3) FAdd 474 473 - Store 247(force) 475 - Branch 454 - 454: Label + 451: 166(bool) Phi 443 414 450 444 + 475: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 + SelectionMerge 453 None + BranchConditional 451 452 453 + 452: Label + 455: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 + 456: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 457 457 12 12 + 454: 7(int) Load 139(index) + 458: 148(ptr) AccessChain 101(params) 147 12 + 459: 73(int) Load 458 + 460: 7(int) Bitcast 459 + 461: 7(int) ISub 454 460 + 462: 7(int) ISub 461 39 + 464: 231(ptr) AccessChain 200 203 462 203 + 465: 71(fvec4) Load 464 + 466: 19(fvec3) VectorShuffle 465 465 0 1 2 + Store 463(param) 466 + 468: 19(fvec3) Load 261(pos) + Store 467(param) 468 + 470: 105(ptr) AccessChain 101(params) 424 + 471: 16(float) Load 470 + Store 469(param) 471 + 472: 19(fvec3) FunctionCall 31(springForce(vf3;vf3;f1;) 463(param) 467(param) 469(param) + 473: 19(fvec3) Load 247(force) + 474: 19(fvec3) FAdd 473 472 + Store 247(force) 474 + Branch 453 + 453: Label 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 476: 137(ptr) AccessChain 125(id) 12 @@ -902,34 +901,34 @@ void main() 496: 166(bool) ULessThan 491 495 Branch 487 487: Label - 498: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 - 497: 166(bool) Phi 485 454 496 486 - SelectionMerge 500 None - BranchConditional 497 499 500 - 499: Label - 502: 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 - 501: 7(int) Load 139(index) - 505: 148(ptr) AccessChain 101(params) 147 12 - 506: 73(int) Load 505 - 507: 7(int) Bitcast 506 - 508: 7(int) IAdd 501 507 - 509: 7(int) IAdd 508 39 - 511: 231(ptr) AccessChain 200 203 509 203 - 512: 71(fvec4) Load 511 - 513: 19(fvec3) VectorShuffle 512 512 0 1 2 - Store 510(param) 513 - 515: 19(fvec3) Load 261(pos) - Store 514(param) 515 - 517: 105(ptr) AccessChain 101(params) 425 - 518: 16(float) Load 517 - Store 516(param) 518 - 519: 19(fvec3) FunctionCall 31(springForce(vf3;vf3;f1;) 510(param) 514(param) 516(param) - 520: 19(fvec3) Load 247(force) - 521: 19(fvec3) FAdd 520 519 - Store 247(force) 521 - Branch 500 - 500: Label + 497: 166(bool) Phi 485 453 496 486 + 521: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 + SelectionMerge 499 None + BranchConditional 497 498 499 + 498: Label + 501: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 + 502: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 503 503 12 12 + 500: 7(int) Load 139(index) + 504: 148(ptr) AccessChain 101(params) 147 12 + 505: 73(int) Load 504 + 506: 7(int) Bitcast 505 + 507: 7(int) IAdd 500 506 + 508: 7(int) IAdd 507 39 + 510: 231(ptr) AccessChain 200 203 508 203 + 511: 71(fvec4) Load 510 + 512: 19(fvec3) VectorShuffle 511 511 0 1 2 + Store 509(param) 512 + 514: 19(fvec3) Load 261(pos) + Store 513(param) 514 + 516: 105(ptr) AccessChain 101(params) 424 + 517: 16(float) Load 516 + Store 515(param) 517 + 518: 19(fvec3) FunctionCall 31(springForce(vf3;vf3;f1;) 509(param) 513(param) 515(param) + 519: 19(fvec3) Load 247(force) + 520: 19(fvec3) FAdd 519 518 + Store 247(force) 520 + Branch 499 + 499: Label 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 522: 137(ptr) AccessChain 125(id) 12 @@ -949,34 +948,34 @@ void main() 538: 166(bool) UGreaterThan 537 12 Branch 533 533: Label - 540: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 - 539: 166(bool) Phi 531 500 538 532 - SelectionMerge 542 None - BranchConditional 539 541 542 - 541: Label - 544: 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 - 543: 7(int) Load 139(index) - 547: 148(ptr) AccessChain 101(params) 147 12 - 548: 73(int) Load 547 - 549: 7(int) Bitcast 548 - 550: 7(int) ISub 543 549 - 551: 7(int) IAdd 550 39 - 553: 231(ptr) AccessChain 200 203 551 203 - 554: 71(fvec4) Load 553 - 555: 19(fvec3) VectorShuffle 554 554 0 1 2 - Store 552(param) 555 - 557: 19(fvec3) Load 261(pos) - Store 556(param) 557 - 559: 105(ptr) AccessChain 101(params) 425 - 560: 16(float) Load 559 - Store 558(param) 560 - 561: 19(fvec3) FunctionCall 31(springForce(vf3;vf3;f1;) 552(param) 556(param) 558(param) - 562: 19(fvec3) Load 247(force) - 563: 19(fvec3) FAdd 562 561 - Store 247(force) 563 - Branch 542 - 542: Label + 539: 166(bool) Phi 531 499 538 532 + 563: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 + SelectionMerge 541 None + BranchConditional 539 540 541 + 540: Label + 543: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 55 + 544: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 545 545 12 12 + 542: 7(int) Load 139(index) + 546: 148(ptr) AccessChain 101(params) 147 12 + 547: 73(int) Load 546 + 548: 7(int) Bitcast 547 + 549: 7(int) ISub 542 548 + 550: 7(int) IAdd 549 39 + 552: 231(ptr) AccessChain 200 203 550 203 + 553: 71(fvec4) Load 552 + 554: 19(fvec3) VectorShuffle 553 553 0 1 2 + Store 551(param) 554 + 556: 19(fvec3) Load 261(pos) + Store 555(param) 556 + 558: 105(ptr) AccessChain 101(params) 424 + 559: 16(float) Load 558 + Store 557(param) 559 + 560: 19(fvec3) FunctionCall 31(springForce(vf3;vf3;f1;) 551(param) 555(param) 557(param) + 561: 19(fvec3) Load 247(force) + 562: 19(fvec3) FAdd 561 560 + Store 247(force) 562 + Branch 541 + 541: Label 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 565: 105(ptr) AccessChain 101(params) 564 diff --git a/Test/baseResults/spv.debuginfo.glsl.frag.out b/Test/baseResults/spv.debuginfo.glsl.frag.out index cf30e573..142107a3 100644 --- a/Test/baseResults/spv.debuginfo.glsl.frag.out +++ b/Test/baseResults/spv.debuginfo.glsl.frag.out @@ -1,5 +1,4 @@ spv.debuginfo.glsl.frag -Validation failed // Module Version 10000 // Generated by (magic number): 8000b // Id's are bound by 877 @@ -231,12 +230,12 @@ void main() 105: String "global_var" 120: String "shadowCoord" 142: String "bool" - 163: String "dist" - 170: String "type.2d.image" - 171: String "@type.2d.image" - 175: String "type.sampled.image" - 176: String "@type.sampled.image" - 181: String "samplerShadowMap" + 162: String "dist" + 169: String "type.2d.image" + 170: String "@type.2d.image" + 174: String "type.sampled.image" + 175: String "@type.sampled.image" + 180: String "samplerShadowMap" 230: String "texDim" 242: String "scale" 249: String "dx" @@ -292,8 +291,8 @@ void main() Name 103 "global_var" Name 112 "shadow" Name 118 "shadowCoord" - Name 161 "dist" - Name 179 "samplerShadowMap" + Name 160 "dist" + Name 178 "samplerShadowMap" Name 228 "texDim" Name 240 "scale" Name 247 "dx" @@ -352,8 +351,8 @@ void main() Name 814 "spec" Name 861 "param" Name 866 "param" - Decorate 179(samplerShadowMap) Binding 5 - Decorate 179(samplerShadowMap) DescriptorSet 0 + Decorate 178(samplerShadowMap) Binding 5 + Decorate 178(samplerShadowMap) DescriptorSet 0 MemberDecorate 405(Light) 0 Offset 0 MemberDecorate 405(Light) 1 Offset 16 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 146: 7(int) Constant 65 148: 16(float) Constant 3212836864 - 164: 7(int) Constant 67 - 162: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 163 18 41 164 12 40 20 - 168: TypeImage 16(float) 2D array sampled format:Unknown - 172: 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 - 173: TypeSampledImage 168 - 174: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 175 12 41 164 12 44 176 172 13 - 177: TypePointer UniformConstant 173 - 178: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 174 12 12 -179(samplerShadowMap): 177(ptr) Variable UniformConstant - 180: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 181 174 41 164 12 44 181 179(samplerShadowMap) 107 - 195: 7(int) Constant 68 - 197: 16(float) Constant 0 - 211: 16(float) Constant 1048576000 - 214: 7(int) Constant 70 + 163: 7(int) Constant 67 + 161: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 162 18 41 163 12 40 20 + 167: TypeImage 16(float) 2D array sampled format:Unknown + 171: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone) + 168: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 169 12 41 163 12 44 170 171 13 + 172: TypeSampledImage 167 + 173: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 174 12 41 163 12 44 175 171 13 + 176: TypePointer UniformConstant 172 + 177: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 173 12 12 +178(samplerShadowMap): 176(ptr) Variable UniformConstant + 179: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 180 173 41 163 12 44 180 178(samplerShadowMap) 107 + 194: 7(int) Constant 68 + 196: 16(float) Constant 0 + 209: 16(float) Constant 1048576000 + 212: 7(int) Constant 70 219: 7(int) Constant 73 224: TypeVector 98(int) 2 225: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 100 28 @@ -535,9 +534,9 @@ void main() 478: 7(int) Constant 119 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 - 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 - 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 486: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 484 12 12 487(samplerposition): 485(ptr) Variable UniformConstant @@ -589,7 +588,7 @@ void main() 678: TypePointer Uniform 19(fvec4) 679: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 21 28 12 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 699: 7(int) Constant 160 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 773: 16(float) Load 725(lightRange) 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 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 782: 74(fvec3) Load 646(N) 783: 74(fvec3) Load 670(L) 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 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 @@ -911,7 +910,7 @@ void main() 810: 74(fvec3) Load 794(R) 811: 74(fvec3) Load 696(V) 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 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 @@ -986,7 +985,7 @@ void main() 38: Label 112(shadow): 25(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 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 @@ -1030,54 +1029,54 @@ void main() 156: 141(bool) FOrdLessThan 155 117 Branch 151 151: Label - 158: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 157: 141(bool) Phi 149 38 156 150 - SelectionMerge 160 None - BranchConditional 157 159 160 - 159: Label - 166: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 - 167: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 164 164 12 12 - 165: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 162 161(dist) 49 - 182: 173 Load 179(samplerShadowMap) - 183: 19(fvec4) Load 118(shadowCoord) - 184: 27(fvec2) VectorShuffle 183 183 0 1 - 185: 27(fvec2) Load 36(offset) - 186: 27(fvec2) FAdd 184 185 - 187: 16(float) Load 35(layer) - 188: 16(float) CompositeExtract 186 0 - 189: 16(float) CompositeExtract 186 1 - 190: 74(fvec3) CompositeConstruct 188 189 187 - 191: 19(fvec4) ImageSampleImplicitLod 182 190 - 192: 16(float) CompositeExtract 191 0 - Store 161(dist) 192 - 194: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 195 195 12 12 - 193: 25(ptr) AccessChain 118(shadowCoord) 13 - 196: 16(float) Load 193 - 198: 141(bool) FOrdGreaterThan 196 197 - SelectionMerge 200 None - BranchConditional 198 199 200 - 199: Label - 202: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 - 203: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 195 195 12 12 - 201: 16(float) Load 161(dist) - 204: 25(ptr) AccessChain 118(shadowCoord) 28 - 205: 16(float) Load 204 - 206: 141(bool) FOrdLessThan 201 205 - Branch 200 - 200: Label - 208: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 - 207: 141(bool) Phi 198 159 206 199 - SelectionMerge 210 None - BranchConditional 207 209 210 - 209: Label - 212: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 - 213: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 214 214 12 12 - Store 112(shadow) 211 - Branch 210 - 210: Label - 215: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 - Branch 160 - 160: Label + 215: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 + SelectionMerge 159 None + BranchConditional 157 158 159 + 158: Label + 165: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 + 166: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 163 163 12 12 + 164: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 161 160(dist) 49 + 181: 172 Load 178(samplerShadowMap) + 182: 19(fvec4) Load 118(shadowCoord) + 183: 27(fvec2) VectorShuffle 182 182 0 1 + 184: 27(fvec2) Load 36(offset) + 185: 27(fvec2) FAdd 183 184 + 186: 16(float) Load 35(layer) + 187: 16(float) CompositeExtract 185 0 + 188: 16(float) CompositeExtract 185 1 + 189: 74(fvec3) CompositeConstruct 187 188 186 + 190: 19(fvec4) ImageSampleImplicitLod 181 189 + 191: 16(float) CompositeExtract 190 0 + Store 160(dist) 191 + 193: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 194 194 12 12 + 192: 25(ptr) AccessChain 118(shadowCoord) 13 + 195: 16(float) Load 192 + 197: 141(bool) FOrdGreaterThan 195 196 + SelectionMerge 199 None + BranchConditional 197 198 199 + 198: Label + 201: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 + 202: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 194 194 12 12 + 200: 16(float) Load 160(dist) + 203: 25(ptr) AccessChain 118(shadowCoord) 28 + 204: 16(float) Load 203 + 205: 141(bool) FOrdLessThan 200 204 + Branch 199 + 199: Label + 206: 141(bool) Phi 197 158 205 198 + 213: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 + SelectionMerge 208 None + BranchConditional 206 207 208 + 207: Label + 210: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 + 211: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 212 212 12 12 + Store 112(shadow) 209 + Branch 208 + 208: Label + 214: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 + Branch 159 + 159: Label 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 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;) 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 - 234: 173 Load 179(samplerShadowMap) - 235: 168 Image 234 + 234: 172 Load 178(samplerShadowMap) + 235: 167 Image 234 238: 236(ivec3) ImageQuerySizeLod 235 108 239: 224(ivec2) VectorShuffle 238 238 0 1 Store 228(texDim) 239 @@ -1134,7 +1133,7 @@ void main() Store 261(dy) 272 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 - Store 273(shadowFactor) 197 + Store 273(shadowFactor) 196 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 Store 279(count) 108