Skip to content

D3D12.X: a sampled texture in the memory of a written one of another format is copied from it (XCL_ALIAS_COPY=1) - #3094

Open
imnicho wants to merge 1 commit into
xcl-dev:nvidia-devfrom
imnicho:alias-copy
Open

imnicho wants to merge 1 commit into
xcl-dev:nvidia-devfrom
imnicho:alias-copy

Conversation

@imnicho

@imnicho imnicho commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

With XCL_ALIAS_COPY=1, a sampled texture the title places in the memory of a written one of another format is copied from it on the GPU. A retail title reads its sky, its light probes and its bounced light through 59 such pairs; on nvidia-dev they were stale, and with the copies its room, sky and yard are lit. The default is unchanged (off).

Plan comment: #1989 (comment)

What is in it

The title packs light as R9G9B9E5 into R32_UINT textures with unordered access (a compute program cannot store R9G9B9E5) and samples the same memory through R9G9B9E5 textures it places at the same addresses. On the console the two are one memory. On nvidia-dev the written one is GPU-owned (vram) and the sampled one is a texture of its own, kept in step with the title's memory (title_textures), which nothing writes. Many of the pairs are at addresses that are not on 64 KiB pages, where the two cannot share pages either.

New module hle/d3d12x/alias_copy.rs:

  1. The pairs. create_placed_resource_x tells it of every placed texture (three places: GPU-owned, kept in step, a resource of its own). A pair is a written texture (render target or UAV) and a sampled one at the same address with the same size, levels, layers and texel width and another format. Buffers, depth buffers, multisampled and block-compressed textures are not kept.
  2. When. The title moves the written texture with an enhanced barrier (list Compute dispatches: a shader takes no more arguments from user SGPRs than it has (XboxBvhBuilder builds empty BLAS / TLAS) #146) after writing it: access UNORDERED_ACCESS to SHADER_RESOURCE, layout 3 to 6, all subresources. uav_barrier_x still answers that call with one UAV barrier for all resources; plan_enhanced now reads the texture barriers of its groups, and one whose access before is render target or unordered access asks for the copy. A legacy transition out of RENDER_TARGET / UNORDERED_ACCESS asks for it too (plan, from resource_barrier_x). Nothing else of an enhanced barrier is used: translating them into states stays D3D12.X: translate list #146 Enhanced Barriers to legacy ResourceBarrier #1025's.
  3. The copy. Through a buffer made at the pair's first copy: each level and layer into the buffer by the written format's footprint and out of it by the sampled one's (list_x::texture_through_buffer, on the PC list past XCL's hooks). The two textures go to the copy states and back from the states the legacy barriers left them in; a texture a transition named only part of is left out. On DIRECT and COMPUTE lists. title_textures::note_gpu_write is told, so no upload from the title's memory goes over the copy.
  4. Off by default. With the switch off nothing is kept and each hook is one atomic load.

The pairs by address and shape and the copy through a buffer are @raylitebull's, from #1989. This is that mechanism written for nvidia-dev with the enhanced barrier as its trigger; #1989 syncs at legacy transitions and UAV barriers, which this title does not issue for these textures on nvidia-dev (numbers below).

Size: 5 files, 421 lines of code and 252 of tests.

Not in it: views by address (#70 / #71), CopyResource between format families, a copy back from the sampled texture, buffers of pairs that went are kept until the process ends (59 pairs in a whole run of the title).

Tested

cargo test -p xcl --lib -- --test-threads=4 (debug) on 839b33a1f: 1778 passed, 0 failed, 28 ignored, 27 SKIPPED lines (21 "no wave64", 3 f16 forms refused after #1426, 1 "no heap windows", 1 "no GPU_UPLOAD heaps", 1 "cannot disable the driver cache"). The head 6396870e2 differs from it by one condition (below) and the larger WARP test; the module's 4 tests were run again on it and pass.

New tests:

  • gpu_a_written_textures_texels_reach_its_sampled_pair_at_the_enhanced_barrier (WARP): an R32_UINT array texture with unordered access, 70 layers and two levels (140 parts) holds a different value in every texel; after the enhanced barrier (access 0x10 to 0x80) and record, its R9G9B9E5 pair, read back, holds the same bits in every level of every layer.
  • After @andrewDoing's report below (a pair of 128 parts was refused): the first version turned away pairs of more than 64 levels times layers. That limit is gone, and the WARP test above was 2 levels of one layer before.
  • a_sampled_texture_in_the_memory_of_a_written_one_of_another_format_is_its_pair, a_written_textures_transition_out_of_a_written_state_asks_for_the_copy, an_enhanced_barrier_of_a_written_texture_asks_for_the_copy (the pairs, the two triggers and what does not trigger, a call that is no list of groups).

In the title (RTX 5080 16 GB, driver 610.47, Intel Core i7-7700K, 16 GB RAM, Windows 10 22H2, release build, Series S profile, 600 s limit, warm shader caches):

The tree is nvidia-dev d1be8103 with the other changes listed in the set-up of my #1989 report and #3089's commit (the lighting target's depth plane) instead of #1989's merge, XCL_DEPTH_UAV_TWIN=1.

  • The pairs. 59 found in every run, all written as R32_UINT with unordered access and read as R9G9B9E5: 11 of 1280x720, 8 of 640x360, 5 of 480x272, 5 of 40x23 with 64 layers or slices, 3 of 128x128 with 8, two of 128x128 and one of 64x64 with 6, three of 2048x120 (two with 4 levels), two each of 2304x576, 2048x512, 1280x320, 768x192, 320x180, 192x108, 160x90, 80x45 and 40x23, and one each of 1024x1024, 32x32 and 20x12.
  • The barriers. 121 frames into the world of one run, counters stood at 459 enhanced barriers of written textures of a pair, the 8 logged all access 0x10 -> 0x80, layout 3 -> 6, all subresources, and at 0 legacy transitions, 0 aliasing barriers and 0 UAV barriers naming one. So D3D12.X: add depth+UAV color twins, format-aliased placed texture copies, and dual-twin UAV barriers #1989's own triggers do not fire for these on nvidia-dev.
  • Without the copies (the build of the version before the clean-up, switch off), a run of 277 frames after the world's set-up: the room after the opening cutscene has its direct light only; the window shows no sky and no yard.
  • With this module, 8 runs: every copy logged was at an enhanced barrier (512 to 16,384 a run, the line being written at powers of two), none left out for a state, a list kind or a pair that cannot be copied. The written textures were in state 0x8 or 0x0 and the sampled ones in 0x0, as nvidia-dev has them. One run reached the 600 s limit: 586 frames after the world's set-up at 155 s, 2,110,141 draws, none skipped, 16,384 copies logged by 484 s, no device loss; in its captures the room's walls, the window with the sunset sky, the yard, the fence and the lettering on the clothes are lit. The other 7 ended at this tree's GPU hang before the room: 67, 86, 90, 99, 107, 128 and 227 frames after the set-up. (The last three of the 8, the full one among them, were of a build that also had a local lookup for another experiment switched on; it matched nothing in 2,097,152 tries.)
  • With the version before its clean-up (the same pairs and the same enhanced-barrier trigger, and copies of all pairs at the title's whole-memory cache flushes too, about three a run), 3 runs: 736 frames with the 600 s limit reached, 32,768 copies logged by 582 s, no device loss, and the room's walls, the window with the sunset sky, the yard, the fence and the bunk lit in the captures; 160 frames; 121 frames.
  • The cost seen. Of the 11 runs with copies above and 2 more with another setting changed as well, 8 ended 67 to 128 frames after the set-up, where none of 3 runs of the same tree without copies did (150, 277 and 679 frames). So on this tree the copies bring its hang forward. Why is not known; the copies themselves are small (the 59 pairs hold about 86 MB in all), and one reading is that the title's own programs do more once the light they read is there.

Regression run

scripts/smoke.ps1, 60 s, XCL_PREPARE=0, each of the three built in release from a clean worktree. The switch is off in these runs, as it is by default.

main (e429936c):

xcl-smoke v1
commit: e429936c10a5b8aa09470ff99dfc8c8d3d8c56fd
gpu: NVIDIA GeForce RTX 5080
title: 21222967
seconds: 60
exit: 0x0
frames shown: 977 (PresentX 977)
presents per 2 s (last 3): 60 59 61
device removals: 0
crashes: 0
peak commit: 17427 MB

The base (nvidia-dev 01b94f5fc):

xcl-smoke v1
commit: 01b94f5fcdaaf519e3a4a7227d8db6b75829b857
gpu: NVIDIA GeForce RTX 5080
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1418 (PresentX 1418)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 12299 MB

This PR (6396870e2):

xcl-smoke v1
commit: 6396870e2184c80b7fa0404edf419d2f8ee262e1
gpu: NVIDIA GeForce RTX 5080
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1420 (PresentX 1420)
presents per 2 s (last 3): 60 61 60
device removals: 0
crashes: 0
peak commit: 12232 MB

Not tested

  • AMD and Intel GPUs, Linux / Wine, the Series X profile.
  • The title's world on this PR's head by itself: the runs are on the test tree.
  • The legacy-transition trigger in a title: this one moves these textures with enhanced barriers only. The unit test covers it.
  • Volumes and cubes in this PR's GPU test: it copies a 2D array. The title's were copied in its runs, and @andrewDoing's report below has a volume on an RTX 5070.
  • A COMPUTE list moving a sampled texture out of a state with PIXEL_SHADER_RESOURCE for the copy: in the title's runs the sampled ones were in state 0. The D3D12 debug layer is not available on this PC.
  • The integration test binaries of crates/xcl/tests (each d3d12_* one takes about 9 minutes here).
  • The copies' cost in frame time.

AI use

Claude Code with Claude Fable 5.2 wrote the code and the tests, ran the suite and the title, and wrote this description.

🤖 Generated with Claude Code

@imnicho

imnicho commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

CI: the "Build and test" job's one failure is not in this PR's code. The run shows 1781 passed, 1 failed, 28 ignored. The one is hle::kernelx::tests::a_page_whose_move_fails_stays_mapped_where_it_was (kernelx.rs:4161), a test of page moves this PR does not touch; it passed in my local run of the library suite on the same head (1778 passed, 0 failed) and #2773 is open about the address it uses. This PR's 4 tests pass in the CI run, the WARP one included.

AI use: Claude Code with Claude Fable 5.2 read the CI log and wrote this.

@andrewDoing

Copy link
Copy Markdown

I tested larger synthetic shapes on RTX 5070 / NVIDIA 616.92 at head 839b33a1, using a test-only extension of the enhanced-barrier alias-copy fixture. Each run paired an R32_UINT written texture with an R9G9B9E5 sampled texture, used distinct words across the data, and fenced the GPU readback.

Shape Planned jobs Recorded / refused Readback
40×23, 64-layer 2D array, 1 mip (64 subresources) 1 1 / 0 58,880 / 58,880 words matched
Same array, 2 mips (128 subresources) 1 0 / 1 72,960 / 72,960 words mismatched
40×23×64 3D volume, 2 mips (2 subresources) 1 1 / 0 65,920 / 65,920 words matched

The two-mip array hits make_through's parts > 64 limit. As a diagnostic only, changing that limit to 128 let the same array case record and all 72,960 words match. That isolates the observed refusal, but it does not establish that 128 is the right production budget or that the title uses a 64-layer, two-mip pair. The title report lists 64-layer/slice pairs and multi-mip pairs without establishing that they are the same pair.

All focused GPU runs completed without skips and the device remained healthy. No retail title, GPU memory budget, or timing was measured.

AI use: OpenAI Codex with GPT-6.2 Astra built and ran the fixture; Codex reviewed and prepared this report.

@KDenKC

KDenKC commented Nov 28, 2026 •

Copy link
Copy Markdown

@imnicho, thanks for this. We ported raylitebull's amd-dev format_alias.rs onto nvidia-dev locally for the same R32_UINT -> R9G9B9E5 problem, so here's what that taught us, read against 839b33a1. On an RTX 5090 that port took the HDR lighting target, the luminance chain and the final target from black to lit (sky, sun and fog; our G-buffer is still empty for the separate view-window reason in #505). So we expect yours to do the same here, and we'd rather add to this PR than open a second one.

One thing that looks like a defect:

  • Table::gone (alias_copy.rs:96) only grows. forget pushes every departed pair's Through into it (:190-191), and nothing ever drains it, so each pair the title tears down keeps its copy buffer for the life of the process. Keeping them while a list in flight may name them is right. Releasing them once the fence of the last list that recorded a copy with them has passed (or on the next list reset after forget) would bound it.

Coverage differences, as possible follow-ups on top of yours, not changes this PR needs:

  • Pairs are only found through create_placed_resource_x (the three note_created calls). The amd-dev version also catches readers made with Create{ShaderResource,UnorderedAccess}ViewAtX at the written texture's address. We haven't measured how many of this title's reads take that path.
  • It skips a copy when the written texture hasn't changed since the last one (a per-pair activity stamp).
  • On COMPUTE lists it checks that the state it transitions from is valid on that list type before recording. If a pair is copied on a compute list here, the transition from 0xC0 may need the same guard; we haven't seen it hit.

Checked and fine: the split-barrier test is bitwise (b[1] & BEGIN_ONLY, :229), so the console hint bits that #3090 now keeps don't break it. That was the one place our own rebase onto 54225f58 needed a fix.

We're glad to send any of the follow-ups as small PRs stacked on this one if you'd like them.

AI use: an agent swarm: Claude Opus 5.5, GPT-6.2-Sol and Gemini 4 Neon.

@DarkPanda69

DarkPanda69 commented Nov 28, 2026 •

Copy link
Copy Markdown

Update for head 6396870 (the limit of 64 parts removed): same command, same merge-base, 54 passed, 0 failed, 0 ignored, no SKIPPED with XCL_ADAPTER=Radeon and with =3060, and no result changes from 839b33a. The 70-layer test still runs on WARP, so the same caveat applies.

Run on an RX 9070 XT and an RTX 3060 in the same PC: the four new tests pass, and nothing in list_x changes. But the GPU test runs on WARP, so this isn't AMD hardware coverage of the copy.

Tested: at the PR head 839b33a against its merge-base with nvidia-dev, 01b94f5 (the diff doesn't apply as a patch on today's nvidia-dev 54225f5). Debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X. RX 9070 XT driver 32.0.32029.2010; RTX 3060 driver 32.0.16.1088.

  • cargo test -p xcl --lib -- hle::d3d12x::alias_copy hle::d3d12x::list_x::tests:: --test-threads=1 --nocapture, once with XCL_ADAPTER=Radeon and once with =3060: merge-base 50 passed, 0 failed (list_x only, since alias_copy is new); PR 54 passed, 0 failed, 0 ignored, no SKIPPED, both times.
  • The only changes are the four new alias_copy tests, all ok.
  • gpu_a_written_textures_texels_reach_its_sampled_pair_at_the_enhanced_barrier builds its device on EnumWarpAdapter, so it ran on WARP both times, not on either card. If you want a hardware data point for the copy, I can run that test on the RX 9070 XT and the RTX 3060 with the device swapped to the XCL_ADAPTER card.

Not tested: XCL_ALIAS_COPY=1 in a title, the whole suite, Intel.

AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

…format is copied from it (XCL_ALIAS_COPY=1)

A retail title packs light as R9G9B9E5 into R32_UINT textures with
unordered access and samples the same memory through R9G9B9E5 textures
it places at the same addresses (59 pairs: its sky, its light probes, the
bounced light its lighting pass adds). On the console the two are one
memory. Here the written one is GPU-owned and the sampled one is a
texture of its own, kept in step with title memory nothing writes, so
what is read through it is stale.

alias_copy keeps the title's placed textures by address. Where a sampled
one lies in the memory of a written one of the same size, levels, layers
and texel width, the written one's texels are copied into it on the GPU
through a buffer, where the title says the written one is written no
more for now: at its enhanced barrier of that texture (list xcl-dev#146) whose
access before is render target or unordered access, and at its legacy
transition out of those states. Only that is read of an enhanced
barrier; the two textures are moved to the copy states and back from the
states the legacy barriers left them in.

Off by default: with the switch off nothing is kept and each hook is one
atomic load.

The pairs by address and shape and the copy through a buffer follow the
format-aliased copies of xcl-dev#1989 by raylitebull.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@imnicho

imnicho commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

@andrewDoing thank you, that was a real hole: the limit of 64 parts was an arbitrary one of mine, and a pair past it was silently left stale (counted under "pairs that cannot be copied", nothing more). The head is now 6396870e2: the limit is gone, and the PR's own WARP test is an array of 70 layers with two levels (140 parts) instead of two levels of one layer. In the title's runs that counter stayed at 0, so none of its 59 pairs was past 64. The description has the new head's smoke block; the library suite's counts are from the commit before (839b33a1f), with the module's 4 tests run again on the head.

AI use: Claude Code with Claude Fable 5.2 made the change and wrote this.

@andrewDoing

Copy link
Copy Markdown

I reran the three native RTX 5070 / NVIDIA 616.92 alias-copy controls from my earlier report on updated head 6396870e2184c80b7fa0404edf419d2f8ee262e1, using the same test overlay and production enhanced-barrier planner/recorder.

  • 64-layer 2D array, two mips: 1 recorded / 0 refused, all 72,960 / 72,960 words matched. The earlier head recorded none, refused one, and all words mismatched.
  • 64-layer array, one mip: 58,880 / 58,880 matched.
  • 64-deep 3D volume, two mips: 65,920 / 65,920 matched.

All three fenced readbacks passed without skips. This validates the synthetic subresource boundary and controls; the title's use of the exact two-mip array shape, performance, and memory budget remain unmeasured.

AI use: OpenAI Codex with GPT-6.2 Astra ran the tests; Codex reviewed and prepared this report.

@thehollowedone

thehollowedone commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

merge-check
base: 54225f5 (nvidia-dev)
head: 6396870 (6396870)
merge: clean, five files, +675/-2

Independent Windows check: cargo build --offline --locked -j 4 --workspace passed on the merged tree. With XCL_ALIAS_COPY=1, cargo test --offline --locked -j 4 -p xcl --lib alias_copy::tests -- --nocapture --test-threads=1 passed 4/4, no skips. The full cargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4 ran on both trees: head merged onto base 1,911 passed / 3 failed / 48 ignored, base 1,907 passed / 3 failed / 48 ignored. Both printed 26 explicit SKIPPED notices, which are included in Cargo's passing counts. The same three library tests failed on both: console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk, a_held_submit_goes_on_when_the_hold_ends_and_at_once_inside_a_timed_call, and a_thread_in_the_driver_is_seen_until_it_returns. These failures do not distinguish this PR from the base.

verdict: not yet

Review verdict: not yet. I traced two state mismatches in the opt-in path. These are source-level findings; I have not run a GPU regression for either boundary.

  1. Legacy planning sees raw console barriers before texture states are normalized. For a texture transition 0x8 -> 0xC1, the native list receives 0x8 -> 0xC0 after the buffer-only 0x1 is removed, but alias-copy state tracking retains 0xC1. Its injected copy then requests a transition from the state the native barrier never established. Plan from the normalized out barriers instead, before other features mutate that vector. A WARP debug-layer test should call the actual resource_barrier_x path and execute the following copy with this state combination.
  2. The planner updates Tex.now globally while recording. Recording a transition on list A and then resetting A without submission still changes the state used to build the injected transitions on list B. For example, an unsubmitted COPY_DEST -> COPY_SOURCE leaves the GPU in COPY_DEST, while the planner would use COPY_SOURCE as B's before-state. Keep pending states with the recording list, discard them on reset, and commit them in queue submission order. A two-list reset/cancel test under the debug layer would guard this lifecycle.

The PR's WARP fixture verifies its copy path; this check did not measure title visuals, title performance, or paired smoke. Hardware: Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), rustc 1.99.1. AI use: Codex (GPT-6.2 Sol) ran the builds and tests and checked the source paths; Codex (GPT-6.2 Astra) independently reviewed the state invariants.

@upipibi

upipibi commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Test report for #3094 on NVIDIA: the whole workspace suite on this PR merged onto today's nvidia-dev and on nvidia-dev alone, and the PR's own tests 3 times by name.

Tested

  • Base: nvidia-dev 54225f5884a94cd23b7aab3f703a7c975070aa77. Head: 6396870e2184c80b7fa0404edf419d2f8ee262e1. git merge --no-ff of the head onto the base: clean, no conflicts (list_x.rs auto-merged); the merge (d6fa58fc, local) differs from the base by 5 files, +675/-2.

  • RTX 3070 8 GB (Ampere, 32-lane waves), driver 616.56, Windows 11 Pro 10.0.26100, Rust 1.100.0 MSVC, debug. Each tree in its own worktree and target dir; XCL_ALIAS_COPY not set.

  • cargo build --workspace and cargo build --workspace --tests: both exit 0 on both trees, 9 and 10 warnings, the same count as the base.

  • cargo test --workspace --no-fail-fast -- --test-threads=4, once on each tree. On both trees the xcl library binary stopped partway through, before printing its result. It exited with code 130088963 (0x7C10003) after D3D12.X: coherent window could not be restored at ... (268435456 bytes, got 0x0, Windows error 487) after CreateCommandQueue: ... (0x8007000E); stopping before guest memory is used, which a uma_driver mixed-window test prints. The other 39 result lines:

    • merge: 132 passed, 0 failed, 20 ignored, 26 SKIPPED lines;
    • base: 132 passed, 0 failed, 20 ignored, 26 SKIPPED lines; the same per-binary results as the merge.
    • Before the stop, the library binary printed 4 FAILED lines on the merge and 5 on the base: the 4 title_textures tests below on both, plus hle::d3d12x::list_x::tests::mid_list_write64_wait64_split_avoids_cycle_and_reuses_spares on the base only. That test passed in the base's 3 library re-runs and 3 of 3 times alone, and it passed in the merge's run.
  • Because of that stop, the library binary was run again on each tree with the two mixed-window tests skipped: cargo test -p xcl --lib -- --test-threads=4 --skip hle::d3d12x::uma_driver::tests::a_refused_gpu_upload_segment_becomes_custom --skip hle::d3d12x::uma_driver::tests::mixed_window_keeps_its_bytes_and_the_gpu_sees_every_segment:

    • merge: 1774 passed, 6 failed, 28 ignored (2 filtered out), 26 SKIPPED lines;
    • base: 1770 passed, 6 failed, 28 ignored (2 filtered out), 26 SKIPPED lines, the same in 3 runs.
    • The 6 failures have the same names on both trees: hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels, …stream_recheck_keeps_the_whole_upload_baseline_over_partial_uploads, …stream_recheck_partial_upload_without_an_entry_queues_a_whole_upload, …stream_recheck_schedule_catches_late_writes_and_resets_milestones, hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory and …gpu_retire_queue_holds_heap_until_blocked_queue_passes_mark. Three panic on 0x8007000E (E_OUTOFMEMORY) from a D3D12 call, and the other three stream_recheck_* ones on a PoisonError after those panics. All 6 pass alone, one at a time, 3 of 3 times on the base.
    • The two skipped mixed-window tests pass alone on both trees: 2 passed, 0 failed, 3 of 3 times each (--exact --test-threads=1).
    • Together with the other 39 result lines of the workspace run: merge 1906 passed, 6 failed, 48 ignored, base 1902 passed, 6 failed, 48 ignored. The difference of 4 is the PR's new tests: the merge lists 1810 library tests, the base 1806.
  • The 26 SKIPPED lines are the same on both trees: 21 "no wave64", 3 f16/f32 per-lane forms refused after gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426, 1 "no heap windows", 1 "cannot disable the driver cache".

  • None of the 9 tests in main e429936 on NVIDIA: 3 e2e title tests and 6 split-wave64 GPU tests fail since #2959 #3093 fail here. The 5 split-wave64 tests present on nvidia-dev and the 3 e2e title tests pass on both trees; gpu_heap_flat_reads_match_guarded_and_root_output is not in nvidia-dev's test list.

  • The PR's own tests, by exact name, 3 runs: cargo test -p xcl --lib -- <the 4 names> --exact --test-threads=1 --nocapture. 4 passed, 0 failed, 0 ignored in each of the 3 runs, 0 SKIPPED lines:

    • hle::d3d12x::alias_copy::tests::a_sampled_texture_in_the_memory_of_a_written_one_of_another_format_is_its_pair
    • hle::d3d12x::alias_copy::tests::a_written_textures_transition_out_of_a_written_state_asks_for_the_copy
    • hle::d3d12x::alias_copy::tests::an_enhanced_barrier_of_a_written_texture_asks_for_the_copy
    • hle::d3d12x::alias_copy::tests::gpu_a_written_textures_texels_reach_its_sampled_pair_at_the_enhanced_barrier

    The GPU test's fixture makes its device on WARP (EnumWarpAdapter), so these runs do not test the copy on the RTX 3070 itself.

Not tested

  • No xcl-smoke block: no title was run.
  • XCL_ALIAS_COPY=1: every run here had the switch unset.
  • The PR's GPU test on the RTX 3070 rather than WARP.
  • A release build, AMD or Intel GPUs, Linux / Wine.

AI use: Claude Code (Claude Opus 5.5) ran the tests above on the hardware named and wrote this report.

@minimalhipster990

Copy link
Copy Markdown

RTX 4090, Series X profile, clean head 6396870e2184c80b7fa0404edf419d2f8ee262e1. The courtyard reaches the G-buffer and the swapchain on the unmodified PR executable. With alias copies enabled, the log reaches at least 16,384 enhanced-barrier copies and zero legacy copies at that checkpoint.

Copies off/on at the same 50 ms graphics wait. I matched the first three heavy frames using features in the base-color dump, then compared the format-10 FP16 target on pixels where the aligned base colors agreed within 8/255 in every channel. In the first pair (BMP 1908 off / 1899 on), 157 features agreed with 0.05-pixel median residual at 640×360. Both HDR targets ran 168 draws, with 487/486 stand-ins off/on. Across 60,341 matching scene pixels the median brightness in XCL’s tone-mapped 8-bit HDR preview was 0 off / 182 on. Both final images were still nearly black. The next two matched HDR pairs gave 0 / 177 and 0 / 191. By the third pair (1910 off / 1901 on), the median of the whole presented image was 21 / 197. The off image shows a dark yard with a few lights. With copies on, people and tables are visible in bright haze. This supports the courtyard lighting change on Ada. Exposure and geometry are still visibly broken. The cell interior and the copies' frame-time cost remain unmeasured here.

Getting past the loading artwork. I used the same checkpoint, A presses at 25/30/35/40/62/64 s and a fresh verified copy of the same populated XCL cache (4,946 files) for each 360 s run. With copies on and the default graphics pipeline wait, the last interval with a present ended at 116.07 s. One thread spent 241.62 of the remaining 243.93 s inside 59 logged graphics pipeline waits. With just XCL_GFX_PSO_WAIT_MS=50 changed, the recorder completed a world frame at 152.91 s. Earlier cold-cache (395 s) and populated-cache (600 s) off/on pairs with the default wait had also ended with loading artwork as their last sampled image.

Where the world first appears. In capture_1900/frame.jsonl, stream entry 1104 is the first recorded indirect mesh dispatch, writing 2560×1440 depth. Entry 22539 is the first recorded mesh dispatch with six 2560×1440 color targets (formats 29/28/28/28/34/28). Both ran on lists submitted to the queue of PresentX 1900. Three earlier list references have missing or partial recordings. In the corresponding BMP sample 1899, courtyard tables and figures are already visible in the base color and HDR target while the final image is black. Sample 1901 presents the courtyard with strongly overexposed lighting. The capture also contains 291 stand-ins, 347 deferred and 450 skipped operations out of 19,406 recorded draws/dispatches.

Reproduction settings. Windows 11 build 26300, RTX 4090 24 GB, NVIDIA 621.40, Ryzen 7 5800X3D, 32 GB RAM. XCL_DEVICE_TYPE=anaconda XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=16 XCL_DIRECT_DXIL=1 XCL_COHERENT_MB=3990 XCL_COHERENT_HEAPS=sparse XCL_TEXTURE_LEVEL_PAGES=1 XCL_PAGE_BUDGET_MB=1024 XCL_VIEW_POOL_MB=1024 XCL_CS_PSO_WAIT_MS=200 XCL_TWO_PASS_MB=3072. Capture used XCL_CAPTURE_FRAME=500,80 XCL_DUMP_TARGETS=500,3,8 XCL_DUMP_AFTER_S=80 XCL_FRAME_DUMP=12. Network and preparation were disabled. The NVIDIA driver cache remained driver-managed. The 50 ms pair completed 360 s with 2,417 frames shown off and 2,361 on, both exit 0 with no logged device removal. This report covers the retail title.

OpenAI Codex (GPT-6) assisted with building the head, running the title, verifying the traces and images, and writing 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.

7 participants