Skip to content

d3d12_xs: say once that LEONIDA_D3D12=vulkan is ignored in a build without the Vulkan device (RT-5) - #7925

Closed
ruvenesh wants to merge 1 commit into
ItsNotRexed:mainfrom
ruvenesh:gee/vk-env-ignored-warning
Closed

ruvenesh wants to merge 1 commit into
ItsNotRexed:mainfrom
ruvenesh:gee/vk-env-ignored-warning

Conversation

@ruvenesh

Copy link
Copy Markdown

Claimed in #7913 (comment)

Depends on: nothing (applies to main).

What and why

A gta6rt configured without Vulkan headers has no LEONIDA_VULKAN_DEVICE (find_package(Vulkan) finds nothing and LEONIDA_VULKAN_HEADERS_FETCH is OFF by default), so LEONIDA_D3D12=vulkan fell through to the host's D3D12 device without a word. Under Wine the host device is vkd3d: D3D12CreateDevice fails at feature level 12_0 (E_INVALIDARG), and a 11_0 workaround fails in the proxy's QueryInterface (E_NOINTERFACE). That reads as "Wine cannot run this", and cost two of our boot-measurement sessions hours before we noticed the Vulkan device was not compiled in.

D3D12XboxCreateDevice now prints one line when the variable is vulkan and the build has no Vulkan device, naming the cause and the fix (VULKAN_SDK, or -DLEONIDA_VULKAN_HEADERS_FETCH=ON). The #ifdef LEONIDA_VULKAN_DEVICE path is unchanged, and so is behaviour: it still uses the host device. docs/testing.md's existing "LEONIDA_D3D12=vulkan does nothing" row mentions the new line.

Tested

Linux, NVIDIA RTX 3060 (driver 580.178.04), Wine 11.22 (also seen on Wine 9.0), clang-cl 23.1.6 + xwin cross-build, RelWithDebInfo, retail executable from my own copy (no game data is quoted here: only our own log lines).

  • Build without Vulkan headers, LEONIDA_D3D12=vulkan gta6rt --run: the new line appears exactly once, at the title's D3D12XboxCreateDevice call, before the host's D3D12 device is used.
  • Same build, variable unset (negative control): no such line; the host path's own failure (PC D3D12CreateDevice failed) is unchanged.
  • Build with Vulkan headers (-DLEONIDA_VULKAN_HEADERS_FETCH=ON), LEONIDA_D3D12=vulkan: no such line; Vulkan device: NVIDIA GeForce RTX 3060 and D3D12XboxCreateDevice -> proxy as before.
  • tests/test_docs_*.py, test_ci_registration.py, test_text_write_line_endings.py on this branch: test_docs_cli_flags, test_docs_links and test_text_write_line_endings fail, and fail the same way on current origin/main (files this PR does not touch). check_no_game_data.py passes.
  • Not tested: Windows/MSVC (the change is a getenv_s/fprintf block that the same file already uses above it).

The boot run needed #4313, #7216, #6582 and #4348 merged locally to reach D3D12XboxCreateDevice; none of them is part of this PR.

AI-assisted: yes (Claude Code).

Checklist

  • 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 (n/a: no translator change).

🤖 Generated with Claude Code

…thout the Vulkan device

A gta6rt configured without Vulkan headers has no LEONIDA_VULKAN_DEVICE, so the variable
fell through to the host's D3D12 device without a word. On Wine's vkd3d that fails
(E_INVALIDARG at 12_0, E_NOINTERFACE in the proxy's QueryInterface) and reads as a Wine limit.
D3D12XboxCreateDevice now logs one line naming the cause and the fix; docs/testing.md's
existing 'LEONIDA_D3D12=vulkan does nothing' row mentions it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@skorex

skorex commented Nov 23, 2026

Copy link
Copy Markdown

Duplicate of #7841

#7841 makes the same change and was opened earlier. Topic: d3d12_xs: log once that LEONIDA_D3D12=vulkan is ignored in a build without the Vulkan device.

Suggest closing this PR in favour of #7841, and porting anything this one adds that #7841 lacks there.

@ruvenesh

Copy link
Copy Markdown
Author

Closing as a duplicate of #7841 (opened earlier, same change). My test results and the docs/testing.md suggestion are on #7841.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants