Skip to content

DirectStorage: read a physical-page list again when its request runs - #1405

Open
mgrein wants to merge 1 commit into
xcl-dev:mainfrom
mgrein:dstorage-page-lists-at-execution
Open

mgrein wants to merge 1 commit into
xcl-dev:mainfrom
mgrein:dstorage-page-lists-at-execution

Conversation

@mgrein

@mgrein mgrein commented Nov 24, 2026 •

Copy link
Copy Markdown

A retail title keeps its DirectStorage destination page lists in slots of its own table and writes a slot's pages after EnqueueRequest. At enqueue, a slot can still name the pages of its previous request. execute() wrote to the snapshot taken then, so the data went into pages the title had since reused. #289 rereads only the entries that are 0 at enqueue (since #509 through read_own), so it does not catch a stale nonzero entry. The console reads the list when it runs the request; this PR does the same, except for a list on the enqueuing thread's stack.

On a new retail game this was more than 16 000 requests per run. The title's own objects got garbage pointers and it crashed about 20 s into world loading, at a different site each run, mostly reads through non-canonical addresses. When the old pages had been freed, the request failed with E_ACCESS_VIOLATION (0x89240009).

What is in it

  • crates/xcl/src/hle/dstorage.rs, execute: the destination page list is read again when the request runs, with read_own as at enqueue. It replaces the snapshot when it differs and every page in it is allocated. DirectStorage: a destination page array entry that is 0 at enqueue is read at the request's turn #289/DirectStorage: a deferred page-array entry is reread without faulting (#476) #509's reread of 0 entries is unchanged and runs after it.
  • Same file, after review: queue_enqueue_request records whether the list lies on the calling thread's stack (GetCurrentThreadStackLimits), and such a list keeps its snapshot. That memory is reused once the call returns, so a page ID written there since can belong to another live allocation.
  • crates/xcl/src/hle/kernelx.rs: physical_pages_live, true when every page of a list is allocated now.
  • Test a_destination_page_rewritten_after_enqueue: a slot in a heap table names one page at enqueue and another before Submit; the data must land in the second page and leave the first alone. The same list on the test thread's stack, rewritten with the other (live) page, must keep its snapshot. Each case fails without its part of the change.

Tested

  • NVIDIA GeForce RTX 4070 12 GB (32-lane waves), AMD Ryzen 5 5600X, 32 GB RAM, Windows 11 25H2 (build 26200), Rust 1.94.1 MSVC, DXC 1.9.2602.17. Debug for the tests, release for the runs.
  • cargo test --workspace -- --test-threads=4 at bb27ed6 (rebased onto main 3da2abb): 1112 passed, 0 failed, 46 ignored (20 test binaries). SKIPPED (25): 20 GPU subtests that need wave64 (gpu::recomp::lower / lower_dxil program families, gpu_wave32_program_in_wave64_hardware, gpu_geometry_wave32_prefix_count_over_a_mask), 3 wave32 per-lane f16 subtests of lower_dxil::tests (refused: unsupported f16 instructions), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows), pso_measurement_compiles_an_exact_synthetic_record (Windows Developer Mode is off).
  • The test without the stack check: its stack case fails (the data goes to the page written on the stack after enqueue). Without the reread: its heap case fails (checked before the rebase).
  • Earlier, on a local branch (main 47efa2e plus other open PRs, before the stack check), 400 s scripted world-load runs of a new retail game with the same settings:
    • A temporary diagnostic compared each list at enqueue with the list at execution. More than 2 000 requests had a nonzero entry that changed in between by 108 s of one run. All were one-page lists from the title's own table, and the enqueue-time page was an older allocation.
    • Without the change: 7 runs crashed between 118 and 132 s on garbage pointers in the title's objects, each at a different site. One crashed at 177 s, and 4 hung.
    • With the change: 2 runs, no crash in 400 s; the log counted more than 16 000 lists taken at execution.

Regression run

The same title for 100 s on each build, XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1, warm shader caches.

main:

xcl-smoke v1
commit: 3da2abb81606df622610e009f0430de99aa9881c
gpu: NVIDIA GeForce RTX 4070
title: 5c412a26
seconds: 100
exit: 0x0
frames shown: 2744 (PresentX 2745)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16238 MB

This PR:

xcl-smoke v1
commit: bb27ed6d661148177e7aa3b77e88735803d9ac12
gpu: NVIDIA GeForce RTX 4070
title: 5c412a26
seconds: 100
exit: 0x0
frames shown: 2757 (PresentX 2757)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16420 MB

Not tested

  • The regression runs do not reach the rewritten lists: the PR run logged no list taken at execution (9 766 DirectStorage requests in 100 s). On current main the title stops before the world load where they happened, with a GPU hang at about 113 s on both builds (DXGI_ERROR_DEVICE_HUNG later), which is unrelated to this change. So the stack check has not been run against the retail title: if it kept these lists on the enqueuing thread's stack, it would lose the fix. The diagnostic above found them in the title's own table.
  • A list on the heap that the title frees and reuses before its request runs is still read at execution.
  • AMD GPUs, Linux / Wine.
  • Interaction with DirectStorage: a late page array holds a half-full queue until Submit #549 (holding a half-full queue until Submit): it changes neighbouring lines and would need a rebase whichever lands second.

AI use

  • Claude Code with Claude Opus 5.5: found the cause from the runs' logs and the diagnostic, wrote the change, the stack check after review, the test and this description, and ran the tests and the runs on the hardware above.

🤖 Generated with Claude Code

gustavsi added a commit to gustavsi/xcl that referenced this pull request Nov 24, 2026
…in-place vtables

Integrates 16 upstream PRs (ivall#1380, ivall#1383, ivall#1384, ivall#1395, ivall#1398, ivall#1400,
ivall#1404, ivall#1405, ivall#1419, ivall#1420, ivall#1421, ivall#1423, ivall#1424, ivall#1427, ivall#1428, ivall#1429)
on top of the Linux/Proton fork, plus three Proton/vkd3d-proton fixes
caught during verification:
- Recompiler (ivall#1428): flatten IO_GROUP_LIMIT early-return in compute
  shaders so vkd3d-proton v3.1 dxil-spirv accepts the emitted CFG.
- D3D12.X (ivall#1395 + ivall#867): skip UnadoptGuard on in-place-patched vtables
  and restore native vtables in runner::submit_list when a prior test
  adopted the singleton ID3D12Device.
- Tests: match Wine centered default in window_position_modes.

Verified under GE-Proton11-14 (RX 9060 XT / RADV):
- gpu_sparse_vram_descriptors_buffers_and_xmem + gpu_valu_float_and_int
  + window_position_modes: 3 passed, 0 failed
- Broad sweep (present, real, sparse, clamp, dstorage, gpu_valu,
  gpu_typed_buffer): 82 passed, 0 failed, 1 ignored, 0 skipped
- 2.5 min retail title run (XCL_MEM_LIMIT=12G): 3,000+ frames at 30.0
  fps, 6.0-6.1 GB flat committed RAM, 6.4 GB local VRAM, 0 DS failures.
@certified-retart

Copy link
Copy Markdown
Contributor

Two notes that connect directly to this PR:

  1. This likely explains the world-load assert in Retail title 1.0.2.1 (Linux, RTX 3060 Ti 8 GB): past the end of story loading, then title assert 0x80000003 at +0x4da6315 #1164 (0x80000003 at game+0x4da6315):

  2. Remaining auto-submit race in dstorage.rs (DSTORAGE_QUEUE_OPTIONS::AutoSubmitDisabled):

    • In crates/xcl/src/hle/dstorage.rs, factory_create_queue1 (IDStorageFactoryX2::CreateQueue1, slot 10) already logs u64 @0x18 = 1 from the retail title's DSTORAGE_QUEUE_DESC1 and ignores it.
    • Per the Xbox GDK dstorage_xs.h spec, offset 0x18 is DSTORAGE_QUEUE_OPTIONS Options, where bit 0 (0x1) is AutoSubmitDisabled.
    • Because enqueue / enqueue_numbered still auto-submit at capacity / 2, a request enqueued when the queue hits half capacity can reach execute() before the title returns from EnqueueRequest to overwrite the stale non-zero slot and call Submit(). In that window, rereading the list in execute() still sees the old pages.
    • Honoring AutoSubmitDisabled in factory_create_queue1 (skipping the capacity / 2 auto-submit when bit 0 is set) closes that race cleanly for both this PR and DirectStorage: a late page array holds a half-full queue until Submit #549.

Not tested: live retail run on this branch (static analysis of dstorage.rs, #1164 crash dumps, and GDK docs only).

AI use: Antigravity (gemini-4-neon) analyzed the #1164 crash site, audited dstorage.rs, and drafted this comment; reviewed before posting.

@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored.

Thanks!

@mgrein
mgrein marked this pull request as ready for review November 24, 2026 17:10
@oz-stanislav-zhukov

Copy link
Copy Markdown

Test report on GTA VI 1.0.2.1 (Windows, NVIDIA). With this PR, the title's 0x80000003 at +0x4da6315 (#1164) did not come back in two runs. On the same tree without it, the same assert came back in the scene. Only three runs, so this is a data point, not proof.

Tested at 7f15632 cherry-picked onto main 9e3831e (local commit 4491b86), together with other open PRs: #751, #688, #1123, #488, #789 (ported by hand), #1195, #1428 (cf6cc59), #1323, plus two local xg CopyFromSubresource fixes. #549 conflicts with this tree, so it is not in it.

Hardware: NVIDIA GeForce RTX 5060 Ti 16 GB, driver 621.24, Agility SDK 1.620.2. CPU i7-14700KF, 64 GB RAM, Windows 10 22H2 (19045). Rust 1.88.0, release.

Env for all three runs: XCL_HEAP_WINDOWS=1 XCL_PSO_WAIT_MS=50 XCL_GPU_CULPRIT=1 XCL_ACTIVITY=1. I also had local diagnostics on (register memory dump at a crash, a thread dump on a commit jump, a cap on concurrent driver compiles); they don't touch DirectStorage.

run #1405 ended unhandled exception DirectStorage requests / failed
1 no 168 s 0x80000003 at +0x4da6315, rdx=0xaaaaaaaa 110 952 / 0
2 yes 427 s none; I stopped it at 55 GB of commit (see below) 128 255 / 0
3 yes 253 s none; I stopped it at 70 GB of commit 113 358 / 21

Not this PR's issue, but it ended both runs: the process commit grows by 5–9 GB per 2 s while the NVIDIA compiler builds big compute pipelines (270–810 KB DXIL in the heap form). It goes from ~32 GB to over 55–70 GB within a minute, and I stopped the runs there. That's tracked in #156 / #1307.

Not tested:

  • this PR alone on main;
  • more than two runs with it;
  • other GPUs and AMD;
  • the full test suite on this tree;
  • scripts/smoke.ps1.

AI use: runs, log analysis and this report by Claude Code (Claude Opus 5.5); posted at the request of the person running the tests.

@gut0to gut0to 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.

AI-assisted review; I traced the enqueue snapshot and execution-time reread paths.

let mut current = vec![0usize; pages.len()];
let pages = if read_own(r.destination as usize, current.as_mut_ptr() as *mut u8, std::mem::size_of_val(pages))
&& current[..] != pages[..]
&& crate::hle::kernelx::physical_pages_live(&current)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This proves only that the replacement page IDs are currently allocated; it does not prove the list is a persistent title table. If a stack-backed list is overwritten after enqueue with the ID of another still-live allocation, read_own succeeds and this check redirects the request from the snapshotted page p1 to unrelated page p2, potentially corrupting its owner. This conflicts with the stated fallback for overwritten stack arrays. Could the late reread require a positively identified persistent page-table range, and otherwise keep the snapshot? AI-assisted review; I verified this with the existing page-list flow.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

You're right: being allocated now does not make the list a persistent table. Fixed in bb27ed6 (squashed, rebased onto main with #509): queue_enqueue_request records whether the destination page list lies on the calling thread's stack (GetCurrentThreadStackLimits), and such a list keeps its snapshot at execution. a_destination_page_rewritten_after_enqueue now has your case – a list on the test thread's stack, rewritten after enqueue with the ID of another live page, keeps its snapshot page and leaves the other alone; it fails without the check.

I could not find a way to positively identify a title's persistent table, so this rules out the stack, the case the snapshot fallback was for. A heap array the title frees and reuses before its request runs would still be read late; that limit is now under Not tested.

(AI-assisted: Claude Code with Claude Opus 5.5 wrote the change and this reply; I checked the test fails without it.)

@tylerstraub

tylerstraub commented Nov 24, 2026 •

Copy link
Copy Markdown

I independently tested mgrein’s change at 7f15632 on Linux with Proton Experimental and an RTX 5090 (NVIDIA 595.99.02). I applied it to my instrumented XCL control (f7c412a, resulting local candidate 8787543) so I could observe the destination pages in both runs.

The focused test hle::dstorage::tests::a_destination_page_rewritten_after_enqueue failed on my control. With the change, all 256 expected bytes reached the replacement page and the original page retained its sentinel. The existing physical-page destination/source and queued remapping tests also passed.

On a matched cold-cache story load, 4,934 of 34,610 traced physical-page requests used a destination entry that was already nonzero at enqueue and had changed by execution. This count excludes entries that were zero at enqueue. Both runs opened the same seven story paths, reached loading artwork, then stopped after device removal on a dark screen. The page-selection fix is independently reproducible here. I saw no visible gameplay improvement in this comparison.

I ran the Windows lib-test binary under Proton with the filter a_destination_page_rewritten_after_enqueue --test-threads=1 --nocapture. I used Codex (GPT-6) to run the comparison and prepare this report.

@joeypercia

joeypercia commented Nov 24, 2026 •

Copy link
Copy Markdown

Where the failures that remain with this PR come from, on an RTX 4070 Ti. I added a local log line to every E_ACCESS_VIOLATION return in dstorage.rs (diagnostic only, not proposed).

Tested: RTX 4070 Ti (driver 616.56), Ryzen 7 7800X3D, 32 GB RAM, Windows 11 Pro 26200, release, retail 1.0.2.1 from an NVMe SSD, XCL_HEAP_WINDOWS=1, A scripted with XCL_PRESS_AT. Tree: main 9e3831e + #1288 + #742 + #1464 + #1448 (with #1321) + the diagnostic, then the same plus this PR (7f15632; its conflict with #1464 resolved by doing this PR's reread first and #1464's wait for zero entries after it).

without this PR with this PR
failed requests (0x89240009) one about every 50 ms from 91.9 s on 4, all between 86.9 s and 87.1 s
refusing check all at the write_physical_pages call of execute (destination physical pages) the same check
"page lists written after their request was enqueued" – 16 384 by 95 s

So the reread fixes nearly all of them here. The few left fail at the same physical-page write, all within 0.2 s on G:\data\ttdb\vfx\ttdb_vfx.ttpf. That fits a list being rewritten at the moment its request runs: the snapshot's pages are already freed, and the current list is not yet entirely live, so neither this PR's reread (all pages live) nor #1464's wait (entries that were 0 at enqueue) applies. That is a reading, not measured: I did not log the page numbers.

Not tested: this PR without #1464; more than one run with each tree; AMD.

AI use: Claude Code (Claude Opus 5.5) wrote the diagnostic, ran the title on my machine, and wrote this comment.

Note on comparing counts (re @3L1A5-1's report above): my tree had #1464 as well, and the two fixes cover different entries. #1464 waits for entries that were 0 at enqueue, and this PR rereads entries that were nonzero and changed. A tree without #1464 still fails on late-filled 0 entries, which this PR does not cover. My numbers also come from one run each, counted from the diagnostic's log lines (capped at 64), not from the activity lines' failed sum, so they are not directly comparable with a 3-run total.

@3L1A5-1

3L1A5-1 commented Nov 24, 2026

Copy link
Copy Markdown

Test report for 7f15632 on an 8 GB NVIDIA card with 16 GB RAM in the retail title: #1164's assert (+0x4da6315) did not come back in 3 of 3 runs (it ended 1 of 3 runs without this PR), and the runs went 30–170 s further. They now end on running out of memory or on the watchdog.

Tested

without this PR with this PR
end of run 1 / 2 / 3 262.5 / 331.1 / 363.6 s 393.5 / 502.5 / 415.0 s
how they end xboxbvhbuilder.dll+0x15078 access violation; +0x4da6315 (#1164); watchdog +0x23cf683 list Close → 0x8007000e, title int3 +0x72ac; watchdog +0x23cf683; Close → 0x8007000e, +0x72ac
device removals 0 0
textures mapped again after eviction (#640), at 260 s 2 019 / 1 350 / 1 094 2 090 / 2 522 / 3 125
  • With this PR more evicted textures are mapped again by the same time (row above), and by the end local video memory reaches 9.0–9.25 GB against a DXGI budget of ~7.2 GB. I read the two 0x8007000e ends as this machine's memory limit (in run 1 free RAM was also down to 0.37 GB), not as something this PR breaks, but I haven't shown that.
  • The reread is used a lot here: "32768 page lists written after their request was enqueued" by ~219 s in every run (the line is logged at powers of two).
  • Failed DirectStorage requests (sum of the activity lines' failed) don't drop clearly on this tree: 397 / 28 / 213 without this PR, 1 / 231 / 397 with it. So I can't confirm here the drop @joeypercia measured.

Not tested: this PR alone on main; AMD; Linux.

AI use: Claude Code (Claude Opus 5.5) ran the runs, compared the logs and wrote this.

@jordi-vancuijlenborg-vinci

jordi-vancuijlenborg-vinci commented Nov 24, 2026 •

Copy link
Copy Markdown

I reproduced the #1164 crash (0x80000003 at +0x4da6315) on Windows 11 with an RTX 3080, on b9b6ea6 with XCL_PSO_WAIT_MS=50. I can test this PR on the same setup. Is there a specific revision or scenario you’d like me to cover?

Update after testing #1405 alone. Both builds hit 0xc0000005 at game+0x23cf683 in the story load. Neither reproduced the earlier #1164 breakpoint. The patched run reread at least 8,192 page lists and recorded zero failed DirectStorage requests in the activity log.

Tested

Windows 11 25H2 (26200.9974), i7-9700F, RTX 3080 10 GB, driver 621.01, Rust 1.100.0 MSVC, release. Control b9b6ea62080cc62fc19e212033372d01c6214e5c. Candidate used the same base with only 7f15632548f0127457877798d291868c967c8ca5 applied (matching Git patch ID).

xcl run <game-folder> on GTA VI 1.0.2.1, Series X, once per build. Both used independent copies of the same save and warm shader cache, XCL_NETWORK=0, XCL_ACTIVITY=1, XCL_PSO_WAIT_MS=50, XCL_PRESS_A_AT=52,65 and XCL_RUN_SECONDS=720.

Build First unhandled exception DirectStorage requests / failed
Control +0x23cf683 at 356.770 s 84,147 / 213
With #1405 +0x23cf683 at 385.457 s 65,818 / 0

Counts are sums of the recorded two-second activity samples. The two runs processed different numbers of requests. Neither logged a D3D12 device removal. Both processes remained alive after the exception and the launcher stopped them at its 765 s deadline. A preliminary control needed a late manual profile selection and is excluded from the comparison.

cargo test --locked --offline --release -p xcl --lib -- --exact hle::dstorage::tests::a_destination_page_rewritten_after_enqueue --nocapture --test-threads=1 on the candidate: 1 passed, 0 failed, 0 ignored, 0 skipped, 862 filtered out.

Not tested

The effect on #1164 remains open on this machine. One matched pair, no full test suite or smoke.ps1 run for this comparison.

OpenAI Codex (GPT-6.2 Sol High) ran the tests and helped draft this comment.

@jessenic

Copy link
Copy Markdown
Contributor

Test report: with this PR (and #1464), the CPU access violations that ended Series S story loads around 90–110 s are gone in 3 of 3 runs, against 6 of 10 runs without them. The same setup and the same warm caches on both sides.

Setup: RTX 5070 Ti 16 GB (driver 610.88), Ryzen 7 9700X, 32 GB, Windows 11 Pro 26300, rustc 1.97.0, release. Retail title, Series S profile (device_type = "lockhart"), story load with scripted A presses, 400 s per run, XCL_HEAP_WINDOWS=1, all compute pipelines precompiled.

Tree: a local integration branch on b7aa9f3 (#1288, #751, #684, #680, #1315/#1316, #1321, #1110, #495, #242, #615, #1697, #1323), plus local diagnostics that do not touch DirectStorage. One of them, XCL_X_DEAD_STOP=1, was on in every run on both sides: it ends a split-wave64 wave's loops after a meet timeout. Of the 10 runs without this PR, 4 had only that, 3 also had #1143 + #1221, and 3 had #1143 + #1221 + #765. The 3 runs with it had all three, plus this PR's 7f15632 and #1464's 3b7d329 (head b132ead, plus the same uncommitted diagnostics).

runs ended by a title access violation (0xc0000005 in the title or vcruntime140) ended by device removal
without #1405/#1464 10 6 (5 at 101–108 s, 1 at 542 s; a different offset each run) 4
with #1405 + #1464 3 0 3 (110–115 s)

Not tested: #1405 and #1464 separately, so the effect is not split between them; plain main; AMD; Series X with the PRs; more than 3 runs with them. The local diagnostics (XCL_X_DEAD_STOP, a page-event log, #1323's tracer) are not in any PR.

AI use: Claude Code (Claude Opus 5.5) ran the runs on the machine above, analysed the logs and wrote this report.

A retail title keeps its destination page lists in slots of its own
table and writes a slot's pages after EnqueueRequest. At enqueue such a
slot can still name the pages of the slot's previous request, and the
snapshot taken then is what execute() wrote to (xcl-dev#289 rereads only the
entries that are 0). Over 16 000 requests a run were written into pages
the title had since reused: its objects got garbage pointers and it
crashed about 20 s into world loading; when the old pages were freed,
the request failed with E_ACCESS_VIOLATION.

The console reads the list when it runs the request. execute() now
reads it again (through read_own, as the snapshot) and takes it when it
differs and every page in it is allocated (kernelx::physical_pages_live).
A list that was on the enqueuing thread's stack keeps the snapshot: that
memory is reused once the call returns, and a page ID written there
since can belong to another live allocation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CharlyRien

Copy link
Copy Markdown

Test report on an RTX 3090 with the world running above 1 frame per second: garbage-pointer faults in 8 of 8 runs without this change, 0 of 9 with it. Two things for the PR: it now conflicts with the merged #509, which does not cover this case; and a second fault showed up behind it, in title_textures.

Setup

Results

runs title faults on a bad pointer world frames per second
snapshot kept (as 9e3831e) 8 8 (118 – 183 s, a different site each run: +0x4da6315 int3, +0x4ed80c0, +0x54e9d82, +0x4e8b4be in 8 threads, a memcpy, …) 1.2 – 1.6 until the fault
list re-read at execution (a local equivalent of this PR) 6 0 1.30 – 1.53
#509 + this PR rebased onto it 3 0 (three clean 200 s runs) 1.19 – 1.40

More than 16 384 destination lists per run differ from their enqueue-time snapshot, from 21.6 s on.

Evidence for the mechanism (local page-history log of every map / unmap / DirectStorage write per 64 KiB page, dumped at the fault): in a snapshot run the faulting object's page shows 165.5872 map-from-home, then 167.1743 a 64 KiB DirectStorage write whose list had changed since enqueue, then nothing until the fault at 183.0 s on a pointer loaded from that page (0xaaaaaaaa7c1f83ff). The bytes are streamed asset data, not GPU-written: these pages are in the title's reservation outside the unified-memory windows.

About #509 (merged): it makes the late re-read of entries that were 0 at enqueue fault-safe. It does not re-read a nonzero entry the title rewrote after enqueue, which is the case here, so main still has this crash; this PR needs a rebase onto it (the conflict is in the same lines of execute).

A second fault behind it, not covered by this PR: once the title survives, one run in six died inside XCL in title_textures::refresh at 159 s, reading in place a page that another title thread had unmapped 2 ms earlier (shown by the same page history). shader::readable says yes for the whole window. Reading in place only in the coherent window and copying through ReadProcessMemory elsewhere removed it in the 6 runs since, at the same frame rate. I can post that diff (65 lines) or open an issue if preferred.

Not tested: the PR's unit test, #1464, AMD, runs without XCL_UMA_SHADOW (the DirectStorage and kernelx code has no dependence on it), current main.

AI use: Claude Code (Claude Fable 5.2 coordinating, Claude Opus 5.5 for the page-history log and the runs) did this and drafted the report.

@maephisto666

Copy link
Copy Markdown

Test report: retail 1.0.2.1 on an RTX 5090 (Windows), #1405 at bb27ed6 and at 7f15632 on a local tree. One failed DirectStorage request per run, the same as a different fix of mine for the same bug. I am dropping mine: this PR covers it. Not a main + #1405 run.

Tested

a fix of mine instead of this PR #1405 7f15632 #1405 bb27ed6
failed DirectStorage requests 2 (0x89240009, 119–120 s) 1 (0x89240009, 122 s) 1 (0x89240009, 120 s)
page lists taken as written at execution (the PR's log line, at powers of two) – ≥ 16 384 by 127.6 s ≥ 16 384 by 123.9 s
end device hung at 158.8 s device hung at ~163 s device hung at 157.7 s
  • Earlier runs of mine on an older tree, with neither fix, had 330–1 300 failed requests in one burst, so on this setup most of the failures were the stale-list case this PR handles.
  • The three runs end the same way: the driver logs SKEDCHECK23_CONSTANT_BUFFER_SIZE failed, then Illegal Instruction Encoding on many SMs. It is the same with my fix, so it is not caused by this PR. I am looking into it separately.
  • Skipped work was the same on all three: 1 024 draws and 26–64 dispatches by ~155 s.

Not tested

AI use: Claude Code (Claude Opus 5.5) applied the patches, ran the builds, tests and runs, read the logs and wrote this report. The numbers come from those runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.