Repository navigation
D3D12.X: title texture reads outside the coherent window use the safe copy #751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
grahamster2
wants to merge
1
commit into
xcl-dev:main
Choose a base branch
from
grahamster2:title-bytes-decommit-race
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+196
−36
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wine 11 guard-page regression in the one-copy fast path, with a small correction tested locally.
I ported
59f8e7c992dda0044d18a660aad86fae1d94185funchanged onto my existing XCL integration (base06c9f5505f63f10c5ec49ef932d75b2c28177324, including #867/#1395/#1069/#1916/#615/#495/#1182/#2177). This is not a clean-head test. Host: Linux 6.17.0-40-generic, Wine 11.0, i7-13620H, RTX 4060 Laptop 8 GB, 16 GB RAM; Rust 1.98.1 MSVC cross-build. These focused tests are CPU memory tests, not GPU coverage.Before this PR: a title-loading run crashed with
0xc0000005inucrtbase.dll. Its release PDB resolves the stack toChain::detile_level(copy_from_slice) ←title_textures::subresources← asubresources_onworker. Last successful GPU telemetry was 6,388 MiB. This matches the already reported intermittent fault; it is not an OOM diagnosis.With this PR, before the suggestion below:
cargo test -p xcl --lib --target x86_64-pc-windows-msvc title_bytes -- --test-threads=1 --nocaptureunder the Wine runner produced 2 passed, 1 failed.title_bytes_leave_guard_pages_alonefailed atguard and no-access pages read as zeros; the copy/coherent-window and concurrent-decommit tests passed.XCL_UMA_MB=256 XCL_COHERENT_MB=64were set, and the fixture reported a 256 MiB coherent window.Wine 11's
NtReadVirtualMemoryimplements the current-process pseudo-handle path asmemmoveinside exception handling. The unconditional read can therefore touch a guard before the fallback checks protections. Walking regions first on Wine avoids that; the existingutil::under_wine()predicate is already present at this PR's head. Native Windows keeps the fast path.With this suggestion, tests unchanged: the
title_bytesfilter passed 3/3, including guard preservation; theread_committedfilter passed 2/2. No ignored/skipped tests; the coherent-window branch was exercised. The release build passed. I did not repeat the failing unmodified run or run the full suite. Native Windows and read-copy performance were not measured.One title follow-up with this correction: last resource sample at 111.54 s, GPU 7,561 MiB; the external 7,500 MiB guard then stopped the launch (exit 143). Minimum available system RAM was 2,725.6 MiB and free disk stayed above 13.29 GiB. The log contains no unhandled-exception/device-loss/OOM marker; unrelated DXGI display diagnostics remain. Last captured frames are loading artwork, not gameplay. This short, resource-stopped run cannot establish that the intermittent title fault is eliminated or that 30 fps gameplay works.
AI assistance: omp / openai-codex/gpt-6-astra investigated the recorded crash, ported the existing PR, wrote and tested this small Wine correction, and drafted/submitted this report at the repository owner's request.