fix(vk): Arc B-series no longer loses the device in Kokiri Forest: float adds are the GPU's own atomic #444
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
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
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!444
Loading…
Reference in a new issue
No description provided.
Delete branch "nyannoying/Longshot:fix/arc-battlemage-native-fadd"
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?
Why
On an Intel Arc B580 the game loses the GPU device the moment Kokiri Forest comes up after the opening, in every run: a black screen, then the game ends.
What changed
native_fadd_wanted()ingpu/vk/vk_main.cppnow also asks for the GPU's own float atomic add (VK_EXT_shader_atomic_float) by default on the Arc B-series, Battlemage (PCI device 0xE2xx), from Intel's Windows driver 101.9154 on, as it already does for Meteor Lake and Arrow Lake from 101.9175. The comment there says what was run. The log line that names the reason says Battlemage too.tests/test_native_float_atomic_add.py's table of 42 cases has the B-series ones (on from 101.9154, off on an older driver and on Arc A-series). It fails onmain.RX_VK_NATIVE_FADDrow indocs/development.md.Flags and settings
RX_VK_NATIVE_FADD=0/1Measurements
main:
cf605c85(2026-11-14)this PR: fix/arc-battlemage-native-fadd @
2d01cc38Hardware: Intel Arc B580 12 GB (PCI device 0xE20B), driver 32.0.101.9154; Core i5-13600K; 64 GB; Windows 11 Pro (26100-series Insider, 10.0.29704)
Scene: from the start into the save's Kokiri Forest (child), then standing on Link's balcony; 2048x1152 output, frame generation off
Method: 4 runs, interleaved (main, this PR, main, this PR), the game started and driven through the control bridge each time; the device loss and the frame counts from
longshot_log.txt, fps from itsvi: ... frames presented (... fps over the last 5.0 s)lines.How to reproduce: on a B580 start a game and let Kokiri Forest load;
RX_VK_NATIVE_FADD=0gives main's behaviour.Baseline: main @
cf605c85, the main this was written and run on. The runs were made with 80e0e5ee, this change oncf605c85; the branch has since been rebased onto main5e072fc8(2d01cc38) with the same diff plus the log line's wording, and was not run in the game again:native_fadd_wanted()and what reads it did not change between the two mains (git diff cf605c85 5e072fc8 -- gpu/vk/vk_main.cppis empty), and a build of main5e072fc8with only #443's change in it (the replay's, nothing of the float add) still lost the device entering the forest on this card in 4 of 4 starts on 2026-11-14 (those logs were not kept). In all, 191 logged sessions on this card ran with the native add (the work behind #443 among them), none losing the device.cf605c852d01cc38(run as 80e0e5ee oncf605c85)(The first three windows of each run are the title and the load;
fadd1's reason reads "Meteor Lake or Arrow Lake" because the log line had no word for Battlemage yet, which this PR adds.)Testing
Tested: Arc B580, 101.9154, Windows 11: the four runs above (files in
docs/tested/), and Kokiri Forest stood in and walked through in 191 logged sessions with the native add, none losing the device.python -I -B tests/run_all.py: 485 passed, 6 failed, 70 skipped; the 6 aretest_module_ids,test_pad_layout,test_tested_configurations,test_oot_state_tap,test_fpx_stickyandtest_spawn_emit, which fail the same way on main5e072fc8here.tests/test_native_float_atomic_add.pyis skipped by the runner on this PC (nospirv-val); run by hand with SPIRV-Tools v2026.4'sspirv-valit passes here and fails on main5e072fc8.Not tested: other areas than Kokiri Forest; the Arc B570; other drivers than 101.9154; this PR's rebased head in the game (see Baseline); a Linux build (no Linux compiler on this PC: the change is one condition in
native_fadd_wanted()and a log string, so the template's two-platform box is left out, not ticked). With this default a B-series card translates its shaders again once: the float add is part of the program cache's stamp.Needs other testers:
float atomic add on storage buffers: nativein the log (T-9FES)Risk and rollback
Only Battlemage cards on Intel's Windows driver 101.9154 or newer change. Their program cache is made again once, because the float add is part of its stamp.
RX_VK_NATIVE_FADD=0keeps the loop; reverting the commit is enough.Reviewer notes
CAS_LOOP_MAX_TRIES, so a fault in Intel's compiler or a timeout are both possible.Issues
See #343
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.docs/tested/for each new measured run (format indocs/tested-configurations.md; no appended row or assembled view).mainand passing here.🤖 Generated with Claude Code
The test request is open (T-9FES: an Arc B570, or a B580 on driver 101.9175 or newer) and named in the description; it waits for a maintainer's testing wanted label. #343 looks like the same loss on a B580 with 101.9175, which this gate covers.
WIP: fix(vk): Arc B-series no longer loses the device in Kokiri Forest: float adds are the GPU's own atomicto fix(vk): Arc B-series no longer loses the device in Kokiri Forest: float adds are the GPU's own atomicView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.