Proposal: rewrite the compatibility layer nearly from scratch #14
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Zetsukae--Northstar-AMD#14
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Zetsukae on GitHub · 2026-12-01 14:16 UTC · original
Summary
Proposal: rewrite Northstar's compatibility layer nearly from scratch, instead of carrying on patching the code inherited from VIctory.
The inherited base is great work, and it's the reason the title runs at all. But the glitches it leaves in game keep coming back. Our assessment after weeks of captures and bisection is that about 98% of them can't be fixed on this base without fighting its design. A rewrite planned around what we now know would cost less than carrying on patching it.
The glitches that keep coming back
Each one has a note in
notes/with what was tried and what was ruled out:notes/Water scramble.mdnotes/Black sand.mdnotes/Home.mdnotes/Distant trees and shadows.mdSee also #5 (texture corruption on beach scenes, flicker on distant objects), which traced the same kind of problem back to the upstream base.
Why patching isn't enough
These don't look like four separate bugs. They point at how the layer models the console's GPU, not at any single shader or draw:
VICTORY_PORT_*, timing modes, audits of the heap). Each helps a case and adds a path, and the paths now interact in ways that are hard to reason about or test.What a rewrite would aim for
To be agreed in this issue; a starting point:
docs/asset-policy.md, and a frame capture can be replayed and compared pass by pass.Proposed architecture
The game's code already runs natively today, and nothing in the path is emulated. The change is the middle layer. Instead of replaying the game's command lists and keeping copies of its memory, heaps and textures in sync, it would translate each call straight to Direct3D 12. Fewer copies and fewer buffers mean less work on the submission thread and on the card.
Memory: one pool for the game, two on PC
The console has one memory that the CPU and GPU share. A PC has RAM for the CPU and VRAM for the card. The game must keep believing it has one pool, while on PC it doesn't:
The condition that decides whether it works: a plain split, with RAM on one side and copies in VRAM on the other, is what today's layer does, and it's where the glitches come from. The game writes GPU data straight into memory without telling us, and when the layer copies it late or misses it, draws read stale or empty data (Black sand, Disappearing objects). So the split has to keep one copy of what the card reads:
VICTORY_WINDOWS_BAR_MB): a captured frame took 32 ms instead of 36.Whether this removes the four glitches can only be proved by a prototype; that's the first milestone below.
How it could be done
Rules
The project's rules apply as everywhere (see CONTRIBUTING.md):
Open questions
Comments, objections and other ideas are welcome. If you think one of these glitches can be fixed on the current base, say so and point at the evidence.