prep: ProjectScarlett's linked-pipeline requests keep the key of the pixel DXIL they were recorded with #651
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 gtb-sbe on 2026-12-02T12:06:08Z.
What I see
The first ProjectScarlett prepare after I switched my DXC from nixpkgs' 1.10 preview to Microsoft's 1.9.2609 release (#650) reported
342 failedof 50,497 requests. All 342 are.linkrequests, and all fail the same way before anything is compiled: 1.9'sdxvrejects the storedpixel.csowithThese failures aren't cached, so every later prepare tries them again and reports them again.
Looking into it, the DXV error is the visible part of something more general, and I'm not sure it's worth fixing. That's the question at the end.
Why
A link request's key is
<producer>_<pixel>_<sha256 of the pixel DXIL>(runtime/d3d12/src/device/shader_cache/compile.rs,linked). The pixel DXIL is the provider's translation of the pixel program at the time it records the request, and the request folder keeps a copy of it aspixel.cso.The ProjectScarlett prepare compiles each recorded
.linkrequest under its recorded key (scarlett_prep.pytranslate->compile_request). It never derives the key again. So once a pixel program's DXIL changes, because of a translator change or a different DXC, the provider asks for a key the prepare doesn't build:.csonobody asks for.chase_warmup.py(prepare_link) already does it the other way: it compiles the pixel program first and builds the link key from that fresh DXIL.Numbers
From my prefix (GE-Proton11-15, RX 9060 XT,
main53782eed, runtime cachef82a2650):.linkrequests for 150 producer/pixel pairs. 72 pairs have more than one request: each change of the pixel DXIL adds a request for the same pair, and the old ones stay..csoin the runtime cache. 12 match (the ones recorded by my two game runs on this build). The other 342 are stale.8345699c, nixpkgs DXC 1.10, before any DXC switch), only 72 of the 354 matched. So most of them were already stale after earlier translator changes. The DXC switch only made it visible.Question
Should this be fixed, or left alone?
.linkrequest from the pixel program's.csoin the current runtime cache, aschase_warmup.pydoes. In my prefix, the pixel program of every pair had been compiled by the same prepare, so its.csowas there. A stale request could be compiled under the new key, or dropped if the pair never needs a link again. That keeps linked pipelines prepared across translator updates, and stale requests stop piling up and failing after a DXC downgrade.pixel.csois newer than the validator as stale rather than failed, so the prepare's failure count stays meaningful.If a fix is wanted, I can make it as a PR, unless someone else already owns this part of the prepare.
AI use
I worked on this with an AI coding agent (Claude Code, following
AGENTS.md). It found the 342 failures in my prepare log, reproduced one with both compilers, read the key derivation in the provider and the prepare, and counted the stale requests in my prefix. All numbers come from my machine's logs and shader cache.Imported from brcly/TuxBox. Originally posted by brcly on 2026-12-02T21:35:37Z.
Thanks for tracing this, the analysis is clear. Yes, please fix it as a PR: key each
.linkrequest from the pixel program's.csoin the current runtime cache, aschase_warmup.pydoes, and compile stale requests under the new key, or drop them when the pair no longer needs a link. Please also count a request whose storedpixel.csothe validator can't read as stale rather than failed, so the prepare's failure count stays meaningful. Nobody else is working on this part of the prepare.