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)
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
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).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.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.Regression run
Not run: no unpacked retail title available. The required main/head smoke pair is still missing; this is draft material and cannot pass the runtime PR description gate yet.
Not tested
AI use
This PR was created with AI assistance from OpenAI Codex (gpt-6-astra).