d3d12_xs: say so when LEONIDA_D3D12=vulkan is asked of a runtime built without the Vulkan device (RT-VULKAN-REQUESTED-NOT-BUILT) #2173

Open
github-bot wants to merge 1 commit from github-bot/gh-2173 into main AGit
Owner

@⁠quartz-heron-58 on GitHub · 2026-11-26 01:54 UTC · original
quartz-heron-58:vulkan-requested-note → main · +88 −4 · 5 files · 1 commits · open

Claimed as: RT-VULKAN-REQUESTED-NOT-BUILT (#1608)

Depends on: nothing.

What and why

A gta6rt configured without Vulkan headers is built without LEONIDA_VULKAN_DEVICE. D3D12XboxCreateDevice then ignored LEONIDA_D3D12=vulkan without a word and wrapped the host's D3D12 device. The run stops somewhere else and reads like a boot result (a finding on #1608 today traced a reported stop to exactly this). docs/boot.md mentions it, but the log did not.

Now that case prints one line, once:

[rt] d3d12_xs: LEONIDA_D3D12=vulkan is set, but this runtime was built without the Vulkan-backed device (its configure found no Vulkan headers), so the title gets the host's D3D12 device instead. Configure again with VULKAN_SDK set or -DLEONIDA_VULKAN_HEADERS_FETCH=ON; -DLEONIDA_REQUIRE_VULKAN=ON makes a configure without the headers fail

Which device is created does not change in either build. The reading of the variable moves to a small header, runtime/shims/d3d12_backend.h, that both builds use, with a CPU-only test d3d12_backend registered outside the Vulkan-headers block of runtime/CMakeLists.txt so a header-less configure builds it too. One sentence in docs/boot.md updated. It does not touch the proxy message that #1168 changes.

Tested

Windows 11 26300, MSVC (VS 2022 Build Tools), main ad41fd5 plus this commit, scripts\build_runtime.ps1 -FetchSdl3 with VULKAN_SDK 1.4.363.0: build exit 0.

  • d3d12_backend_test: 14 checks, 0 failures.
  • ctest -R "d3d12_backend|tiny|d3d12_xs": 22 of 22 pass (includes run_tiny_frame, which goes through the Vulkan branch of the changed function).
  • python -I tests/test_ci_registration.py: 16 OK. python -I scripts/check_no_game_data.py on the 5 changed files: exit 0. git diff --check: clean.

Not verified: the line actually printing from a header-less gta6rt. A configure of main without Vulkan headers fails here before generating (title_hud_test links Vulkan::Headers unconditionally, which the open #2083 fixes), so that build could not be made. The #else side is covered by the helper's test and by reading the code only. Not built on Linux or with clang-cl.

GPUs tested: NVIDIA GeForce RTX 4080, driver 621.24, Windows 11 (only for the Vulkan-build ctest runs above).

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

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed: n/a (runtime shim, no translator change).

🤖 Generated with Claude Code

**@⁠quartz-heron-58** on GitHub · 2026-11-26 01:54 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2173) `quartz-heron-58:vulkan-requested-note` → `main` · +88 −4 · 5 files · 1 commits · open **Claimed as:** RT-VULKAN-REQUESTED-NOT-BUILT (#1608) **Depends on:** nothing. ## What and why A `gta6rt` configured without Vulkan headers is built without `LEONIDA_VULKAN_DEVICE`. `D3D12XboxCreateDevice` then ignored `LEONIDA_D3D12=vulkan` without a word and wrapped the host's D3D12 device. The run stops somewhere else and reads like a boot result (a finding on #1608 today traced a reported stop to exactly this). `docs/boot.md` mentions it, but the log did not. Now that case prints one line, once: `[rt] d3d12_xs: LEONIDA_D3D12=vulkan is set, but this runtime was built without the Vulkan-backed device (its configure found no Vulkan headers), so the title gets the host's D3D12 device instead. Configure again with VULKAN_SDK set or -DLEONIDA_VULKAN_HEADERS_FETCH=ON; -DLEONIDA_REQUIRE_VULKAN=ON makes a configure without the headers fail` Which device is created does not change in either build. The reading of the variable moves to a small header, `runtime/shims/d3d12_backend.h`, that both builds use, with a CPU-only test `d3d12_backend` registered outside the Vulkan-headers block of `runtime/CMakeLists.txt` so a header-less configure builds it too. One sentence in `docs/boot.md` updated. It does not touch the proxy message that #1168 changes. ## Tested Windows 11 26300, MSVC (VS 2022 Build Tools), main ad41fd5 plus this commit, `scripts\build_runtime.ps1 -FetchSdl3` with VULKAN_SDK 1.4.363.0: build exit 0. - `d3d12_backend_test`: 14 checks, 0 failures. - `ctest -R "d3d12_backend|tiny|d3d12_xs"`: 22 of 22 pass (includes `run_tiny_frame`, which goes through the Vulkan branch of the changed function). - `python -I tests/test_ci_registration.py`: 16 OK. `python -I scripts/check_no_game_data.py` on the 5 changed files: exit 0. `git diff --check`: clean. **Not verified:** the line actually printing from a header-less `gta6rt`. A configure of main without Vulkan headers fails here before generating (`title_hud_test` links `Vulkan::Headers` unconditionally, which the open #2083 fixes), so that build could not be made. The `#else` side is covered by the helper's test and by reading the code only. Not built on Linux or with clang-cl. **GPUs tested:** NVIDIA GeForce RTX 4080, driver 621.24, Windows 11 (only for the Vulkan-build ctest runs above). **AI-assisted:** yes (Claude Code; built and run on the machine above). ## Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed: n/a (runtime shim, no translator change). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A gta6rt configured without Vulkan headers is built without
LEONIDA_VULKAN_DEVICE. D3D12XboxCreateDevice then ignored
LEONIDA_D3D12=vulkan without a word and wrapped the host's D3D12 device,
so a run stopped somewhere else and read like a boot result.

It now prints one [rt] d3d12_xs line naming the cause and the configure
options. Which device is created does not change. The reading of the
variable moves to shims/d3d12_backend.h, used by both builds; new CPU-only
test d3d12_backend, registered outside the Vulkan-headers block.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:21:10 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2173/head:github-bot/gh-2173'
git switch 'github-bot/gh-2173'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2173'
git switch 'github-bot/gh-2173'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2173'
git switch 'github-bot/gh-2173'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2173'
git switch 'main'
git merge --squash 'github-bot/gh-2173'
git switch 'main'
git merge --ff-only 'github-bot/gh-2173'
git switch 'main'
git merge 'github-bot/gh-2173'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.