Skip to content

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

Merged
brcly merged 1 commit into
brcly:mainfrom
NathansDomainSolutions:fix/mesh-pixel-table-copy
Nov 25, 2026
Merged

brcly merged 1 commit into
brcly:mainfrom
NathansDomainSolutions:fix/mesh-pixel-table-copy

Conversation

@NathansDomainSolutions

Copy link
Copy Markdown
Contributor

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. xshader: accept the sampler heap base in rooted pixel shaders #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

…writes

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 <noreply@anthropic.com>
(cherry picked from commit 1b04aed9c3132cdff160b2ebba9122b1affd349c)
(cherry picked from commit 1b88a230760e0a382580a022bc56e515984988c2)
@brcly
brcly merged commit cc9f44b into brcly:main Nov 25, 2026
2 checks passed
@NathansDomainSolutions

Copy link
Copy Markdown
Contributor Author

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants