d3d12: give a mesh pipeline the index map only where its stages can read it #617

Merged
NickStallman merged 2 commits from upstream-pr/617 into main 2026-12-01 14:18:44 +00:00
NickStallman commented 2026-12-01 11:04:08 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-01T11:04:08Z.


Since #610 a mesh pipeline on a root that indexes the resource heap directly gets a table with the resource index map, so its draws run. Its mesh and amplification stages were still translated on the title's root, without the map. Under descriptor paging they used the title's heap indices as slots of the smaller visible heap and read other descriptors.

This translates those stages, and the link retry, on the title's root with the map appended (the request derivation is #390's, by @MathiewMay). The table keeps the map only when the mesh, amplification and console pixel stages all have a translation that reads it; otherwise the pipeline is treated as before #610. Builds on #610 by @s3rius.

Refs #533.

Draft: the full check on both cards is still to run (our GPUs are busy with game runs tonight), and it has not been tried in a title.

Measured

  • Lanes mesh-heap-read (new, in lanes-raster-tables, heap limit 64): a mesh program takes a raw buffer from heap index 100 and reads its triangle's far corner from it; decoy buffers hold -1.0, which draws nothing.
    • On main 717a74c4 with only the scenario added: fails on the RTX 5090 (10de:2b85, 620.70.10) and on an AMD iGPU (1002:13c0, RADV), GE-Proton11-15.
    • With this change: all 13 scenarios of lanes-raster-tables pass on the AMD iGPU. The RTX 5090 run is to come.
  • The mesh program translates on both roots, and only the mapped one reads the index map; DXC 1.9 and dxv pass for the scenario's programs.
  • Unit tests for the request derivation and the table choice; Python tests of the fixture and gate.
  • python tuxbox.py check --no-gpu: 13 passed, 0 failed, 0 not run.

In a title (measured by @3kynox, #586)

On a 16 GB card, main 717a74c4 lost the device in mesh-shader draws after 158 s and 13 s; with this change applied, the same setup ran to its 25-minute limit with no Xid. One run each.

Not covered

  • A mesh or amplification stage that also needs the heap's stride table is still left out; that is a follow-up.
  • mesh_table::reflected returns E_INVALIDARG for a root with no parameters, which looks like a separate fault on main; the scenario's root carries one unread constant to avoid it.

🤖 Generated with Claude Code

<!-- greyfinch-sync:brcly/TuxBox:issue:5584367485 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/617). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-12-01T11:04:08Z. --- Since #610 a mesh pipeline on a root that indexes the resource heap directly gets a table with the resource index map, so its draws run. Its mesh and amplification stages were still translated on the title's root, without the map. Under descriptor paging they used the title's heap indices as slots of the smaller visible heap and read other descriptors. This translates those stages, and the link retry, on the title's root with the map appended (the request derivation is #390's, by @MathiewMay). The table keeps the map only when the mesh, amplification and console pixel stages all have a translation that reads it; otherwise the pipeline is treated as before #610. Builds on #610 by @s3rius. Refs #533. **Draft:** the full check on both cards is still to run (our GPUs are busy with game runs tonight), and it has not been tried in a title. ## Measured - **Lanes `mesh-heap-read`** (new, in `lanes-raster-tables`, heap limit 64): a mesh program takes a raw buffer from heap index 100 and reads its triangle's far corner from it; decoy buffers hold -1.0, which draws nothing. - On main 717a74c4 with only the scenario added: fails on the RTX 5090 (`10de:2b85`, 620.70.10) and on an AMD iGPU (`1002:13c0`, RADV), GE-Proton11-15. - With this change: all 13 scenarios of `lanes-raster-tables` pass on the AMD iGPU. The RTX 5090 run is to come. - The mesh program translates on both roots, and only the mapped one reads the index map; DXC 1.9 and dxv pass for the scenario's programs. - Unit tests for the request derivation and the table choice; Python tests of the fixture and gate. - `python tuxbox.py check --no-gpu`: 13 passed, 0 failed, 0 not run. ## In a title (measured by @3kynox, [#586](https://github.com/brcly/TuxBox/pull/586)) On a 16 GB card, main 717a74c4 lost the device in mesh-shader draws after 158 s and 13 s; with this change applied, the same setup ran to its 25-minute limit with no Xid. One run each. ## Not covered - A mesh or amplification stage that also needs the heap's stride table is still left out; that is a follow-up. - `mesh_table::reflected` returns `E_INVALIDARG` for a root with no parameters, which looks like a separate fault on main; the scenario's root carries one unread constant to avoid it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
brcly/TuxBox!617
No description provided.