Skip to content

Recompiler: honor DXC overrides with warm translation caches - #613

Draft
mjnhbg3 wants to merge 2 commits into
xcl-dev:mainfrom
mjnhbg3:codex/dxc-warm-cache-arguments
Draft

mjnhbg3 wants to merge 2 commits into
xcl-dev:mainfrom
mjnhbg3:codex/dxc-warm-cache-arguments

Conversation

@mjnhbg3

@mjnhbg3 mjnhbg3 commented Nov 24, 2026

Copy link
Copy Markdown

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 dxc: hash arguments into the DXIL cache key and honor XCL_DXC_ARGS (#559) #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

Ivankiosan and others added 2 commits November 23, 2026 21:26
Stacked on xcl-dev#591; part of xcl-dev#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.
@Anon64

Anon64 commented Nov 24, 2026

Copy link
Copy Markdown

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.

@DavidM1911

Copy link
Copy Markdown
Contributor

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

@CalvyPZ CalvyPZ added the duplicate This issue or pull request already exists label Nov 25, 2026
@CalvyPZ CalvyPZ closed this Nov 25, 2026
@CalvyPZ CalvyPZ reopened this Nov 25, 2026
@CalvyPZ CalvyPZ removed the duplicate This issue or pull request already exists label Nov 25, 2026
@Prime1997 Prime1997 mentioned this pull request Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants