d3d12: recover a mesh pixel program's literal samplers under a root with no static samplers #291
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/291"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from brcly/TuxBox. Originally posted by JeffreyBytes on 2026-11-27T01:19:02Z.
Summary
A follow-up to #266 that finishes the literal-sampler part of #227. Two commits:
d3d12: recover a mesh pixel program's literal samplers under a root with no static samplers(15 lines acrossstream.rsandcompute_table.rs). #266 appends a mesh pixel program's unmatched literal samplers throughinline_sampler::unmatched, which returns nothing for a root with no static samplers at all and leaves that case toinline_sampler::pixelandinline_sampler::private. The vertex + pixel roots call those two; the mesh path did not. So under such a root the pixel translation still names a private sampler the mesh root lacks, and vkd3d-proton rejects the pipeline:dxil-spirv: Failed to remap sampler 32765:0,0x80070057. The mesh path now uses the same recovery as the vertex + pixel roots, through one shared helper, and as before keeps the extended root only if the pixel program translates against it.lanes: draw through mesh pipelines whose root has no static samplers: the scenariomesh-sampler-rootless.Measured, RX 6700 XT, ProjectScarlett 1.0.2.1 from the Account Picker to the story loading screen, two runs with identical counts. Distinct pipelines, creations in parentheses:
main(8c56463)Failed to remap sampler 32765:0lines0x800700570x80004001/0x80004005Two pixel variants were compiled on the first launch and none on the second. It is a small number in this part of the game; the 121 that remain are pixel programs with no translation yet, not samplers.
Known gaps, the same ones the vertex + pixel path has:
inline_sampler::privatereturns nothing for a pixel container without anSFI0part, so such a program under a root with no static samplers is still not recovered. The block also only runs when a mesh table already exists, as in #266.Not verified: what these two pipelines draw in the game.
Verified on Lanes
python tuxbox.py checkpassed on this branchmesh-sampler-rootlessruns in thelanes-raster-tablessuite aftermesh-sampler-single. It uses themesh-samplersmesh program under the two-table root without its static samplers, with two pixel programs that sample with a literal linear state: theraster-samplersprogram, which declares one sampler (recovered at its own register), and the two-sampler program with an emptySFI0part (recovered at private registers). Everything in it is written by hand for the test; nothing comes from a title.main:lanes-mesh-sampler-rootless FAIL,slot 86 pipeline stage failure #1 0x80070057lanes-mesh-samplers,lanes-mesh-sampler-singleandlanes-raster-samplersGPU, driver and backend: AMD Radeon RX 6700 XT (
1002:73df), Mesa RADV 26.3.1, Linux 7.3.6, Proton backend with GE-Proton11-14. The game runs used theANONONLYpreload from #191.f3ed825(128 gates, comment).The check ran on this branch at
ab644f0.mainhas moved since; the branch still merges cleanly.Checks
The CI commands pass locally: the
tuxbox-dxbctests, the Python tests (414) and thetuxbox-d3d12Windows typecheck. No evidence JSON changes.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-27T01:49:29Z.
NVIDIA run of
f3ed825(this PR's head): the fullpython tuxbox.py check --adapter 10de:2b85 --proton … --prefix … --windows-dxc …passed, 128 gates, including the mesh sampler Lanes scenarios. Every group passed: Lanes and the self-tests, the D3D12 regression controls and the translator on the GPU.RTX 5090 (10de:2b85), driver 620.70.10 (open kernel module), GE-Proton11-14, Linux 7.0. This was the check only; I didn't do a game run on this branch.