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

Closed
Daolyap wants to merge 1 commit from upstream-pr/1168 into main
Daolyap commented 2026-11-24 19:31:49 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Daolyap on 2026-11-24T19:31:49Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5478936088 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1168). Originally posted by [Daolyap](https://github.com/Daolyap) on 2026-11-24T19:31:49Z. --- 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)
abnalstlll-byte commented 2026-11-24 19:32:06 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T19:32:06Z.

Review: APPROVED


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6045978904 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1168#pullrequestreview-6045978904). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T19:32:06Z. **Review:** APPROVED --- 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.
madhyn commented 2026-11-24 19:35:07 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by madhyn on 2026-11-24T19:35:07Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7142307385 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1168#issuecomment-7142307385). Originally posted by [madhyn](https://github.com/madhyn) on 2026-11-24T19:35:07Z. --- 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
abnalstlll-byte commented 2026-11-24 19:42:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T19:42:50Z.

Review: APPROVED


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6046149610 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1168#pullrequestreview-6046149610). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T19:42:50Z. **Review:** APPROVED --- 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.
Deedlyy commented 2026-11-24 20:11:01 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Deedlyy on 2026-11-24T20:11:01Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7143157731 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1168#issuecomment-7143157731). Originally posted by [Deedlyy](https://github.com/Deedlyy) on 2026-11-24T20:11:01Z. --- **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
MoonEyes commented 2026-11-28 02:49:35 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T02:49:35Z.


Hi @Daolyap, thanks for this pull request. It currently conflicts with main (conflicting file(s): runtime/shims/d3d12_xs.cpp), so it carries the needs rebase label. CONTRIBUTING.md asks authors to rebase their branch on main; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7232618219 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1168#issuecomment-7232618219). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T02:49:35Z. --- Hi @Daolyap, thanks for this pull request. It currently conflicts with `main` (conflicting file(s): `runtime/shims/d3d12_xs.cpp`), so it carries the `needs rebase` label. CONTRIBUTING.md asks authors to rebase their branch on `main`; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here. AI-assisted (Claude Code, Claude Opus 5.5).
aslan2142 commented 2026-12-01 16:33:37 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:33:37Z.


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7317807681 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1168#issuecomment-7317807681). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:33:37Z. --- 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.

Pull request closed

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
ProjectLeonida/mandy!1168
No description provided.