Skip to content

D3D12.X: stub orphaned older command list slots on the newer layout (#104) - #310

Open
Michael-Glaser wants to merge 1 commit into
xcl-dev:mainfrom
Michael-Glaser:fix/d3d12x-orphaned-list-slots
Open

Michael-Glaser wants to merge 1 commit into
xcl-dev:mainfrom
Michael-Glaser:fix/d3d12x-orphaned-list-slots

Conversation

@Michael-Glaser

Copy link
Copy Markdown

Part of #104. On newer GDK runtimes (QUEUE_SHIFTED), 11 shifted command list slots (#59, #60, #68, #69, #78, #81, #84, #88, #89, #93, #94) remained wired to older-layout handlers instead of stubs.

What is in it

  • crates/xcl/src/hle/d3d12x/real.rs: wrap orphaned older slots in make_layout_split (leaving #10 Reset intact and keeping PC targets including cl_execute_indirect at #59), plus unit test list_layout_tests.

Tested

  • Cross-checked on macOS (aarch64-apple-darwin, Rust 1.100.0): cargo check --offline --target x86_64-pc-windows-msvc --workspace --tests (0 errors, 0 new warnings).

Not tested

  • Not built or executed on Windows; cargo test, GPU tests, and scripts/smoke.ps1 not run yet.

AI use

  • Antigravity with Gemini 4 Neon (audit, fix, unit test, description).

@ghost

ghost commented Nov 24, 2026

Copy link
Copy Markdown

Windows run for this PR (the description lists it as not built or run on Windows): 644967f merged onto main 3516080 (clean merge) builds and passes with MSVC.

Tested

  • AMD Radeon RX 9060 XT (RDNA4), driver 32.0.32029.2010; Ryzen 7 5800X3D; Windows 11 Pro 26200; Rust 1.100.0 x86_64-pc-windows-msvc; debug build.
  • .\scripts\test.ps1: 671 passed, 0 failed, 41 ignored; no SKIPPED GPU tests.
  • cargo test -p xcl --lib list_layout: orphaned_older_list_slots_are_stubbed_on_newer_layout_without_touching_reset passes.

Not tested

  • No run without the fix: the test exercises plan_newer_list_slots, which this PR adds.
  • smoke.ps1 / a retail title (so nothing on a real newer-layout command list); NVIDIA.

AI use

  • Claude Code (Claude Opus 5.5) ran the commands and wrote this report from the logs; I checked it before posting.

…vall#104)

On newer GDK runtimes (QUEUE_SHIFTED), 20 command list console methods shift up by +2 via NEWER_LIST_SLOTS, leaving 11 older slots (ivall#59, ivall#60, ivall#68, ivall#69, ivall#78, ivall#81, ivall#84, ivall#88, ivall#89, ivall#93, ivall#94) without another shifted method taking their old index. Those slots remained wired directly to the older layout's handlers, so a newer-layout call hit the wrong method.

Wrap those orphaned slots in make_layout_split so newer-layout title calls go to a logged stub while older-layout titles keep the handler and non-title callers keep their PC target (including cl_execute_indirect at ivall#59 and the original base-table stub for slots >= scanned). Slot ivall#10 (Reset) stays Reset on both layouts and is not orphaned.

Assisted-by: Antigravity (Gemini 4 Neon)
@CuteBooty

Copy link
Copy Markdown

Regression run on a retail title for bf1d03c: pass (no device removal, no crash, frames and peak commit within the check's limits).

Tested

  • RTX 3070 8 GB (32-lane waves), NVIDIA 621.24; Ryzen 5 3600, 32 GB; Windows 11 Pro 26200; rustc 1.100.0 MSVC; release build.
  • scripts\smoke.ps1 -Game <folder> -Seconds 60, no input, on this PR's head as it is and on main 47efa2e, the commit it branches from, each from a clean checkout. Each build ran twice back to back; the blocks are the second runs. The main block is shared with my reports on other PRs of the same base.

main:

xcl-smoke v1
commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3
gpu: NVIDIA GeForce RTX 3070
title: game
seconds: 60
exit: 0x0
frames shown: 1446 (PresentX 1446)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 19285 MB

this PR:

xcl-smoke v1
commit: bf1d03c67f0ad1be11aafc308b0766d28e247195
gpu: NVIDIA GeForce RTX 3070
title: game
seconds: 60
exit: 0x0
frames shown: 1511 (PresentX 1511)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 18792 MB

Not tested

  • Whether the 60 s reach the code this PR changes, the world load, the test suite, current main merged in, AMD and Intel GPUs.

AI use

  • Claude Code (Claude Opus 5.5) made the runs with me present and wrote this from the script's output.

@DavidM1911

Copy link
Copy Markdown
Contributor

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

Thanks!

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.

3 participants