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

Open
github-bot wants to merge 1 commit from github-bot/gh-238 into main AGit
Owner

@⁠Andretuta on GitHub · 2026-11-24 02:51 UTC · original
ubiquitarianism:old-pr/9970 → main · +3 −1 · 1 files · 1 commits · draft

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.
**@⁠Andretuta** on GitHub · 2026-11-24 02:51 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/238) `ubiquitarianism:old-pr/9970` → `main` · +3 −1 · 1 files · 1 commits · draft > 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:49:57 +00:00
Author
Owner

@⁠Dezmonius on GitHub · 2026-11-24 04:40 UTC · original

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** on GitHub · 2026-11-24 04:40 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/238#issuecomment-7122240303) 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.
Author
Owner

@⁠Dezmonius on GitHub · 2026-11-24 04:48 UTC · original

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.

**@⁠Dezmonius** on GitHub · 2026-11-24 04:48 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/238#issuecomment-7122351517) 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.
This pull request has changes conflicting with the target branch.
  • runtime/test/d3d12_vulkan_device_test.cpp
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/238/head:github-bot/gh-238'
git switch 'github-bot/gh-238'

Merge

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