prep: ProjectScarlett's linked-pipeline requests keep the key of the pixel DXIL they were recorded with #651

Open
opened 2026-12-02 12:06:08 +00:00 by gtb-sbe · 1 comment
gtb-sbe commented 2026-12-02 12:06:08 +00:00 (Migrated from github.com)
Contributor

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 failed of 50,497 requests. All 342 are .link requests, and all fail the same way before anything is compiled: 1.9's dxv rejects the stored pixel.cso with

Error: Validator version in metadata (1.10) is not supported; maximum: (1.9).

These 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 as pixel.cso.

The ProjectScarlett prepare compiles each recorded .link request under its recorded key (scarlett_prep.py translate -> 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:

  • With the same or a newer DXC, the old request still compiles, into a .cso nobody asks for.
  • With an older DXC, as in my case, it fails in DXV and shows up as a failure.

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, main 53782eed, runtime cache f82a2650):

  • 354 .link requests 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.
  • I compared each request's key with the sha256 of the pixel program's current .cso in the runtime cache. 12 match (the ones recorded by my two game runs on this build). The other 342 are stale.
  • Against the runtime cache of my previous build (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.
  • What it costs in the game: the provider translates those pairs at first use. In two runs up to the story intro that was 2 and 10 link translations, out of 2,020 and 838 translations in total.

Question

Should this be fixed, or left alone?

  • Fix: key each .link request from the pixel program's .cso in the current runtime cache, as chase_warmup.py does. In my prefix, the pixel program of every pair had been compiled by the same prepare, so its .cso was 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.
  • Ignore: the runtime cost is small so far (a few link translations per run), a fresh setup never hits the DXV error, and a DXC downgrade is unusual. A smaller step would be to count a link request whose stored pixel.cso is 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.

<!-- greyfinch-sync:brcly/TuxBox:issue:6744300091 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/651). Originally posted by [gtb-sbe](https://github.com/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 failed` of 50,497 requests. All 342 are `.link` requests, and all fail the same way before anything is compiled: 1.9's `dxv` rejects the stored `pixel.cso` with ``` Error: Validator version in metadata (1.10) is not supported; maximum: (1.9). ``` These 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 as `pixel.cso`. The ProjectScarlett prepare compiles each recorded `.link` request under its recorded key (`scarlett_prep.py` `translate` -> `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: - With the same or a newer DXC, the old request still compiles, into a `.cso` nobody asks for. - With an older DXC, as in my case, it fails in DXV and shows up as a failure. `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, `main` 53782eed, runtime cache `f82a2650`): - 354 `.link` requests 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. - I compared each request's key with the sha256 of the pixel program's current `.cso` in the runtime cache. 12 match (the ones recorded by my two game runs on this build). The other 342 are stale. - Against the runtime cache of my previous build (`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. - What it costs in the game: the provider translates those pairs at first use. In two runs up to the story intro that was 2 and 10 link translations, out of 2,020 and 838 translations in total. ## Question Should this be fixed, or left alone? - **Fix:** key each `.link` request from the pixel program's `.cso` in the current runtime cache, as `chase_warmup.py` does. In my prefix, the pixel program of every pair had been compiled by the same prepare, so its `.cso` was 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. - **Ignore:** the runtime cost is small so far (a few link translations per run), a fresh setup never hits the DXV error, and a DXC downgrade is unusual. A smaller step would be to count a link request whose stored `pixel.cso` is 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.
brcly commented 2026-12-02 21:35:37 +00:00 (Migrated from github.com)
Author
Contributor

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 .link request from the pixel program's .cso in the current runtime cache, as chase_warmup.py does, 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 stored pixel.cso the 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.

<!-- greyfinch-sync:brcly/TuxBox:comment:7359500643 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/651#issuecomment-7359500643). Originally posted by [brcly](https://github.com/brcly) on 2026-12-02T21:35:37Z. --- Thanks for tracing this, the analysis is clear. Yes, please fix it as a PR: key each `.link` request from the pixel program's `.cso` in the current runtime cache, as `chase_warmup.py` does, 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 stored `pixel.cso` the 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.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
brcly/TuxBox#651
No description provided.