Skip to content

DirectStorage: resolve GPU-view addresses to their paired CPU view - #979

Open
n-romanovich wants to merge 1 commit into
xcl-dev:mainfrom
n-romanovich:dstorage/gpu-view-mirrors
Open

n-romanovich wants to merge 1 commit into
xcl-dev:mainfrom
n-romanovich:dstorage/gpu-view-mirrors

Conversation

@n-romanovich

@n-romanovich n-romanovich commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

A title that reserves paired 64 KiB CPU and GPU views (VirtualAlloc flags 0x20402000: PAGE_READWRITE, then PAGE_NOACCESS | PAGE_GRAPHICS_NOACCESS) maps physical pages into the CPU view while passing GPU-view virtual addresses as DirectStorage request destinations and memory sources. Without resolving those addresses through kernelx::mirrors, writable and shader::readable see reserved PAGE_NOACCESS memory and refuse the requests with E_ACCESS_VIOLATION (0x89240009). Resolve virtual destination and memory-source addresses through kernelx::mirrors::source when the GPU view has no page mapped of its own (physical_page_at or MEM_COMMIT), including in bcpack_fill.

What is in it

  • crates/xcl/src/hle/kernelx.rs: add mirrors::overlaps_gpu_view and mirrors::resolve for GPU-view reservations without a page mapped of their own (physical_page_at or MEM_COMMIT).
  • crates/xcl/src/hle/dstorage.rs: add per-64 KiB-page for_each_mirror_run / mirror_writable / write_virtual_destination / read_virtual_source so multi-page and mixed-view spans, execute (including snapshot_page_array and late zero-entry re-reads), and bcpack_fill resolve GPU-view addresses and re-check/write via NtWriteVirtualMemory.
  • crates/xcl/src/hle/dstorage/parallel.rs: route file-backed zlib parallel decompression checks and writes through mirror_writable and write_virtual_destination.
  • gpu_view_addresses_read_and_write_their_paired_cpu_view: tests zlib memory-source/destination mirror resolution, XCL_DSTORAGE_BCPACK_FILL (mode 2 / BC2), direct physical-page mappings + cross-page mixed-view reads (with runner::skip_test if unavailable), and file-backed zlib via parallel.rs.

Tested
Hardware: Windows 11 x64, NVIDIA GeForce RTX 5060 Ti.

  • cargo test -p xcl --lib dstorage -- --test-threads=4: 30 passed; 0 failed; 0 ignored
  • cargo test --workspace -- --test-threads=4: 892 passed; 0 failed; 42 ignored
    • SKIPPED: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware (no wave64), shaders::tests::pso_measurement_compiles_an_exact_synthetic_record (Windows Developer Mode is required), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows)

Regression run

Main (5478c4a7c1ae5adba127c8d27018d7fdbf3a8725):

xcl-smoke v1
commit: 5478c4a7c1ae5adba127c8d27018d7fdbf3a8725
gpu: NVIDIA GeForce RTX 5060 Ti
title: FILES
seconds: 60
exit: 0x0
frames shown: 1541 (PresentX 1541)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15701 MB

PR (063c281f879e53fb081fc335fcaaefd573f30d28):

xcl-smoke v1
commit: 063c281f879e53fb081fc335fcaaefd573f30d28
gpu: NVIDIA GeForce RTX 5060 Ti
title: FILES
seconds: 60
exit: 0x0
frames shown: 1532 (PresentX 1532)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14704 MB

Not tested

  • macOS / Linux (crate targets Windows only).
  • AMD / wave64-capable GPU.

AI use

  • Antigravity (model name not provided): implemented the fix and unit tests, ran the test suite and smoke.ps1 runs.

@raylitebull

Copy link
Copy Markdown
Member

Code/CI review only (not independently runtime-tested by me): clean merge and PR description green (just awaiting CI workflow approval). Cleanly resolves DirectStorage GPU-view addresses to their paired CPU view. Recommend approving CI and merging, @ivall.

@Filip722

Filip722 commented Nov 24, 2026 •

Copy link
Copy Markdown

I tested b8d21b0 on XCL main 47efa2e plus #640, #793 and #820, using an RTX 5060 Laptop GPU (8 GB, driver 615.78.08) on Bazzite 44 with Proton Experimental 11.0-20261112, the vkd3d-proton 4522cc1 compatibility build from #257 and the #775 dxil-spirv pin.

  • Windows MSVC release build under Proton, hle::dstorage::tests --test-threads=1 (15 tests). Fourteen passed. gpu_view_addresses_read_and_write_their_paired_cpu_view passed the zlib source/destination checks and failed at the BC7 debug-fill assertion. On this main, that BC7 request reaches the decoder, which rejects the malformed stream with E_DECOMPRESSION. The solid-fill branch runs on an enqueue refusal.
  • Offline Series X run with XCL_COHERENT_MB=512, XCL_PAGE_BUDGET_MB=2048, XCL_PSO_WAIT_MS=50 and XCL_BIG_COMPILES=1. Both builds showed unlit silhouettes during loading and exited after a vkAllocateMemory access violation. The run with this PR recorded zero storage failures through 39,196 executed requests. The comparison recorded 44 failures (0x89240009 first on a file request) by 45,904 requests and crashed after 59,883 sampled requests. The patched run ended before it reached a comparable request count, so the retail result is inconclusive for this fix.

AI assistance by OpenAI Codex for the build, test and report. Model GPT-6.2-Sol (high).

Visual follow-up: a later run rendered the full loading artwork. The earlier silhouette frames did not establish entry into the playable world.

Focused retest: changing the debug-fill subcase to BC2 exercises the enqueue refusal on current main. With that test-only adjustment, the same hle::dstorage::tests --test-threads=1 suite reported 15 passed and 0 failed under Proton.

@SlopTart

Copy link
Copy Markdown

Linux / AMD RDNA3 run: the new GPU-view/CPU-view pairing test fails deterministically under Wine.

Merged state: head onto main (a027808 lane merge), clean merge, full suite 729 passed / 13 failed / 41 ignored: the known Wine-lane set from #42, this rig's mirror flake, and the xapu_connect_returns_oom... flake from my #943 footnote. The one that does not clear in isolation:

  • hle::dstorage::tests::gpu_view_addresses_read_and_write_their_paired_cpu_view - fails 2/2 isolated, panic at crates/xcl/src/hle/dstorage.rs:2603: after filling through the GPU view, the paired CPU view's 16-byte chunks don't match the source block (slice::from_raw_parts(fill_dst_cpu...).chunks(16).all(...) is false).

Diagnosis lead, not a verdict: on this rig all D3D12.X heaps come through vkd3d-proton's translated/host-visible path rather than real device-memory aliasing, so "resolve GPU-view address to its paired CPU view" has different coherence semantics here than on native Windows or NVIDIA's d3d12-on-Wine lanes. Either the test assumes console-style paired views that vkd3d-proton can't provide (then it should gate like #983's atomics skip), or the pairing code returns a stale/duplicate CPU address on the translated path. Worth one isolated run on a Windows lane to split those two.

Everything else dstorage-related is green in-lane (the batch's multi_stage... and requests_are_checked... tests included).

Counts only, no game data.

Not tested: retail titles (none here), Windows, RDNA4.

Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross x86_64-pc-windows-gnu, XCL_NETWORK=0, release profile, --test-threads=4. My Linux rows: #42 / #718.

AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

@pvfreis pvfreis left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of b8d21b0 against its merge base 077ce40, by reading the code; nothing was built or run here. The runtime change is small and I found no crash or memory-safety defect in it: the resolved address goes through the same writable / readable checks as before, so the worst case is still a refused request. The problems are in the test, which no longer passes on today's main.

  1. CONFIRMED: the new test fails once the PR is on current main (crates/xcl/src/hle/dstorage.rs:2397-2409, request at :2404, assertion at :2408). The branch merges into main 47efa2e without a textual conflict, but main now unpacks BCPack BC7 (8cad517). There Request::check accepts mode 7 (can_decode), so the request is no longer refused at enqueue; it runs, the decoder rejects the 16 bytes of zlib data as a BC7 stream, and execute returns E_DECOMPRESSION. The solid fill is only done for an Entry::Refused from enqueue, so the status assertion passes and the fill assertion fails. The Proton report in this thread already says this. In the merged file that assertion is line 2603, the panic line of the Linux/RDNA3 report, so that failure has the same cause: it is not a property of Wine or vkd3d-proton, and the test needs no Wine skip. main's own fill test moved to BC2 for the same reason. Fix: rebase and use a mode without a decoder (2 << BCPACK_SHIFT, bcpack_fill_block(2)) in subcase 2. The smoke block and the counts then need a rerun on the new head.

Also against CONTRIBUTING: subcase 3 is skipped silently when there is no unified memory (dstorage.rs:2413), so on the GPU-less CI the "page mapped in the GPU view" branch of mirror_address is not exercised and nothing prints SKIPPED; AI use names the tool and model but not what it did; Tested gives whole-suite counts only for --test-threads=1. The CI check has not run on this head yet (only PR description is green). The Regression run blocks are present, on the merge base and on this head, and the description says plainly that the 30 s run does not reach the changed code.

Verdict: not ready to merge as it stands; the runtime change looks safe, but the test must be rebased onto the BCPack decoder (finding 1).

Review by Claude Code (written by Claude Fable 5.2, checked and edited with Claude Opus 5.5); each point checked by a person before posting.

@DavidM1911

Copy link
Copy Markdown
Contributor

Independent verification — the PR's own new test fails standalone on its head b480ae7 (which already contains a main merge), and identically after merging current main 384f7f7 locally.

Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug.

  • cargo test -p xcl --lib dstorage: 14 passed, 1 failed — gpu_view_addresses_read_and_write_their_paired_cpu_view.
  • Failure detail: the test's BCPack BC7 fill request fails with E_DECOMPRESSION (packed=16, dst=32 — "the stream ends early or is corrupt"), so fill_dst_cpu never receives the expected block and the chunks(16) == block assertion at dstorage.rs:2603 fails. The paired GPU→CPU view resolution itself looks right (the request reaches the queue with the resolved destination); the fixture stream appears too short for the destination size, or the test needs the bcpack decode path to accept it.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

@SlopTart

Copy link
Copy Markdown

Re-check on the updated head: re-merged b8d21b0 onto current main (lane merge 568cb1a) and gpu_view_addresses_read_and_write_their_paired_cpu_view still fails, same panic site dstorage.rs:2603 (chunks(16) comparison against the expected BC7 block), same as my comment above and same as the Windows reproduction from DavidM1911 (E_DECOMPRESSION on the BCPack fill, packed=16, dst=32).

So the failure survives the head move and now has three independent confirmations: this Wine/RADV rig, that Windows/NVIDIA rig, on both the old head and the post-main-merge head. It does not look rig-specific or Wine-specific anymore; the destination resolution reaching the queue looks fine on both reports, the decompression/fill step is where the stream dies.

Counts only, no game data.

Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross x86_64-pc-windows-gnu, XCL_NETWORK=0, release profile. My Linux rows: #42 / #718.

AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

@einfachama

Copy link
Copy Markdown
Contributor

Test report for #979 at b8d21b0, merged locally onto main 47efa2e (no conflicts), on my retail title's world load. Short version: on this title, #979 doesn't change the 0x89240009 failures. They come in both builds, at the same time in the load, from the same package files and in about the same numbers.

Setup

Results

run build failed requests first failure exit peak commit
1 main 44 70.2 s 0x0 26 886 MB
2 #979 70 70.3 s 0x887a0006 at 83.5 s 24 946 MB
3 #979 249 75.0 s 0x0 27 750 MB
4 main 754 73.5 s 0x0 27 830 MB
5 main 17 68.9 s 0x0 27 956 MB
6 #979 104 66.9 s 0x0 28 407 MB
7 #979 4 054 70.6 s 0x0 28 013 MB
8 main 346 68.1 s 0x0 28 345 MB

Not tested

  • Whether DirectStorage: resolve GPU-view addresses to their paired CPU view #979 fixes requests that really target GPU-view addresses in another title, or later in this one: none of the requests I can classify here are of that kind.
  • Past 100 s, AMD, other titles. The unit test (gpu_view_addresses_read_and_write_their_paired_cpu_view) and cargo test --workspace were not run on this merge.

AI use

  • Claude Code (Claude Opus 5.5) ran the builds and runs, counted the results from the logs and wrote this report; I checked it before posting.

@crastinator crastinator left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged onto current main, the new test fails. That isn't Wine: main has gained BCPack decoding since this PR's base. The test passes at the PR's own head.

Tested (head b8d21b0; base 077ce40 is 49 commits behind main 930e8b4)

  • AMD Radeon RX 6700 XT (RDNA2, gfx1031, RADV NAVI22, Mesa 26.3.1), Ryzen 7 5700X, Linux 7.3.5 (CachyOS)
  • Proton Experimental 11.0-20261112's Wine, vkd3d-proton v3.1 + #257's patch (-Db_ndebug=true, dxil-spirv 53aac418 from #775), DXVK v3.1.1-209 dxgi, DXC 1.9.2609.5, libopus 1.5.2, XCL_REQUIRE_GPU=wave64,mesh (0 SKIPPED)
  • cross-built for x86_64-pc-windows-msvc (clang-cl / lld-link, xwin SDK 10.0.26100), Rust 1.99.1, debug
  • At b8d21b0 itself: hle::dstorage::tests::gpu_view_addresses_read_and_write_their_paired_cpu_view passes 2/2.
  • Merged onto main 930e8b4 (no textual conflict): it fails 3/3 at dstorage.rs:2603, the fill check of step 2. The destination still holds the 0xCD the test wrote, and the log says BCPack BC7 stream (decode): the stream ends early or is corrupt (packed=16, dst=32); the request fails with E_DECOMPRESSION.
  • Cause: since 8cad517 ("DirectStorage: unpack BCPack BC1, BC3, BC4, BC5, BC6H and BC7 streams"), a BC7 request is no longer refused at EnqueueRequest. It is decoded and fails at execute time. On main, bcpack_fill only runs for Entry::Refused, so step 2 never fills.
  • Using a mode main still refuses, as main's own fill test does with mode 2, makes it pass 3/3 on the merged tree, and all 15 hle::dstorage tests pass:
    -                run(&request(SOURCE_MEMORY_BIT | 7 << BCPACK_SHIFT, fill_dst_gpu as u64, 32, gpu_src as u64, 0, 16), 1),
    +                run(&request(SOURCE_MEMORY_BIT | 2 << BCPACK_SHIFT, fill_dst_gpu as u64, 32, gpu_src as u64, 0, 16), 1),
    ...
    -            let block = bcpack_fill_block(7).unwrap();
    +            let block = bcpack_fill_block(2).unwrap();
    That holds only while mode 2 stays undecoded on main. A rebase onto main would show the failure in this PR's own CI.
  • The rest of the suite with the PR merged: 743 passed, 9 failed, 41 ignored (main: 740 / 11 / 41, with the #718 flakes failing in that run). Apart from this test, nothing fails that passes on main.

Not tested

  • Anything that needs game files: no XCL_SAMPLE_* was set, so the tests that read them (about 66) pass without running.
  • Windows. The cause doesn't depend on the platform, but I haven't run it there. A retail title.

AI use

  • Claude Code (Claude Opus 5.5) merged, built and ran this and wrote the report; I checked the results.

Update: retested 8f7dc3a (rebased on main 4178e88; same RX 6700 XT / RADV 26.3.1 / Proton Experimental Wine; --test-threads=1, compared per test with main 4178e88 on the same build)

  • With the PR merged: 878 passed, 14 failed, 42 ignored, against main's 877 / 14 / 42. The extra pass is this PR's test, and no test fails here that passes on main. No hle::dstorage test fails, and gpu_view_addresses_read_and_write_their_paired_cpu_view passes (the BC2 subcase included). The 14 are the Wine-lane set main has here.
  • Read for_each_mirror_run / mirror_writable / write_virtual_destination and the parallel.rs change. The page walk resolving each 64 KiB page through mirrors::resolve and merging contiguous runs looks right to me. One leftover from the conflict resolution: the doc comment above for_each_mirror_run starts "Where a virtual address in a GPU view (kernelx::mirrors) is read or written: its own" and then breaks off into "Walk [va, va + len)…".
  • Not tested: Windows; a title's DirectStorage traffic (no game data, no XCL_SAMPLE_*).

@n-romanovich

Copy link
Copy Markdown
Contributor Author

Thanks for the reviews and test reports (@pvfreis, @SlopTart, @DavidM1911, @Filip722, @einfachama).

Rebased onto main (9e3831e) and updated the PR:

  1. BCPack BC7 → BC2 in subcase 2: Switched gpu_view_addresses_read_and_write_their_paired_cpu_view subcase 2 from mode 7 (now decoded on main since 8cad517) to mode 2 (BC2, with assert!(!crate::hle::bcpack::can_decode(2))), so bcpack_fill exercises the enqueue-refusal path as intended.
  2. skip_test for subcase 3: Added crate::gpu::recomp::runner::skip_test(...) when unified memory or title physical pages are unavailable instead of silently skipping.
  3. Parallel mirror-size isolation: Changed the test's fallback reservation size from 24 GiB to 26 GiB + 64 KiB so it does not collide in global kernelx::mirrors with title_textures tests under --test-threads=4.

Verified on Windows 11 (RTX 5060 Ti):

  • Fails without mirror_address (0x89240009), passes with it (dstorage::tests: 18 passed, 0 failed).
  • cargo test --workspace -- --test-threads=4: 777 passed, 0 failed, 41 ignored (3 consecutive runs).
  • Updated both xcl-smoke blocks in the PR description for 9e3831e and ce8acc5.

@einfachama: thanks for tracing the 0x89240009 burst in your run — indeed, DestinationPages zero-entry arrays are separate from virtual GPU-view addresses (handled by #549).

Ready for re-review!

@pvfreis

pvfreis commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Thanks. Checked at ce8acc5 (read in full): the BCPack subcase uses mode 2 and asserts can_decode(2) is false, and the two skips print. On an RTX 3060, merged onto main 9e3831e (clean), cargo test --workspace --locked --offline --no-fail-fast -- --test-threads=4: 776 passed, 1 failed, 41 ignored (main: 775 / 1 / 41). The one added test is gpu_view_addresses_read_and_write_their_paired_cpu_view, which passes; the one failure is the e2e test, which fails the same way on main here (no display in this session). SKIPPED: the two wave64 tests and heap_window_out_of_memory_falls_back_to_the_switch_form. Finding 1 of the review is fixed. Not tested: AMD, a retail title.

Reply by Claude Code (Claude Opus 5.5); checked by a person before posting.

@n-romanovich
n-romanovich force-pushed the dstorage/gpu-view-mirrors branch from ce8acc5 to 8f7dc3a Compare November 24, 2026 20:35
@n-romanovich

n-romanovich commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

I just rebased onto main (4178e88) after #819 landed (and wired parallel.rs + multi-page mixed-view handling into 8f7dc3a while resolving the conflict). Since dstorage.rs is getting heavy traffic right now, keeping this open much longer will likely force another rebase and re-review cycle for all of us.

If 8f7dc3a looks good, ready for a quick approval/merge while the branch is clean so I can move on to the next DirectStorage issues.

@crastinator

Copy link
Copy Markdown

@n-romanovich retested 8f7dc3a under Wine on RDNA2. No regression against main 4178e88, and the new test passes. Details are in my review above (edited), with one leftover doc line from the conflict resolution. I can't merge (I'm not a maintainer), so that's up to the maintainer's batch.

@JJAutoCompare

Copy link
Copy Markdown

Empirical test report (8f7dc3a)

PR #979, “DirectStorage: resolve GPU-view addresses to their paired CPU view,” at 8f7dc3a057001c698bc007ef8432ff40d0f9e39d.

Hardware / environment

  • Windows x64 build 26200, AMD64 Family 23 Model 113 Stepping 0, 12 logical processors.
  • Unoptimized Cargo test profile with debug info and incremental compilation disabled. The fixture exercises Windows virtual memory and emulated title pages on the CPU. It creates no D3D12 device.
  • rustc 1.100.0 (0ef1bc386 2026-11-09). DXC reports 1.9.2609.5 (01b62ad47).

Commands and results

  • cargo test --workspace --no-run built the workspace test executables and exited 0.
  • cargo test -p xcl --lib hle::dstorage::tests::gpu_view_addresses_read_and_write_their_paired_cpu_view -- --exact ran with XCL_ADAPTER=NONE_CPU_ONLY, RUST_TEST_NOCAPTURE=1, and XCL_DSTORAGE_PARALLEL_DECOMPRESS=1. It exited 0 with 1 passed, 0 failed, 0 ignored, 0 SKIPPED lines, and 864 filtered out. Both commands ran outside the Arc test wrapper.

Observed behavior

  • Memory-source zlib read through the GPU-view source and wrote the decoded bytes through the paired CPU destination. The trailing sentinel bytes held.
  • The unsupported BC2 request returned the expected E_DECOMPRESSION (0x89240030) and wrote the fallback blocks through the paired CPU view.
  • A title page mapped directly in the GPU view received the write. The paired CPU page kept its sentinel. A read across the 64 KiB boundary combined the paired CPU page and the directly mapped page.
  • With parallel decompression enabled, file-backed zlib wrote the decoded payload through the paired CPU view and preserved the trailing sentinel bytes.

Not tested

The full GPU workspace suite and game smoke runs on main and the PR head were omitted. This run provides focused CPU fixture coverage.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr979-focused.log and published.

@throny throny added the goal:world-load Bears on the retail title getting past world loading label Nov 25, 2026
@n-romanovich
n-romanovich force-pushed the dstorage/gpu-view-mirrors branch from 8f7dc3a to b986487 Compare November 25, 2026 06:43
@thehollowedone

Copy link
Copy Markdown

Independent Windows check of b986487. I extended the PR’s fixture with one file-backed zlib write that crossed a 64 KiB boundary, from a GPU view backed by its paired CPU page into a GPU view with a directly mapped physical page.

Tested

  • Windows 11 build 26300, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, debug. With the test-only extension, cargo test --offline --locked -p xcl --lib dstorage -j 3 -- --nocapture --test-threads=1 passed twice (31 passed, 0 failed, 0 ignored, 0 runtime skips each).
  • The request completed with S_OK. Both 512-byte halves matched their distinct expected data. The guard bytes and the second page in the paired CPU view remained intact. The existing BeforeDecode hook recorded one worker decode for this request, confirming the parallel path.

Not tested
Workspace suite, retail streaming, or other adapters. Synthetic input only. I have the fixture as a test-only patch if useful.

AI use
Codex (GPT-6.2 Sol) wrote and ran the test extension and drafted this report.

SavageCore added a commit to SavageCore/xcl that referenced this pull request Nov 25, 2026
…pstream PR xcl-dev#979)

Cherry-picked from xcl-dev/xcl PR xcl-dev#979. Titles pass GPU-view virtual addresses as DirectStorage destinations/sources; without mirrors::source resolution, writable()/readable() see reserved PAGE_NOACCESS memory and refuse with E_ACCESS_VIOLATION (0x89240009) - the exact failures seen streaming ttdb terrain/vehicles/props. Applied cleanly.
A title that reserves paired 64 KiB CPU and GPU views (VirtualAlloc flags
0x20402000: PAGE_READWRITE, then PAGE_NOACCESS | PAGE_GRAPHICS_NOACCESS)
maps physical pages into the CPU view while passing GPU-view virtual
addresses as DirectStorage request destinations and memory sources. Without
resolving those addresses through kernelx::mirrors, writable() and
shader::readable() see reserved PAGE_NOACCESS memory and refuse the
requests with E_ACCESS_VIOLATION (0x89240009).

Resolve virtual destination and memory-source addresses through
kernelx::mirrors::source when the GPU view has no page mapped of its own
(physical_page_at or MEM_COMMIT), including in bcpack_fill.

Assisted-by: Antigravity (Gemini 4 Carbon)
Assisted-by: Antigravity (Claude Sonnet 5.5)
@n-romanovich
n-romanovich force-pushed the dstorage/gpu-view-mirrors branch from b986487 to 063c281 Compare November 25, 2026 10:56
SavageCore added a commit to SavageCore/xcl that referenced this pull request Nov 25, 2026
…pstream PR xcl-dev#979)

Cherry-picked from xcl-dev/xcl PR xcl-dev#979. Titles pass GPU-view virtual addresses as DirectStorage destinations/sources; without mirrors::source resolution, writable()/readable() see reserved PAGE_NOACCESS memory and refuse with E_ACCESS_VIOLATION (0x89240009) - the exact failures seen streaming ttdb terrain/vehicles/props. Applied cleanly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

goal:world-load Bears on the retail title getting past world loading

Projects

None yet

Development

Successfully merging this pull request may close these issues.