mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-21 10:09:59 -04:00
Translate every shader, keep atomic loops from spinning on stale values, harden pool teardown, and update the README.
Shaders: a switch whose index is clamped against a register that a MOV of an immediate set before it now finds its jump table (AmpereLowering.cs BrxTargets), so all 36,031 of the game's shader variants translate and no draw is skipped for a failed one. The compare-and-swap loop behind storage-buffer atomics (patch 0033) takes the value a failed swap returns as its next expected value instead of loading the word again, which on some drivers kept returning a stale copy. Memory: an unused physical pool outlives the submission being recorded, as virtual pages may still reach it through device addresses; an image whose creation failed is not tried again for 2 s. The installer and Linux texts name this game. The README has the project icon, the current status, features, requirements and known issues. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2306,6 +2306,18 @@ static class AmpereLowering
|
||||
// (the uniform switches: UISETP.GT P0, URx, bound; USEL URx, URx, bound, P0)
|
||||
uint mop = mn >= 0 ? _code[mn].Bits(0, 12) : 0, mb = mop & 0x7f;
|
||||
if (mn >= 0 && (mb == 0x17 || mb == 0x07) && _code[mn].Bits(9, 3) == 4) count = (int)_code[mn].W1 + 1;
|
||||
// the register form, the bound in a register a MOV (UMOV) of an immediate set before it: SEL Rx, Rx, Rb
|
||||
// under ISETP Rx, Rb, or IMNMX Rx, Rx, Rb; either source may be the bound, the other is the index
|
||||
else if (mn >= 0 && (mb == 0x17 || mb == 0x07) && _code[mn].Bits(9, 3) == 1)
|
||||
foreach (uint r in new[] { _code[mn].Bits(32, 8), _code[mn].Bits(24, 8) })
|
||||
{
|
||||
int mv = r == RZ ? -1 : Writer(mn - 1, r, uniform);
|
||||
if (mv >= 0 && _code[mv].Bits(0, 12) == (uniform ? 0x882u : 0x802u) && _code[mv].Bits(12, 4) == 7)
|
||||
{
|
||||
count = (int)_code[mv].W1 + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (count <= 0 || count > 1024) throw Fail("BRX jump table without a bound");
|
||||
var t = new List<uint>();
|
||||
|
||||
Reference in New Issue
Block a user