Skip to content

Fix NVN2 task/mesh bindings and packed shader outputs - #1247

Closed
sn0wst0rm wants to merge 1 commit into
seedds:mainfrom
sn0wst0rm:pr/mkw-native-taskmesh
Closed

sn0wst0rm wants to merge 1 commit into
seedds:mainfrom
sn0wst0rm:pr/mkw-native-taskmesh

Conversation

@sn0wst0rm

Copy link
Copy Markdown
Contributor

Keep NVN2 task and mesh stages separate from tessellation throughout program binding, resource tables and replay. Preserve explicit stage unbinding and all dimensions of direct mesh draws.

Translate task payloads and packed vertex/primitive outputs through distinct ISBE regions. Decode primitive output metadata before truncating shader code, preserve early exits through the export barriers, and emit native Metal object/mesh entry points with separate argument tables. Retain the corrected SSBO offsets and reserved first-workgroup buffer slot already in main.

Validation covers shader metadata and translation, native Metal pixel readback, stage binding, direct draw recording and capture/replay. GPU tests pass with Metal validation enabled. Indirect and multi-draw mesh commands remain unsupported.

Front-ends: break: rebuild shader libraries and host/replay tools together using the updated translator. Older captures must be recorded again.

Keep NVN2 task and mesh stages separate from tessellation throughout program binding, resource tables and replay. Preserve explicit stage unbinding and all dimensions of direct mesh draws.

Translate task payloads and packed vertex/primitive outputs through distinct ISBE regions. Decode primitive output metadata before truncating shader code, preserve early exits through the export barriers, and emit native Metal object/mesh entry points with separate argument tables. Retain the corrected SSBO offsets and reserved first-workgroup buffer slot already in main.

Validation covers shader metadata and translation, native Metal pixel readback, stage binding, direct draw recording and capture/replay. GPU tests pass with Metal validation enabled. Indirect and multi-draw mesh commands remain unsupported.

Front-ends: break: rebuild shader libraries and host/replay tools together using the updated translator. Older captures must be recorded again.
@github-actions github-actions Bot added nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers tools Tools and scripts (dm/tools, scripts) docs Documentation shader chain The shader translation chain (DMSH_CHAIN): a change rebuilds every game's shaders game: 0400C3F00006E000 A game profile labels Nov 4, 2026
@seedds

seedds commented Nov 29, 2026

Copy link
Copy Markdown
Owner

Thanks @sn0wst0rm for the work on separating NVN2 task and mesh stages, payload translation, and native Metal object/mesh entry points!

Closing this PR because main has since landed native Metal task and mesh pipelines with capture/replay and pipeline bases (including commits bf420fd and 685d2ae), leaving this older 2,351-line branch superseded. We checked those commits and the current mesh pipeline code on main.

Still open: if any specific gap around explicit stage unbinding or direct mesh draw dimensions turns up on current main, we can revisit it as a focused change using your test cases as reference.

@seedds seedds closed this Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation game: 0400C3F00006E000 A game profile nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers 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.

2 participants