D3D12.X: apply buffer_delta on console_list copies and guard null/sampler records #3315

Open
Kalmarv wants to merge 1 commit from upstream-pr/3315 into main
Kalmarv commented 2026-11-29 07:26:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-29T07:26:04Z.


Problem

During console_list::close replay in crates/xcl/src/hle/d3d12x/console_list.rs:

  1. COPY_BUFFER_MARKER replayed CopyBufferRegion(d, q(1), s, q(3), q(4)) without adding real::buffer_delta(dst) / real::buffer_delta(src) (unlike list_x::copy_buffer_region_inner). Any copy involving a shifted UMA buffer read or wrote at the wrong buffer offset.
  2. COPY_TEXTURE_MARKER replayed CopyTextureRegion without adding real::buffer_delta(pResource) to PlacedFootprint.Offset when Type == D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT (unlike list_x::pc_location). Any texture upload or readback using a shifted UMA buffer footprint copied from or into the wrong offset.
  3. CLEAR_UAV_MARKER only checked g.pc_gpu_uav != 0 without checking !g.sampler && !c.sampler && c.pc_uav != 0 (unlike list_x::uav_clear_handles, which rejects sampler slots, and additionally ensuring the CPU UAV handle is non-zero before calling ClearUnorderedAccessViewUint / Float).
  4. Recording hooks cl_resource_barrier, clear_uav, and cl_copy_texture_region dereferenced barriers, values, dst, and src without null-pointer guards.

Fix

In crates/xcl/src/hle/d3d12x/console_list.rs:

  • Add replay_copy_buffer_region, pc_copy_location, and replay_copy_texture_region, applying real::buffer_delta with checked_add to CopyBufferRegion offsets and D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT offsets (skipping the record cleanly if a resource is null or an offset addition overflows).
  • Add clear_uav_slot_usable requiring !g.sampler && !c.sampler && g.pc_gpu_uav != 0 && c.pc_uav != 0 in CLEAR_UAV_MARKER.
  • Guard null pointers in cl_resource_barrier (n == 0 || barriers.is_null()), clear_uav (values.is_null()), and cl_copy_texture_region (dst.is_null() || src.is_null()).
  • Add unit tests clear_uav_slot_usable_requires_non_sampler_and_nonzero_handles and null_pointers_in_console_list_recording_are_ignored, plus end-to-end GPU test gpu_console_list_copies_apply_buffer_delta verifying shifted CopyBufferRegion and CopyTextureRegion (upload + readback) plus overflow rejection on a real D3D12 queue.

Tested

Tested on Windows 11 Pro (Build 26200), AMD Ryzen 9 9950X, NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.1074), DXC 1.9.2609.5, rustc 1.99.0.

  • cargo check --workspace --all-targets: passed, 0 errors.
  • Targeted tests (cargo test --lib -- console_list::tests --test-threads=1): 14 passed, 0 failed (including gpu_console_list_copies_apply_buffer_delta on RTX 5070 Ti).
  • Full workspace GPU suite (cargo test --workspace -- --test-threads=4): 2611 passed, 0 failed, 49 ignored (26 runtime-skipped by capability guards).
  • Real-title 150 s smoke (xcl-smoke), main-ancestor baseline vs this branch (0 device removals, 0 crashes, 0 minidumps, 0 System display events):

Baseline (f0e8fdd5):

xcl-smoke v1
commit: f0e8fdd5c3942ddd399d5ee11384c8595c5aacff
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 150
exit: 0x0
frames shown: 1695 (PresentX 1695)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 31546 MB

Branch (d9b869ed):

xcl-smoke v1
commit: d9b869edd6ae7e8fe12839bc74dfbb740098f6be
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 150
exit: 0x0
frames shown: 1898 (PresentX 1898)
presents per 2 s (last 3): 16 0 0
device removals: 0
crashes: 0
peak commit: 32434 MB

Not tested

  • Live XCL_CONSOLE_LISTS=1 replay inside a title using shifted console-list copies (covered by the synthetic D3D12 GPU test gpu_console_list_copies_apply_buffer_delta, while the 150 s smoke ran with default settings).
  • AMD and Intel GPU hardware.

AI use

Used an AI coding assistant to audit console_list.rs against list_x.rs, implement the buffer_delta / guard fixes and GPU test, and run all local verification and smoke checks.

<!-- greyfinch-sync:ivall/xcl:issue:5548617833 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3315). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-29T07:26:04Z. --- **Problem** During `console_list::close` replay in `crates/xcl/src/hle/d3d12x/console_list.rs`: 1. `COPY_BUFFER_MARKER` replayed `CopyBufferRegion(d, q(1), s, q(3), q(4))` without adding `real::buffer_delta(dst)` / `real::buffer_delta(src)` (unlike `list_x::copy_buffer_region_inner`). Any copy involving a shifted UMA buffer read or wrote at the wrong buffer offset. 2. `COPY_TEXTURE_MARKER` replayed `CopyTextureRegion` without adding `real::buffer_delta(pResource)` to `PlacedFootprint.Offset` when `Type == D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT` (unlike `list_x::pc_location`). Any texture upload or readback using a shifted UMA buffer footprint copied from or into the wrong offset. 3. `CLEAR_UAV_MARKER` only checked `g.pc_gpu_uav != 0` without checking `!g.sampler && !c.sampler && c.pc_uav != 0` (unlike `list_x::uav_clear_handles`, which rejects sampler slots, and additionally ensuring the CPU UAV handle is non-zero before calling `ClearUnorderedAccessViewUint` / `Float`). 4. Recording hooks `cl_resource_barrier`, `clear_uav`, and `cl_copy_texture_region` dereferenced `barriers`, `values`, `dst`, and `src` without null-pointer guards. **Fix** In `crates/xcl/src/hle/d3d12x/console_list.rs`: - Add `replay_copy_buffer_region`, `pc_copy_location`, and `replay_copy_texture_region`, applying `real::buffer_delta` with `checked_add` to `CopyBufferRegion` offsets and `D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT` offsets (skipping the record cleanly if a resource is null or an offset addition overflows). - Add `clear_uav_slot_usable` requiring `!g.sampler && !c.sampler && g.pc_gpu_uav != 0 && c.pc_uav != 0` in `CLEAR_UAV_MARKER`. - Guard null pointers in `cl_resource_barrier` (`n == 0 || barriers.is_null()`), `clear_uav` (`values.is_null()`), and `cl_copy_texture_region` (`dst.is_null() || src.is_null()`). - Add unit tests `clear_uav_slot_usable_requires_non_sampler_and_nonzero_handles` and `null_pointers_in_console_list_recording_are_ignored`, plus end-to-end GPU test `gpu_console_list_copies_apply_buffer_delta` verifying shifted `CopyBufferRegion` and `CopyTextureRegion` (upload + readback) plus overflow rejection on a real D3D12 queue. **Tested** Tested on Windows 11 Pro (Build 26200), AMD Ryzen 9 9950X, NVIDIA GeForce RTX 5070 Ti (driver `32.0.16.1074`), DXC `1.9.2609.5`, `rustc 1.99.0`. - `cargo check --workspace --all-targets`: passed, 0 errors. - Targeted tests (`cargo test --lib -- console_list::tests --test-threads=1`): 14 passed, 0 failed (including `gpu_console_list_copies_apply_buffer_delta` on RTX 5070 Ti). - Full workspace GPU suite (`cargo test --workspace -- --test-threads=4`): 2611 passed, 0 failed, 49 ignored (26 runtime-skipped by capability guards). - Real-title 150 s smoke (`xcl-smoke`), `main`-ancestor baseline vs this branch (0 device removals, 0 crashes, 0 minidumps, 0 System display events): Baseline (`f0e8fdd5`): ``` xcl-smoke v1 commit: f0e8fdd5c3942ddd399d5ee11384c8595c5aacff gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 150 exit: 0x0 frames shown: 1695 (PresentX 1695) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 31546 MB ``` Branch (`d9b869ed`): ``` xcl-smoke v1 commit: d9b869edd6ae7e8fe12839bc74dfbb740098f6be gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 150 exit: 0x0 frames shown: 1898 (PresentX 1898) presents per 2 s (last 3): 16 0 0 device removals: 0 crashes: 0 peak commit: 32434 MB ``` **Not tested** - Live `XCL_CONSOLE_LISTS=1` replay inside a title using shifted console-list copies (covered by the synthetic D3D12 GPU test `gpu_console_list_copies_apply_buffer_delta`, while the 150 s smoke ran with default settings). - AMD and Intel GPU hardware. **AI use** Used an AI coding assistant to audit `console_list.rs` against `list_x.rs`, implement the `buffer_delta` / guard fixes and GPU test, and run all local verification and smoke checks.
andrewDoing commented 2026-11-29 07:38:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-29T07:38:11Z.


Verified buffer copies through console list recording and Close replay on d9b869ed, RTX 5070 / driver 616.92. With XCL_CONSOLE_LISTS=1, a synthetic caller issued four CopyBufferRegion records through console vtable slot 15, then Close through slot 9. Replay reported 4 copies, 0 skipped records. A native DIRECT queue executed the resulting list.

The fixture used production place_at_title_address on separately allocated, 64 KiB-aligned coherent blocks. Each copy moved 68 bytes from guest offset 36 to guest offset 92. All four source/destination placement-delta pairs passed: (0, 0), (256, 0), (0, 768), and (256, 768) bytes.

After fence completion, each destination had exactly the 17 expected address-tagged DWORDs at dst_delta + 92, sourced from src_delta + 36. All 1,007 other destination DWORDs and all 1,024 source DWORDs in each 4 KiB observation range retained their original values. This covers marker encoding and replay with independently shifted placements, beyond calling the replay helper directly. It exercises buffer copies; texture footprints, UAV clears and retail execution remain outside this fixture.

AI disclosure: OpenAI Codex built and ran the fixture and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7252595341 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3315#issuecomment-7252595341). Originally posted by [andrewDoing](https://github.com/andrewDoing) on 2026-11-29T07:38:11Z. --- Verified buffer copies through console list recording **and** Close replay on `d9b869ed`, RTX 5070 / driver 616.92. With `XCL_CONSOLE_LISTS=1`, a synthetic caller issued four CopyBufferRegion records through console vtable slot 15, then Close through slot 9. Replay reported **4 copies, 0 skipped records**. A native DIRECT queue executed the resulting list. The fixture used production `place_at_title_address` on separately allocated, 64 KiB-aligned coherent blocks. Each copy moved 68 bytes from guest offset 36 to guest offset 92. All four source/destination placement-delta pairs passed: (0, 0), (256, 0), (0, 768), and (256, 768) bytes. After fence completion, each destination had exactly the 17 expected address-tagged DWORDs at `dst_delta + 92`, sourced from `src_delta + 36`. All 1,007 other destination DWORDs and all 1,024 source DWORDs in each 4 KiB observation range retained their original values. This covers marker encoding and replay with independently shifted placements, beyond calling the replay helper directly. It exercises buffer copies; texture footprints, UAV clears and retail execution remain outside this fixture. AI disclosure: OpenAI Codex built and ran the fixture and drafted this report.
Foniass commented 2026-11-29 14:57:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-11-29T14:57:10Z.


merge-check
base: fa204595a488c60c6c5f905244f0172072c9c2a9
head: d9b869edd6ae7e8fe12839bc74dfbb740098f6be
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2607 passed, 4 failed, 49 ignored; SKIPPED: 44; failing: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3 (driver E_OUTOFMEMORY, same on base on this machine)
review: no bug found: no double delta, and it mirrors list_x::copy_buffer_region_inner and pc_location. It bundles four changes (the delta fix plus separate null and sampler guards). The GPU test calls the replay helpers directly and never goes through close()'s decoding. A doc comment landed on the wrong function. AI use names no model. The smoke does not reach it, because console lists are opt-in.
performance: 60 s smoke: 1676 frames (99.7 % of fa204595), peak commit 16937 MB (99.8 %)
verdict: not yet: split the guards from the delta fix (scope); the code is fine
hardware / tool and model: RTX 5070 Ti (driver 32.0.16.2114), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5

Merge-check run and written with Claude Code (Claude Opus 5.5): a test merge onto the base above, the full suite, and a 60 s scripts/smoke.ps1 run of a retail title against main on the same machine. The 4 fuzz_validate_and_gpu_* failures happen on main on this machine too.

<!-- greyfinch-sync:ivall/xcl:comment:7257703262 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3315#issuecomment-7257703262). Originally posted by [Foniass](https://github.com/Foniass) on 2026-11-29T14:57:10Z. --- ```text merge-check base: fa204595a488c60c6c5f905244f0172072c9c2a9 head: d9b869edd6ae7e8fe12839bc74dfbb740098f6be merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2607 passed, 4 failed, 49 ignored; SKIPPED: 44; failing: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3 (driver E_OUTOFMEMORY, same on base on this machine) review: no bug found: no double delta, and it mirrors list_x::copy_buffer_region_inner and pc_location. It bundles four changes (the delta fix plus separate null and sampler guards). The GPU test calls the replay helpers directly and never goes through close()'s decoding. A doc comment landed on the wrong function. AI use names no model. The smoke does not reach it, because console lists are opt-in. performance: 60 s smoke: 1676 frames (99.7 % of fa204595), peak commit 16937 MB (99.8 %) verdict: not yet: split the guards from the delta fix (scope); the code is fine hardware / tool and model: RTX 5070 Ti (driver 32.0.16.2114), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5 ``` Merge-check run and written with Claude Code (Claude Opus 5.5): a test merge onto the base above, the full suite, and a 60 s `scripts/smoke.ps1` run of a retail title against main on the same machine. The 4 `fuzz_validate_and_gpu_*` failures happen on main on this machine too.
Foniass commented 2026-12-01 05:49:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:49:50Z.


merge-check
base: d0832e614f
head: d9b869edd6
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2893 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: read the whole diff (console_list.rs, +316/-14, ~75 lines of code). Nothing changes by default: console lists only run with XCL_CONSOLE_LISTS=1. The buffer_delta fix is real and applied once: on main close() added no delta when replaying copies (unlike list_x.rs ~6611/6651), and the backing list's slots 15/16 send XCL's own calls straight to the PC method, so there's no double shift. Each side gets its own delta, the PC buffer is delta + bytes wide so the copy stays in bounds, and checked_add skips on overflow. Findings: (1) the tests call replay_copy_buffer_region / replay_copy_texture_region directly on an unhooked list, not through close(), so a mistake in the record decoding inside close() would pass; clear_uav_slot_usable is only tested as a predicate. (2) The new helpers were inserted under close()'s doc comment ("Turn the recorded console commands into commands on the PC list and close it."), which now documents clear_uav_slot_usable. (3) Three changes in one PR (delta, clear-UAV guard, null guards in recording). (4) The clear-UAV guard adds little: sampler GPU slots already have pc_gpu_uav == 0 (console_heap.rs ~1106), so the only new refusal is a CPU handle from a sampler heap. (5) AI use names no tool or model. Fine: the 48-byte copy-location decode is sound, the GPU test uses skip_test, and the null-pointer test would crash or fail without the guards. No smoke run: the default path doesn't reach console lists.
performance: no smoke run (the default path doesn't reach this change); not measured.
verdict: safe to merge (off by default; splitting the three changes and testing through close() would make it stronger)
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5

AI-written and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7302183235 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3315#issuecomment-7302183235). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:49:50Z. --- merge-check base: d0832e614fa7d6ae027bb4feb27ccb9121f54a8f head: d9b869edd6ae7e8fe12839bc74dfbb740098f6be merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2893 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none review: read the whole diff (console_list.rs, +316/-14, ~75 lines of code). Nothing changes by default: console lists only run with `XCL_CONSOLE_LISTS=1`. The buffer_delta fix is real and applied once: on main `close()` added no delta when replaying copies (unlike list_x.rs ~6611/6651), and the backing list's slots 15/16 send XCL's own calls straight to the PC method, so there's no double shift. Each side gets its own delta, the PC buffer is `delta + bytes` wide so the copy stays in bounds, and `checked_add` skips on overflow. Findings: (1) the tests call `replay_copy_buffer_region` / `replay_copy_texture_region` directly on an unhooked list, not through `close()`, so a mistake in the record decoding inside `close()` would pass; `clear_uav_slot_usable` is only tested as a predicate. (2) The new helpers were inserted under `close()`'s doc comment ("Turn the recorded console commands into commands on the PC list and close it."), which now documents `clear_uav_slot_usable`. (3) Three changes in one PR (delta, clear-UAV guard, null guards in recording). (4) The clear-UAV guard adds little: sampler GPU slots already have `pc_gpu_uav == 0` (console_heap.rs ~1106), so the only new refusal is a CPU handle from a sampler heap. (5) AI use names no tool or model. Fine: the 48-byte copy-location decode is sound, the GPU test uses `skip_test`, and the null-pointer test would crash or fail without the guards. No smoke run: the default path doesn't reach console lists. performance: no smoke run (the default path doesn't reach this change); not measured. verdict: safe to merge (off by default; splitting the three changes and testing through close() would make it stronger) hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5 AI-written and posted by Foniass without a human check of each point.
bmjask commented 2026-12-01 23:14:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-01T23:14:39Z.

Code review location: crates/xcl/src/hle/d3d12x/console_list.rs; line 1020

@@ -951,8 +1020,7 @@ pub unsafe fn close(obj: *mut c_void) -> Result<Translation, String> {
             } else if w0 == COPY_BUFFER_MARKER {

The COPY_BUFFER / COPY_TEXTURE replay now has list_x's buffer_delta handling but still skips the rest of list_x's copy bookkeeping: note_copy_into, note_texture_write, placements::note_use and present::note_use. With XCL_CONSOLE_LISTS=1, a CopyBufferRegion/CopyTextureRegion into a readback buffer in a shadowed UMA window (or one placed in a GPU view) never calls note_copy_into. The GPU-written bytes never come back to the title's CPU view after submit, so it reads stale data. Copies into kept-in-step title textures also aren't recorded as GPU writes. So these copies still differ from the same calls on a direct list.

<!-- greyfinch-sync:ivall/xcl:review-comment:4762388391 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3315#discussion_r4762388391). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-01T23:14:39Z. **Code review location:** `crates/xcl/src/hle/d3d12x/console_list.rs`; line 1020 ~~~~diff @@ -951,8 +1020,7 @@ pub unsafe fn close(obj: *mut c_void) -> Result<Translation, String> { } else if w0 == COPY_BUFFER_MARKER { ~~~~ --- The COPY_BUFFER / COPY_TEXTURE replay now has list_x's buffer_delta handling but still skips the rest of list_x's copy bookkeeping: `note_copy_into`, `note_texture_write`, `placements::note_use` and `present::note_use`. With XCL_CONSOLE_LISTS=1, a CopyBufferRegion/CopyTextureRegion into a readback buffer in a shadowed UMA window (or one placed in a GPU view) never calls `note_copy_into`. The GPU-written bytes never come back to the title's CPU view after submit, so it reads stale data. Copies into kept-in-step title textures also aren't recorded as GPU writes. So these copies still differ from the same calls on a direct list.
bmjask commented 2026-12-01 23:14:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-01T23:14:39Z.

Review: COMMENTED


Review of d9b869ed: 2 finding(s). 1 are inline. These are on lines outside the diff:

crates/xcl/src/hle/d3d12x/console_list.rs:585: The null guards were added to cl_resource_barrier, clear_uav and cl_copy_texture_region, but the sibling hooks cl_set_descriptor_heaps (heaps) and cl_set_root_constants (data) still dereference without a check. SetDescriptorHeaps(n>0, NULL) or SetComputeRoot32BitConstants(i, n>0, NULL, off) on a console list access-violates via *heaps.add(k) / slice::from_raw_parts(data, n), which is the same class of crash this PR fixes in the other hooks.


These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it.

<!-- greyfinch-sync:ivall/xcl:review:6141935464 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3315#pullrequestreview-6141935464). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-01T23:14:39Z. **Review:** COMMENTED --- Review of `d9b869ed`: 2 finding(s). 1 are inline. These are on lines outside the diff: **`crates/xcl/src/hle/d3d12x/console_list.rs:585`**: The null guards were added to cl_resource_barrier, clear_uav and cl_copy_texture_region, but the sibling hooks `cl_set_descriptor_heaps` (heaps) and `cl_set_root_constants` (data) still dereference without a check. `SetDescriptorHeaps(n>0, NULL)` or `SetComputeRoot32BitConstants(i, n>0, NULL, off)` on a console list access-violates via `*heaps.add(k)` / `slice::from_raw_parts(data, n)`, which is the same class of crash this PR fixes in the other hooks. --- _These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it._
stijn-boer commented 2026-12-02 18:20:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by stijn-boer on 2026-12-02T18:20:42Z.


merge-check
base: 817eb1fc9f
head: d9b869edd6
verdict: not yet: the targeted AMD copy tests passed, but the first workspace run aborted with an access violation and the retail smoke ended early.

Windows / AMD RDNA4 (native D3D12) — shifted UMA console-list copy checks on d9b869e

Clean merge onto main at 817eb1f (merge commit ffcbe5a7286689e5ea1f2b8e980bb2284a671130). git diff --check was clean.

Setup

  • AMD Radeon RX 9060 XT (driver 32.0.32029.2010), Ryzen 7 5700X, Windows 10 21H2 build 19044.6332
  • Rust 1.100.0, debug builds, Agility SDK 1.620.2 with matching d3d12SDKLayers.dll, DXC 1.9.2609.5

Tested

cargo build --workspace passed. cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output exited 101 on both builds. The baseline table row is from a prior run of the same commit, machine, SDK, and command.

Build Passed Failed Ignored SKIPPED notices
main 340 3 23 0
Merged PR 340 3 23 0

Counts are partial because two test processes aborted on each build.

  • First merged run — 189 passed, 1 failed, 20 ignored, 0 skip notices before counting aborted targets. The library exited 0xc0000005. The table shows the rerun, which reproduced the baseline's two 0xc0000409 aborts instead. The cause of the one-off access violation is unconfirmed.
  • New focused tests — 3 passed, 0 failed, 0 ignored, 0 skip notices with --test-threads=1 --show-output --nocapture. This includes AMD buffer and texture copy readback at shifted offsets, null-pointer recording, and ClearUAV slot validation.
  • Debug-layer coverage — both debug-layer E2E tests, including DRED, and uploads_start_from_each_subresources_state passed.
Shared failures and process aborts
  • fuzz_validate_and_gpu_1, fuzz_validate_and_gpu_3, and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs reported failures on both builds.
  • The library and gpu_compute_e2e test processes exited with 0xc0000409 on both builds.

Retail smoke

Ran scripts/smoke.ps1 -Game <local folder> -Seconds 60 -Xcl <debug binary> with XCL_UMA_DRIVER=mixed for title hash 2c508222.

Build Exit Frames logged Device removals logged Peak commit
main 0xc0000409 None 0 1321 MB
Merged PR, first attempt 0xc0000409 None 0 4911 MB
Merged PR, repeat from fresh data root 0xc0000409 None 0 1320 MB

The first run's higher startup commit did not reproduce. These exits leave frame and steady-state memory behavior unverified.

Diff review

Both buffer-copy offsets and texture placed-footprint offsets use the resource's buffer delta. The focused GPU test validated copied bytes. The recording test confirmed null pointers are skipped.

Not tested

Remaining workspace tests after the aborts and retail copy and rendering behavior.

AI use

Codex (GPT-6) merged and built the PR, ran the tests, compared the results with main, reviewed the diff, and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7354412820 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3315#issuecomment-7354412820). Originally posted by [stijn-boer](https://github.com/stijn-boer) on 2026-12-02T18:20:42Z. --- merge-check base: 817eb1fc9fb0763008ae5d8de1f7f586f442b51d head: d9b869edd6ae7e8fe12839bc74dfbb740098f6be verdict: not yet: the targeted AMD copy tests passed, but the first workspace run aborted with an access violation and the retail smoke ended early. **Windows / AMD RDNA4 (native D3D12) — shifted UMA console-list copy checks on `d9b869e`** Clean merge onto `main` at `817eb1f` (merge commit `ffcbe5a7286689e5ea1f2b8e980bb2284a671130`). `git diff --check` was clean. **Setup** - AMD Radeon RX 9060 XT (driver 32.0.32029.2010), Ryzen 7 5700X, Windows 10 21H2 build 19044.6332 - Rust 1.100.0, debug builds, Agility SDK 1.620.2 with matching `d3d12SDKLayers.dll`, DXC 1.9.2609.5 **Tested** `cargo build --workspace` passed. `cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output` exited 101 on both builds. The baseline table row is from a prior run of the same commit, machine, SDK, and command. | Build | Passed | Failed | Ignored | `SKIPPED` notices | |---|---:|---:|---:|---:| | `main` | 340 | 3 | 23 | 0 | | Merged PR | 340 | 3 | 23 | 0 | Counts are partial because two test processes aborted on each build. - **First merged run** — 189 passed, 1 failed, 20 ignored, 0 skip notices before counting aborted targets. The library exited `0xc0000005`. The table shows the rerun, which reproduced the baseline's two `0xc0000409` aborts instead. The cause of the one-off access violation is unconfirmed. - **New focused tests** — 3 passed, 0 failed, 0 ignored, 0 skip notices with `--test-threads=1 --show-output --nocapture`. This includes AMD buffer and texture copy readback at shifted offsets, null-pointer recording, and ClearUAV slot validation. - **Debug-layer coverage** — both debug-layer E2E tests, including DRED, and `uploads_start_from_each_subresources_state` passed. <details><summary>Shared failures and process aborts</summary> - `fuzz_validate_and_gpu_1`, `fuzz_validate_and_gpu_3`, and `two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs` reported failures on both builds. - The library and `gpu_compute_e2e` test processes exited with `0xc0000409` on both builds. </details> **Retail smoke** Ran `scripts/smoke.ps1 -Game <local folder> -Seconds 60 -Xcl <debug binary>` with `XCL_UMA_DRIVER=mixed` for title hash `2c508222`. | Build | Exit | Frames logged | Device removals logged | Peak commit | |---|---|---|---:|---:| | `main` | `0xc0000409` | None | 0 | 1321 MB | | Merged PR, first attempt | `0xc0000409` | None | 0 | 4911 MB | | Merged PR, repeat from fresh data root | `0xc0000409` | None | 0 | 1320 MB | The first run's higher startup commit did not reproduce. These exits leave frame and steady-state memory behavior unverified. **Diff review** Both buffer-copy offsets and texture placed-footprint offsets use the resource's buffer delta. The focused GPU test validated copied bytes. The recording test confirmed null pointers are skipped. **Not tested** Remaining workspace tests after the aborts and retail copy and rendering behavior. **AI use** Codex (GPT-6) merged and built the PR, ran the tests, compared the results with `main`, reviewed the diff, and drafted this report.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3315:upstream-pr/3315'
git switch 'upstream-pr/3315'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3315'
git switch 'upstream-pr/3315'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3315'
git switch 'upstream-pr/3315'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3315'
git switch 'main'
git merge --squash 'upstream-pr/3315'
git switch 'main'
git merge --ff-only 'upstream-pr/3315'
git switch 'main'
git merge 'upstream-pr/3315'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!3315
No description provided.