HLSL: Fix #1249: Always execute both sides of ternary "?:".
This is semantically required by HLSL, and frequently results in using OpSelect instead of control flow.
This commit is contained in:
@@ -90,10 +90,10 @@ spv.Operations.frag
|
||||
188(f): 143(ptr) Variable Function
|
||||
285(u): 284(ptr) Variable Function
|
||||
305(b): 304(ptr) Variable Function
|
||||
486: 8(ptr) Variable Function
|
||||
487: 8(ptr) Variable Function
|
||||
503(m1): 502(ptr) Variable Function
|
||||
510(m2): 502(ptr) Variable Function
|
||||
513: 502(ptr) Variable Function
|
||||
514: 502(ptr) Variable Function
|
||||
12: 7(fvec4) Load 11(uv4)
|
||||
13: 7(fvec4) ExtInst 1(GLSL.std.450) 11(Radians) 12
|
||||
Store 9(v) 13
|
||||
@@ -658,9 +658,9 @@ spv.Operations.frag
|
||||
482: 178(bool) Load 305(b)
|
||||
483: 178(bool) LogicalNot 482
|
||||
Store 305(b) 483
|
||||
487: 178(bool) Load 305(b)
|
||||
486: 178(bool) Load 305(b)
|
||||
SelectionMerge 489 None
|
||||
BranchConditional 487 488 498
|
||||
BranchConditional 486 488 498
|
||||
488: Label
|
||||
490: 18(int) Load 20(i)
|
||||
491: 6(float) ConvertSToF 490
|
||||
@@ -670,30 +670,30 @@ spv.Operations.frag
|
||||
495: 7(fvec4) FAdd 492 494
|
||||
496: 7(fvec4) Load 9(v)
|
||||
497: 7(fvec4) FAdd 495 496
|
||||
Store 486 497
|
||||
Store 487 497
|
||||
Branch 489
|
||||
498: Label
|
||||
499: 7(fvec4) Load 9(v)
|
||||
Store 486 499
|
||||
Store 487 499
|
||||
Branch 489
|
||||
489: Label
|
||||
500: 7(fvec4) Load 486
|
||||
500: 7(fvec4) Load 487
|
||||
Store 485(FragColor) 500
|
||||
Store 503(m1) 509
|
||||
Store 510(m2) 512
|
||||
514: 178(bool) Load 305(b)
|
||||
513: 178(bool) Load 305(b)
|
||||
SelectionMerge 516 None
|
||||
BranchConditional 514 515 518
|
||||
BranchConditional 513 515 518
|
||||
515: Label
|
||||
517: 501 Load 503(m1)
|
||||
Store 513 517
|
||||
Store 514 517
|
||||
Branch 516
|
||||
518: Label
|
||||
519: 501 Load 510(m2)
|
||||
Store 513 519
|
||||
Store 514 519
|
||||
Branch 516
|
||||
516: Label
|
||||
520: 8(ptr) AccessChain 513 405
|
||||
520: 8(ptr) AccessChain 514 405
|
||||
521: 7(fvec4) Load 520
|
||||
522: 7(fvec4) Load 485(FragColor)
|
||||
523: 7(fvec4) FAdd 522 521
|
||||
|
||||
Reference in New Issue
Block a user