d3d12_vulkan_device_test: query ID3D12Device10 on inner device to avoid slot 78 SetFrameIntervalX shadow #238

Closed
leonida/mandy
Andretuta wants to merge 0 commits from old-pr/9970 into main

Pull request closed

This pull request cannot be reopened because the branch was deleted.

Andretuta commented 2026-11-24 02:51:04 +00:00

Carried over from old PR 9970 by liamhob in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9970, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
liamhob: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

What and why

On \main\ (\2d53a8055), \d3d12_vulkan_device\ fails at line 6576:
\\
[rt] d3d12_xs: device slot 78 (Xbox SetFrameIntervalX) first call
[rt] d3d12_xs: device slot 78 routed to SetFrameIntervalX (...)
line 6576: tiles == 1
\\

\d3d12_vulkan_device_test.cpp\ queried \ID3D12Device10\ from \device\ (the Xbox device proxy), then called \device10->CreateReservedResource2(...). On the Xbox device proxy, vtable slot 78 (PC \ID3D12Device10::CreateReservedResource2) is intentionally shadowed by Xbox \SetFrameIntervalX\ (commit \2dbcb882c), which returns \S_OK\ without creating the resource—leaving \ wo.p == nullptr\ and \GetResourceTiling\ returning \ iles == 0.

Querying \ID3D12Device10\ on \inner\ (the underlying PC device) tests \CreateReservedResource2\ directly without hitting the Xbox proxy's slot-78 shadow.

Verification

  • Windows 11, MSVC 19.44, Ninja, AMD Radeon RX 9070 XT (tested with #9857 applied to build on MSVC):
    • \ctest -R ^d3d12_vulkan_device$: PASS (5.23 s).
    • \git diff --check: clean.
  • Synthetic test only; no game files. AI-assisted.
> Carried over from **old PR 9970** by `liamhob` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9970`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `liamhob`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): ### What and why On \main\ (\2d53a8055\), \d3d12_vulkan_device\ fails at line 6576: \\\ [rt] d3d12_xs: device slot 78 (Xbox SetFrameIntervalX) first call [rt] d3d12_xs: device slot 78 routed to SetFrameIntervalX (...) line 6576: tiles == 1 \\\ \d3d12_vulkan_device_test.cpp\ queried \ID3D12Device10\ from \device\ (the Xbox device proxy), then called \device10->CreateReservedResource2(...)\. On the Xbox device proxy, vtable slot 78 (PC \ID3D12Device10::CreateReservedResource2\) is intentionally shadowed by Xbox \SetFrameIntervalX\ (commit \2dbcb882c\), which returns \S_OK\ without creating the resource—leaving \ wo.p == nullptr\ and \GetResourceTiling\ returning \ iles == 0\. Querying \ID3D12Device10\ on \inner\ (the underlying PC device) tests \CreateReservedResource2\ directly without hitting the Xbox proxy's slot-78 shadow. ### Verification - Windows 11, MSVC 19.44, Ninja, AMD Radeon RX 9070 XT (tested with `#9857` applied to build on MSVC): - \ctest -R ^d3d12_vulkan_device$\: **PASS** (5.23 s). - \git diff --check\: clean. - Synthetic test only; no game files. AI-assisted.
Dezmonius commented 2026-11-24 04:40:51 +00:00

Independent Windows result for the same slot-78 test change proposed here. I tested the equivalent change in old Leonida PR 7125 (703fc03a7), against 4da521de3. The tests below are from that run.

Environment — Windows 10 22H2 (19045.6466), Core i7-7700K, RTX 5070 (NVIDIA 610.88, Vulkan subgroup 32), MSVC 19.51.36256, Windows SDK 10.0.26100.0, Vulkan-Headers 1.4.363, Ninja Release, static CRT.

  • Baseline: d3d12_vulkan_device fails at tiles == 1 after the proxy routes slot 78 to SetFrameIntervalX.
  • Same baseline executable with LEONIDA_XS_FRAME_INTERVAL_SLOT=120: pass. With default routing restored and the test changed to query ID3D12Device10 from the device behind the proxy: 3/3 passes.
  • Nine adjacent CTests passed before and after. d3d12_texture_tiles matched 992,768 reference pixels across four cases, including a COPY-to-DIRECT handoff.
  • The optional WARP comparison fails in a separate video-encode allocator argument check both before and after the patch, including in the slot-120 control.

Command: ctest --test-dir <build-dir> -V -R '^(d3d12_vulkan_device|d3d12_texture_tiles|device_proxy|device_proxy_trace|xs_proxy_mock.*)$'.

Synthetic runtime fixtures only. The Khronos validation layer was unavailable. AI-assisted.

Independent Windows result for the same slot-78 test change proposed here. I tested the equivalent change in old Leonida PR 7125 (`703fc03a7`), against `4da521de3`. The tests below are from that run. **Environment** — Windows 10 22H2 (19045.6466), Core i7-7700K, RTX 5070 (NVIDIA 610.88, Vulkan subgroup 32), MSVC 19.51.36256, Windows SDK 10.0.26100.0, Vulkan-Headers 1.4.363, Ninja Release, static CRT. - Baseline: `d3d12_vulkan_device` fails at `tiles == 1` after the proxy routes slot 78 to `SetFrameIntervalX`. - Same baseline executable with `LEONIDA_XS_FRAME_INTERVAL_SLOT=120`: pass. With default routing restored and the test changed to query `ID3D12Device10` from the device behind the proxy: **3/3 passes**. - Nine adjacent CTests passed before and after. `d3d12_texture_tiles` matched **992,768** reference pixels across four cases, including a COPY-to-DIRECT handoff. - The optional WARP comparison fails in a separate video-encode allocator argument check both before and after the patch, including in the slot-120 control. Command: `ctest --test-dir <build-dir> -V -R '^(d3d12_vulkan_device|d3d12_texture_tiles|device_proxy|device_proxy_trace|xs_proxy_mock.*)$'`. Synthetic runtime fixtures only. The Khronos validation layer was unavailable. AI-assisted.
Dezmonius commented 2026-11-24 04:48:08 +00:00

Follow-up on unmodified main@d2cd6c0d: it contains fadad913 (query ID3D12Device10 on the inner device). d3d12_vulkan_device now passes with default Xbox slot routing on native Windows 10 22H2 (19045.6466), RTX 5070 / NVIDIA 610.88, MSVC 19.51.36256, Ninja Release. No slot override was set.

The separate run with LEONIDA_HOST_ADAPTER=warp still fails at argument_mismatches <= 0 in the video-encode allocator argument comparison, which also reproduced before the slot-78 fix. No game files were used. AI-assisted.

Follow-up on unmodified `main@d2cd6c0d`: it contains `fadad913` (query `ID3D12Device10` on the inner device). `d3d12_vulkan_device` now passes with default Xbox slot routing on native Windows 10 22H2 (19045.6466), RTX 5070 / NVIDIA 610.88, MSVC 19.51.36256, Ninja Release. No slot override was set. The separate run with `LEONIDA_HOST_ADAPTER=warp` still fails at `argument_mismatches <= 0` in the video-encode allocator argument comparison, which also reproduced before the slot-78 fix. No game files were used. AI-assisted.
aslan2142 commented 2026-12-01 12:16:08 +00:00

Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review.

(AI-assisted triage.)

Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review. *(AI-assisted triage.)*
aslan2142 commented 2026-12-01 16:29:12 +00:00

Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.
Sign in to join this conversation.
No description provided.