build(windows): no WebGPU renderer: the Windows game builds the Vulkan back end only, as Linux does #577
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!577
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:build/no-webgpu"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type: build · Risk: medium · Tested on: nothing run (Linux PC, Windows change) · Needs: Windows, any GPU
Why
Every Windows build compiles an old renderer the game doesn't use by default (TOTKPort's WebGPU renderer and suyu's
shader recompiler with its WGSL back end, about 160 C++ files at -O2) and downloads
wgpu-nativefor it, so everyplayer's first build is longer than it needs to be. The game only drew with it when
RX_BACKENDnamed another rendererthan Vulkan, or when the Vulkan back end didn't start. The owner decided (2026-11-14) to drop it: Linux already builds
without it. See #362 (a shorter first build).
What changed
The Windows game is now built as the Linux one is: the Vulkan back end (
longshot_vk.dll) is the only renderer, theexe is linked with the stand-ins that were already there for a build without wgpu-native (
host/rx_nowgpu.c), andwgpu-nativeis no longer a build tool. The WebGPU renderer's own sources are deleted; the headers the host and theVulkan back end use stay.
nx2/build.pylosesgpu_sources(),WGPU/WGPU_NATIVE, the "the renderer (C++20, NDEBUG...)" job branch,the
wgpu_native.dll.liblink and thewgpu_native.dllcopy;host/rx_nowgpu.cis always in the Windows hostsources (Linux keeps
host/posix/linux_stubs.c).rx_start()inhost/rx_backend.cno longer readsRX_BACKEND: it always loads the Vulkan back end, as it didwith
RX_BACKENDunset (the default).load_vulkan()'s failure lines say "nothing is drawn" instead of "WebGPU".host/rx_nowgpu.cgainsrx_collect_written()(a build withRX_SOFT_WRITE_WATCH=0needed it fromgpu/render/rx_core.cpp; it now answers "nothing tracked", as Linux's does) and its messages are reworded.host/display.clogs "no renderer" instead of "no WebGPU device". Comments innn_hid.c,nvn_native.c,hos_main.c,nn_audio.cno longer point at the deleted files.rx_*.cpp,rx_none.c(built by nothing already), and the headers only they used(
rx_internal.h,rx_web_mt.h,rx_bcn.h,rx_wgpu_names.h,renderdoc_app.h). Keptrx.h(host/display.c),rx_nvn.handnvn_api.h(the op stream:host/,gpu/vk/vk_api.h, tests, the AppImage's header copy). The topcomment of
rx.hsays what it is now.tools.lockloses thewgpu-nativeline,scripts/tools.pyREQUIRED["windows-x64"]loses it, the builder(
builder/LongshotBuilder/Runner.cs) no longer setsWGPU_NATIVE,builder/setup/setup.ccomment.nx2/make_game.pydrops
wgpu_native.dllfromBESIDEand removes one an older build left in the game folder (nothing loads it now).scripts/run-vk.ps1no longer setsRX_BACKEND=vulkan..forgejo/workflows/build-windows.ymland both in.circleci/shared.yml) no longerinstall
wgpu-nativeor setWGPU_NATIVE.tests/test_no_webgpu.py(the build compiles nothing ofgpu/render, names no wgpu-native, no tool listrequires it,
rx_startreads noRX_BACKEND, and both platforms' stand-ins define everywgr_*and live-inputfunction the host names, so the exe links).
tests/test_renderer_load_error.pynow also checks the Windows failureline names no WebGPU.
tests/test_dev_packs.py: a route check's label and path (gpu/render/x.h: still "game").tests/test_capture_past_end.pyno longer lists the deletedgpu/render/rx_shader.cppamong the capture loops it reads.docs/development.md(theRX_BACKENDrow andWGPU_NATIVEgone, thegpu/render/layout row, the liveinput's
!dump/!shots),README.mdandCONTRIBUTING.md(thetools\wgpu-nativestep),docs/design.md(thecurrent design; the history stays),
docs/releases.md,RELEASING.md(a note on the dated "Done" line),gpu/PROVENANCE.md(what was removed and what stays),gpu/vk/VULKAN.md's top note,gpu/vk/vk_api.h's comments.Left on purpose:
gpu/third_party/suyu/is untouched (its shader recompiler and WGSL back end stay in the tree,uncompiled; the Vulkan back end still compiles its texture decoders).
third_party/is untouched. Historical commentsin
gpu/vkthat say a piece was ported "from the WebGPU renderer's rx_*.cpp" are left as history, andgpu/vk/vk_state.hand
vk_shader.cppare not touched at all (they are in the shader stamp: a comment change there would make every playertranslate every program again).
scripts/cpu_categories.py'srender/webgpu-fallbackrow is left: it matches nothing ina new build and still reads older profiles.
Measurements
Verdict: not measured: this PC is Linux, and the point of the change (a shorter Windows build, ~160 fewer C++
files) has to be timed on a Windows build. Requested under Must be tested.
Flags and settings
Two switches removed; nothing added.
RX_BACKEND(removed)vulkan: Vulkan; anything else: the WebGPU renderer, in a build with wgpu-nativeWGPU_NATIVE(removed, build)Testing
Tested: nothing run on this PC (the owner's rule for this change: no tests or builds here; CI runs the game-free
checks). Read instead: every user of each deleted file (grep across the tree: only the WebGPU renderer itself, and
comments), every check under
tests/that readshost/rx_backend.c,nx2/build.py,tools.lockorscripts/tools.py.Not tested: the Windows build and the game on Windows; the Linux build (its sources change only in comments and
in
host/rx_backend.c'srx_startand log lines);python -I -B tests/run_all.py(left to CI).Must be tested:
make_game.py, expecting it to build withoutwgpu-native and with no
gpu_*objects, the game to start on Vulkan (rx: renderer: Vulkan (longshot_vk.dll)inlongshot_log.txt) and play as on main, and the compile to be shorter than main's at the same commit otherwise(by hand or the Test Farm: request to open)
wgpu_native.dllgone from the folder and the gamestarting (by hand)
Risks
What could break: the Windows exe could fail to link if something still needs a WebGPU renderer function that
neither
host/rx_nowgpu.cnor the host defines (tests/test_no_webgpu.pychecks the ones the host names). A WindowsPC whose Vulkan doesn't start used to fall back to the WebGPU renderer (on D3D12 through wgpu-native); it now gets a
black window and "nothing is drawn" in the log, as Linux does. With default settings and a working Vulkan nothing
changes.
Turning it off: revert the commit.
Compatibility: saves,
longshot_options.iniand the shader and pipeline caches are untouched (no stamped filechanged). The vk ABI is unchanged (
vk_api.h: comments only, noMKWVK_API_VERSIONbump). The builder no longerdownloads
wgpu-native; an older game folder'swgpu_native.dllis removed at the next build.RX_BACKENDset tosomething other than
vulkannow gets Vulkan.Issues
See #362
Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named). (not run here: left to CI)third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.mainand passing here. (tests/test_no_webgpu.py; not run here: left to CI)tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
2604177316b47ce8ca3cRebased onto main
4e80ea63(after #569 merged), no conflicts. Nothing run here.b47ce8ca3c5d463a657fRebased onto main
414f56e2(after #569 and #573 merged), no conflicts. Nothing run here.Decided with the owner: the WebGPU fallback goes. It ran only when Vulkan failed to load or start on Windows (no loader, a GPU or driver without the features the renderer needs, a broken driver), and then gave an unmaintained renderer that none of Longshot's Ocarina fixes, upscalers, frame generation or menu reached, and that no tested run ever used. Linux has never had it. A clear message when Vulkan fails, instead of the black window, can follow separately.
Rebased onto main
b2911d33. Three text conflicts with #572 (both edited the same lines), resolved as main's new text with this PR's one change, wgpu-native dropped: scripts/tools.py's REQUIRED and its comment, RELEASING.md's one-time setup step 6, docs/releases.md's Windows tool list. Nothing run here.5d463a657f2fc45cf04dWIP: build(windows): no WebGPU renderer: the Windows game builds the Vulkan back end only, as Linux doesto build(windows): no WebGPU renderer: the Windows game builds the Vulkan back end only, as Linux does2fc45cf04db6aa228f06b6aa228f06002fa6f28cRebased on main @
772fe283(now002fa6f2). Two conflicts:gpu/render/rx_shader.cppstays deleted (main's #427 fix there was the WebGPU copy of the one ingpu/vk/vk_shader.cpp, which is kept), andnx2/build.pykeeps #857'sexe_resources()withoutWGPU/gpu_sources(). Also covered what main added since:.circleci/shared.yml(#417) no longer installs wgpu-native, which this PR takes out oftools.lock, andtests/test_capture_past_end.py(#427) no longer reads the deletedrx_shader.cpp. Not run here; left to CI.