fix(vk): the renderer's own compute pipelines are made without the optimizer where Intel's Arc A-series driver refuses it #2075
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
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
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2075
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/arc-a-unoptimized-retry"
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?
Summary
On an Intel Arc A580 (Windows, driver 101.9175, v3.0.0) the screen goes black after the Deku Tree opening cutscene and at a save's load, with the sound and menus still working (#1874). The reporter's logs show why. Intel's driver answers
VK_ERROR_UNKNOWN(-13) for optimized compute builds that it then makes without the optimizer: the game's dispatches log it 39 times ("the optimized build was not made (-13); the one without the optimizer stays"). The renderer's own compute pipelines were asked once, with the optimizer, and then given up on:a frame's uploads took 30853 ms: on the CPU 190 (400.6 MB), with Kokiri Forest's two 1365 x 1365 x 90 arrays at 10.7 s and 11.7 s each. Frames took 30 s and 49 s (slow submit: 29976.0 ms,48978.3 ms), at 0.4 fps over 80 s. That is the black loading screen.72ba090c70fe2614, left out on every non-NVIDIA card by design:networks_left_out) was not made either (typed upscale helper generic RGB9E5 fallback, packed output: its pipeline was not made). That network's output was then a plain blit of RGB9E5 bits read as B10G11R11: the log'sprogram 72ba090c70fe2614 does not translate: its dispatch replaced by a linear upscale. The translation failure is not device-dependent:72ba090cis a cooperative-matrix network, left out by policy on every non-NVIDIA GPU. What is A-series specific is that its stand-in's pipeline could not be made.its pipeline was not made,(-13)).This change asks once more without the optimizer when the driver refuses the optimized build:
extern_guarded_compute(gpu/vk/vk_draw.cpp) handles every built-in compute pipeline another file makes: the texture pipelines throughtexture_compute_pipeline, the write-back diff, the late pages' fix, FSR 3, frame generation and the reactive mask. When the optimized build fails it tries once more withVK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BITand logsone of the renderer's compute pipelines was not made with the driver's optimizer (-13): made without it. This is the fallback the game's own dispatches already have (compute_optimize).texture_compute_pipeline: the pipeline cache first, then the retry above. TheirIntelDriverGatenow covers only the module, as the texture pipelines' does.astc_readylogs why the GPU decoder is missing:the GPU ASTC decoder's pipeline was not made (%d): ASTC is decoded on the CPU.Where the optimized build is made (NVIDIA, AMD, the other Intel GPUs the logs show) nothing else is asked, so nothing changes there.
Read first:
extern_guarded_computeingpu/vk/vk_draw.cpp,texture_compute_pipelineandastc_readyingpu/vk/vk_texture.cpp.Not fixed here, #826 (A770 device lost just after the intro). It is not the float-add loop of #444 and #816. The dispatch in flight at the loss is
4b03b3040d7cf076; the one before it,ab7699ee7f536755, had finished (checkpoint stages 0x1 and 0x2000). This PC's translation of4b03b304has no float adds: noOpAtomicFAddEXTunder the native add, whereab7699eeand499dbfd0have them. Its 25 compare-exchange loops are byte and short stores into words (OpBitFieldInsertthen CAS, at most 1024 tries), and every GPU runs those. On the A580,4b03b304's andab7699ee's optimized builds are the very ones the driver refuses (-13), and the A580 never lost the device. So the likely cause is Intel's optimizer on4b03b304on the A-series. The Beanstalk request below tells these causes apart. Turning the native float add on for the A-series would not change4b03b304.Fixes #1874
See #826
Testing
Tested: Linux, NVIDIA RTX 3090 (driver 620.70.06), this PR @
ac7ed497over the shared base of main9dd41326: a run from the kokiri-start save through the job queue: in play after 52 s, a walk and 40 s in Kokiri Forest, a shot, a clean quit (exit 0). The log has "texture pipelines made before the game in 9 ms (ASTC decoder yes, BC encoder yes, GPU unswizzle yes)" and "ASTC is decoded on the GPU", and no "not made with the driver's optimizer" line; the shot shows Link outside his house with every texture and the HUD right. The tree-shadow mask helper is made at first use and wasn't reached in this run. The retry path does not run on this PC: NVIDIA makes every optimized build. The new checktests/test_builtin_compute_unoptimized.pyruns the realextern_guarded_computeandtexture_compute_pipelineagainst a driver that refuses optimized builds (the A580's), one that makes them, and one that refuses both. It fails on main and passes here; CI on the forge runs it, because no test suites run on this PC.tests/test_compute_gate.py(the wrapper's lines) andtests/test_taau_typed_dispatch.py(its stand-in for the pipeline call) are updated to match.Still to test:
Measurements
Verdict: the bug is shown by a check and by the reporter's log. No speed changes where the driver makes optimized builds. On the A-series it should take a frame's uploads from 30.9 s of CPU decoding back to the GPU decoder (Beanstalk).
Setup:
tests/test_builtin_compute_unoptimized.py; the A580 log from #1874 (v3.0.0, driver 101.9175); one run on this PC (Linux, RTX 3090).9dd41326ac7ed497a frame's uploads took 30853 ms: on the CPURisks
cached_compute, with its turn at Intel's gate) instead of the driver directly. They are still made on the replay thread at first use, as the texture pipelines were beforetexture_pipelines_warm.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (No test suites run on this PC; CI on the forge runs them)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here. (Written to fail on main: main'sextern_guarded_computereturns the driver's -13. Not run on this PC; CI runs it)tests/that reads changed source is updated, not weakened.docs/dev/reference/architecture.md, Rules for resources and presentation)Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
https://claude.ai/code/session_017vw8e2uxGKQxzDeQ15jjNK
Tested in game: Linux, RTX 3090, NVIDIA 620.70.06, this PR @
ac7ed497over main 9dd41326's base, through the job queue: kokiri-start save, in play after 52 s, walk and 40 s in Kokiri Forest, clean quit. Log: texture pipelines made (ASTC decoder yes, BC encoder yes, GPU unswizzle yes), ASTC decoded on the GPU, no 'not made with the driver's optimizer' line; the picture and HUD were right. The Intel retry path can't run on NVIDIA: Beanstalk request below.@Beanstalk Windows, Intel Arc A-series (A580, A770 or A380), Intel driver 101.9175 (and 101.9150 if there is one): build this branch, then three short runs.
(1) Default settings, a new game through the Deku Tree opening into Kokiri Forest (or load the kokiri-start save) and walk for two minutes. Expect the log to have "ASTC is decoded on the GPU", no "a frame's uploads took" line of seconds, and the forest drawn at a playable rate instead of a black screen. Count any "one of the renderer's compute pipelines was not made with the driver's optimizer" lines and say whether it reads "made without it". Note whether the device is lost (#826).
(2) The same with RX_VK_NATIVE_FADD=1: the device lost or not, and whether the forest has a white haze.
(3) The same with RX_VK_NOOPT=1 (every compute dispatch without the optimizer): the device lost or not, and the fps against (1).
For a device loss, paste the log's "device lost:" checkpoint lines (the program keys at stage 0x1 and 0x2000).
Beanstalk test farm · ⛔ can't be tested as asked
Commit
ac7ed49· approved by HumanBean (untrusted) · dashboardNot run: the farm can't test this as asked, so nothing is built or run:
⚠️ Note: The plan moves briefly, then measures for two minutes stationary; it cannot walk throughout the measurement. FPS is reported for each scenario but cannot be automatically compared across these separate switch runs.
⚠️ Note: Shots compare each switch setting against main, not against the PR's default, so a haze shared by both builds could be missed. Device-loss checkpoint lines require inspecting the captured log; the plan cannot paste them into its result.
⚠️ Note: The fallback message is logged at most eight times, so its count is a logged count, not necessarily the total number of retries.
What it could test instead: The alternative plan loads the Kokiri start save on Windows Arc A580, A770, or A380 hardware and compares main with the PR under default settings and two diagnostic switches. It records forest images, frame rate, upload stalls, compute-pipeline fallback messages, and device loss over roughly 40 minutes per tester. Missing GPU ASTC decoding, uploads lasting at least a second, a crash, or a substantial image difference fails the plan. No matching Arc model is listed online, so the target would wait for a tester. No tester online now matches windows+intel+gpu-a380_a580_a770: that target waits for one.
A member of
BigBeanscan comment@Beanstalk <new words>to ask for something else, or@Beanstalk test it anywayto run the plan regardless.Possibly related, for context:
WIP: fix(vk): the renderer's own compute pipelines are made without the optimizer where Intel's Arc A-series driver refuses itto fix(vk): the renderer's own compute pipelines are made without the optimizer where Intel's Arc A-series driver refuses it