Repository navigation
fix(linux): the log says why the renderer did not load - #2875
Open
jordanella wants to merge 1 commit into
Open
jordanella wants to merge 1 commit into
jordanella wants to merge 1 commit into
Conversation
hookshot_vk.so is opened with RTLD_NOW and takes symbols from the executable, so one from another build fails at dlopen, before mkwvk_init's version check, and the game falls back to WebGPU. The POSIX LoadLibraryA kept only ERROR_FILE_NOT_FOUND, so the log said "(2)" for that and for a missing file alike. It keeps dlerror()'s text (hos_load_error), and load_vulkan prints it: rx: RX_BACKEND=vulkan, but .../hookshot_vk.so did not load (.../hookshot_vk.so: undefined symbol: mkwvk_...): WebGPU tests/test_renderer_load_error.py: the source everywhere; on Linux, the shim as it is loading a missing file, a library needing a missing symbol and a good one. Part of the dev-loop proposal's B1 (NotRexed#2636). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the Linux renderer fails to load, the log says only
(2). That covers a missing file and ahookshot_vk.sofrom another build alike, though the second is the one that needs explaining: it takes symbols from the executable, so it fails atdlopen, beforemkwvk_init's version check, and the game quietly falls back to WebGPU.Change
host/posix/win32_posix.c:LoadLibraryAkeepsdlerror()'s text for the last failure, per thread, andhos_load_error()returns it (""after a success).GetLastError()is stillERROR_FILE_NOT_FOUND, as before.host/rx_backend.c:load_vulkan's failure line prints that text on Linux:Windows keeps the error number, which already tells a missing file (126) from a missing function (127).
Part of the dev-loop proposal's B1 (#2636): a renderer swap during development needs this line to say why the new one was refused.
Testing
tests/test_renderer_load_error.py(new):main);win32_posix.cas it is and loads, throughLoadLibraryA, a.dllname with no library behind it, a library that needs a symbol nothing has, then a good one.The Linux part, run by hand on WSL Ubuntu (gcc), as the check does it:
Every check that reads the changed files (37), through
run_all.py, rebased on today'smain, on Windows: 34 pass;nx2/test_bc_storage_views.py,nx2/test_dll.pyandnx2/test_leaf.pyfail the same way onmainhere. The new check's Linux part is skipped on Windows.Not run: the game on Linux. The change is the failure path's log line.
See #2636 (B1).
🤖 Generated with Claude Code