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

Manually merged
github merged 1 commit from gh-pr/158/head into gh-pr/158/base 2026-11-26 06:35:08 +00:00
Owner

@⁠NathansDomainSolutions on GitHub · 2026-11-25 09:56 UTC · original
NathansDomainSolutions:fix/mesh-pixel-table-copy → main · +52 −7 · 3 files · 1 commits · merged 2026-11-25 10:00 UTC

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

**@⁠NathansDomainSolutions** on GitHub · 2026-11-25 09:56 UTC · [original](https://github.com/brcly/TuxBox/pull/158) `NathansDomainSolutions:fix/mesh-pixel-table-copy` → `main` · +52 −7 · 3 files · 1 commits · merged 2026-11-25 10:00 UTC ## 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)
A mesh pipeline's reflected root rewrites some guest tables into the mesh
program's FSSM layout and makes them mesh-only. When the pixel stage also
reads such a table, the pipeline was refused (E_NOTIMPL, mesh_table.rs
pixel-access check), so the draw was lost.

Append a pixel-only copy of the original table instead and bind the guest's
table to both parameters at draw time.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 1b04aed9c3132cdff160b2ebba9122b1affd349c)
(cherry picked from commit 1b88a230760e0a382580a022bc56e515984988c2)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:35:06 +00:00
github manually merged commit e971efc3aa into gh-pr/158/base 2026-11-26 06:35:08 +00:00
Author
Owner

@⁠NathansDomainSolutions on GitHub · 2026-11-25 10:12 UTC · original

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.

**@⁠NathansDomainSolutions** on GitHub · 2026-11-25 10:12 UTC · [original](https://github.com/brcly/TuxBox/pull/158#issuecomment-7159377933) 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.
This discussion has been locked. Commenting is limited to contributors.
No description provided.