d3d12: give the pixel stage a copy of guest tables the mesh layout rewrites #158

Merged
NathansDomainSolutions merged 1 commit from upstream-pr/158 into main 2026-11-25 10:00:56 +00:00
NathansDomainSolutions commented 2026-11-25 09:56:16 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NathansDomainSolutions on 2026-11-25T09:56:16Z.


Summary

A mesh pipeline's reflected root (mesh_table::reflected) rewrites some guest descriptor tables into the mesh program's FSSM layout and makes them mesh-only. When the pixel stage also reads one of those tables, collect_pixel_accesses refused the whole table (if rewritten { return Err(E_NOTIMPL) }). stream.rs propagates that with ?, so slot 86 returned E_NOTIMPL and the draw was lost.

This PR keeps the rewritten parameter mesh-only, appends a pixel-only copy of the original table parameter, and records it in a new ComputeTable::mirrors list (host index, guest slot). At draw time the binder sets the guest's table on both parameters. The two parameters may overlap in registers because their visibilities don't intersect.

Checks

  • python -m unittest discover -s tests: 265 OK. build.py d3d12 builds.
  • In game (RTX 4070, Proton Experimental, offline; run 35, main 53bb4d6 + this change, plus a local log line on each refusal site): every logged mesh-table refusal came from this check, before the change. With the change, slot 86 mesh pipelines failing E_NOTIMPL went from 6,856 (run 30b) to 154 over a 39-minute run. Those pipelines now reach pipeline creation.
  • Most of them then failed in vkd3d-proton with -3, because the pixel stage was the root-less fallback translation. #157 addresses that: the rooted pixel translation was refused for heap-indexing shaders. The two changes are independent; an in-game run with both is in progress.

AI-assisted: written with Claude Code and reviewed by me.

🤖 Generated with Claude Code

<!-- greyfinch-sync:brcly/TuxBox:issue:6601821820 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/158). Originally posted by [NathansDomainSolutions](https://github.com/NathansDomainSolutions) on 2026-11-25T09:56:16Z. --- ## Summary A mesh pipeline's reflected root (`mesh_table::reflected`) rewrites some guest descriptor tables into the mesh program's FSSM layout and makes them mesh-only. When the pixel stage also reads one of those tables, `collect_pixel_accesses` refused the whole table (`if rewritten { return Err(E_NOTIMPL) }`). `stream.rs` propagates that with `?`, so slot 86 returned E_NOTIMPL and the draw was lost. This PR keeps the rewritten parameter mesh-only, appends a pixel-only copy of the original table parameter, and records it in a new `ComputeTable::mirrors` list (host index, guest slot). At draw time the binder sets the guest's table on both parameters. The two parameters may overlap in registers because their visibilities don't intersect. ## Checks - `python -m unittest discover -s tests`: 265 OK. `build.py d3d12` builds. - In game (RTX 4070, Proton Experimental, offline; run 35, main 53bb4d6 + this change, plus a local log line on each refusal site): every logged mesh-table refusal came from this check, before the change. With the change, slot 86 mesh pipelines failing E_NOTIMPL went from 6,856 (run 30b) to 154 over a 39-minute run. Those pipelines now reach pipeline creation. - Most of them then failed in vkd3d-proton with -3, because the pixel stage was the root-less fallback translation. #157 addresses that: the rooted pixel translation was refused for heap-indexing shaders. The two changes are independent; an in-game run with both is in progress. AI-assisted: written with Claude Code and reviewed by me. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
NathansDomainSolutions commented 2026-11-25 10:12:30 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NathansDomainSolutions on 2026-11-25T10:12:30Z.


Added a follow-up commit: the pixel stage is translated against the guest root (after #157 its rooted translation is no longer refused), so it can read registers of a pixel-visible table that its guest resource list doesn't name. The pixel-only copy is now made for every pixel-visible table the mesh layout rewrites.

In-game, same machine, main 53bb4d6 + #157 + this PR: slot 86 mesh failures 3 min into a run went from 1,976 (only accessed tables mirrored) to 765, and the t6 space1 uncovered-binding class seen in the previous run disappeared.

<!-- greyfinch-sync:brcly/TuxBox:comment:7159377933 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/158#issuecomment-7159377933). Originally posted by [NathansDomainSolutions](https://github.com/NathansDomainSolutions) on 2026-11-25T10:12:30Z. --- Added a follow-up commit: the pixel stage is translated against the guest root (after #157 its rooted translation is no longer refused), so it can read registers of a pixel-visible table that its guest resource list doesn't name. The pixel-only copy is now made for every pixel-visible table the mesh layout rewrites. In-game, same machine, main 53bb4d6 + #157 + this PR: slot 86 mesh failures 3 min into a run went from 1,976 (only accessed tables mirrored) to 765, and the `t6 space1` uncovered-binding class seen in the previous run disappeared.
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!158
No description provided.