README: saved driver blobs belong to the DXIL a build makes #2224

Open
Anon64 wants to merge 1 commit from upstream-pr/2234 into main
Anon64 commented 2026-11-25 10:55:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-25T10:55:07Z.


The README says --precompile --pipelines saves driver blobs "for the next run", but not that the next run has to make the same DXIL. Compute blobs are looked up by the exact DXIL bytes and flags (driver_cache::path in hle/d3d12x/real.rs). So a warm-up made with one build, or with XCL_DIRECT_DXIL set differently, is missed, and those pipelines compile on the title's threads again. This adds one bullet saying so, next to the existing note on translated-shader reuse.

Seen on an RTX 3060 12 GB with a retail title. After a warm-up made with a PR branch, a run of main had 4-16 cold compute builds of 6-26 s each, logged as "ungated here (a title thread's…)". After a warm-up made with main it had none. Without XCL_DIRECT_DXIL, a run after the direct-DXIL warm-up had cold builds of about 3-4 s each again.

What is in it

  • README.md: one bullet under "Switches, caches, logs and the files XCL writes".

Tested

  • Docs only, no code changed: no tests run for this PR.

Regression run

  • Not needed: no change to crates/xcl/src.

Not tested

  • Graphics pipeline blobs (graphics_path) are named differently; the bullet is about the --pipelines compute blobs only.

AI use

  • Claude Code (Claude Opus 5.5) found the cause in the runs, checked the cache key in the code and wrote the bullet and this description.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5489943612 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2234). Originally posted by [Anon64](https://github.com/Anon64) on 2026-11-25T10:55:07Z. --- The README says `--precompile --pipelines` saves driver blobs "for the next run", but not that the next run has to make the same DXIL. Compute blobs are looked up by the exact DXIL bytes and flags (`driver_cache::path` in `hle/d3d12x/real.rs`). So a warm-up made with one build, or with `XCL_DIRECT_DXIL` set differently, is missed, and those pipelines compile on the title's threads again. This adds one bullet saying so, next to the existing note on translated-shader reuse. Seen on an RTX 3060 12 GB with a retail title. After a warm-up made with a PR branch, a run of `main` had 4-16 cold compute builds of 6-26 s each, logged as "ungated here (a title thread's…)". After a warm-up made with `main` it had none. Without `XCL_DIRECT_DXIL`, a run after the direct-DXIL warm-up had cold builds of about 3-4 s each again. **What is in it** - `README.md`: one bullet under "Switches, caches, logs and the files XCL writes". **Tested** - Docs only, no code changed: no tests run for this PR. **Regression run** - Not needed: no change to `crates/xcl/src`. **Not tested** - Graphics pipeline blobs (`graphics_path`) are named differently; the bullet is about the `--pipelines` compute blobs only. **AI use** - Claude Code (Claude Opus 5.5) found the cause in the runs, checked the cache key in the code and wrote the bullet and this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
raylitebull commented 2026-11-25 11:09:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T11:00:38Z.


Reviewed 10f478f (README.md):

  • Adding the --precompile --pipelines driver-blob key note accurately matches driver_cache::path in crates/xcl/src/hle/d3d12x/real.rs (keyed on exact DXIL bytes and flags, so XCL_DIRECT_DXIL or translator changes miss cached compute blobs).
  • Diff audited and CI workflow approved (45599530469).
<!-- greyfinch-sync:ivall/xcl:comment:7160465675 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2234#issuecomment-7160465675). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T11:00:38Z. --- Reviewed `10f478f` (`README.md`): - Adding the `--precompile --pipelines` driver-blob key note accurately matches `driver_cache::path` in `crates/xcl/src/hle/d3d12x/real.rs` (keyed on exact DXIL bytes and flags, so `XCL_DIRECT_DXIL` or translator changes miss cached compute blobs). - Diff audited and CI workflow approved (`45599530469`).
DavidM1911 commented 2026-11-25 17:07:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T16:31:27Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: 2 real failures, deterministic (also fail --test-threads=1):
hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa
  assertion failed: format 85 kept — left: 28, right: 85 (device_x.rs:1376)
gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator
  assertion failed — left: 68, right: 1 (pso.rs:1360)

Needs fixes before merge.

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7168116546 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2234#issuecomment-7168116546). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T16:31:27Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: **2 real failures**, deterministic (also fail `--test-threads=1`): ``` hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa assertion failed: format 85 kept — left: 28, right: 85 (device_x.rs:1376) gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator assertion failed — left: 68, right: 1 (pso.rs:1360) ``` Needs fixes before merge. — Devin
Anon64 commented 2026-11-25 18:04:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-25T17:19:48Z.


Thanks for running it. This PR changes one bullet in README.md and no code, so it cannot change either test.

I ran both on current main 68a284a (debug test build, RTX 3060 12 GB, Windows 11):

cargo test -p xcl --lib -- pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa rerouted_disk_entries_follow_the_direct_translator
test hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa ... ok
test gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator ... ok
test result: ok. 2 passed; 0 failed; 0 ignored

So the failures you saw come from something else in the tree you tested, perhaps an older main or another branch merged in. If you can name that commit, I'll gladly run the two tests there too.

AI use: Claude Code, Claude Opus 5.5 ran the tests and wrote this reply.

<!-- greyfinch-sync:ivall/xcl:comment:7169346045 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2234#issuecomment-7169346045). Originally posted by [Anon64](https://github.com/Anon64) on 2026-11-25T17:19:48Z. --- Thanks for running it. This PR changes one bullet in `README.md` and no code, so it cannot change either test. I ran both on current `main` `68a284a` (debug test build, RTX 3060 12 GB, Windows 11): ``` cargo test -p xcl --lib -- pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa rerouted_disk_entries_follow_the_direct_translator test hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa ... ok test gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator ... ok test result: ok. 2 passed; 0 failed; 0 ignored ``` So the failures you saw come from something else in the tree you tested, perhaps an older `main` or another branch merged in. If you can name that commit, I'll gladly run the two tests there too. AI use: Claude Code, Claude Opus 5.5 ran the tests and wrote this reply.
DavidM1911 commented 2026-11-26 01:05:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T00:59:27Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7179315157 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2234#issuecomment-7179315157). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T00:59:27Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
luckyteagirl commented 2026-11-26 08:51:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T08:51:28Z.

Review: COMMENTED


At exact head 70d5f59 on current main b49be18, the new README bullet correctly describes DXIL-based driver-blob lookup, but “compiles those pipelines again at run time, on the title's threads” is too broad. In dev_create_compute_pso, a translated-cache miss can enter go_background, which queues build_compute for an xcl-pso worker; that build also reaches the driver-cache lookup. Other paths can compile inline. This is a source-only review; I did not run a cold-cache title.

Could the sentence say that XCL rebuilds missed pipelines at run time, without assigning every rebuild to a title thread? If useful, mention separately that some builds run on background workers. The advice to precompile with the chosen build and switches remains sound.

AI assistance: two GPT-6.2 Sol agents checked the runtime path; GPT-6.2 Astra verified the exact-head README and wording.

<!-- greyfinch-sync:ivall/xcl:review:6070992127 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2234#pullrequestreview-6070992127). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T08:51:28Z. **Review:** COMMENTED --- At exact head `70d5f59` on current main `b49be18`, the new README bullet correctly describes DXIL-based driver-blob lookup, but “compiles those pipelines again at run time, on the title's threads” is too broad. In `dev_create_compute_pso`, a translated-cache miss can enter `go_background`, which queues `build_compute` for an `xcl-pso` worker; that build also reaches the driver-cache lookup. Other paths can compile inline. This is a source-only review; I did not run a cold-cache title. Could the sentence say that XCL rebuilds missed pipelines at run time, without assigning every rebuild to a title thread? If useful, mention separately that some builds run on background workers. The advice to precompile with the chosen build and switches remains sound. AI assistance: two GPT-6.2 Sol agents checked the runtime path; GPT-6.2 Astra verified the exact-head README and wording.
Anon64 commented 2026-11-26 21:09:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-26T21:09:45Z.


Thanks, you are right: a miss can also go to an xcl-pso worker through go_background. The bullet now says XCL "builds those pipelines again at run time", with no claim about which thread (b91f6ee, rebased onto 8b957be).

AI use: Claude Code (Claude Opus 5.5) made the change and wrote this reply.

<!-- greyfinch-sync:ivall/xcl:comment:7203451467 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2234#issuecomment-7203451467). Originally posted by [Anon64](https://github.com/Anon64) on 2026-11-26T21:09:45Z. --- Thanks, you are right: a miss can also go to an `xcl-pso` worker through `go_background`. The bullet now says XCL "builds those pipelines again at run time", with no claim about which thread (`b91f6ee`, rebased onto `8b957be`). AI use: Claude Code (Claude Opus 5.5) made the change and wrote this reply.
github-actions[bot] commented 2026-12-01 02:35:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:35:41Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7298784546 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2234#issuecomment-7298784546). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-12-01T02:35:41Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 07:38:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:38:41Z.


Triage (#1607) – head b91f6ee

No open or merged PR makes the same change. The note matches the code: compute driver blobs are keyed by the DXIL (compute_blob_key_for hashes dxil), so a translator or switch change that alters the DXIL misses them. The PR conflicts with the current README and needs a rebase. The bullet should probably go next to the XCL_PSO_DISK_CACHE / driver-blob bullets.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7304308162 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2234#issuecomment-7304308162). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:38:41Z. --- **Triage (#1607)** – head b91f6ee No open or merged PR makes the same change. The note matches the code: compute driver blobs are keyed by the DXIL (`compute_blob_key_for` hashes `dxil`), so a translator or switch change that alters the DXIL misses them. The PR conflicts with the current README and needs a rebase. The bullet should probably go next to the `XCL_PSO_DISK_CACHE` / driver-blob bullets. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2234:upstream-pr/2234'
git switch 'upstream-pr/2234'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/2234'
git switch 'upstream-pr/2234'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2234'
git switch 'upstream-pr/2234'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2234'
git switch 'main'
git merge --squash 'upstream-pr/2234'
git switch 'main'
git merge --ff-only 'upstream-pr/2234'
git switch 'main'
git merge 'upstream-pr/2234'
git push origin 'main'
Sign in to join this conversation.
No reviewers
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
xcl-dev/xcl!2224
No description provided.