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

Open
opened 2026-11-26 20:20:26 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1168
Author: @Daolyap
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: rt-slot133-hint


📝 Commits (1)

  • 7b5cf3b runtime: say why slot 133 refuses and which device the proxy wraps (RT-SLOT133-HINT)

📊 Changes

2 files changed (+24 additions, -6 deletions)

View changed files

📝 runtime/shims/d3d12_xs.cpp (+12 -5)
📝 runtime/shims/d3d12_xs_device.cpp (+12 -1)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1168 **Author:** [@Daolyap](https://github.com/Daolyap) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `rt-slot133-hint` --- ### 📝 Commits (1) - [`7b5cf3b`](https://github.com/ubiquitarianism/leonida/commit/7b5cf3bd8412ab1840f3fe52236c5fd6a62f7082) runtime: say why slot 133 refuses and which device the proxy wraps (RT-SLOT133-HINT) ### 📊 Changes **2 files changed** (+24 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `runtime/shims/d3d12_xs.cpp` (+12 -5) 📝 `runtime/shims/d3d12_xs_device.cpp` (+12 -1) </details> ### 📄 Description 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#1200
No description provided.