Repository navigation
Conversation
) readback_ranges copies a GPU-written range into the CPU view and then sync_sent_range marked every 64-byte chunk the range touched as sent, hashing the chunk's whole content. The bytes of such a chunk the readback did not write may be CPU writes that were never uploaded; hashing them as sent made before_execute skip them for good - the GPU never had them, and the CPU's view kept them (until the next readback put the GPU's back). Mark a chunk sent only when the range covers it whole; a partly covered one gets a hash it cannot have, so the next submit uploads it. Assisted-by: OpenCode (Gemini 4 Neon)
|
Independent AMD check on Windows, RX 9070 XT. I cherry-picked #1740 head
AI-assisted with Codex for setup, execution, and reporting. |
readback_ranges copies a GPU-written range into the CPU view and then sync_sent_range marked every 64-byte chunk the range touched as sent, hashing the chunk's whole content. The bytes of such a chunk the readback did not write may be CPU writes that were never uploaded; hashing them as sent made before_execute skip them for good - the GPU never had them, and the CPU's view kept them (until the next readback put the GPU's back). Mark a chunk sent only when the range covers it whole; a partly covered one gets a hash it cannot have, so the next submit uploads it. Assisted-by: OpenCode (Gemini 4 Neon)
36371bd to
294f565
Compare
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
PR #1740 compatibility verificationTested head Environment Tested
Failures and skips
Not tested AI use |
|
Independent Windows run on 294f565. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, debug.
I extended
|
|
Linux (Wine + vkd3d-proton) + NVIDIA, the title, 100 s runs: the case this fixes did not come up here. In 4 runs of Setup:
Not tested: the rest of the suite; Windows; AMD and Intel; runs past 100 s. AI use: Claude Code (Claude Opus 5.5) read the change, wrote the counter, ran the title and the tests, and wrote this comment. Posted without review by a person: the account owner was away and reads replies later. |
Addresses
XCL-BT-033from #1488.readback_rangescopies a GPU-written range into the CPU view and thensync_sent_rangemarked every 64-byte chunk the range touched as sent, hashing the chunk's whole content. The bytes of such a chunk that the readback did not write may be CPU writes that were never uploaded — hashing them as sent made the nextbefore_executeskip the chunk for good: the GPU never had those bytes, and the CPU's view kept them until a later readback replaced them with the GPU's.This marks a chunk sent only when the range covers it whole; a partly covered chunk is given a hash it cannot have, so the next submit uploads it (the GPU end gets the CPU's view, which now also holds the read-back bytes).
What is in it
crates/xcl/src/hle/d3d12x/sparse.rs:mark_read_back()does the per-chunk rule;State::sync_sent_rangecalls it; add testa_partly_read_back_chunk_is_uploaded_again(a 4-byte readback inside a chunk with a 4-byte CPU write: the chunk must be uploaded; a range covering chunks whole must not be; the page's last chunk too). Fails onmainwithleft: [], right: [(0, 64)]— the CPU's write was dropped.Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1).\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 960 passed, 0 failed, 43 ignored (SKIPPED: the wave64 / direct-DXIL per-lane tests that need 64-lane hardware or a semantics mode this adapter refuses,no heap windows, andcannot disable the driver cache (Windows Developer Mode is required)). The one#[ignore]d test in the module (early_commit_timing) is pre-existing.cargo test -p xcl --lib sparse: 18 passed, 0 failed, 1 ignoredRegression run
main (
c4d37be, clean tree, no local changes):PR (
294f565, clean tree, no local changes):Not tested
before_executeand a GPU readback of the same cacheline (the test drivesmark_read_backdirectly)AI use
XCL-BT-033againstreadback_ranges/scan_page, wrote the fix and test (and confirmed it fails without the fix), rebased ontoc4d37be, ran the test suite andscripts/smoke.ps1regression runs with Scripts: smoke blocks print the game folder's name #677's title hashing, and drafted this PR description.