[PR #243] [CLOSED] runtime: fix the three compile breaks that stop main from building #295

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/243
Author: @Andretuta
Created: 11/24/2026
Status: ❌ Closed

Base: main ← Head: old-pr/9978


📝 Commits (3)

  • 88ed23f fix: make main build again (3 hunks, 3 root causes)
  • c1e1c50 runtime: give the standalone proxy tests an inert create_console_descriptor_heap so they link
  • 7b31674 runtime: give the remaining standalone d3d12_xs_device.cpp consumers the stub too

📊 Changes

5 files changed (+43 additions, -3 deletions)

View changed files

📝 runtime/CMakeLists.txt (+7 -0)
📝 runtime/shims/acphal.cpp (+2 -2)
➕ runtime/shims/d3d12_console_heap_stub.cpp (+22 -0)
📝 runtime/shims/d3d12_vulkan_device.cpp (+2 -1)
📝 runtime/shims/d3d12_xs_device.cpp (+10 -0)

📄 Description

Carried over from old PR 9978 by icecreammule277-dot in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9978, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
This branch conflicts with the current main and needs a rebase.
icecreammule277-dot: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

main (d083a2cc3) does not compile the runtime (gta6rt). Three independent source-level breaks from recent merges, each fixed with one hunk. With them the target links; without them it fails with C2084, C2338, C3083, C2248, C2665.

1. runtime/shims/d3d12_xs_device.cpp — missing declaration.
Xbox slot 14's console descriptor-heap path (3630610ca) calls rt::d3d12::create_console_descriptor_heap (declared in d3d12_com.h:221, defined in d3d12_vulkan_device.cpp) but this translation unit never sees the declaration. Fixed with a forward declaration, not #include "d3d12_com.h": that header pulls in gfx10_descriptors.h and vulkan_backend.h, and this TU is also compiled by root_sig_test, device_proxy_test and xs_proxy_mock_test, which do not carry the Vulkan include path — including the header breaks those three tests instead (verified: adding the include reintroduces a vulkan/vulkan.h C1083 in those targets).

2. runtime/shims/d3d12_vulkan_device.cpp — the same commit's helper.
create_console_descriptor_heap needs a non-const DeviceState& (Device::state() returns a const reference) and the private Device::identity(). Added a non-const state() overload and used the existing public holder() (which returns identity()). Behaviour-neutral.

3. runtime/shims/acphal.cpp — SHAPE context sizes (ccd36246f).
sizeof(SHAPE_XMA_CONTEXT) is 60 against the asserted 64, and sizeof(SHAPE_PCM_CONTEXT) is 28 against 32. The repo's own ABI test (tests/test_acphal_abi.py) asserts 64/32 are the GDK sizes, so the structs are one trailing dword short: reserved[10] -> reserved[11], reserved[1] -> reserved[2]. Padding only; no named field moves. (The shim never reads a field of either context — it only allocates sizeof(...) zeroed arrays — so only the size matters to it. Where the true GDK puts the byte is still the author's to confirm.)

Verified: cmake --build runtime/build --config RelWithDebInfo --target gta6rt links on d083a2cc3 with these hunks.

Not fixed here (separate, and its author's to rewrite): runtime/test/d3d12_console_descriptor_heap_test.cpp, added by the same 3630610ca, does not compile — it uses a Ref<T> template this tree does not have and calls IID_PPV_ARGS on a void*.

Method: Windows 11 26300, MSVC 19.52, RelWithDebInfo, Vulkan SDK 1.4.363.0. AI-assisted (OpenCode).


🔄 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/243 **Author:** [@Andretuta](https://github.com/Andretuta) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `old-pr/9978` --- ### 📝 Commits (3) - [`88ed23f`](https://github.com/ubiquitarianism/leonida/commit/88ed23f8d8323cef9aa5e28b5d94c4a8de758aed) fix: make main build again (3 hunks, 3 root causes) - [`c1e1c50`](https://github.com/ubiquitarianism/leonida/commit/c1e1c500b059b4b27e908e68588744612f75d168) runtime: give the standalone proxy tests an inert create_console_descriptor_heap so they link - [`7b31674`](https://github.com/ubiquitarianism/leonida/commit/7b31674e1ead28893b313d3b05f8b9ddac861c93) runtime: give the remaining standalone d3d12_xs_device.cpp consumers the stub too ### 📊 Changes **5 files changed** (+43 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `runtime/CMakeLists.txt` (+7 -0) 📝 `runtime/shims/acphal.cpp` (+2 -2) ➕ `runtime/shims/d3d12_console_heap_stub.cpp` (+22 -0) 📝 `runtime/shims/d3d12_vulkan_device.cpp` (+2 -1) 📝 `runtime/shims/d3d12_xs_device.cpp` (+10 -0) </details> ### 📄 Description > Carried over from **old PR 9978** by `icecreammule277-dot` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9978`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > This branch conflicts with the current `main` and needs a rebase. > `icecreammule277-dot`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): `main` (`d083a2cc3`) does not compile the runtime (`gta6rt`). Three independent source-level breaks from recent merges, each fixed with one hunk. With them the target links; without them it fails with `C2084`, `C2338`, `C3083`, `C2248`, `C2665`. **1. `runtime/shims/d3d12_xs_device.cpp` — missing declaration.** Xbox slot 14's console descriptor-heap path (`3630610ca`) calls `rt::d3d12::create_console_descriptor_heap` (declared in `d3d12_com.h:221`, defined in `d3d12_vulkan_device.cpp`) but this translation unit never sees the declaration. Fixed with a forward declaration, *not* `#include "d3d12_com.h"`: that header pulls in `gfx10_descriptors.h` and `vulkan_backend.h`, and this TU is also compiled by `root_sig_test`, `device_proxy_test` and `xs_proxy_mock_test`, which do not carry the Vulkan include path — including the header breaks those three tests instead (verified: adding the include reintroduces a `vulkan/vulkan.h` C1083 in those targets). **2. `runtime/shims/d3d12_vulkan_device.cpp` — the same commit's helper.** `create_console_descriptor_heap` needs a non-const `DeviceState&` (`Device::state()` returns a const reference) and the private `Device::identity()`. Added a non-const `state()` overload and used the existing public `holder()` (which returns `identity()`). Behaviour-neutral. **3. `runtime/shims/acphal.cpp` — SHAPE context sizes (`ccd36246f`).** `sizeof(SHAPE_XMA_CONTEXT)` is 60 against the asserted 64, and `sizeof(SHAPE_PCM_CONTEXT)` is 28 against 32. The repo's own ABI test (`tests/test_acphal_abi.py`) asserts 64/32 are the GDK sizes, so the structs are one trailing dword short: `reserved[10] -> reserved[11]`, `reserved[1] -> reserved[2]`. Padding only; no named field moves. (The shim never reads a field of either context — it only allocates `sizeof(...)` zeroed arrays — so only the size matters to it. Where the true GDK puts the byte is still the author's to confirm.) **Verified:** `cmake --build runtime/build --config RelWithDebInfo --target gta6rt` links on `d083a2cc3` with these hunks. **Not fixed here** (separate, and its author's to rewrite): `runtime/test/d3d12_console_descriptor_heap_test.cpp`, added by the same `3630610ca`, does not compile — it uses a `Ref<T>` template this tree does not have and calls `IID_PPV_ARGS` on a `void*`. Method: Windows 11 26300, MSVC 19.52, RelWithDebInfo, Vulkan SDK 1.4.363.0. AI-assisted (OpenCode). --- <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:25 +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#295
No description provided.