Recompiler: honor DXC overrides with warm translation caches #613

Open
github-bot wants to merge 2 commits from github-bot/gh-613 into main AGit
Owner

@⁠mjnhbg3 on GitHub · 2026-11-24 02:31 UTC · original
mjnhbg3:codex/dxc-warm-cache-arguments → main · +164 −35 · 3 files · 2 commits · draft

Stacked on #591 (rebased onto main cb868b2); only the top commit belongs here. Part of #559.

A warm translated shader returns before #591's argument-aware DXIL cache is consulted: even an invalid XCL_DXC_ARGS option silently returns the old translation. Bypass the RAM and translated-file caches while the override is present; keep the argument-keyed DXIL cache active.

What is in it

  • pso.rs: bypass higher shader caches for XCL_DXC_ARGS, following the existing debug overrides.
  • dxc.rs: replace the process-wide environment fixture with real-DXC subprocess checks: default, macro + -O1, macro + -O0, invalid option, and warm cache hits. The previous fixture raced dxil_cache_round_trip in a parallel run.
  • README.md: document the override and cache behavior.

Tested

  • Intel Core Ultra 7 265K, RTX 5070 Ti 16 GB / NVIDIA 616.64, Windows 11 build 26200, Rust 1.97.1 MSVC, SDK DXC 1.8.2502.11; debug build.
  • cargo build --workspace; cargo test --workspace --no-fail-fast -- --test-threads=1 --nocapture: 688 passed, 0 failed, 41 ignored.
  • Four runtime skips: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64); test_title_draws_with_a_root_signature_under_the_debug_layer, uploads_start_from_each_subresources_state (missing debug layer).
  • CI path: XCL_ADAPTER=warp, scripts/test.ps1 --skip test_title_runs_and_game_folder_is_untouched --nocapture: 687 passed, 0 failed, 41 ignored; 88 runtime skips, one filtered e2e test. These skips are not GPU coverage.
  • The new regression fails on #591 with invalid arguments reused a cached translation and passes with this fix.
  • scripts/test-native-stderr.tests.ps1: passed under Windows PowerShell 5.1 and PowerShell 7.
  • Genuine rustc unused-variable fixtures through the runner on both shells: warnings preserved with exit 0 and one real test passed; -D warnings preserved the compiler error and propagated exit 1.

Regression run

main: not run on a retail title; none available.

PR: not run on a retail title; none available. This remains a draft pending the required paired smoke runs.

Not tested

  • Retail titles, AMD, and the missing debug-layer cases.
  • A completed four-thread hardware suite on this final head. Preliminary runs on main 508a0c7 and local ba3d7ba stalled at the same four GPU tests and were stopped; the hardware counts above are serial.

AI use

  • Codex with gpt-6.1-sol: implementation, isolated regression fixture, review and local verification of the top commit. The dependency implementation is from #591.
**@⁠mjnhbg3** on GitHub · 2026-11-24 02:31 UTC · [original](https://github.com/xcl-dev/xcl/pull/613) `mjnhbg3:codex/dxc-warm-cache-arguments` → `main` · +164 −35 · 3 files · 2 commits · draft Stacked on #591 (rebased onto main `cb868b2`); only the top commit belongs here. Part of #559. A warm translated shader returns before #591's argument-aware DXIL cache is consulted: even an invalid `XCL_DXC_ARGS` option silently returns the old translation. Bypass the RAM and translated-file caches while the override is present; keep the argument-keyed DXIL cache active. **What is in it** - `pso.rs`: bypass higher shader caches for `XCL_DXC_ARGS`, following the existing debug overrides. - `dxc.rs`: replace the process-wide environment fixture with real-DXC subprocess checks: default, macro + `-O1`, macro + `-O0`, invalid option, and warm cache hits. The previous fixture raced `dxil_cache_round_trip` in a parallel run. - `README.md`: document the override and cache behavior. **Tested** - Intel Core Ultra 7 265K, RTX 5070 Ti 16 GB / NVIDIA 616.64, Windows 11 build 26200, Rust 1.97.1 MSVC, SDK DXC 1.8.2502.11; debug build. - `cargo build --workspace`; `cargo test --workspace --no-fail-fast -- --test-threads=1 --nocapture`: 688 passed, 0 failed, 41 ignored. - Four runtime skips: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64); `test_title_draws_with_a_root_signature_under_the_debug_layer`, `uploads_start_from_each_subresources_state` (missing debug layer). - CI path: `XCL_ADAPTER=warp`, `scripts/test.ps1 --skip test_title_runs_and_game_folder_is_untouched --nocapture`: 687 passed, 0 failed, 41 ignored; 88 runtime skips, one filtered e2e test. These skips are not GPU coverage. - The new regression fails on #591 with `invalid arguments reused a cached translation` and passes with this fix. - `scripts/test-native-stderr.tests.ps1`: passed under Windows PowerShell 5.1 and PowerShell 7. - Genuine `rustc` unused-variable fixtures through the runner on both shells: warnings preserved with exit 0 and one real test passed; `-D warnings` preserved the compiler error and propagated exit 1. **Regression run** main: not run on a retail title; none available. PR: not run on a retail title; none available. This remains a draft pending the required paired smoke runs. **Not tested** - Retail titles, AMD, and the missing debug-layer cases. - A completed four-thread hardware suite on this final head. Preliminary runs on main `508a0c7` and local `ba3d7ba` stalled at the same four GPU tests and were stopped; the hardware counts above are serial. **AI use** - Codex with `gpt-6.1-sol`: implementation, isolated regression fixture, review and local verification of the top commit. The dependency implementation is from #591.
Stacked on #591; part of #559. A cached translation can return DXIL before the argument-aware compiler cache is consulted. Bypass RAM and translated-file caches for XCL_DXC_ARGS and replace the process-wide environment test with an isolated real-DXC warm-cache regression.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:27:12 +00:00
Author
Owner

@⁠Anon64 on GitHub · 2026-11-24 07:01 UTC · original

Regression runs for this PR's head 920c380 and for its base main cb868b2, on a retail title (same title, 60 s each), made with scripts/smoke.ps1 (release, clean tree at each commit) and pasted unedited, for Regression run.

main:

xcl-smoke v1
commit: cb868b200517d7b11bbfcb0146bf0c787ce632b6
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1611 (PresentX 1611)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14564 MB

this PR:

xcl-smoke v1
commit: 920c3807df84c7b9cd9ab7be1ea0122c2199f02d
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1609 (PresentX 1609)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14559 MB

Tested

  • NVIDIA GeForce RTX 3060 12 GB (driver 581.80, wave32), Intel Core i9-14900KF, Windows 11 25H2 26200.9974, Rust 1.90.0

Not tested

  • the unit tests on this machine
  • XCL_DXC_ARGS itself: these runs leave it unset, so this is a regression check only

Report written with Claude Code (Claude Opus 5.5) from runs on this machine.

**@⁠Anon64** on GitHub · 2026-11-24 07:01 UTC · [original](https://github.com/xcl-dev/xcl/pull/613#issuecomment-7124532196) Regression runs for this PR's head `920c380` and for its base `main` `cb868b2`, on a retail title (same title, 60 s each), made with `scripts/smoke.ps1` (release, clean tree at each commit) and pasted unedited, for **Regression run**. main: ``` xcl-smoke v1 commit: cb868b200517d7b11bbfcb0146bf0c787ce632b6 gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1611 (PresentX 1611) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14564 MB ``` this PR: ``` xcl-smoke v1 commit: 920c3807df84c7b9cd9ab7be1ea0122c2199f02d gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1609 (PresentX 1609) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14559 MB ``` **Tested** - NVIDIA GeForce RTX 3060 12 GB (driver 581.80, wave32), Intel Core i9-14900KF, Windows 11 25H2 26200.9974, Rust 1.90.0 **Not tested** - the unit tests on this machine - `XCL_DXC_ARGS` itself: these runs leave it unset, so this is a regression check only Report written with Claude Code (Claude Opus 5.5) from runs on this machine.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 12:55 UTC · original

Verification on RTX 3060 Ti (Windows 11): merge conflict with current main — needs a rebase before it can be tested.

**@⁠DavidM1911** on GitHub · 2026-11-25 12:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/613#issuecomment-7163051752) Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** — needs a rebase before it can be tested.
This pull request has changes conflicting with the target branch.
  • README.md
  • crates/xcl/src/gpu/recomp/pso.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/613/head:github-bot/gh-613'
git switch 'github-bot/gh-613'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-613'
git switch 'github-bot/gh-613'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-613'
git switch 'github-bot/gh-613'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-613'
git switch 'main'
git merge --squash 'github-bot/gh-613'
git switch 'main'
git merge --ff-only 'github-bot/gh-613'
git switch 'main'
git merge 'github-bot/gh-613'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.