Add opt-in Windows DirectStorage staging for compressed reads #2157

Merged
nawnie merged 1 commit from upstream-pr/2157 into main 2026-11-30 14:12:03 +00:00
nawnie commented 2026-11-29 10:01:54 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nawnie on 2026-11-29T10:01:54Z.


This adds an opt-in Windows DirectStorage backend for compressed file reads into owned staging buffers. Set VICTORY_DSTORAGE_IO=windows to enable it. Raw guest destinations continue through the existing Win32 reader. A missing bridge, saturated queue, oversized request, or native failure falls back to Win32. The upstream scratch-buffer pool and its budget remain in use.

Validation

  • On the preceding gameplay build with this bridge, the final complete sample recorded 259,066 successful native reads and 1,223,686 busy fallbacks, with zero native timeouts, aborts, or other errors. This confirms live use of the backend and shows where the four-slot default falls back most often.
  • In a synthetic test of 1,200 byte-checked 64 KiB reads across 12 threads, switching the bridge from polling to event completion reduced median batch time from 209 ms to 31 ms across three runs per version. Both versions completed 400 native reads and fell back to Win32 for 800 busy requests per run. This measures the completion mechanism in the synthetic workload. Gameplay frame time was outside the benchmark.
  • On this PR branch, 29 DirectStorage tests passed, plus the native EOF/fallback, concurrent byte-parity, compressed-source routing, and synthetic benchmark tests with the Windows runtime DLLs present. A controlled gameplay A/B on this branch remains open.

The PR contains source and build instructions. I can share a runner-only test build, diagnostics, or reproduction details if that helps with review.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5549645563 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2157). Originally posted by [nawnie](https://github.com/nawnie) on 2026-11-29T10:01:54Z. --- This adds an opt-in Windows DirectStorage backend for compressed file reads into owned staging buffers. Set `VICTORY_DSTORAGE_IO=windows` to enable it. Raw guest destinations continue through the existing Win32 reader. A missing bridge, saturated queue, oversized request, or native failure falls back to Win32. The upstream scratch-buffer pool and its budget remain in use. ### Validation - On the preceding gameplay build with this bridge, the final complete sample recorded **259,066 successful native reads** and **1,223,686 busy fallbacks**, with zero native timeouts, aborts, or other errors. This confirms live use of the backend and shows where the four-slot default falls back most often. - In a synthetic test of 1,200 byte-checked 64 KiB reads across 12 threads, switching the bridge from polling to event completion reduced median batch time from **209 ms to 31 ms** across three runs per version. Both versions completed 400 native reads and fell back to Win32 for 800 busy requests per run. This measures the completion mechanism in the synthetic workload. Gameplay frame time was outside the benchmark. - On this PR branch, 29 DirectStorage tests passed, plus the native EOF/fallback, concurrent byte-parity, compressed-source routing, and synthetic benchmark tests with the Windows runtime DLLs present. A controlled gameplay A/B on this branch remains open. The PR contains source and build instructions. I can share a runner-only test build, diagnostics, or reproduction details if that helps with review.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!2157
No description provided.