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

Closed
leonida/mandy
Daolyap wants to merge 0 commits from rt-slot133-hint into main

Pull request closed

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

Daolyap commented 2026-11-24 19:31:49 +00:00

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

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 approved these changes 2026-11-24 19:32:06 +00:00
abnalstlll-byte left a comment

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.

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

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

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 approved these changes 2026-11-24 19:42:50 +00:00
abnalstlll-byte left a comment

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.

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

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

**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

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).

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

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.