Files
NX2navi/tools/xlate/patches/0025-call-falls-through.patch
chrg6 85f401669f Translate float atomic adds, signed RED offsets, calls and subgroup operations correctly.
Patch 0023 turns a global RED or ATOM .F32 add, which the translator dropped, into a compare-and-swap loop with a float
add once GlobalToStorage knows its buffer; the light and fog accumulators of Ocarina use them, and their loss lit
Kokiri Forest's fog as if nothing shaded it. Patch 0024 reads RED's 20-bit offset as signed, as ATOM already did.
Patch 0025 keeps the block after a CAL as its successor, so code after a call is no longer dropped. Patch 0026 keeps
ballot, shuffle and vote operations where they are, so they see every lane. build_xlate.py now expects 25 patches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 05:04:39 -05:00

15 lines
777 B
Diff

--- a/src/Ryujinx.Graphics.Shader/Decoders/Decoder.cs
+++ b/src/Ryujinx.Graphics.Shader/Decoders/Decoder.cs
@@ -500,7 +500,10 @@
public static bool IsUnconditionalBranch(ref InstOp op)
{
- return IsUnconditional(ref op) && op.Props.HasFlag(InstProps.Bra);
+ // NX2NAVI: a call returns to the next instruction, so the block after a CAL is its successor. Taken for
+ // a branch, that block lost its only predecessor and was dropped (AmpereLowering emits CAL for SM86
+ // CALL/RET; Ocarina's culling writes its draw lists after one).
+ return IsUnconditional(ref op) && op.Props.HasFlag(InstProps.Bra) && op.Name != InstName.Cal;
}
private static bool IsUnconditional(ref InstOp op)