Repository navigation
Conversation
|
Native Windows SATA validation for #2864 Clean PR head Tested
cargo test --offline --locked -j 1 -p xcl --lib -- --exact hle::d3d12x::list_x::tests::mid_list_write64_wait64_split_avoids_cycle_and_reuses_spares hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory --test-threads=4 --nocaptureReview observation By inspection, Not tested Retail playback or smoke, sustained SATA throughput, warm cache hits through the file-request queue, Windows release builds, and the full-workspace or full-library scheduling conditions from the Wine report. AI use Codex GPT-6.2 inspected the source and fixtures, ran the tests, checked the stored synthetic output, and drafted this report. |
A title streams the same compressed data again and again, in one run and in every later one, and XCL decodes it on the CPU each time (zlib, then BCPack). With XCL_DSTORAGE_CACHE=<folder> the unpacked bytes of a decoded file request are kept in the folder and read back the next time the same request comes: same file (path, size, modification time), offset, source size and decoding. One store per source file (an append-only data file and an index of fixed records, each with the entry's Adler-32); a record without all its bytes, a cut record or bytes that do not match their checksum are not used. New entries are written by a thread of their own (at most 256 MiB queued), so a request never waits for the disk. No eviction: entries stop once the folder holds XCL_DSTORAGE_CACHE_MB (default 32,768). report.json counts hits and stored entries. XCL_DSTORAGE_CACHE_VERIFY=0 skips the check on reads. Assisted-by: Claude Code (Claude Opus 5.5)
aea330e to
723f5a1
Compare
|
@razormontana thanks for the Windows run and the review. You're right about One request, if you have the time: the PR can't be merged without .\scripts\smoke.ps1 -Game <title folder> -StartupTimeoutSeconds <enough for the shader preparation>
The same title and time for both. It would also be useful to run the PR's head twice more with On Linux/Wine, the same script on AI-assisted. Claude Code, Claude Opus 5.5 made the fix and the test and wrote this reply. |
A title streams the same compressed data again and again, within one run and in every later one, and XCL decodes it on the CPU each time (zlib, then BCPack). With
XCL_DSTORAGE_CACHE=<folder>, XCL keeps the unpacked bytes of each decoded file request in that folder and reads them back the next time the same request comes. Off by default. Part of #2863.A request counts as the same when it names the same file (path, size, modification time), the same offset and source size, and the same decoding (zlib and BCPack bits, intermediate and destination sizes). Requests from memory sources and plain copies are not kept. A request on a closed file fails with
E_FILE_HANDLEas before, kept bytes or not.What is in it
crates/xcl/src/hle/dstorage/unpack_cache.rs(new):bad_entries).XCL_DSTORAGE_CACHE_MB(default 32,768).crates/xcl/src/hle/dstorage.rs:executeasks the cache before reading and decoding a file request, and gives it the result after.FileInnerkeeps the file's store. A closed file gets no cache entry (test:a_closed_file_is_not_answered_from_the_unpack_cache).report.json→dstorage.unpack_cachecounts hits, stored entries, entries not stored (full or busy) and bad entries.README.md: the three variables.598 changed lines, about 225 of them unit tests. The cache cannot be split from its use in
executeand still be testable in a run.Tested
NVIDIA (32-lane waves), driver 595.99.02, Ryzen 5 9600X. Linux (Ubuntu 24.04) with Wine 11.21 + vkd3d-proton (dxil-spirv
694cc67), not Windows. Release build forx86_64-pc-windows-gnu, Rust 1.100.0.cargo test -p xcl --lib --release -- --test-threads=4(the test binary under Wine, with the relaxed vkd3d-proton from Linux (Wine + vkd3d-proton): a retail game reaches whatmainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #175) onaea330e1, this PR's first head (before theClosefix): 1,312 passed, 12 failed, 27 ignored. 25SKIPPED, mostlyno wave64.main8b957bechere: 8 test-data and validator cases ingpu::rdna2,gpu::dxil,gpu::recomp, plusbcpack::tests::fixtures_decode_to_their_lanesanddevice_x::tests::gpu_promoted_uav_clear_values_pass_create_committed_resource.list_x::tests::mid_list_write64_wait64_split_avoids_cycle_and_reuses_sparesandvram::tests::d32s8_targets_take_their_own_size_of_video_memory, pass when run alone.main's own run hung twice invramGPU tests after a GPU fault (1,305 passed and the same 10 failed before that). So I have no completemaincount to compare with.723f5a19):hle::dstorage::38 passed, 0 failed (unpack_cache6 of them). TheClosetest fails without its fix.A retail title, run on
mainb49be18plus this commit, because8b957bec's startup shader preparation (xcl run: prepare shaders in the game window before title execution #2555) takes longer than a run here. The DirectStorage code is identical between the two. A local counter timed the decode stages. Each run ends at ~95 s inmain's own crash (XG CopyFromSubresource: retail title passes one argument more → memcpy AV in copy_from; then null write at game+0x23cf683 at end of loading #662; the same with the cache off).XCL_DSTORAGE_CACHE_VERIFY=0One run per cell. "Request time" sums the time requests spent on the queue's worker thread (read, decode, cache, copy). The first run costs about the same as no cache, since the writes go to a thread of their own. The read check costs 1.2–2.6 s per 3.8–4.9 GB read back. No entry failed it.
Frames presented were about the same in all runs (title screens at 30 fps). No run had a device removal before the crash. Cache folder after one run: about 4–5 GB per console mode.
Regression run
main8b957becand this head will follow (a Windows run was asked for in the comments; on Linux, the shader preparation in8b957bechas to finish first).mainb49be18, with and without this commit and with the cache empty and full: four clean 60 s runs (1,573–1,612 frames, 60 presents per 2 s, no removals or crashes; Wine reports no commit). The full cache answered all 6,507 requests.Not tested
maincrashes before it here).XCL_DSTORAGE_PARALLEL_DECOMPRESStogether with the cache: its requests do not use the cache.AI use
🤖 Generated with Claude Code
https://claude.ai/code/session_01H6JBZXaFw99FcnmUV1mPWj
AI-assisted.