Repository navigation
D3D12.X: do not borrow title memory in texture workers - #2849
guinpereira wants to merge 1 commit into
Conversation
|
Independent Wine verification of production head Environment: Linux, Wine 11.0, Rust 1.98.1, Windows MSVC target, 16 GiB host RAM; 9 GiB memory / 512 MiB swap cgroup limits, 180 s timeout, one test thread. RTX 4060 Laptop host, but these are CPU/Win32 memory tests, not GPU rendering. The installed vkd3d stack is diagnostic-relaxed; no native-Windows or stock-driver certification is implied. Production code unchanged. Two local test-only strengthenings:
The API adaptation is simply: let bytes = title_bytes(base, PAGES * PAGE);
std::hint::black_box(content_hash(&bytes));
assert!(bytes.chunks(4096).enumerate().all(|(k, c)| {
let n = c.iter().position(|&x| x != tag(k)).unwrap_or(c.len());
c[n..].iter().all(|&x| x == 0)
}));The local fixture additionally uses a scoped thread and a stop-on-drop guard to stop the mutator on assertion failure. It requires a nonzero concurrent-decommit count and successful decommit/recommit calls. No production hooks or mocked memory calls. Suggested changes before merge: rename the existing test/doc comment (it now requires copying outside UMA, not in-place use whenever readable), and retain a source-release/concurrent-decommit regression. The existing static byte-equality test alone does not exercise the lifetime defect from #2841. Performance/RAM limitation: No matched-parent race run: deliberately reproducing the known worker access violation is not needed for this verification. No title launch, Game Init watchdog fix claim, or gameplay/OOM claim. Local evidence: |
|
Independent test report under Wine/Proton (not native Windows) for head Tested
(Counts are from the last
The test change only switches the existing assertion from Not tested
AI use
|
Relates to #2841.
Copies title bytes page by page instead of borrowing the range, so a worker cannot fault if the title decommits pages between the readability check and the detile copy.
What is in it
crates/xcl/src/hle/d3d12x/title_textures.rs: page-by-page copy instead of borrowing the title range.Tested
cargo test -p xcl --lib -- --test-threads=4: 1315 passed, 4 failed (GPU OOM in dxil fuzz tests, environment), 27 ignored.cargo build -p xcl: clean.Regression run
Reference run on the author's local main (05adb5a). A run on ivall/xcl main and on this PR's head commit is still pending (cold shader cache crashes the title's startup precompile on this machine).
Not tested
AI use
OpenCode, Beam Free - drafted the change; smoke run and review by the author.