D3D12.X: a console list keeps its record chunk across Reset #510

Open
github-bot wants to merge 2 commits from github-bot/gh-510 into main AGit
Owner

@⁠TG0000 on GitHub · 2026-11-24 01:07 UTC · original
TG0000:perf/d3d12x-hotpath2 → main · +302 −49 · 1 files · 2 commits · open

Every console-shaped command list (made by CreateCommandListX, so every list the title records through D3D12.X) did this on each recording:

  • Reset dropped its record chunks and allocated a new zeroed 1 MiB chunk (vec![0u8; CHUNK]). That is a fresh large allocation, page faults on first touch, and the free of the old chunk, for every list every frame.
  • Close first copied the whole recording into a Vec<Vec<u32>> (chunks(4).map(from_le_bytes).collect()), then replayed it.
  • the methods (SetComputeRoot32BitConstants, SetDescriptorHeaps, ResourceBarrier, CopyBufferRegion, ClearUnorderedAccessView*, CopyTextureRegion) each built their record in a heap Vec before copying it into the chunk.

Now:

  • Reset keeps the first chunk. It zeroes the part the last recording wrote (up to the write pointer), so the chunk is as a new zeroed one, and starts the next recording in it. Any other chunks are freed as before, so a list holds the same memory as before: one chunk between recordings.
  • the chunks are Box<[u32]>, and Close reads the records where they were written (&c[..used / 4]). uma_copy takes the arena and block list rather than the whole ListState, so the loop can borrow the chunks while it uploads argument tables.
  • the methods write their records with push_parts (slices and stack arrays, no allocation). The words are the same.

The behaviour is the same: the same words in the same order, the same chunk geometry (F_WRITE, F_END, F_DISPATCH_END), records split across chunks the same way, and a zeroed chunk at the start of every recording.

What is in it

  • crates/xcl/src/hle/d3d12x/console_list.rs only. It adds seal_last, recycle_chunks and push_parts, plus the spare field. close and recorded_words read the chunks directly. There are two new unit tests and an #[ignore]d release microbenchmark.

No open PR touches console_list.rs (I checked all open PRs' file lists). This PR does not touch real.rs, bind.rs or list_x.rs.

Tested

  • AMD Radeon RX 6800 (driver 32.0.21045.29003), Ryzen 9 5900X, Windows 11 build 26300, rustc 1.100.0 stable-x86_64-pc-windows-msvc
  • New unit tests:
    • methods_record_the_same_words: every recording method (root constants with and without a count, root constant, root descriptor, descriptor heaps, two transitions, buffer copy, float UAV clear, texture copy with and without a box, dispatch, barrier), compared with words built by hand from the old encodings. I also ran this same test against the unchanged origin/main code, and it passed there too, so the encodings are unchanged.
    • a_reset_reuses_the_first_chunk_zeroed: a recording three chunks long reads back whole and in order. After Reset, the next recording starts at the first chunk's address, with the same F_END / F_DISPATCH_END, one chunk, and that chunk all zero. Words the inline code writes itself (past the last method's record) are zeroed too. The next recording reads back only its own words.
  • cargo +stable-x86_64-pc-windows-msvc test -p xcl --lib console_list: 7 passed, 0 failed, 1 ignored. title_list's test of console-list objects still passes.
  • cargo +stable-x86_64-pc-windows-msvc test -p xcl --lib: 633 passed, 4 failed, 21 ignored. None of the 4 is in this file:
    • vram::tests::d32s8_targets_take_their_own_size_of_video_memory and title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels fail the same way on origin/main on this adapter.
    • rdna2::tests::llvm_gfx10_corpus and recomp::tests::buffer_format_table_matches_llvm need the untracked tests/data/llvm-amdgpu folder, which a fresh worktree does not have.
  • cargo +stable-x86_64-pc-windows-msvc clippy -p xcl --all-targets: no new warnings. The 6 warnings in console_list.rs were already on main (# Safety docs on existing unsafe fns, cl_release's slice cast, the existing chunks_exact). The release build has the same single rustc warning as main.
  • Release microbenchmark, cargo test --release -p xcl --lib console_list_frame_speed -- --ignored --nocapture. It models one recording per frame (Reset, a heaps record, then 64 dispatches each with a pipeline, 12 root constants, two root descriptors and two transitions, then Close reading the words). Before: the old chunk allocation, a Vec per record and the copy-out. After: the list's own code, including the LISTS lock the old path skipped in the bench.
    console list frame (64 dispatches): as it was 36267 ns, now 3468 ns (10.5x)
    console list frame (64 dispatches): as it was 39105 ns, now 3601 ns (10.9x)
    console list frame (64 dispatches): as it was 42840 ns, now 6905 ns (6.2x)
    

Regression run

scripts/smoke.ps1 -Seconds 45, one run each, under a 1 s free-RAM watchdog (FreePhysicalMemory below 3.5 GB; it never fired), one game instance at a time. First origin/main (47efa2e, a later commit of main than this PR's base), then this PR's head:

xcl-smoke v1
commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3
gpu: AMD Radeon RX 6800
title: retail-title-1.0.2.1
seconds: 45
exit: 0x0
frames shown: 954 (PresentX 954)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15118 MB
xcl-smoke v1
commit: b66109575bfe87d9d52e7fa88fa19930f92650d7
gpu: AMD Radeon RX 6800
title: retail-title-1.0.2.1
seconds: 45
exit: 0x0
frames shown: 1012 (PresentX 1013)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15096 MB

These are single runs, and frame counts vary a lot from run to run on this machine (other builds are often compiling on it): an earlier run of main (2997c9a) gave 692 frames, and an earlier run of an earlier head of this PR gave 835. I don't claim this change caused the difference in frame counts. The point of these runs is that nothing regressed: no device removal, no crash, and the same peak commit (15096 MB against 15118 MB).

Not tested

  • NVIDIA and Intel GPUs, and RDNA4.
  • How many console lists the title resets per frame, and how many bytes each records. I have no count from the retail run, so the per-frame saving in that title is not measured. The microbenchmark measures only the record path.
  • close with a real PC list in a unit test. The replay loop is unchanged apart from reading the words in place; the smoke run exercises it.

AI use

  • Claude Code with Claude Opus 5.5: found the hot path, wrote the change, the tests and the benchmark, and ran the builds, tests and smoke runs. I reviewed the diff.

🤖 Generated with Claude Code

**@⁠TG0000** on GitHub · 2026-11-24 01:07 UTC · [original](https://github.com/xcl-dev/xcl/pull/510) `TG0000:perf/d3d12x-hotpath2` → `main` · +302 −49 · 1 files · 2 commits · open Every console-shaped command list (made by `CreateCommandListX`, so every list the title records through D3D12.X) did this on each recording: - `Reset` dropped its record chunks and allocated a new **zeroed 1 MiB** chunk (`vec![0u8; CHUNK]`). That is a fresh large allocation, page faults on first touch, and the free of the old chunk, for every list every frame. - `Close` first copied the whole recording into a `Vec<Vec<u32>>` (`chunks(4).map(from_le_bytes).collect()`), then replayed it. - the methods (`SetComputeRoot32BitConstants`, `SetDescriptorHeaps`, `ResourceBarrier`, `CopyBufferRegion`, `ClearUnorderedAccessView*`, `CopyTextureRegion`) each built their record in a heap `Vec` before copying it into the chunk. Now: - `Reset` keeps the first chunk. It zeroes the part the last recording wrote (up to the write pointer), so the chunk is as a new zeroed one, and starts the next recording in it. Any other chunks are freed as before, so a list holds the same memory as before: one chunk between recordings. - the chunks are `Box<[u32]>`, and `Close` reads the records where they were written (`&c[..used / 4]`). `uma_copy` takes the arena and block list rather than the whole `ListState`, so the loop can borrow the chunks while it uploads argument tables. - the methods write their records with `push_parts` (slices and stack arrays, no allocation). The words are the same. The behaviour is the same: the same words in the same order, the same chunk geometry (`F_WRITE`, `F_END`, `F_DISPATCH_END`), records split across chunks the same way, and a zeroed chunk at the start of every recording. **What is in it** - `crates/xcl/src/hle/d3d12x/console_list.rs` only. It adds `seal_last`, `recycle_chunks` and `push_parts`, plus the `spare` field. `close` and `recorded_words` read the chunks directly. There are two new unit tests and an `#[ignore]`d release microbenchmark. No open PR touches `console_list.rs` (I checked all open PRs' file lists). This PR does not touch `real.rs`, `bind.rs` or `list_x.rs`. **Tested** - AMD Radeon RX 6800 (driver 32.0.21045.29003), Ryzen 9 5900X, Windows 11 build 26300, rustc 1.100.0 `stable-x86_64-pc-windows-msvc` - New unit tests: - `methods_record_the_same_words`: every recording method (root constants with and without a count, root constant, root descriptor, descriptor heaps, two transitions, buffer copy, float UAV clear, texture copy with and without a box, dispatch, barrier), compared with words built by hand from the old encodings. **I also ran this same test against the unchanged `origin/main` code, and it passed there too**, so the encodings are unchanged. - `a_reset_reuses_the_first_chunk_zeroed`: a recording three chunks long reads back whole and in order. After Reset, the next recording starts at the first chunk's address, with the same `F_END` / `F_DISPATCH_END`, one chunk, and that chunk all zero. Words the inline code writes itself (past the last method's record) are zeroed too. The next recording reads back only its own words. - `cargo +stable-x86_64-pc-windows-msvc test -p xcl --lib console_list`: 7 passed, 0 failed, 1 ignored. `title_list`'s test of console-list objects still passes. - `cargo +stable-x86_64-pc-windows-msvc test -p xcl --lib`: 633 passed, 4 failed, 21 ignored. None of the 4 is in this file: - `vram::tests::d32s8_targets_take_their_own_size_of_video_memory` and `title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels` fail the same way on `origin/main` on this adapter. - `rdna2::tests::llvm_gfx10_corpus` and `recomp::tests::buffer_format_table_matches_llvm` need the untracked `tests/data/llvm-amdgpu` folder, which a fresh worktree does not have. - `cargo +stable-x86_64-pc-windows-msvc clippy -p xcl --all-targets`: no new warnings. The 6 warnings in `console_list.rs` were already on `main` (`# Safety` docs on existing `unsafe fn`s, `cl_release`'s slice cast, the existing `chunks_exact`). The release build has the same single rustc warning as `main`. - Release microbenchmark, `cargo test --release -p xcl --lib console_list_frame_speed -- --ignored --nocapture`. It models one recording per frame (Reset, a heaps record, then 64 dispatches each with a pipeline, 12 root constants, two root descriptors and two transitions, then Close reading the words). Before: the old chunk allocation, a Vec per record and the copy-out. After: the list's own code, including the `LISTS` lock the old path skipped in the bench. ``` console list frame (64 dispatches): as it was 36267 ns, now 3468 ns (10.5x) console list frame (64 dispatches): as it was 39105 ns, now 3601 ns (10.9x) console list frame (64 dispatches): as it was 42840 ns, now 6905 ns (6.2x) ``` **Regression run** `scripts/smoke.ps1 -Seconds 45`, one run each, under a 1 s free-RAM watchdog (`FreePhysicalMemory` below 3.5 GB; it never fired), one game instance at a time. First `origin/main` (47efa2e, a later commit of main than this PR's base), then this PR's head: ``` xcl-smoke v1 commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3 gpu: AMD Radeon RX 6800 title: retail-title-1.0.2.1 seconds: 45 exit: 0x0 frames shown: 954 (PresentX 954) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15118 MB ``` ``` xcl-smoke v1 commit: b66109575bfe87d9d52e7fa88fa19930f92650d7 gpu: AMD Radeon RX 6800 title: retail-title-1.0.2.1 seconds: 45 exit: 0x0 frames shown: 1012 (PresentX 1013) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15096 MB ``` These are single runs, and frame counts vary a lot from run to run on this machine (other builds are often compiling on it): an earlier run of `main` (2997c9a) gave 692 frames, and an earlier run of an earlier head of this PR gave 835. I don't claim this change caused the difference in frame counts. The point of these runs is that nothing regressed: no device removal, no crash, and the same peak commit (15096 MB against 15118 MB). **Not tested** - NVIDIA and Intel GPUs, and RDNA4. - How many console lists the title resets per frame, and how many bytes each records. I have no count from the retail run, so the per-frame saving in that title is not measured. The microbenchmark measures only the record path. - `close` with a real PC list in a unit test. The replay loop is unchanged apart from reading the words in place; the smoke run exercises it. **AI use** - Claude Code with Claude Opus 5.5: found the hot path, wrote the change, the tests and the benchmark, and ran the builds, tests and smoke runs. I reviewed the diff. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Every Reset of a console-shaped command list dropped its record chunks and
allocated a new zeroed 1 MiB one, and every Close copied the whole recording
into a Vec<Vec<u32>> before replaying it. The methods built each record in a
Vec as well.

Reset now keeps the first chunk, zeroes the part the last recording wrote and
starts the next recording in it; the other chunks are freed as before. The
chunks are u32 slices and Close reads the records where they were written. The
methods write their records from slices and stack arrays (push_parts), the same
words as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
SetDescriptorHeaps and ResourceBarrier built their records with
slice::from_raw_parts, which requires a non-null pointer even for an
empty slice. The loops they replaced never read the pointer when the count
was zero, so a caller passing no entries and a null array became undefined
behaviour. A zero count now takes an empty slice and records the same
header as before.

A test calls both methods (and SetRootConstants) with a zero count and a
null array; without the guard it aborts on the unsafe precondition check.

Reported in review by shdann.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:23:59 +00:00
Author
Owner

@⁠Alpha325 on GitHub · 2026-11-24 01:23 UTC · original

Independent release-build check on clean PR head 26d98b66bc30f978c1b30b72ca862065629bcb05, using a Ryzen 5 7600X3D, Windows 11 build 26200.9974, and Rust 1.100.0 MSVC x64.

cargo test --offline --locked --release -j 4 -p xcl --lib console_list -- --test-threads=1 --nocapture

7 passed, 0 failed, 1 ignored. The recording-format and chunk-reuse tests both passed. The ignored test was the benchmark, which I ran separately five times.

In the PR's CPU benchmark (64 dispatches per recording), the modeled old path took 22.06–23.54 µs per recording and the new path took 2.01–2.21 µs, a 10.3–11.7× speedup across the five runs. This measures CPU recording overhead only. I did not measure GPU execution or frame rate. These tests also did not cover the zero-count paths raised in review.

AI use: OpenAI Codex (GPT-6.2 Sol) ran the tests and drafted this report.

**@⁠Alpha325** on GitHub · 2026-11-24 01:23 UTC · [original](https://github.com/xcl-dev/xcl/pull/510#issuecomment-7119048570) Independent release-build check on clean PR head `26d98b66bc30f978c1b30b72ca862065629bcb05`, using a Ryzen 5 7600X3D, Windows 11 build `26200.9974`, and Rust 1.100.0 MSVC x64. `cargo test --offline --locked --release -j 4 -p xcl --lib console_list -- --test-threads=1 --nocapture` **7 passed, 0 failed, 1 ignored.** The recording-format and chunk-reuse tests both passed. The ignored test was the benchmark, which I ran separately five times. In the PR's CPU benchmark (64 dispatches per recording), the modeled old path took **22.06–23.54 µs** per recording and the new path took **2.01–2.21 µs**, a **10.3–11.7×** speedup across the five runs. This measures CPU recording overhead only. I did not measure GPU execution or frame rate. These tests also did not cover the zero-count paths raised in review. **AI use:** OpenAI Codex (GPT-6.2 Sol) ran the tests and drafted this report.
Author
Owner

@⁠H0UNDZER0 on GitHub · 2026-11-24 02:14 UTC · original · edited 2026-11-24 02:20 UTC

Tested on an RTX 5080: pass, 678 passed, 0 failed. This adds the whole suite to the partial runs above (the record, reset and console_list tests).

  • Commit 26d98b66bc30f978c1b30b72ca862065629bcb05, this PR's head as is (on its base 2997c9a), release build.
  • NVIDIA GeForce RTX 5080 16 GB, driver 621.24 (32.0.16.2124), 32-lane waves; Ryzen 7 9700X; Windows 11 Pro 24H2 (26100.9711); Rust 1.100.0 MSVC; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0). No XCL_* variables set.
  • cargo build --release --workspace --locked: OK, the same single fetch_update warning as main.
  • cargo test --workspace --release --no-fail-fast --locked -- --test-threads=4, run twice (the second with --show-output): 678 passed, 0 failed, 42 ignored both times. main 2997c9a gives 676 / 0 / 41 on this PC: the difference is this PR's 2 new tests and its ignored benchmark.
  • SKIPPED: the usual 2, gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware (no wave64).
  • methods_record_the_same_words and a_reset_reuses_the_first_chunk_zeroed pass, with the other console_list tests. The test title (e2e) ends with failures: 0.

Not tested

  • This PR merged onto a newer main. At the time of the run that was 508a0c7; git merge-tree showed no conflict.
  • The benchmark, debug build, retail titles, scripts/smoke.ps1.

AI use: Claude Code (Claude Opus 5.5, Claude Fable 5.2)

**@⁠H0UNDZER0** on GitHub · 2026-11-24 02:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/510#issuecomment-7119912388) · edited 2026-11-24 02:20 UTC **Tested** on an RTX 5080: **pass**, 678 passed, 0 failed. This adds the whole suite to the partial runs above (the `record`, `reset` and `console_list` tests). - Commit `26d98b66bc30f978c1b30b72ca862065629bcb05`, this PR's head as is (on its base `2997c9a`), release build. - NVIDIA GeForce RTX 5080 16 GB, driver 621.24 (32.0.16.2124), 32-lane waves; Ryzen 7 9700X; Windows 11 Pro 24H2 (26100.9711); Rust 1.100.0 MSVC; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0). No `XCL_*` variables set. - `cargo build --release --workspace --locked`: OK, the same single `fetch_update` warning as `main`. - `cargo test --workspace --release --no-fail-fast --locked -- --test-threads=4`, run twice (the second with `--show-output`): **678 passed, 0 failed, 42 ignored** both times. `main` `2997c9a` gives 676 / 0 / 41 on this PC: the difference is this PR's 2 new tests and its ignored benchmark. - `SKIPPED`: the usual 2, `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware` (no wave64). - `methods_record_the_same_words` and `a_reset_reuses_the_first_chunk_zeroed` pass, with the other `console_list` tests. The test title (`e2e`) ends with `failures: 0`. **Not tested** - This PR merged onto a newer `main`. At the time of the run that was `508a0c7`; `git merge-tree` showed no conflict. - The benchmark, debug build, retail titles, `scripts/smoke.ps1`. **AI use:** Claude Code (Claude Opus 5.5, Claude Fable 5.2)
Author
Owner

@⁠TG0000 on GitHub · 2026-11-24 10:22 UTC · original

Thanks @⁠shdann, good catch. SetDescriptorHeaps and ResourceBarrier now go through a small counted helper that returns an empty slice for a zero count, so the null array is never read, and the record header is written as before. New test a_call_with_no_entries_records_its_header_for_a_null_array calls both (and SetRootConstants) with zero entries and a null array; with the guard removed it aborts on the from_raw_parts precondition check.

I also rebased onto the current main (one conflict in console_list.rs, with the new IO_UMA_BASE_HI line). New head b661095; cargo test -p xcl --lib console_list: 8 passed, 0 failed, 1 ignored. The full lib run shows the same 3 failures as a clean main on my GPU (title_textures x2, vram::d32s8_targets...), unrelated to this change.

AI-assisted (Claude Sonnet 5.5).

**@⁠TG0000** on GitHub · 2026-11-24 10:22 UTC · [original](https://github.com/xcl-dev/xcl/pull/510#issuecomment-7128697516) Thanks @⁠shdann, good catch. `SetDescriptorHeaps` and `ResourceBarrier` now go through a small `counted` helper that returns an empty slice for a zero count, so the null array is never read, and the record header is written as before. New test `a_call_with_no_entries_records_its_header_for_a_null_array` calls both (and `SetRootConstants`) with zero entries and a null array; with the guard removed it aborts on the `from_raw_parts` precondition check. I also rebased onto the current `main` (one conflict in `console_list.rs`, with the new `IO_UMA_BASE_HI` line). New head `b661095`; `cargo test -p xcl --lib console_list`: 8 passed, 0 failed, 1 ignored. The full lib run shows the same 3 failures as a clean `main` on my GPU (`title_textures` x2, `vram::d32s8_targets...`), unrelated to this change. AI-assisted (Claude Sonnet 5.5).
Author
Owner

@⁠Toons29 on GitHub · 2026-11-25 02:56 UTC · original

Regression run of 88f16482 on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on 4178e888, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14831 MB
xcl-smoke v1
commit: 88f16482a31d0eafffe2207b64e9f99115552e8b
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1632 (PresentX 1632)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14811 MB

Against the limits in CONTRIBUTING.md: 101 % of main's frames, 100 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; I checked the blocks before posting.

**@⁠Toons29** on GitHub · 2026-11-25 02:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/510#issuecomment-7151399882) Regression run of `88f16482` on the retail title, for this PR's **Regression run** section. Both blocks are from `scripts/smoke.ps1` as printed, not edited: `main` on `4178e888`, this PR on its head commit with no uncommitted changes, same title and time. ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14831 MB ``` ``` xcl-smoke v1 commit: 88f16482a31d0eafffe2207b64e9f99115552e8b gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1632 (PresentX 1632) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14811 MB ``` Against the limits in CONTRIBUTING.md: 101 % of `main`'s frames, 100 % of its peak commit, no crash, no device removal. AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, `cargo build --release -p xcl`, 60 s, `XCL_NETWORK=0`. This is a regression check only: it does not show whether the run reaches the code this PR changes. AI use: Claude Code (Claude Opus 5.5) built both trees and ran `scripts/smoke.ps1`; I checked the blocks before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 13:53 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 13:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/510#issuecomment-7164444952) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠towiice on GitHub · 2026-11-24 01:12 UTC · original · reviewed

Tested PR head 26d98b6 on NVIDIA GeForce GTX 1650 SUPER (Turing / TU116, driver 610.88), Windows 11 build 10.0.26300 (26H2), Rust 1.100.0 (stable-x86_64-pc-windows-gnullvm), DXC v1.9.2609:

  • cargo test -p xcl --lib record -- --test-threads=4: 6 passed, 0 failed (including hle::d3d12x::console_list::tests::methods_record_the_same_words).
  • cargo test -p xcl --lib reset -- --test-threads=4: 7 passed, 0 failed (including hle::d3d12x::console_list::tests::a_reset_reuses_the_first_chunk_zeroed).

Builds and passes cleanly on Turing / gnullvm.

**@⁠towiice** on GitHub · 2026-11-24 01:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/510#pullrequestreview-6032123312) · **reviewed** Tested PR head `26d98b6` on **NVIDIA GeForce GTX 1650 SUPER** (Turing / TU116, driver 610.88), Windows 11 build 10.0.26300 (26H2), Rust 1.100.0 (`stable-x86_64-pc-windows-gnullvm`), DXC `v1.9.2609`: - `cargo test -p xcl --lib record -- --test-threads=4`: **6 passed, 0 failed** (including `hle::d3d12x::console_list::tests::methods_record_the_same_words`). - `cargo test -p xcl --lib reset -- --test-threads=4`: **7 passed, 0 failed** (including `hle::d3d12x::console_list::tests::a_reset_reuses_the_first_chunk_zeroed`). Builds and passes cleanly on Turing / `gnullvm`.
Author
Owner

@⁠shdann on GitHub · 2026-11-24 01:12 UTC · original · reviewed

At console_list.rs:501 and :506, the new from_raw_parts calls require a non-null pointer even for a zero-length slice. The old loops did not read either pointer when n was zero. A call with zero entries and a null array can now cause undefined behavior. Use an empty slice for zero entries and preserve the existing record header. Please test both zero-count paths. Static review with OpenAI Codex (GPT-6.2 Sol).

**@⁠shdann** on GitHub · 2026-11-24 01:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/510#pullrequestreview-6032123540) · **reviewed** At console_list.rs:501 and :506, the new from_raw_parts calls require a non-null pointer even for a zero-length slice. The old loops did not read either pointer when n was zero. A call with zero entries and a null array can now cause undefined behavior. Use an empty slice for zero entries and preserve the existing record header. Please test both zero-count paths. Static review with OpenAI Codex (GPT-6.2 Sol).
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/hle/d3d12x/console_list.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/510/head:github-bot/gh-510'
git switch 'github-bot/gh-510'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-510'
git switch 'github-bot/gh-510'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-510'
git switch 'github-bot/gh-510'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-510'
git switch 'main'
git merge --squash 'github-bot/gh-510'
git switch 'main'
git merge --ff-only 'github-bot/gh-510'
git switch 'main'
git merge 'github-bot/gh-510'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.