perf(vk): the Arc B-series compiles shaders side by side by default: a new area no longer freezes the picture for minutes #500
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/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!500
Loading…
Reference in a new issue
No description provided.
Delete branch "nyannoying/Longshot:perf/battlemage-compiles-side-by-side"
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 picture freezes for four to seven minutes the first time an area is entered, while its shaders are compiled one at a time. Compiled side by side, the same card does not freeze at all.
What changed
gpu/vk/intel_compiles.h(new) says where Auto is side by side: the Arc B-series (Battlemage, PCI device 0xE2xx) from Intel's Windows driver 101.9154, the family and driver it was run on. On every other Intel GPU Auto is one at a time, as before.intel_compiles_side_by_side()ingpu/vk/vk_menu.cppasks it with the row, the GPU and its driver;IntelDriverGate(gpu/vk/vk_internal.h) is unchanged but for a log line that says when the compiler is entered side by side.RX_VK_NO_INTEL_SERIAL=1is side by side for a run and=0one at a time.tests/test_intel_compiles_auto.py(new) compiles the rule alone against 39 cases (B580 and B570 from 101.9154, an older driver, Arc A-series, Meteor Lake, Arrow Lake, Lunar Lake, Iris Xe, UHD, and the row's three values) and checks the row in the source; it fails onmain.tests/test_intel_compiler_gate.pyreads the gate's new question.RX_VK_NO_INTEL_SERIALrow indocs/development.md.Flags and settings
intel_shader_compiles=0/1/2)RX_VK_NO_INTEL_SERIAL=0/1Measurements
main:
9c9d69ed(2026-11-14)this PR: perf/battlemage-compiles-side-by-side @
dc47a621Hardware: Intel Arc B580 12 GB (PCI device 0xE20B), driver 32.0.101.9154; Core i5-13600K (20 threads, 6 background workers); 64 GB; Windows 11 Pro (26100-series Insider, 10.0.29704)
Scene: areas entered by the debug teleport for the first time on this PC, in a game folder never prepared (
RX_VK_PRECOMPILE=0), frame generation offMethod: an area can be new only once (the driver keeps what it compiled), so no area was run twice: each launch teleports to areas not visited before and stands there. New programs are the log's
vk: in play:lines; "under 5 fps" is the sum of the log'svi: ... frames presented (... fps over the last ... s)windows below 5 fps; "steady after" is the time from the teleport until the control bridge's status reads 25 fps or more four times in a row. The last two launches are one build, the default againstRX_VK_NO_INTEL_SERIAL=0.How to reproduce: on a B-series card, with a game folder not prepared, enter an area for the first time with the row on One at a time and another with it on Side by side; the log's
vi:lines show the freeze.Baseline: this PR @
dc47a621,RX_VK_NO_INTEL_SERIAL=0(One at a time, main's default). main itself was not the comparison because on the B580 it loses the device entering Kokiri Forest (#444). The build that ran is this PR's change applied to maincf605c85with four changes not merged yet (#444, #446, #443, #459), since a main-based build has another shader stamp than this card's caches. The change touchesvk_menu.cpp,vk_menu.h,vk_internal.hand the new header only, and applies to both bases unchanged.dc47a621,RX_VK_NO_INTEL_SERIAL=0(One at a time, main's default)dc47a621(Auto: side by side on this card)Before the change, with the switch on the same base (
RX_VK_NO_INTEL_SERIAL=1is what Auto now chooses on this card):RX_VK_TRANSLATE_WAIT_MS=8RX_VK_TRANSLATE_WAIT_MS=8Over all the areas, the median time until steady is 154 s one at a time (five areas in three launches: 250, 410, 134, 73, 154) and 27 s side by side (thirteen areas in four launches); the launches of the two settings were alternated over the afternoon, not paired area by area, for the reason under Method.
The usual figures of a
perfchange (average fps, 1% low, frame time) do not describe this one: what it moves is how long a first visit stops the picture, so that and the time until the frame rate is back are what is measured. The frame rate once an area's shaders exist is the same either way. Both timers in the log start before the gate, so with one thread in the compiler most of "translation" is queueing at the lock.Testing
Tested: Arc B580, 101.9154, Windows 11: the seven launches above (seven files in
docs/tested/; the Kokiri, Hyrule Field and Market fixes of #443, #444 and #446 in the build). Side by side in four launches through thirteen areas: 1,484 programs first compiled, noVK_ERROR_DEVICE_LOST, no "driver faulted" line, no exit; Kakariko Village, Zora's Domain and Dodongo's Cavern looked at and drawn right. With the default the log says side by side; withRX_VK_NO_INTEL_SERIAL=0it says one thread.python -I -B tests/run_all.py: 496 passed, 5 failed, 70 skipped; the 5 aretest_fpx_sticky,test_walk_key,test_spawn_emit,test_tested_configurationsandtest_oot_state_tap, which fail the same way on main9c9d69edhere.Not tested: the row changed in the menu itself (the runs used the default and the environment switch); the up-front preparation on this card, side by side or not; a long play session side by side;
RX_VK_COMPUTE_SERIAL=0(left at its default: compute pipelines stay one at a time); this PR's own head in the game (see Baseline); a Linux build (no Linux compiler on this PC, and the gate is Windows only; the template's two-platform box is left out, not ticked).Needs other testers:
igvk64.dll, say so and which driver (T-DFNY)Risk and rollback
Only Arc B-series cards on driver 101.9154 or newer change by default. One at a time has a net that side by side has not: a shader Intel's compiler faults on is left out there, and side by side such a fault closes the game. None came in 1,484 first compiles on this card, but that is one card and one driver. A player sets the row to One at a time (or
RX_VK_NO_INTEL_SERIAL=0) to have it back; a B-series owner who had chosen One at a time on purpose must choose it again, since the old value 0 now reads as Auto. Reverting the commit is enough; a saved 2 then reads as Side by side under the old row's clamp, so a revert should say so.Reviewer notes
RX_VK_TRANSLATE_WAIT_MS=8alone took a third off a first visit's freeze and left draws out in only six reports; it is not part of this.Issues
See #407
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.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
The two test requests are open (T-DFNY: an Arc B570, or a B580 on a newer driver; T-WW92: any other Intel GPU on Windows, expecting no change) and named in the description; they wait for a maintainer's testing wanted label.
WIP: perf(vk): the Arc B-series compiles shaders side by side by default: a new area no longer freezes the picture for minutesto perf(vk): the Arc B-series compiles shaders side by side by default: a new area no longer freezes the picture for minutesView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.