Skip to content

chain: NVN2 images picked at run time: c2 slot arrays and an image pool for handles from memory - #2616

Open
FifteenPen wants to merge 3 commits into
seedds:mainfrom
FifteenPen:pr/nvn2-image-handles
Open

FifteenPen wants to merge 3 commits into
seedds:mainfrom
FifteenPen:pr/nvn2-image-handles

Conversation

@FifteenPen

@FifteenPen FifteenPen commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

NVN2 image handles the translator couldn't trace, found on The Duskbloods network test (and needed by Persona 3 Reload):

  • host/nvn: an image the shader picks from c2's table at run time binds as a 32-entry slot array, where element k is image slot k (profile key tex_dyn_slots, as for textures).
  • chain/translator: an image whose handle the shader loads from memory (the fog volume, GXFogVolume_*, reads its 3D image handle from storage buffer 0) can't be a slot array, because the index is the image ID itself. It now indexes an image pool by ID: a new reflection kind, img_pool, gets a table filled by the replay with the bound images (the write sink elsewhere). Without it the fog volume was never written and the world drew black behind the HUD. Covered by test_dmsh_pool_arrays.py.
  • chain: dmsh_xlate rebuilt (native tools, arm64 + x86_64), with the lock and the chain header.

Rebased on main: SULD / SUST through a register, the first commit here before, is in main already (4032a11), so it is dropped.

@github-actions github-actions Bot added nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) tools Tools and scripts (dm/tools, scripts) shader chain The shader translation chain (DMSH_CHAIN): a change rebuilds every game's shaders labels Nov 13, 2026
@FifteenPen
FifteenPen force-pushed the pr/nvn2-image-handles branch from 3d59039 to 2c20122 Compare November 14, 2026 08:36
@FifteenPen FifteenPen changed the title chain: NVN2 image handles from a register, c2's table and memory (image pool) chain: NVN2 images picked at run time: c2 slot arrays and an image pool for handles from memory Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) shader chain The shader translation chain (DMSH_CHAIN): a change rebuilds every game's shaders tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant