prep: key ProjectScarlett's linked pairs by the pixel program's current DXIL #674
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/674"
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-03T13:45:45Z.
Fixes #651.
Summary
The provider keys a linked pair by its pixel program's DXIL at the moment it records the request (
shader_cache/compile.rs,linked). ProjectScarlett's prepare compiled each recorded.linkrequest under that recorded key. Once the pixel program translates to different DXIL, with a new translator or another DXC, the provider asks for a key the prepare never filled, and a request recorded under a newer DXC than the one installed failed in DXV ("Validator version in metadata (1.10) is not supported"). On my machine that was 342 of 354 link requests after I went from nixpkgs' DXC 1.10 to the 1.9.2609 release.As you asked in #651:
.csoin the current runtime cache, aschase_warmup.pyalready does, and staged again with that DXIL when the key differs. Link requests start after every other request, so the pixel program's translation exists by then.shader_cache::link_on_demand: a portable vertex or geometry producer, a portable pixel program, and a semantic that moves register, needs a component the producer didn't write, or changes component type (runtime_shaders.packing_mismatch, a port oftuxbox_dxbc::has_packing_mismatch). Without the producer's translation in the cache the pair is kept.pixel.csothe validator rejects as newer than it supports ("Validator version in metadata ... is not supported"), counts asstaleinstead offailed. Any other rejection stays a failure.staleanddroppedshow up in the summary line and the aggregate receipt only when they aren't zero, so other preparations print what they did before.docs/PROJECTSCARLETT.mddescribes the two counts.Tested
No Lanes scenario: the change is in the ProjectScarlett prepare, which reads a title's shader pack and the provider's recorded link requests; Lanes doesn't record link requests. Unit tests cover it instead (below).
GPU, driver and backend: RX 9060 XT (
1002:7590), RADV / Mesa 26.3.1, Proton ExperimentalThe
Evidence:linetuxbox.py checkprints last, one per card (it names the commit it tested; run it on this pull request's head):Commands run and their results:
New tests: a pair the provider would no longer link is dropped while a pair with a moved register is compiled under its current key; a recorded pair whose stored pixel DXIL is too new for the validator is stale, while one the validator rejects for another reason, or one that fails elsewhere, stays failed; the signature check's cases.
A real prepare on my machine (RX 9060 XT, GE-Proton11-15, DXC 1.9.2609 with the helper): before the change, 342 of 354 link requests failed. With this branch on
106120ca: 355 link requests, 14 dropped as no longer linked, 0 stale, 0 failed. Over all 53,655 requests, 44,094 compiled, 199 cached, 9,348 unsupported and 0 failed, in 2,553 s.AI use
I made this branch with an AI coding agent (Claude Code, following
AGENTS.md). It traced the stale keys to the provider's recording, wrote the change and the tests from your description in #651, and ran the unit tests, the checks and the real prepare above on my machine.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.