Repository navigation
Conversation
Move a validated unsplit payload to the start of its read buffer and retain that allocation. Keep split entries on the existing copy path so the whole shader does not retain the combined file allocation. Cover allocation ownership, sampler offsets, malformed files and split round trips.
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! — Devin |
After validating an unsplit translated-shader cache entry, move its payload to the front of the file buffer and retain that allocation instead of making a second payload-sized copy. Split entries keep the existing copy path so they do not retain all piece bytes. Preserve cache-I/O stall attribution and add ownership, sampler-offset, malformed-entry, and split round-trip coverage. The upstream extracted-loader benchmark reported 27-35% faster 4-16 MiB warm-cache loads with roughly half the incremental heap peak. GNU Windows-target cargo check passed. Windows/MSVC, GPU tests, and retail smoke were not run on this host. Adapted from PR xcl-dev#2594. Assisted-by: OpenAI Codex (gpt-6-astra) Assisted-by: Codex (GPT-5.6-sol)
|
Reviewed exact head
The same change appears in mega-PR #2778 as Not tested
AI use
|
|
Tested
Regression run Both release builds completed from clean worktrees. The smoke runs were blocked because no locally owned unpacked title was available. No Not tested
AI use
|
|
Paired 60 s smoke on RTX 5070 Ti (Windows 11): Tested
Not tested
AI use
|
After validating an unsplit translated-shader cache entry, move its payload to the front of the file buffer and retain that allocation instead of making a second payload-sized copy. Split entries keep the existing copy path so they do not retain all piece bytes. Preserve cache-I/O stall attribution and add ownership, sampler-offset, malformed-entry, and split round-trip coverage. The upstream extracted-loader benchmark reported 27-35% faster 4-16 MiB warm-cache loads with roughly half the incremental heap peak. GNU Windows-target cargo check passed. Windows/MSVC, GPU tests, and retail smoke were not run on this host. Adapted from PR xcl-dev#2594. Assisted-by: OpenAI Codex (gpt-6-astra) Assisted-by: Codex (GPT-5.6-sol)
After validating an unsplit translated-shader cache entry, move its payload to the front of the file buffer and retain that allocation instead of making a second payload-sized copy. Split entries keep the existing copy path so they do not retain all piece bytes. Preserve cache-I/O stall attribution and add ownership, sampler-offset, malformed-entry, and split round-trip coverage. The upstream extracted-loader benchmark reported 27-35% faster 4-16 MiB warm-cache loads with roughly half the incremental heap peak. GNU Windows-target cargo check passed. Windows/MSVC, GPU tests, and retail smoke were not run on this host. Adapted from PR xcl-dev#2594. Assisted-by: OpenAI Codex (gpt-6-astra) Assisted-by: Codex (GPT-5.6-sol)
After validating an unsplit translated-shader cache entry, move its payload to the front of the file buffer and retain that allocation instead of making a second payload-sized copy. Split entries keep the existing copy path so they do not retain all piece bytes. Preserve cache-I/O stall attribution and add ownership, sampler-offset, malformed-entry, and split round-trip coverage. The upstream extracted-loader benchmark reported 27-35% faster 4-16 MiB warm-cache loads with roughly half the incremental heap peak. GNU Windows-target cargo check passed. Windows/MSVC, GPU tests, and retail smoke were not run on this host. Adapted from PR xcl-dev#2594. Assisted-by: OpenAI Codex (gpt-6-astra) Assisted-by: Codex (GPT-5.6-sol) Assisted-by: Codex (GPT-5.6-sol)
Loading a translated shader cache entry currently allocates a second payload-sized buffer after reading the file. Reuse the validated file buffer for entries without split pieces; split entries retain their existing allocation and validation behavior.
What is in it
pso.rs, with ownership/round-trip and malformed-entry tests; document it in README.Tested
Ryzen 7 8840HS, Radeon 780M (32.0.31033.3), Windows 11 Pro 26300, Rust 1.100.0; debug workspace, optimized standalone benchmark.
cargo build --workspace --jobs 2: passed.cargo test --workspace --no-fail-fast --jobs 2 -- --test-threads=4 --nocapture: 1436 passed, 1 failed, 47 ignored; 11 SKIPPED subcases (six unsupported f16/conversion cases, one driver-cache test requiring Developer Mode, three missing-debug-layer cases, one unavailable heap-window case).The sole failure is
gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, seed 722; reproduced before this optimization on base08db802. No test was disabled to conceal it. The final branch is based onb49be18.Buffer-ownership test fails before the optimization and passes after it. The standalone old/new loader comparison agrees on 2,664 valid/malformed inputs.
Two warm-file-cache runs of the extracted production loader (including validation), synthetic structurally valid containers,
rustc -O, alternating order, nine-round medians: 4-16 MiB entries loaded 27-35% faster, with approximately half the incremental heap peak. This does not measure game loading or FPS.Independent report by mokkamokacaffe, exact PR head versus
b49be183: GTX 1060 6GB (582.66), i7-6700, Windows 10 Pro 19045.7846, Rust 1.100.0 MSVC. Debug and release builds passed. Full workspace with--no-fail-fast -- --test-threads=4: PR 1,434 passed / 3 failed / 47 ignored; main 1,432 passed / 3 failed / 47 ignored; 359 explicit SKIPPED messages on each. All three failures reproduced on main with matching errors.Independent report by tiagonleal, exact PR head:
cargo test -p xcl --lib translated_cache -- --nocapture --test-threads=1: 6 passed / 0 failed / 0 ignored.cargo test -p xcl --lib gpu::recomp::pso -- --nocapture --test-threads=4: 29 passed / 0 failed / 1 ignored, no SKIPPED lines. Hardware and paired retail smoke below. These are contributor-reported results, separate from the author's local tests above.Regression run
Paired runs reported by tiagonleal on 2026-11-26. Both commits built separately in clean detached worktrees, release; same title
9cc6a39e, 60 seconds each, main first, default settings. RTX 5070 Ti 16 GB (32.0.16.1742), Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro 26300, Rust 1.100.0 MSVC; NVIDIA xcl.exe shader-heap profile 1024 MB. Reported command:scripts/smoke.ps1 -Seconds 60 -Title 9cc6a39e. Neither tested revision includes the later #2555 startup preparation step.Main (
b49be183):PR head (
ae921b40):Original result blocks copied unchanged from the linked contributor report. One run per revision, no world load; the 102-frame difference is not evidence of a performance improvement.
Not tested
AI use
This PR was created with AI assistance from OpenAI Codex (gpt-6-astra).