[PR #383] [MERGED] d3d12_xs: device slot 61 is CreateSamplerX for the title's calls, again (RT-SLOT61) #436

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/383
Author: @Mumogg
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142

Base: main ← Head: slot61-sampler-x


📝 Commits (4)

  • 99ba1c0 d3d12_xs: Xbox device slot 61 is CreateSamplerX, routed to the PC CreateSampler
  • 49fd9a4 d3d12_xs: slot 61 is CreateSamplerX only for the title's calls; a host caller gets PC CreateMetaCommand
  • 484962e d3d12_xs: CreateSamplerX translates a destination in the title's descriptor range
  • 150b753 Merge main into RT-SLOT61 (#383)

📊 Changes

5 files changed (+99 additions, -4 deletions)

View changed files

📝 docs/d3d12_vulkan.md (+1 -0)
📝 runtime/shims/d3d12_xs.cpp (+6 -0)
📝 runtime/shims/d3d12_xs_device.cpp (+54 -1)
📝 runtime/shims/d3d12_xs_device.h (+8 -0)
📝 runtime/test/xs_proxy_mock_test.cpp (+30 -3)

📄 Description

Claimed in #14 as RT-SLOT61. Depends on: #349, #350, #356, #362, #369, #375, #377 (their commits come first here; this pull request is the last two commits).

What and why

After #377 the title calls device slot 61 once per sampler, as (description, destination handle). On the PC that slot is CreateMetaCommand, and main forwards it by number: a host access violation, reading through one of the title's words.

Two commits by mrp1no, cherry-picked with -x (authorship kept; ancestors of main whose content is not in the tree):

  • e22994464: slot 61 is routed to the PC CreateSampler with the same two words.
  • c915e1da4: only for callers in an image the guest loader mapped. The proxy also serves host callers (d3d12_vulkan_device_test calls ID3D12Device5::CreateMetaCommand through it), and they get the PC slot 61 as before.

The first commit conflicted where neighbours have been added since (slot 41's handler and test case, the slot lists, a docs table row); both sides are kept. The second applied cleanly.

Measured

Linux (Nobara 44, kernel 7.3), Wine 11.21 staging, RTX 5070 Ti (driver 615.78.08), clang-cl 22.1.8 + xwin SDK 10.0.26100, own 1.0.2.1 copy, network off, on main ece4ba5b3, with #142 and #328 applied on top for the boot runs (they are not in this branch).

--run D3D12 calls Ends with
up to #377 1,655 host AV at device slot 61
+ this 1,657 the title's own int3; the last traced call is ID3D12Device9::ShaderCacheControl failed, reached through device slot 74 forwarded by number

So the next stop is device slot 74, another console slot at a PC method's position.

xs_proxy_mock_test under Wine passes with the three cases of the second commit: no classifier installed (PC slot 61), a guest caller (PC CreateSampler with the same words; a null description skipped) and a host caller under a classifier (PC slot 61).

Not built with MSVC and not run on Windows; I did not run d3d12_vulkan_device_test, which the second commit is about (it fails under Wine here on main as well).

AI-assisted (Claude Code); built and run on the machine above.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt


🔄 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/383 **Author:** [@Mumogg](https://github.com/Mumogg) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/25/2026 **Merged by:** [@aslan2142](https://github.com/aslan2142) **Base:** `main` ← **Head:** `slot61-sampler-x` --- ### 📝 Commits (4) - [`99ba1c0`](https://github.com/ubiquitarianism/leonida/commit/99ba1c085f1d3a1dcd4639e55508009e318b06b6) d3d12_xs: Xbox device slot 61 is CreateSamplerX, routed to the PC CreateSampler - [`49fd9a4`](https://github.com/ubiquitarianism/leonida/commit/49fd9a4275a608ff4e7c3d6bc93766e84fd447a1) d3d12_xs: slot 61 is CreateSamplerX only for the title's calls; a host caller gets PC CreateMetaCommand - [`484962e`](https://github.com/ubiquitarianism/leonida/commit/484962eb8f56486fa1a234f250c6bb0e5d287063) d3d12_xs: CreateSamplerX translates a destination in the title's descriptor range - [`150b753`](https://github.com/ubiquitarianism/leonida/commit/150b753449ee00b9dec0fdce8d52c009af93c34f) Merge main into RT-SLOT61 (#383) ### 📊 Changes **5 files changed** (+99 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `docs/d3d12_vulkan.md` (+1 -0) 📝 `runtime/shims/d3d12_xs.cpp` (+6 -0) 📝 `runtime/shims/d3d12_xs_device.cpp` (+54 -1) 📝 `runtime/shims/d3d12_xs_device.h` (+8 -0) 📝 `runtime/test/xs_proxy_mock_test.cpp` (+30 -3) </details> ### 📄 Description Claimed in #14 as `RT-SLOT61`. Depends on: #349, #350, #356, #362, #369, #375, #377 (their commits come first here; this pull request is the last two commits). ### What and why After #377 the title calls device slot 61 once per sampler, as `(description, destination handle)`. On the PC that slot is `CreateMetaCommand`, and `main` forwards it by number: a host access violation, reading through one of the title's words. Two commits by mrp1no, cherry-picked with `-x` (authorship kept; ancestors of `main` whose content is not in the tree): - `e22994464`: slot 61 is routed to the PC `CreateSampler` with the same two words. - `c915e1da4`: only for callers in an image the guest loader mapped. The proxy also serves host callers (`d3d12_vulkan_device_test` calls `ID3D12Device5::CreateMetaCommand` through it), and they get the PC slot 61 as before. The first commit conflicted where neighbours have been added since (slot 41's handler and test case, the slot lists, a docs table row); both sides are kept. The second applied cleanly. ### Measured Linux (Nobara 44, kernel 7.3), Wine 11.21 staging, RTX 5070 Ti (driver 615.78.08), clang-cl 22.1.8 + xwin SDK 10.0.26100, own 1.0.2.1 copy, network off, on `main` `ece4ba5b3`, with #142 and #328 applied on top for the boot runs (they are not in this branch). | `--run` | D3D12 calls | Ends with | |---|---|---| | up to #377 | 1,655 | host AV at device slot 61 | | + this | 1,657 | the title's own `int3`; the last traced call is `ID3D12Device9::ShaderCacheControl failed`, reached through device slot 74 forwarded by number | So the next stop is device slot 74, another console slot at a PC method's position. `xs_proxy_mock_test` under Wine passes with the three cases of the second commit: no classifier installed (PC slot 61), a guest caller (PC `CreateSampler` with the same words; a null description skipped) and a host caller under a classifier (PC slot 61). Not built with MSVC and not run on Windows; I did not run `d3d12_vulkan_device_test`, which the second commit is about (it fails under Wine here on `main` as well). AI-assisted (Claude Code); built and run on the machine above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:17:52 +01:00
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#436
No description provided.