Repository navigation
Description
On main (d1112f9), ProjectScarlett 1.0.2.1 has 417 distinct mesh + pixel pipelines rejected with 0x80070057 between the Account Picker and the story loading screen (RX 6700 XT, RADV 26.3.1, GE-Proton11-14; the counts are identical run to run). I traced what they are. About half have one cause in the runtime, which I'm working on. I'm claiming that half here so nobody duplicates it.
What the 417 are
| pipelines (creations) | cause |
|---|---|
| 204 (447) | The pixel program uses a literal sampler state that no static sampler of the pipeline root matches. Details below. |
| 210 (480) | The pixel program has no translation at all (lane operations 78, PS attribute with no signature register 40, v128 spill 48, dynamic soffset 19, cube LOD clamp 18, other 7). The console pixel shader is then used and fails vkd3d_validate_mesh_shader_io_signatures. Not part of this claim. |
| 3 (3) | Not explained yet. |
Attribution is from the pipeline failure record joined with the shader cache's refusal reasons and the recorded root signatures, not from the log: pipeline creation runs on a worker thread, so vkd3d's messages don't line up with TuxBox's.
The 204
The console builds a sampler from literal words, so a title can pair a pixel program with a root that doesn't hold that state. In all 204 the root has a static sampler at the register the program declares, but in a different state (border, linear), while the program builds an anisotropic wrap sampler from words.
- The translation against the pipeline root is refused:
mimg … not a sampler descriptor (InlineWord). - The mesh path falls back to the root-less translation, which reads its samplers from space 32765.
- Nothing adds those private samplers to a mesh pipeline's root, so vkd3d-proton rejects the pipeline:
dxil-spirv: Failed to remap sampler 32765:0.
The vertex + pixel path already recovers from this by appending private static samplers (missing_literal_samplers in compute_table.rs, extended in #174). The mesh path (mesh_table::reflected) copies the title's static samplers and adds none.
The 204 pipelines come from 126 distinct pixel programs, each with one to three unmatched states.
What I have
A local change that, only when the pixel translation against the root is refused, rebuilds the mesh table with the unmatched literal states appended as private static samplers, to both the host root and the root the pixel stage is translated against, and keeps the result only if the retry translates. Pipelines that translate today are untouched.
On the RX 6700 XT, two runs: 0x80070057 rejections go from 417 to 213 distinct (930 to 483 creations), 126 new pixel variants are compiled, and no other failure count changes.
Before I open the PR
- A Lanes scenario that fails without the change. So far there is only a unit test.
- One design point I'd like an opinion on: the translator keys a sampler by its register alone, so the private samplers are placed on registers above every sampler register the root or the program names. With plain numbering from 0, 43 of the 126 programs refuse with "overlaps another space". If keying by register and space in the translator is preferred, say so and I'll look at that instead.
- I can't judge the picture: every AMD run still ends at the page-remap device loss from d3d12:
buffer-remapregression control fails on RADV, with host memory imports refused #191 a couple of minutes in. A check on NVIDIA past the loading screen would be welcome once the PR is up.
Activity
NickStallman commentedon Nov 26, 2026
Thanks for claiming the mesh half. To avoid duplicate work: I have an unopened branch that does the same thing for the other root kinds,
NickStallman:fix/xshader-inline-literal-samplers(bfc1d7c, based onmainbefore #216; it hasn't had a full GPUcheckyet).dxbc::inline_sampler::unmatchedlists each literal state that no static sampler visible to the stage has.omitted) append them. xshader is unchanged.sN not a sampler descriptor (Some(InlineWord(N))), mostly programs that index the heap, which d3d12: restore static samplers a multi-table raster root leaves out #174 skips.Two options:
mesh_table::reflected, take it, and I'll open the compute/raster part separately on top of yours.Once your PR is up, I can run it on NVIDIA past the loading screen (RTX 5090, GE-Proton11-14).
JeffreyBytes commentedon Nov 26, 2026
Thanks, that's good timing. I fetched
bfc1d7cand compared: yourinline_sampler::unmatchedand mine are the same idea with the same placement, down to the name, so there should only be one.I'd go with your second option: please open yours first, and I'll build the mesh part on it.
mesh_table::reflectedplus the retry instream.rs.I can run your branch on AMD in the meantime (RX 6700 XT, RADV 26.3.1):
tuxbox.py checkand the ProjectScarlett failure counts before and after. And yes please to the NVIDIA run past the loading screen once the mesh PR is up.NickStallman commentedon Nov 26, 2026
Sounds good. I'm rebasing it onto current
mainnow: #216 addedmissing_literal_samplersfor roots without 0x800, so the two need reconciling. Then the AMD and NVIDIA checks, and I'll open the PR and link it here. If the 126 mesh programs need the registers kept above the pixel program's own declared sampler registers, please raise it on the PR.JeffreyBytes commentedon Nov 26, 2026
AMD numbers for both parts together. I cherry-picked
bfc1d7contomain(c6ce497) and put the mesh change on top of it, using yourunmatchedas is. ProjectScarlett from the Account Picker to the story loading screen, RX 6700 XT, RADV 26.3.1, GE-Proton11-14, three runs with identical counts. Distinct pipelines, creations in parentheses:main0x800700570x80004001/0x80004005The mesh number is the same as with my own helper, so yours covers it: all 126 pixel programs behind those pipelines translate, compile, and use only registers the extended root has. Your numbering differs from mine in 54 of them and none fail, so I have nothing to ask for on your side. The 131 vertex + pixel stand-ins and 15 compute failures that go away are from your commit alone.
Two notes for when you rebase onto
main:compute_table.rsconflicts with ProjectScarlett start menu: compute roots, faster compiles, watchdog pause #216 in two places. In the compute root,mainnow haselse if flags & 0x800 == 0 { missing_literal_samplers }; I kept that and fall back tounmatchedwhen it returns nothing. In the sampler conversion I keptmain'sstatic_samplerhelper and itsheap_stridesblock.unmatchedreturnsNonefor a root with no static samplers, so the mesh retry skips such pipelines. None of the 204 are like that (they have 12 to 22), so it doesn't matter here.On the Lanes scenario I promised: the mesh path only runs for a console mesh program, and nothing in the repo can produce one by hand (the translator accepts them only with their full launch and export code). The closest automated check would be a records-only console mesh container with a prepared replacement, plus a hand-written console pixel program with literal sampler words, which is a few hundred lines of fixture. I'll say that in the PR and leave it to @brcly whether it is wanted.
The mesh commit is ready to go up as soon as your PR is open.
bbijsterbosch commentedon Nov 26, 2026
Hi guys, if you want to continue on shader compilition, maybe an idea that i start on shader and pipeline performance? Seems to me everything is way to slow to run the game atm. Or maybe its my hardware. Let me know what you think.
NickStallman commentedon Nov 26, 2026
Opened as #241, rebased onto
3b8a220. Both vendors pass the full check, and there's a Lanes scenario (raster-samplers) that fails onmain. The registers sit above every sampler register the root uses; if the mesh programs also need them above the pixel program's own declared registers, a comment on #241 is the best place for it.d3d12: give a mesh pipeline's pixel stage the literal samplers its ro…
lanes: draw through a mesh pipeline whose pixel sampler the root lacks
JeffreyBytes commentedon Nov 27, 2026
Status after #266 and today's translator merges, on the RX 6700 XT (picker to story loading,
mainat8c56463): mesh+pixel pipelines failing with0x80070057are down from 417 to 123.I classified the 195 that were left at
6ce0aac: all but three were pixel programs the translator refuses outright (lane reads with a non-constant index, a register used as both lane spill area and vector, attributes without a signature register, dynamic scalar-load offsets), not samplers. Two are still a literal-sampler case, where the root has no static samplers at all.So this issue is close to done; I'll look at those two and then close it.
JeffreyBytes commentedon Nov 27, 2026
#291 is merged, which covers the last literal-sampler case I could find (a root with no static samplers). On the RX 6700 XT the
Failed to remap sampler 32765:0lines are gone between the picker and the story loading screen, and the 121 mesh + pixel pipelines that still fail with0x80070057there are not sampler cases: 120 have a pixel program the translator refuses, and one translates on both stages and is still rejected, cause not found yet.Closing this; if a literal-sampler case turns up further into the game it can get its own issue. Thanks @NickStallman for #241 and the NVIDIA runs.
One known gap remains, shared with the vertex + pixel path: a pixel container with no
SFI0part under a root with no static samplers is not recovered. I haven't seen it in the title.