Game: Intel Arc iGPU (Meteor Lake) on Linux, Mesa 26.2.5: 9-10 fps in Kokiri Forest; native float add, off by default here, more than halves the GPU time #1897
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot#1897
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Longshot version
v3.0.0 (source bd6a0cdd)
Channel
Release (the v3.0.0 Linux AppImage's builder,
--cli; I startbin/longshotfrom a script, not through the launcher)What kind of problem
Low fps or stutter
What happened
On a Meteor Lake Arc iGPU, v3.0.0 runs stable and draws Kokiri Forest correctly, but stays at 9-10 fps, GPU-bound at about 95-100 ms a frame. Halving the render resolution barely changes it. It is the same on every pass through the same spot and on every start. And that is only with
RX_VK_NATIVE_FADD=1, which this device doesn't get by default (below).Suggested change: native float add on by default for Mesa ANV on Meteor Lake. The policy line here says
native_float_add=0, and the log saysfloat atomic add on storage buffers: compare-exchange loop. Same save, same spot, Minimum preset, the same 100-420 s of each run:RX_VK_NATIVE_FADD0(this device's default: the compare-exchange loop)1(VK_EXT_shader_atomic_float)The picture looks the same to me with both (
ladder-native-fadd.jpgandladder-cas-loop.jpg: the same spot, 200 s into each run). 7 runs with it on (up to 15 minutes each) had no device loss and no kernel GPU hang.native_fadd_listed(gpu/vk/device_policy.h) turns it on "where the card has it and a run has shown it right": Intel's Windows driver on Meteor Lake (0x7Dxx, from 101.9175), but no Mesa driver. So maybe these runs are enough to addVK_DRIVER_ID_INTEL_OPEN_SOURCE_MESAon0x7Dxx(Mesa 26.2.5, driver version0x6802005, here). I've only checked the picture by eye, in Kokiri Forest, so you may want more than that first.Some good news for the Intel work. On this machine, rc.3 and rc.6 (with Mesa 25.3.6) lost the device a few minutes into play (i915
GPU HANG: ecode 12:1:85def5fb: rc.3 in 4 of 4 runs, rc.6 in 3 of 4, 5-7 minutes into play), and rc.6 drew grass and railings blown-out white. v3.0.0 on Mesa 26.2.5 ran 5 times, 3 of them for about 11½ minutes of play each, with no device loss, no kernel GPU hang and a correct picture. Mesa changed at the same time, so I can't say which of the two ended the hang.Measurements (Kokiri Forest, Link's balcony and house, warm caches, from the attached logs):
Auto's own line:
Auto (this PC), measured in play: settled (8 fps of 60, the GPU at 116.6 ms a frame of 16.7): Render resolution 50% kept. A frame is about 1070 draws (0 skipped), 121 dispatches, 162 passes, 187 barriers and 6 submits.RX_VK_PASS_TIMING=1(Minimum preset, three 600-present windows in play): the named spans stay at 48-51 ms a frame (dispatches 33.7-35.1 ms, passes 10.6-11.7 ms, barriers 3.4-3.9 ms), while the time between spans ("glue the spans do not name") is 45, 70 and 77 ms, 49-61 % of the first-to-last time, over 13.8-15.6 recordings' command buffers a frame. The heaviest single spans are compute programs27ee9883e2a20323(6.8 ms),ee7764a6b1ef459c(5.0 ms),26fe0c70ab9fc547(2.7 ms) and the indirect7650519f88e59b19(2.65 ms). The full blocks are inlongshot_log-minimum-pass-timing.txt.Also tried (each against the same Minimum baseline, 8.7 fps and 103 ms):
RX_VK_BATCH=1(the log saysbatched submits on): 8.5 fps, 113 ms. No change.RX_VK_SPLIT_BEFORE_DRAW=0(split_before_draw=0*): 8.5 fps, 115 ms. No change. So neither batching the submits nor fewer split parts touched the time between the spans.RX_VK_MESH_SHADERS=native: entering the world froze for about 11 minutes (black,stalled), then Kokiri Forest drew correctly at 4-6 fps. So I stay on the compute path.Where in the game
Kokiri Forest: Link's house, its balcony, doorway and ladder, loaded from a save; standing, walking a little and pressing A.
How often
Every time
Graphics card and driver version
Intel Arc Graphics (MTL) iGPU, 8086:7d55; Intel open-source Mesa driver 26.2.5 (ANV), Vulkan 1.4; i915
CPU, RAM and operating system
Intel Core Ultra 7 155H (22 threads), 31 GB; Batocera 44 (Linux 7.2.8), X11; screen 1920x1080 at 120 Hz
Changes from the defaults
RX_VK_MESH_SHADERS=compute;RX_VK_NATIVE_FADD=1(see the suggested change above);RX_VK_PRECOMPILE=0(with rc.3 on Mesa 25.3.6 the up-front preparation made 220 of 38,809 programs in 14 minutes here, and without the 32-lane pin it ran toward out-of-memory);HOS_SDL_VERSION=2,HOS_DISCORD=0,HOS_CRASH_WATCH=0;HOS_CONTROL, the control bridge, which my test script used to press buttons and read fps and state.fullscreen=1,fps_counter=1; the Minimum runs also havequality_preset=6(Auto → Minimum).LONGSHOT_THIRD_PARTY_OBJECTS=0and--no-prepare-shaders. My dump has 3 damaged files (Fairy Fountain floor, Ganon stage and Water Temple gate textures; the builder stood in others), none of them in Kokiri Forest.longshot_log.txt
RX_VK_PASS_TIMING=1, 5½ minRX_VK_NATIVE_FADD=0, 7 minScreenshots or video
Native float add (8 fps) and the compare-exchange loop (4 fps), Minimum, the same spot 200 s into each run:
Defaults, about 10 s into play, and Minimum, about 6 minutes into play:
Before you send it
Possibly related, for context:
Follow-up with nightly-625 (
a104182b, which has #1586), same machine, settings, save and spot (Minimum, compute mesh path,RX_VK_NATIVE_FADD=1):No device loss in any of 7 runs (up to 13 minutes), and the first start was drawn right from the start (no white or black phase).
But it draws less. 41 draws a frame are skipped (v3.0.0: 0), all at
vk_draw.cpp:8722(fallback_record()refuses the mesh draw), for the whole run, with 121 render passes a frame instead of 162 and 114 dispatches instead of 121. On screen, the 3D moss and grass blades, the bushes and ivy on the stumps and the grass patches on the forest floor are gone; flat textures show instead (attached, v3.0.0 left, nightly-625 right, the same view as the save loads).It isn't #1586's three defaults. With
RX_VK_MESH_SHARED_WARP=0,RX_VK_MESH_GLOBAL_ATTRS=0andRX_VK_MESH_PAGES=0one at a time, and all three together (the start lines confirm each), the 41 skips stay, at 16-19.5 fps. So something else between v3.0.0 and nightly-625 leaves these mesh draws out on this device, and I'd guess part of the speed-up is those missing draws. I haven't bisected further. The log of a 13-minute nightly run is attached.v3.0.0 (left) and nightly-625 (right), the same view as the save loads:
Log: longshot_log-nightly-625.txt (warm caches, 13 min)