Skip to content

A uniform slot the game left unbound gets a plain line naming its shader instead of a [RED] - #2398

Open
computerguy526 wants to merge 1 commit into
seedds:mainfrom
computerguy526:cb-unbound-line
Open

computerguy526 wants to merge 1 commit into
seedds:mainfrom
computerguy526:cb-unbound-line

Conversation

@computerguy526

@computerguy526 computerguy526 commented Nov 11, 2026 •

Copy link
Copy Markdown

Related to the PRAGMATA bring-up, ccd834e (@seedds).

cbuf_slot binds the all-zero bank in two cases: when the game left a slot at address 0, and when the host lost a binding (an address in no memory pool, or a slot past the 16 the replay keeps). It printed [RED] stage N cbK has no uniform buffer bound for both. Address 0 is the game's own state. PRAGMATA's compute shader 9d5de89b049f5915_b declares cb1, which the game never binds, and reads it only for a workgroup count of 2,048 or more, so the [RED] showed on every boot with nothing wrong (it is in the port's Open list).

What changes

  • Address 0: a plain line, stage N cbK of shader <key> is not bound (address 0): it reads the zero bank, the game's own state, once per shader for the first 8 shaders.
  • A lost binding keeps the existing [RED] line, with its shader, address and frame, unchanged.
  • The binding itself does not change in either case.

Tests

  • t_cbmiss (new, CPU only): nvn_cbmiss.h sorts unbound / lost / slot past 16 / bound (5 checks).
  • Reference entry: An unbound uniform slot reads the zero bank now shows the new line and keeps the old one as "before", and lists PRAGMATA. The symptom index is regenerated, and PRAGMATA's README moves the item from Open to Found on.

Regression

  • regress.py impact picks The Legend of Zelda: Breath of the Wild, Pokémon Scarlet and The Legend of Zelda: Tears of the Kingdom (the profiles with a usage manifest; they reach nvn_mtl.m as a whole). They were not run.

  • Reach: only the log line of a slot that already read the zero bank changes, so there is no rendering change. Several game READMEs quote the old line (Batman: Arkham Knight, Kirby Star Allies, Paper Mario: The Thousand-Year Door, Paper Mario: The Origami King, Super Mario Party Jamboree, Fire Emblem Fortune's Weave). Where their slot is at address 0 (Batman's is), they will show the plain line instead; I left their notes as they are.

  • Working with UncraftableXD

…der instead of a [RED]

cbuf_slot binds the all-zero bank both when the game left a slot at address 0
and when the host lost a binding (an address in no memory pool, or a slot past
the 16 the replay keeps), and printed "[RED] stage N cbK has no uniform buffer
bound" for either. Address 0 is the game's own state: PRAGMATA's compute shader
9d5de89b049f5915_b declares cb1, which the game never binds, and reads it only
for a workgroup count of 2,048 or more, so the [RED] showed on every boot with
nothing wrong. That case is now a plain line for each of the first 8 shaders;
a lost binding keeps the [RED] line as it was. The binding does not change.

nvn_cbmiss.h holds the decision; t_cbmiss checks it (5 checks).

Co-authored-by: uncraftablexd <352372032+uncraftablexd@users.noreply.github.com>
@github-actions github-actions Bot added nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) docs Documentation game: 0400C76024710000 A game profile labels Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation game: 0400C76024710000 A game profile nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant