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

Open
Michael-Glaser wants to merge 1 commit from upstream-pr/310 into main
Michael-Glaser commented 2026-11-23 23:06:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Michael-Glaser on 2026-11-23T23:06:44Z.


Part of #104. On the newer command list vtable layout (Reset at #63), older Xbox slots #61/#62/#64/#65/#66/#71/#72/#73/#74/#75/#79/#80 were left pointing at raw PC slots instead of stubs.

What is in it

  • crates/xcl/src/hle/d3d12x/real.rs: plan newer-layout slots cleanly (plan_newer_list_slots), stubbing orphaned older slots while preserving PC Reset at #63.
  • crates/xcl/src/hle/d3d12x/real.rs: unit test orphaned_older_list_slots_are_stubbed_on_newer_layout_without_touching_reset.

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).
  • Community Windows run by @nullmarsh on 644967f (AMD RX 9060 XT RDNA4, Windows 11, Rust 1.100.0 MSVC): .\scripts\test.ps1 671 passed, 0 failed, 41 ignored (0 SKIPPED GPU tests).
  • Community Windows run by @DavidM1911 (RTX 3060 Ti, Windows 11, merged with main): cargo test -p xcl --lib passed, 0 failed.

Regression run
Retail 60 s smoke run contributed by @CuteBooty (RTX 3070 8 GB, NVIDIA 621.24, Ryzen 5 3600, Windows 11 Pro 26200, Rust 1.100.0 MSVC, release build):

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

  • Not built or executed locally on Windows; the 60 s retail smoke run does not confirm whether that title exercises the newer-layout orphaned slots; Intel GPUs not tested.

AI use

  • Antigravity with Gemini 4 Neon (audit, fix, unit test, description); community smoke run by @CuteBooty with Claude Code (Claude Opus 5.5).
<!-- greyfinch-sync:ivall/xcl:issue:5462800670 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/310). Originally posted by [Michael-Glaser](https://github.com/Michael-Glaser) on 2026-11-23T23:06:44Z. --- Part of #104. On the newer command list vtable layout (Reset at #63), older Xbox slots #61/#62/#64/#65/#66/#71/#72/#73/#74/#75/#79/#80 were left pointing at raw PC slots instead of stubs. **What is in it** - `crates/xcl/src/hle/d3d12x/real.rs`: plan newer-layout slots cleanly (`plan_newer_list_slots`), stubbing orphaned older slots while preserving PC `Reset` at #63. - `crates/xcl/src/hle/d3d12x/real.rs`: unit test `orphaned_older_list_slots_are_stubbed_on_newer_layout_without_touching_reset`. **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). - Community Windows run by `@nullmarsh` on `644967f` (AMD RX 9060 XT RDNA4, Windows 11, Rust 1.100.0 MSVC): `.\scripts\test.ps1` 671 passed, 0 failed, 41 ignored (0 SKIPPED GPU tests). - Community Windows run by `@DavidM1911` (RTX 3060 Ti, Windows 11, merged with `main`): `cargo test -p xcl --lib` passed, 0 failed. **Regression run** Retail 60 s smoke run contributed by `@CuteBooty` (RTX 3070 8 GB, NVIDIA 621.24, Ryzen 5 3600, Windows 11 Pro 26200, Rust 1.100.0 MSVC, release build): 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** - Not built or executed locally on Windows; the 60 s retail smoke run does not confirm whether that title exercises the newer-layout orphaned slots; Intel GPUs not tested. **AI use** - Antigravity with Gemini 4 Neon (audit, fix, unit test, description); community smoke run by `@CuteBooty` with Claude Code (Claude Opus 5.5).
nullmarsh commented 2026-11-24 07:04:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by nullmarsh on 2026-11-24T00:05:06Z.


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.
<!-- greyfinch-sync:ivall/xcl:comment:7117685157 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/310#issuecomment-7117685157). Originally posted by [nullmarsh](https://github.com/nullmarsh) on 2026-11-24T00:05:06Z. --- 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.
CuteBooty commented 2026-11-24 21:09:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by CuteBooty on 2026-11-24T21:02:27Z.


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.
<!-- greyfinch-sync:ivall/xcl:comment:7144395145 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/310#issuecomment-7144395145). Originally posted by [CuteBooty](https://github.com/CuteBooty) on 2026-11-24T21:02:27Z. --- 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 commented 2026-11-25 15:07:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T14:43:37Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7165719436 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/310#issuecomment-7165719436). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T14:43:37Z. --- 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!
Michael-Glaser commented 2026-11-27 12:00:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Michael-Glaser on 2026-11-27T12:00:36Z.


Thanks @CuteBooty, @nullmarsh, and @DavidM1911! Added the verbatim xcl-smoke v1 regression blocks for bf1d03c and the Windows test results into the PR description.

<!-- greyfinch-sync:ivall/xcl:comment:7217729687 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/310#issuecomment-7217729687). Originally posted by [Michael-Glaser](https://github.com/Michael-Glaser) on 2026-11-27T12:00:36Z. --- Thanks @CuteBooty, @nullmarsh, and @DavidM1911! Added the verbatim `xcl-smoke v1` regression blocks for `bf1d03c` and the Windows test results into the PR description.
futurepro62 commented 2026-11-27 17:52:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-27T17:52:50Z.


NVIDIA and AMD full-suite run, to go with the reports above by CuteBooty, since none of them covers AMD. Tested exact head bf1d03c6 (on its base 47efa2e).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace --no-fail-fast -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 742 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: orphaned_older_list_slots_are_stubbed_on_newer_layout_without_touching_reset.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace --no-fail-fast -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 742 passed, 0 failed, 41 ignored, no skips.
  • --skip leaves out tests that fail on main 6089122a too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651), the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu and mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7224884623 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/310#issuecomment-7224884623). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-27T17:52:50Z. --- NVIDIA and AMD full-suite run, to go with the reports above by CuteBooty, since none of them covers AMD. Tested exact head `bf1d03c6` (on its base `47efa2e`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace --no-fail-fast -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests`: **742 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `orphaned_older_list_slots_are_stubbed_on_newer_layout_without_touching_reset`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace --no-fail-fast -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`: **742 passed, 0 failed, 41 ignored**, no skips. - `--skip` leaves out tests that fail on main `6089122a` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651), the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests, `const_and_null_mask_operands_agree_with_hlsl_on_the_gpu` and `mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu` ([follow-up on #1651](https://github.com/xcl-dev/xcl/issues/1651#issuecomment-7146069648)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`, and `gpu::dxil::fuzz_tests` seeds 70, 545, 1019 and 1507 fail `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card (drivers 616.64 and 621.40). On AMD: `fuzz_validate_and_gpu_1` fails on seed 540 (`res[833]` 0x7 vs CPU 0x6). The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Foniass commented 2026-12-01 03:06:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:06:30Z.


Triage (#1607) – head bf1d03c

No other open PR changes the command list newer/older layout split. #1378 (also #104) is a test-only change for queue slot #18 and does not overlap.
Notes on the diff: (1) the description lists the orphaned slots as #61/#62/#64/..., but the code and test give 59, 60, 68, 69, 78, 81, 84, 88, 89, 93, 94. (2) plan_newer_list_slots changes the PC target of the existing shifted slots below public from the raw driver method (*ot.add(newer) on main) to the overridden vtable entry (pc[1 + slot]). This changes runtime behaviour and the description does not mention it.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7299331689 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/310#issuecomment-7299331689). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:06:30Z. --- **Triage (#1607)** – head bf1d03c No other open PR changes the command list newer/older layout split. #1378 (also #104) is a test-only change for queue slot #18 and does not overlap. Notes on the diff: (1) the description lists the orphaned slots as #61/#62/#64/..., but the code and test give 59, 60, 68, 69, 78, 81, 84, 88, 89, 93, 94. (2) `plan_newer_list_slots` changes the PC target of the existing shifted slots below `public` from the raw driver method (`*ot.add(newer)` on main) to the overridden vtable entry (`pc[1 + slot]`). This changes runtime behaviour and the description does not mention it. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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/310:upstream-pr/310'
git switch 'upstream-pr/310'

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/310'
git switch 'upstream-pr/310'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/310'
git switch 'upstream-pr/310'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/310'
git switch 'main'
git merge --squash 'upstream-pr/310'
git switch 'main'
git merge --ff-only 'upstream-pr/310'
git switch 'main'
git merge 'upstream-pr/310'
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!307
No description provided.