runtime: say why slot 133 refuses and which device the proxy wraps (RT-SLOT133-HINT) #1168

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

@⁠Daolyap on GitHub · 2026-11-24 19:31 UTC · original
Daolyap:rt-slot133-hint → main · +24 −6 · 2 files · 1 commits · open

Item: RT-SLOT133-HINT (claimed in #14).

Why

With the default backend (no LEONIDA_D3D12), device slot 133 (CreatePlacedResourceX) has no handler behind the
host's D3D12 device and returns E_NOTIMPL without logging anything. The retail 1.0.2.1 title takes that as a failed
graphics init and stops at an int3 at game_scarlett_master.exe+0x19f4f58 about 4.5 s in. The last line in the log
is the slot's "first call", with nothing pointing at the cause. Only the Vulkan device registers the slot 133 handler
(d3d12_vulkan_device.cpp, Device::Device).

D3D12XboxCreateDevice also printed "wrapping the PC ID3D12Device" before picking the backend, so the line was wrong
under LEONIDA_D3D12=vulkan.

Change

  • d3d12_xs_device.cpp: a one-time stderr hint when slot 133 refuses for lack of a handler, naming LEONIDA_D3D12=vulkan.
  • d3d12_xs.cpp: the proxy line names the device actually wrapped (host PC device or Vulkan device).

Log-only. Return values and behaviour are unchanged.

Tested

  • Windows 11, VS 2022 RelWithDebInfo, NVIDIA RTX 3070, driver 32.0.16.1692.
  • ctest -R "xs|proxy|placed": 14/14 pass. A full ctest before the change gave 305/308; the 3 failures (ExecuteIndirect / indirect RT) are unrelated and listed in #14.
  • gta6rt --run on the retail 1.0.2.1 exe, default backend: both new lines appear, followed by the same int3 as before.

AI-assisted (Claude Code).

🤖 Generated with Claude Code

**@⁠Daolyap** on GitHub · 2026-11-24 19:31 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1168) `Daolyap:rt-slot133-hint` → `main` · +24 −6 · 2 files · 1 commits · open Item: **RT-SLOT133-HINT** (claimed in #14). ## Why With the default backend (no `LEONIDA_D3D12`), device slot 133 (`CreatePlacedResourceX`) has no handler behind the host's D3D12 device and returns `E_NOTIMPL` without logging anything. The retail 1.0.2.1 title takes that as a failed graphics init and stops at an `int3` at `game_scarlett_master.exe+0x19f4f58` about 4.5 s in. The last line in the log is the slot's "first call", with nothing pointing at the cause. Only the Vulkan device registers the slot 133 handler (`d3d12_vulkan_device.cpp`, `Device::Device`). `D3D12XboxCreateDevice` also printed "wrapping the PC ID3D12Device" before picking the backend, so the line was wrong under `LEONIDA_D3D12=vulkan`. ## Change - `d3d12_xs_device.cpp`: a one-time stderr hint when slot 133 refuses for lack of a handler, naming `LEONIDA_D3D12=vulkan`. - `d3d12_xs.cpp`: the proxy line names the device actually wrapped (host PC device or Vulkan device). Log-only. Return values and behaviour are unchanged. ## Tested - Windows 11, VS 2022 RelWithDebInfo, NVIDIA RTX 3070, driver 32.0.16.1692. - `ctest -R "xs|proxy|placed"`: 14/14 pass. A full ctest before the change gave 305/308; the 3 failures (ExecuteIndirect / indirect RT) are unrelated and listed in #14. - `gta6rt --run` on the retail 1.0.2.1 exe, default backend: both new lines appear, followed by the same `int3` as before. AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With the host's D3D12 device behind the proxy, device slot 133 (CreatePlacedResourceX) has no handler and returns
E_NOTIMPL without logging anything. The retail 1.0.2.1 title then fails its graphics init and stops at an int3
(game_scarlett_master.exe+0x19f4f58) a few calls later, with nothing pointing at the slot. Log a one-time hint
naming LEONIDA_D3D12=vulkan, the only backend that registers the handler.

D3D12XboxCreateDevice also logged "wrapping the PC ID3D12Device" before choosing the backend, so the line was
wrong under LEONIDA_D3D12=vulkan. It now names the device actually wrapped.

Log-only; no change in behaviour.

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

@⁠abnalstlll-byte on GitHub · 2026-11-24 19:32 UTC · original · approved these changes

Reviewed and verified. Improves diagnostics in runtime/shims/d3d12_xs_device.cpp and d3d12_xs.cpp by outputting a one-time stderr hint recommending LEONIDA_D3D12=vulkan when slot 133 lacks a host handler, and explicitly naming whether the proxy wraps a PC D3D12 device or Vulkan device. 100% clean-room.

**@⁠abnalstlll-byte** on GitHub · 2026-11-24 19:32 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1168#pullrequestreview-6045978904) · **approved these changes** Reviewed and verified. Improves diagnostics in `runtime/shims/d3d12_xs_device.cpp` and `d3d12_xs.cpp` by outputting a one-time stderr hint recommending `LEONIDA_D3D12=vulkan` when slot 133 lacks a host handler, and explicitly naming whether the proxy wraps a PC D3D12 device or Vulkan device. 100% clean-room.
Author
Owner

@⁠madhyn on GitHub · 2026-11-24 19:35 UTC · original

Tested 7b5cf3bd8 on Arch Linux + Wine 11.22 (clang-cl + xwin cross-build):

  • ctest --test-dir runtime/build/win -R "^xs_proxy_mock" --output-on-failure: 6/6 passed (32.16 s)

AI-assisted: yes

**@⁠madhyn** on GitHub · 2026-11-24 19:35 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1168#issuecomment-7142307385) Tested `7b5cf3bd8` on Arch Linux + Wine 11.22 (clang-cl + xwin cross-build): - `ctest --test-dir runtime/build/win -R "^xs_proxy_mock" --output-on-failure`: **6/6 passed** (32.16 s) AI-assisted: yes
Author
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-24 19:42 UTC · original · approved these changes

Audited by Leonida Swarm (fwd-validator): Clean-room verification passed (0 game data, 0 retail keys). Clean atomic hint logging for slot 133 and device proxy naming. Merges cleanly with main 6293c1c4f.

**@⁠abnalstlll-byte** on GitHub · 2026-11-24 19:42 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1168#pullrequestreview-6046149610) · **approved these changes** Audited by Leonida Swarm (fwd-validator): Clean-room verification passed (0 game data, 0 retail keys). Clean atomic hint logging for slot 133 and device proxy naming. Merges cleanly with main 6293c1c4f.
Author
Owner

@⁠Deedlyy on GitHub · 2026-11-24 20:11 UTC · original

Recommendation: [MERGE]

Reasoning: Logs why slot 133 returns E_NOTIMPL on the default backend (no Vulkan device behind it) and reports which device the proxy actually wraps, so the retail title's stop at the int3 becomes diagnosable. Logging-only change. Verified on Wine by madhyn (xs_proxy_mock 6/6). CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with main. Merge once the queued checks are green.

Impact level: 2/10

**@⁠Deedlyy** on GitHub · 2026-11-24 20:11 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1168#issuecomment-7143157731) **Recommendation:** [MERGE] **Reasoning:** Logs why slot 133 returns `E_NOTIMPL` on the default backend (no Vulkan device behind it) and reports which device the proxy actually wraps, so the retail title's stop at the int3 becomes diagnosable. Logging-only change. Verified on Wine by madhyn (`xs_proxy_mock` 6/6). CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with `main`. Merge once the queued checks are green. **Impact level:** 2/10
This pull request has changes conflicting with the target branch.
  • runtime/shims/d3d12_xs.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/1168/head:github-bot/gh-1168'
git switch 'github-bot/gh-1168'

Merge

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