Skip to content

D3D12.X: copy a GPU-written title texture back into the title's memory - #2678

Open
joeypercia wants to merge 1 commit into
xcl-dev:mainfrom
joeypercia:d3d12x-texture-readback
Open

joeypercia wants to merge 1 commit into
xcl-dev:mainfrom
joeypercia:d3d12x-texture-readback

Conversation

@joeypercia

@joeypercia joeypercia commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Part 1 of #2663. A title texture the GPU writes is never copied back to the title's memory, so a title that reads it on the CPU gets stale bytes. This adds the read-back, but nothing calls it yet. The next part decides when to call it: a CPU read of a GPU-written texture.

What is in it (one commit)

  • crates/xcl/src/gpu/texture.rs: download copies every subresource of a resource out to linear rows on a queue and waits. It's the reverse of upload: barriers from the given states to COPY_SOURCE and back.
  • crates/xcl/src/hle/d3d12x/title_textures.rs:
    • write_subresources tiles them into the console layout with the existing Chain::tile_level / tile_volume. It's the reverse of subresources. It writes only the 4 KiB pages that change, and only committed, writable ones, through WriteProcessMemory, so a page unmapped meanwhile fails instead of faulting.
    • read_back(res) does both for a registered title texture on XCL's upload queue, holding its own reference to the resource meanwhile. It is #[allow(dead_code)] until part 2 calls it.
  • Tests:
    • written_subresources_read_back_as_the_same_texels (CPU) covers 2D with mips and slices, 3D, BC7 and a 4×4 texture, all in tiled layouts. Written texels detile back to the same subresources, bytes past the texture stay as they were, a second write with nothing changed writes 0 bytes, and subresources of the wrong size or number are refused.
    • read_back_writes_what_the_gpu_holds_into_the_title_memory (GPU) covers 2D RGBA8 with 3 mips and 2 slices, 3D 40×24×6 with 3 mips, and BC7 256×256 with 9 mips. A copy into a registered texture is the GPU write. read_back then makes the title's memory detile to exactly those texels. The page after the texture is untouched, a second read-back writes nothing, and a read-only page of the texture is left alone while the others are written.
    • With the writes left out (negative control), both tests fail.
  • If the wait for the copy fails (fence error, or the 10 s timeout of texture::wait), download keeps the readback buffer, the allocator, the list and a reference to the texture rather than releasing them under a copy that may still run (luckyteagirl's review). texture::upload has the same early return on a wait error and isn't changed here.
  • download refuses a format of more than one plane (depth and stencil, video), checked with D3D12_FEATURE_FORMAT_INFO before anything is recorded, rather than reading back plane 0 alone (luckyteagirl's second review). The GPU test checks that a D24_UNORM_S8_UINT texture is refused; without the check it reads back plane 0 and the test fails.
  • write_subresources compares against an owned copy of the title's memory (read_committed, page by page through ReadProcessMemory), not a borrowed view of it. A page the title unmaps meanwhile reads as zeros and isn't written (luckyteagirl's third review). Test written_subresources_skip_a_page_the_title_unmapped: a texture with one decommitted page gets the other pages' texels, and that page stays unmapped. The race itself, an unmap between the check and the read, isn't reproduced by a test.
  • download refuses a multisampled texture the same way, since a copy of one needs a destination with as many samples (thehollowedone). The GPU test checks that a 4-sample RGBA8 render target is refused.

Tested

  • NVIDIA GeForce RTX 4070 Ti (driver 621.40), and the AMD Radeon iGPU of a Ryzen 7 7800X3D (RDNA2) with XCL_ADAPTER=Radeon. Windows 11 Pro 26200, Rust 1.100.0 MSVC, DXC 1.8.2502.11. Debug builds for the tests, release for the runs.
  • cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4 on cfed80cf:
    • RTX 4070 Ti: 1438 passed, 0 failed, 47 ignored.
    • RDNA2: 1437 passed, 1 failed, 47 ignored. The failure is gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, which fails the same way on main on this iGPU (DXIL fuzz tests: fuzz_validate_and_gpu_1 fails on AMD (seed 722 and others, RDNA2-4), so the default suite is red there #2115).
    • The two new tests ran on both adapters (... ok), not skipped.
    • SKIPPED on both: heap_window_out_of_memory_falls_back_to_the_switch_form, uploads_start_from_each_subresources_state, the title under the debug layer, and the GPU / shader cases the adapter can't run (wave64 on the RTX 4070 Ti, mesh shaders on RDNA2).

Regression run

RTX 4070 Ti (driver 621.40), release builds, 60 s each, scripts/smoke.ps1 -Game <folder> -Title retail-title on the newer retail title, one after the other with the same settings. The runs stay on the menus, and nothing calls the new code yet, so this is a regression check only. Both ran with the NVIDIA shader-heap profile (#2590, 1 GiB) installed on this machine since 2026-11-25. main b49be183 (this PR's base) and this PR's head (no uncommitted changes):

main:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 4070 Ti
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1587 (PresentX 1587)
presents per 2 s (last 3): 60 58 48
device removals: 0
crashes: 0
peak commit: 15772 MB

PR:

xcl-smoke v1
commit: cfed80cff0cd8a06aee72d6898daf2955dcf3690
gpu: NVIDIA GeForce RTX 4070 Ti
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1581 (PresentX 1582)
presents per 2 s (last 3): 60 59 46
device removals: 0
crashes: 0
peak commit: 16385 MB

Not tested

  • The read-back in a title: nothing calls it yet.
  • Textures that shaders write through a UAV. Those are vram::place placements and aren't registered in title_textures, so read_back doesn't reach them yet. Part 2 has to keep their console description to read them back.
  • The wait-error path of download: no test makes the wait fail.
  • Ordering against the title's queues. read_back assumes the writing work is done; part 2 waits for it.
  • Depth / stencil planes, MSAA, and the console float formats 116 / 117 (register refuses those).

AI use

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

Could the download retain its readback buffer, command allocator, and source until the submitted copy is known complete, including on a wait error? ExecuteCommandLists has already queued the copy when wait(dev, queue)? runs. That helper can fail creating/signaling the fence or time out after 10 seconds; the early return then drops rb and alloc while the queue may still execute the copy. A healthy but stalled queue can exceed that budget and resume later. Creating the fence before submission covers one failure point, but signal/wait failures still need a lifetime policy for in-flight objects. Microsoft's D3D12 synchronization guidance says the application tracks how long GPU work needs resources and uses fences before reuse or destruction. Exact-head source review at 033c725442f6534e9938a7c82e41c4279d445127; no live GPU timeout reproduction. AI-assisted review with Codex.

@joeypercia
joeypercia force-pushed the d3d12x-texture-readback branch from 033c725 to bbc97e2 Compare November 26, 2026 06:05
@joeypercia

Copy link
Copy Markdown
Contributor Author

Thanks, yes. When the wait fails, download now keeps the readback buffer, the allocator, the list and a reference to the texture (std::mem::forget) instead of releasing them while the queued copy may still run. That's bbc97e25. It leaks them, but only on that error path, and read_back gives up there. The wait-error path itself isn't tested; I couldn't make the wait fail in a test. texture::upload has the same early return and is left as it is here. The suite and the smoke run were rerun on bbc97e25, and the description has the counts. (Claude Code, Claude Opus 5.5)

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

download() promises every D3D12 subresource, but n = MipLevels * arrays omits the native format's plane count. D3D12 counts MipLevels * ArraySize * PlaneCount (Microsoft's resource descriptor helper); the current footprint and copy loop can return Ok containing only plane 0 for a two-plane resource when states.len() == 1. With a state per real subresource, it instead rejects the valid state count. Could this query D3D12_FEATURE_FORMAT_INFO.PlaneCount and either copy all planes or explicitly reject formats with more than one plane before recording commands? A two-plane format fixture would catch a silent partial readback. I did not find a production caller for title_textures::read_back yet, so this is a helper contract issue rather than a measured retail regression.

Exact-head source review of bbc97e2584f575be83b5e07e1f4a5db51001046c; no GPU readback was run. AI-assisted review with Codex.

@joeypercia

Copy link
Copy Markdown
Contributor Author

Thanks, also right. download now checks the format's plane count (D3D12_FEATURE_FORMAT_INFO) before it records anything, and refuses a format of more than one plane instead of returning plane 0 alone. No caller needs a depth or stencil read-back yet, and register already turns render targets and depth buffers away. The GPU test now checks that a D24_UNORM_S8_UINT texture is refused. With the check taken out, that assertion fails: download returns a single plane-0 subresource. Amended into 077f8876, with the suite and the smoke run rerun on it (description updated). (Claude Code, Claude Opus 5.5)

@Aniseto

Aniseto commented Nov 26, 2026 •

Copy link
Copy Markdown

Ran the texture read-back tests at 077f8876:

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.

XCL_ADAPTER=nvidia cargo test -p xcl --lib read_back -- --test-threads=1 --nocapture
3 passed; 0 failed; 0 ignored; 1335 filtered out      (exit 0)

read_back_writes_what_the_gpu_holds_into_the_title_memory ran on the real adapter (backend 'real' --- NVIDIA GeForce RTX 5070 Ti) and passed, together with the CPU detiling test and the driver-cache test matched by the same filter.

What this adds: the author tested an Ada RTX 4070 Ti and an RDNA2 iGPU; this is a Blackwell wave32 part, and no third-party report exists in the thread yet.

Not tested: a title actually calling read_back (nothing does yet), UAV-written textures, the wait-error path, MSAA, depth/stencil, a paired 60 s smoke run, AMD and Intel GPUs, release profile, title data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.

Update (26/11, head moved to a598134): the new commits add 13 lines in texture.rs and title_textures.rs. Re-ran the same filter at a598134:

XCL_ADAPTER=nvidia cargo test -p xcl --lib read_back -- --test-threads=1 --nocapture
3 passed; 0 failed; 0 ignored; 1335 filtered out      (exit 0)

The GPU read-back test still runs on the real RTX 5070 Ti and passes.

@SlopTart

SlopTart commented Nov 26, 2026 •

Copy link
Copy Markdown

Tested on the Linux/Wine lane, full standard env (AMD rig: Ryzen 9 9900X, 96 GB DDR5, RX 7900 XT 20 GB, Arch kernel 7.2.15, Mesa 26.2.5 RADV, wine-11.0 Proton, rustc 1.94.0; d3d12,d3d12core,dxgi,d3d11,d3d10core=n,b overrides, official DXC kit, VKD3D_CONFIG=ignore_shared_fence, threads=2), head 077f8876, mergeable against main b49be183:
non-gpu suite (--skip gpu::): 598 passed, 3 failed, 4 ignored, 733 filtered.
The failure set is identical to bare main b49be183 measured on the same rig the same day (596 passed, 3 failed): gpu_promoted_uav_clear (our #2490), xma2_source_voice (#2481, vendored-FAudio gate). The third red, the sparse tile video-memory test, is a known batch flake (green solo).
Zero delta from this PR; every test it adds passes inside the suite.
Not tested: gpu suite, Windows native.
Correction: an earlier version of this row reported three extra reds; those runs lacked the d3d12,d3d12core=n,b DLL overrides and hit stub-DLL NOTIMPL artifacts. Re-ran with the standard env, artifacts gone.
AI use: Hermes agent (local Qwen-class) ran the tests and drafted this; I checked it before posting.

@SzczepanGrela

Copy link
Copy Markdown

Linux/RADV verification of 077f8876195f6a26e0acfbe66b036e5a003c3fea against main b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7. The unmodified GPU fixture stops before read-back; a test-only raw-device fixture exercises the read-back and passes.

Tested

  • RX 9070 16 GB (RDNA4, RADV GFX1201), Mesa 26.3.1-arch3.5, Ryzen 7 7700, CachyOS 7.3.0-5-cachyos, GE-Proton11-12 / Wine 11.0 Staging, vkd3d-proton 8293130ebe370b1+ (v3.1-1-g8293130eb-GE-Proton(dirty)+), rustc 1.97.1, MinGW GCC 16.2.0, release.
  • Build: cargo test --offline --locked --release --target x86_64-pc-windows-gnu -p xcl --lib --no-run for both source snapshots.
  • Ran each resulting Windows test executable with Wine, --nocapture --skip retail_ --test-threads=N. Filters below. XCL_ADAPTER=radeon XCL_REQUIRE_GPU=wave64 XCL_NETWORK=0 VKD3D_SHADER_CACHE_PATH=0, native d3d12,d3d12core,dxgi, no XCL_SAMPLE_*. Zero skip messages.
Filter Threads main passed/failed PR passed/failed
gpu::texture::tests:: 1 14/0 14/0
hle::d3d12x::title_textures::tests:: 1 16/3 17/4
hle::d3d12x::title_textures::tests:: 4 16/3 17/4

The same three existing tests fail on both revisions: a_placed_texture_gets_the_pages_of_a_level_with_its_texels, gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes, and placed_title_textures_share_vram_and_preserve_pixels.

Each new test was also run alone with --exact, in three fresh processes:

  • written_subresources_read_back_as_the_same_texels: 3/3 passed.
  • read_back_writes_what_the_gpu_holds_into_the_title_memory: 0/3 passed. All fail at title_textures.rs:2079, in the existing texture::upload, with 0x80070057; vkd3d-proton logs d3d12_command_list_Reset: Invalid command allocator. The first read_back call at line 2083 is not reached. This is a setup blockage, not a reproduced read-back failure.

Test-only diagnostic

  • In a separate source copy, replaced only this GPU test's backend() / real::device_raw() initialization with agility::create_device(None, D3D_FEATURE_LEVEL_12_0) and its raw pointer. Production code and all assertions are unchanged.
  • The GPU test then passed 3/3, zero skips: 2D array/mips, 3D, BC7/mips, unchanged-memory zero-write, the trailing sentinel, the read-only page, and the D24/S8 two-plane refusal checks all completed.
  • This isolates the read-back primitive on this stack. It is not a passing result for the unmodified head's HLE integration path.

Not tested

  • Full workspace, retail data or workloads, scripts/smoke.ps1, UAV-written placements, cross-queue producer ordering, injected wait failures, Windows, other GPUs, or performance. The actual read-back failure path has not been reproduced.

AI use

  • OpenAI Codex (GPT-6; exact serving variant unavailable) audited the diff, built and ran the tests, prepared the test-only diagnostic, checked source hashes and raw logs, and drafted this report for the account owner's review before posting.

@thehollowedone

Copy link
Copy Markdown
Contributor

One API-contract edge case before this helper is reused: download accepts a one-plane texture without checking SampleDesc.Count, then copies each subresource into a single-sample readback buffer. Microsoft's CopyTextureRegion contract says copies involving a multisampled resource must cover the whole subresource and the source and destination should have matching sample counts (documentation). The current path therefore has no defined MSAA read-back behavior.

Could download reject rd.SampleDesc.Count != 1 before allocating or recording commands, with a focused test, unless this helper is meant to resolve to a defined single-sample representation? I have not run an MSAA case; this is a source/API-contract finding, not a retail-title result.

AI-assisted.

@joeypercia
joeypercia force-pushed the d3d12x-texture-readback branch from 077f887 to a598134 Compare November 26, 2026 07:34
@joeypercia

Copy link
Copy Markdown
Contributor Author

Thanks, @thehollowedone. download now refuses a multisampled texture before it records anything, as it refuses a format of several planes. Resolving to one sample would be a different read-back, and nothing needs one. The GPU test checks that a 4-sample RGBA8 render target is refused. It's in a5981342, and the read-back tests pass on the RTX 4070 Ti and the RDNA2 iGPU. The full suite and the smoke run on it follow; I'll update the description then. (Claude Code, Claude Opus 5.5)

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

At head a59813423a7f10c44fd3702e7caed0c017e441ab, write_subresources takes old = title_bytes(va, len), clones it to mem, spends time retiling, then reads old again for each page diff (title_textures.rs:1506-1524). For an all-readable range, title_bytes returns a borrowed slice into title memory after a readability check (:1459-1464). If another title thread decommits/unmaps a page after that check, either the clone or the later diff read can fault before write_writable reaches its guarded WriteProcessMemory path. The new helper's comment promises that unmapped pages fail rather than fault, but this borrowed snapshot does not provide that guarantee. Could the diff baseline use an owned read_committed(va, len) snapshot (the existing page-safe copy helper) or another mapping-lifetime guard? A concurrent decommit test between snapshot and diff would cover it.

This is an exact-head source review of the helper, which is not yet called in production until the follow-up PR. I did not run a concurrent-decommit reproduction. AI use: OpenAI Codex (GPT-6.2 Sol) traced the new readback path; I checked the borrowed title_bytes and diff loop before posting.

A title texture that the GPU writes is not copied back to the title's
memory, so a title that reads it on the CPU gets stale bytes (xcl-dev#2663).
The ocean of the newer retail title is such a case: its height maps are
written by compute and sampled by the physics on the CPU.

This adds the read-back, not yet called:
- texture::download copies every subresource of a resource out to linear
  rows (the reverse of texture::upload).
- title_textures::write_subresources tiles them into the console layout
  (Chain::tile_level / tile_volume) and writes the pages that change, on
  committed, writable pages only (the reverse of subresources).
- title_textures::read_back does both for a registered title texture, on
  XCL's upload queue.

When to call it (a CPU read of a GPU-written texture) is the next part.

Part of xcl-dev#2663.

Assisted-by: Claude Code (Claude Opus 5.5)
@joeypercia

Copy link
Copy Markdown
Contributor Author

Right, thanks. The baseline is now an owned copy from read_committed, the page-safe helper (ReadProcessMemory per page run), and the retile and the diff use that copy. A page the title unmaps meanwhile reads as zeros there, and write_writable then skips it because it isn't committed.

New test written_subresources_skip_a_page_the_title_unmapped: one page of a texture's memory is decommitted. That page isn't written or committed again, and the other pages get their texels.

The race itself, an unmap between the check and the read, isn't reproduced by a test. That test decommits before the call, so it doesn't fail with the borrowed view either. In cfed80cf; the suite and smoke rerun follow. (Claude Code, Claude Opus 5.5)

@joeypercia
joeypercia force-pushed the d3d12x-texture-readback branch from a598134 to cfed80c Compare November 26, 2026 08:29
@Aniseto

Aniseto commented Nov 26, 2026

Copy link
Copy Markdown

Re-verified the texture read-back tests at cfed80cf after the head moved again (36 lines added in title_textures.rs).

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.

XCL_ADAPTER=nvidia cargo test -p xcl --lib read_back -- --test-threads=1 --nocapture
3 passed; 0 failed; 0 ignored; 1336 filtered out      (exit 0)

read_back_writes_what_the_gpu_holds_into_the_title_memory still runs on the real adapter (backend 'real' - NVIDIA GeForce RTX 5070 Ti) and passes, along with the CPU detiling test and the driver-cache test matched by the same filter. This follows my earlier reports at 077f8876 and a598134; I am posting a new report rather than editing those, per the current rule.

Not tested: a title actually calling read_back, UAV-written textures, the wait-error path, MSAA, depth/stencil, a paired 60 s smoke run, AMD and Intel GPUs, release profile, title data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.

rootw0rm pushed a commit to rootw0rm/xcl that referenced this pull request Nov 26, 2026
… GPU writeback (port upstream xcl-dev#2470 + xcl-dev#2558 + xcl-dev#2678)

(cherry picked from commit f78556f9601c01eac0e05e43532047658d085701)
@thehollowedone

Copy link
Copy Markdown
Contributor

Independent Windows/NVIDIA check of head cfed80cf against main b49be183. RTX 3080 Ti (driver 621.35), Ryzen 7 9800X3D, Windows 11 build 26300, rustc 1.99.1 MSVC; debug tests.

  • cargo build --offline --locked --workspace: passed.
  • cargo test --offline --locked -p xcl --lib read_back_writes_what_the_gpu_holds_into_the_title_memory -- --nocapture --test-threads=1: 1 passed, 0 failed, 0 ignored; the real RTX adapter ran the GPU readback fixture.
  • cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --quiet: 1,438 passed, 0 failed, 47 ignored across 37 test executables. There were 25 GPU SKIPPED notices, mainly unsupported wave64 cases; they are not counted as GPU coverage. These results are for the unmodified PR head.

One source-level gap remains in the new page-safe baseline. read_committed uses a raw pointer copy when uma.in_committed_window(va, len) is true. That predicate checks window membership, not the current page protections. kernelx::VirtualProtect can pass PAGE_NOACCESS to Windows for an interior page. The raw copy can then fault before write_writable gets to skip that page. The new decommit test allocates outside the UMA window, so it does not exercise this branch.

The existing copy_committed_region uses ReadProcessMemory and splits failed spans around inaccessible pages. Using it for the coherent-window branch avoids a VirtualQuery walk over the large window:

Suggested one-line diff
@@ unsafe fn read_committed(at: usize, len: usize) -> Vec<u8> {
     if crate::gpu::uma::get().is_some_and(|u| u.in_committed_window(at, len)) {
-        std::ptr::copy_nonoverlapping(at as *const u8, out.as_mut_ptr(), len);
+        copy_committed_region(at, out.as_mut_ptr(), len);
         return out;
     }

In a separate local copy with only that line changed, written_subresources passed 2/0/0 and the real-GPU readback test passed 1/0/0. A regression should protect an interior page of an actual coherent UMA allocation and check neighboring pages. I did not run that protected-window case, so this is a source finding and a suggested fix, not a reproduced crash or a validated protection regression. I did not run a retail title, a paired smoke test, AMD or Intel hardware, or a readback caller in production.

AI use: Codex (GPT-6.2 Sol) reviewed the source, made the local trial change, ran the tests, and drafted this report; Codex (GPT-6.2 Astra) independently checked the page-protection path.

@Decodere

Copy link
Copy Markdown
Contributor

Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2678 at cfed80cff0cd8a06aee72d6898daf2955dcf3690 (exact parent origin/main b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7). Measurements and targeted test results only; not a full source review.

Setup

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6 cores / 12 threads), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200
  • Toolchain / caches: rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2609.5, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs)
  • Workload: Retail workload title: 29640639 via scripts/smoke.ps1 -Seconds 60 (XCL_NETWORK=0 XCL_ACTIVITY=1, default flags, no input)

Targeted RTX 4060 release unit tests (cfed80cf)

  • cargo test --release -p xcl --lib written_subresources_skip_a_page_the_title_unmapped -- --nocapture: 1 passed, 0 failed, 0 ignored (0.04 s, exit 0).
  • cargo test --release -p xcl --lib written_subresources_read_back_as_the_same_texels -- --nocapture: 1 passed, 0 failed, 0 ignored (0.02 s, exit 0).
  • cargo test --release -p xcl --lib read_back_writes_what_the_gpu_holds_into_the_title_memory -- --nocapture: 1 passed, 0 failed, 0 ignored (0.45 s, exit 0).
  • cargo test --release -p xcl --lib gpu::texture:: -- --test-threads=4: 15 passed, 0 failed, 0 ignored (0.62 s, 0 skipped, exit 0).
  • cargo test --release -p xcl --lib hle::d3d12x::title_textures:: -- --test-threads=4: 22 passed, 0 failed, 0 ignored (1.03 s, 0 skipped, exit 0).

Observations

  • All 3 new GPU-written title-texture readback tests (written_subresources_skip_a_page_the_title_unmapped, written_subresources_read_back_as_the_same_texels, read_back_writes_what_the_gpu_holds_into_the_title_memory) and all 37 targeted gpu::texture:: + hle::d3d12x::title_textures:: tests passed cleanly in --release on this RTX 4060 (8 GB) host with 0 skips.
  • Quiet 60 s retail smoke ran cleanly (exit: 0x0, 1539 frames shown, 60 60 60 steady-state presents per 2 s, 0 device removals, 0 crashes, 14019 MB peak commit vs parent b49be183's 14018 MB / 1518 frames).

Paired 60 s RTX 4060 smoke (b49be183 vs cfed80cf)

Parent origin/main (b49be183):

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1518 (PresentX 1518)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14018 MB

PR #2678 head (cfed80cf):

xcl-smoke v1
commit: cfed80cff0cd8a06aee72d6898daf2955dcf3690
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1539 (PresentX 1539)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14019 MB

Limits of coverage

  • Full workspace test suite was not re-run on cfed80cf (only targeted gpu::texture:: and hle::d3d12x::title_textures:: release tests plus paired quiet 60 s smoke).
  • The quiet 60 s no-input retail smoke verifies no runtime regression on normal texture paths; live title readbacks of GPU-written tiled textures back to CPU memory are exercised by the GPU/title-memory unit tests above.
  • Single discrete NVIDIA 8 GB GPU (RTX 4060) on native Windows 11; no AMD, Intel, or Wine/Linux run on this host.

AI use

Ran the targeted release unit tests and paired quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts and smoke blocks were taken directly from cargo test and scripts/smoke.ps1 outputs.

@andrewDoing

Copy link
Copy Markdown

RTX 5070 timeout and recovery in texture download

On PR #2678, head cfed80cff0cd8a06aee72d6898daf2955dcf3690, the production texture download returned its configured 10,000 ms timeout after 10.012 s on a deliberately gated direct queue. After signalling the gate, the queue drained and a second download returned all 16 source texels exactly, from 0 through 105 in steps of 7. The native device remained healthy. The live D3D12 info queue contained no error or corruption messages during the measured interval. Run log

One test passed in 10.47 s. A local test-only overlay uploaded a 4 × 4 R8_UNORM texture, inserted the queue wait, and checked the recovery. It used the Windows default adapter, independently identified as the RTX 5070. The first download returned an error and exposed no data to the caller. This exercised one timeout with the caller holding its texture reference, followed by a successful retry. Long-running memory use after repeated timeouts and retail behavior remain unmeasured.

AI use: OpenAI Codex prepared the local probe, ran it and wrote this report.

@JJAutoCompare

Copy link
Copy Markdown

Tested: Clean cfed80cff0cd8a06aee72d6898daf2955dcf3690, Windows 11 build 26200.9974, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC debug. Built cargo test --locked -j 2 -p xcl --lib --no-run. Four separate Arc invocations with --exact --test-threads=1 --nocapture passed: read_back_writes_what_the_gpu_holds_into_the_title_memory, gpu_console_textures_upload_every_mip_and_slice, gpu_upload_batches_reuse_the_queues_upload_buffer, gpu_large_mixed_upload_keeps_tight_staging_and_exact_pixels. Zero failures, ignores or skips. Copy-back matched synthetic tiled RGBA8 and BC7 bytes, including mips, arrays and volumes. It also checked repeat writes, read-only page preservation and refusal of multi-plane and multisampled textures.

Not tested: Coherent UMA PAGE_NOACCESS, production game callers, full suite and retail smoke.

AI use: T3 Code / Codex (gpt-6.2-sol) ran and reran the checks and drafted this report.

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.

9 participants