Repository navigation
dxc: hash arguments into the DXIL cache key and honor XCL_DXC_ARGS (#559) - #591
Ivankiosan wants to merge 1 commit into
Conversation
|
NVIDIA run, since Not tested lists NVIDIA GPUs. Tested
Not tested
AI use
|
|
Test run of Tested
Review: An empty argument list keeps the old digest, so existing caches stay valid. One thing in the tests: Not tested: no retail title or regression run (I have no unpacked game), no Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code. |
|
Thanks for wiring Two things about
Suggestion: split parsing into a pure AI use: Claude Code (Claude Opus 5.5) read the diff; not run. Checked by the user before posting. |
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.
Empirical test report (6c68cc7)Hardware / environment
Commands and results
Observed behavior
Not tested Full GPU workspace suite, game smoke runs, and real DXC compilation with overridden flags. The flag-specific tests used synthetic DXIL. AI use Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr591-focused.log and published. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
gut0to
left a comment
There was a problem hiding this comment.
AI-assisted review (OpenAI GPT-6); I inspected the current diff and tests. I did not run tests or the game.
| fn env_dxc_args() -> Vec<String> { | ||
| std::env::var("XCL_DXC_ARGS") | ||
| .ok() | ||
| .map(|v| v.split_whitespace().map(String::from).collect()) |
There was a problem hiding this comment.
Could XCL_DXC_ARGS use Windows command-line argument parsing, or document the supported quoting format and cover it with a test? With -I "C:\Program Files\DXC Includes", split_whitespace() returns tokens with the quotes attached, so DXC receives a truncated include path and extra arguments. This prevents passing a normal Windows include directory through the new setting. AI-assisted review (OpenAI GPT-6); I inspected the changed argument parsing and tests, and did not run tests or the game.
Hash explicit and environment DXC arguments into the DXIL disk cache key, and honor
XCL_DXC_ARGSon the cached compilation path. Fixes #559.Previously,
cache_key_for_toolchainonly hashed the package version, toolchain identity, profile, entry, and source text, omitting any compiler arguments (extra: &[&str]). Furthermore,compile_cached_inhardcoded an empty argument list&[], ignoringXCL_DXC_ARGS. This caused different optimization levels or custom arguments to collide on the same cache key or be dropped entirely.This change:
cache_key_for_toolchainandcache_keyto append and hash the argument list into the FNV-1a digest. Empty argument lists keep the digest unchanged.compile_cached_argsto allow callers to pass explicit arguments through the cache.XCL_DXC_ARGSthroughcompile_cached_inso environment-specified arguments reach both the cache key and the compiler.What is in it
crates/xcl/src/gpu/recomp/dxc.rs: hash arguments intocache_key_for_toolchain, exposecompile_cached_args, consultXCL_DXC_ARGSincompile_cached_in, and add unit tests verifying key separation and environment variable handlingTested
cargo test --workspace -- --test-threads=4: 678 passed, 0 failed, 37 ignoredSKIPPEDGPU tests on adapter: nonegame_scarlett_master.exe)Regression run
Not tested
AI use