[PR #350] [MERGED] d3d12_xs: device slot 48 reads the console's 32-byte queue description, again (RT-SLOT48) #402

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

📋 Pull Request Information

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

Base: main ← Head: slot48-queue-desc


📝 Commits (2)

  • c495458 d3d12_xs: device slot 26 takes the console's struct-return form
  • 9e6f8ae d3d12_xs: device slot 48 creates a command queue proxy from the 32-byte Xbox description

📊 Changes

5 files changed (+192 additions, -14 deletions)

View changed files

📝 docs/d3d12_vulkan.md (+7 -1)
📝 runtime/shims/d3d12_xs_device.cpp (+50 -6)
📝 runtime/shims/d3d12_xs_device.h (+7 -1)
📝 runtime/test/device_proxy_test.cpp (+36 -0)
📝 runtime/test/xs_proxy_mock_test.cpp (+92 -6)

📄 Description

Claimed in #14 as RT-SLOT48. Depends on: #349 (its commit is the first one here; this pull request is the second commit).

What and why

After #349 the retail boot stops at device slot 48. main already routes that slot to CreateCommandQueueX, but hands the console's description to the PC path as it is. The description is the PC D3D12_COMMAND_QUEUE_DESC (16 bytes) followed by four Xbox words, and its flags word carries a bit the PC does not know, so the layer refuses the queue (CreateCommandQueue refused (type, priority, flags or node mask)) and the title stops on its own int3.

The fix is commit 0cde63d61 by Alex Collini (-x, authorship kept; an ancestor of main whose content is not in the tree): proxy_create_command_queue_xbox copies the PC prefix, keeps only D3D12_COMMAND_QUEUE_FLAG_DISABLE_GPU_TIMEOUT and logs the four extra words once.

Adapted to main, as the commit message says:

  • The commit added a fixed Slot == 48 branch. main has its Xbox slot table (LEONIDA_XS_QUEUE_X_SLOT), so the table's route calls the new function instead and the fixed branch is gone. The override keeps working.
  • xs_proxy_mock_test: check_xbox_slots and the environment case passed a 16-byte PC description to the console slot. They now pass a 32-byte one, and the check is that the PC call gets its 16-byte prefix.

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.

main + #349 + this
D3D12 calls under --run 1 5 13
Last call D3D12XboxCreateDevice ok CreateCommandQueue failed CreateCommandList failed

The next stop is device slot 73: the list is asked for with an interface the layer does not know (QueryInterface: unknown IID). #142 looks like the fix for that; I will measure it on top of this and report there.

xs_proxy_mock_test under Wine passes in its default run (including the new slot 48 makes a queue proxy from a 32-byte description case) and exits 0 with --env-slots, --env-slots-invalid and --fail-veh.

Not built with MSVC and not run on Windows.

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/350 **Author:** [@Mumogg](https://github.com/Mumogg) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@ubiquitarianism](https://github.com/ubiquitarianism) **Base:** `main` ← **Head:** `slot48-queue-desc` --- ### 📝 Commits (2) - [`c495458`](https://github.com/ubiquitarianism/leonida/commit/c4954581ae27e9db5baabaea091302ed54eb96ea) d3d12_xs: device slot 26 takes the console's struct-return form - [`9e6f8ae`](https://github.com/ubiquitarianism/leonida/commit/9e6f8ae1332aed8efb5b2ed78a4780340c29fc40) d3d12_xs: device slot 48 creates a command queue proxy from the 32-byte Xbox description ### 📊 Changes **5 files changed** (+192 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `docs/d3d12_vulkan.md` (+7 -1) 📝 `runtime/shims/d3d12_xs_device.cpp` (+50 -6) 📝 `runtime/shims/d3d12_xs_device.h` (+7 -1) 📝 `runtime/test/device_proxy_test.cpp` (+36 -0) 📝 `runtime/test/xs_proxy_mock_test.cpp` (+92 -6) </details> ### 📄 Description Claimed in #14 as `RT-SLOT48`. Depends on: #349 (its commit is the first one here; this pull request is the second commit). ### What and why After #349 the retail boot stops at device slot 48. `main` already routes that slot to `CreateCommandQueueX`, but hands the console's description to the PC path as it is. The description is the PC `D3D12_COMMAND_QUEUE_DESC` (16 bytes) followed by four Xbox words, and its flags word carries a bit the PC does not know, so the layer refuses the queue (`CreateCommandQueue refused (type, priority, flags or node mask)`) and the title stops on its own `int3`. The fix is commit `0cde63d61` by Alex Collini (`-x`, authorship kept; an ancestor of `main` whose content is not in the tree): `proxy_create_command_queue_xbox` copies the PC prefix, keeps only `D3D12_COMMAND_QUEUE_FLAG_DISABLE_GPU_TIMEOUT` and logs the four extra words once. Adapted to `main`, as the commit message says: - The commit added a fixed `Slot == 48` branch. `main` has its Xbox slot table (`LEONIDA_XS_QUEUE_X_SLOT`), so the table's route calls the new function instead and the fixed branch is gone. The override keeps working. - `xs_proxy_mock_test`: `check_xbox_slots` and the environment case passed a 16-byte PC description to the console slot. They now pass a 32-byte one, and the check is that the PC call gets its 16-byte prefix. ### 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`. | | `main` | + #349 | + this | |---|---|---|---| | D3D12 calls under `--run` | 1 | 5 | 13 | | Last call | `D3D12XboxCreateDevice` ok | `CreateCommandQueue` failed | `CreateCommandList` failed | The next stop is device slot 73: the list is asked for with an interface the layer does not know (`QueryInterface: unknown IID`). #142 looks like the fix for that; I will measure it on top of this and report there. `xs_proxy_mock_test` under Wine passes in its default run (including the new `slot 48 makes a queue proxy from a 32-byte description` case) and exits 0 with `--env-slots`, `--env-slots-invalid` and `--fail-veh`. Not built with MSVC and not run on Windows. 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:46 +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#402
No description provided.