Skip to content

fix(vk): RADV's mesh shaders off by default on Linux AMD (issue 2245) - #2362

Merged
NotRexed merged 1 commit into
NotRexed:mainfrom
deuxque:fix/radv-mesh-compute-default
Nov 12, 2026
Merged

NotRexed merged 1 commit into
NotRexed:mainfrom
deuxque:fix/radv-mesh-compute-default

Conversation

@deuxque

@deuxque deuxque commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2245.

Until this lands, setting Mesh shaders to Compute avoids the crash.

On Linux, Automatic now means Compute on AMD cards: RADV's task/mesh path hangs the GPU, so native mesh shaders stay off unless Native is picked by hand. Windows keeps what it had. RDNA1 and older never had mesh shaders on RADV, so nothing changes there.

Why full Compute and not the fallback: on the native path the gfx ring and RADV's gang compute ring end up waiting on each other with no waves running (the RX 6800 devcoredump in #2245). With RX_VK_TASK_MESH_FALLBACK=1 the hang moves to a mesh-only draw instead: waves on gfx, compute queue empty. So pushing only task and mesh draws to the fallback, like the Windows default from #1747, is not enough on RADV. Which programs hang moves around between runs (the checkpoint culprits follow the skipped ones), so it isn't one bad shader either. The reports cover Navi 2x (RX 6800, RX 6600 XT) and the RDNA3 APUs (Steam Deck OLED, Rog Xbox Ally X), which is why this keys on the vendor instead of a device list.

Tested on an RX 6600 (RADV NAVI23, driver 0x6802006, kernel 7.3.3-cachyos), v2.1.0:

  • stock Automatic: the cutscene after the intro took the GPU down in all three runs. Ring gfx timed out first, then ring comp, and the MODE1 reset lost VRAM and the desktop with it.
  • mesh_shaders=2: fine.
  • this patch, Automatic: fine, and the log reads "mesh shaders row: Automatic (the compute path)".

main with the same patch compiles clean.

RADV's native task/mesh path deadlocks the GPU: the gfx ring and RADV's
gang compute ring end up waiting on each other, and a mesh-only draw
hangs with the compute queue empty (devcoredumps on an RX 6800, no VM
fault). Task + mesh draws alone on the compute fallback still crash, so
only full Compute is stable there; the reports span Navi 2x (RX 6800,
RX 6600 XT) and the RDNA3 APUs (Steam Deck OLED, Rog Xbox Ally X).

So on Linux, where AMD's Vulkan driver is RADV, the Mesh shaders row's
Automatic now picks Compute. Native stays a choice in the row, Windows
is untouched, and RDNA1 and older are a no-op (no mesh shaders on RADV).

The menu row's Automatic hint now says so.
Copilot AI balanced review requested due to automatic review settings November 11, 2026 15:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@simonwjackson

Copy link
Copy Markdown
Contributor

RDNA3 desktop data in support (RX 7900 XT, RADV NAVI31, Mesa 26.2.3, Linux 7.2.7; rows in docs/tested-configurations.md from #2202):

Mesh mode (main 117eae7) Runs Hangs Game fps, standing in Kokiri Forest
full compute (RX_VK_FORCE_MESH_FALLBACK=1) 4 0 46.1–46.6
task + mesh fallback (RX_VK_TASK_MESH_FALLBACK=1) 4 0 43.8–44.0
native 2 0 44.9–45.4

On an older build, native hung on the load into Kokiri Forest (gfx ring timeout → MODE1 reset) in 3 of 4 tries. Since then we've played on full compute, with no hang. So on this card, full compute is also the fastest mode, and making it the AMD default costs nothing here.

@Joey-Magnus Joey-Magnus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inline point still applies: gpu/vk/vk_main.cpp:258 checks vendorID == 0x1002 under #ifndef _WIN32. That catches AMDVLK on Linux and misses the Windows build under Proton, where the driver is RADV. driverID == VK_DRIVER_ID_MESA_RADV covers both.

#2311 (re-enable the optimizer for mesh programs on RADV) may be the real fix for #2245. If it is, this PR would move every Linux AMD card, Deck and Ally included, onto the slower compute fallback for nothing. #2382's depth hold also applies on that path, and the two haven't been tested together. Could someone with an RX 6600/6800 try #2311 first?

@Fortich

Fortich commented Nov 12, 2026

Copy link
Copy Markdown

This is the run asked for in the review: RX 6800 XT, main with #1965 merged (landed 23:34Z today), Mesh shaders on Automatic.

Result: on this card the optimizer change is not enough on its own for native mesh, the run still ends in a full GPU reset.

[hos host] vk: mesh shaders row: Automatic (native)
...
[hos sead::MainThread] vk: FATAL: the GPU device was lost (VK_ERROR_DEVICE_LOST): the driver
stopped or reset the GPU

99 s into the session, at frame 1398. The kernel took a full reset:

amdgpu: VRAM is lost due to GPU reset!
amdgpu: GPU reset(4) succeeded!
amdgpu: device wedged, but recovered through reset
amdgpu: Failed to initialize parser -125

To be clear about what this says and what it does not: #1965 may well fix what it set out to fix — the reset while a save loads and nothing here contradicts that. The finding is narrower: on desktop RDNA2 with Automatic, the mesh path still takes the GPU down.

It is not the import bug either: the same run logged 0 pool ... not imported lines, with the sparse-queue patch active (sparse buffers are bound on a queue of family 4).

An earlier attempt on the same build hung sooner, on the Kokiri Forest load, with ring gfx_0.0.0 followed by ring comp_1.0.1 timeouts — the mutual wait this PR describes. This one got further, then took the full reset.

Same build with the compute fallback restored: loads and runs, no resets.

What I could not measure: fps Native vs Compute. The native run died before there was a stable window to read it.

Hardware: RX 6800 XT (RADV NAVI21), Mesa 25.0.7, kernel 7.0.0-42, Vulkan 1.4.

@NotRexed
NotRexed merged commit 434cdd3 into NotRexed:main Nov 12, 2026
2 checks passed
@deuxque
deuxque deleted the fix/radv-mesh-compute-default branch November 12, 2026 03:31
notquiteog added a commit to notquiteog/Hookshot that referenced this pull request Nov 12, 2026
…s behind them

Upstream's main fails 15 of its own source checks at c356bef (PRs merged without a
rebase). These are the eleven outside the upscalers:

- vk_memory.cpp: RX_VK_CAPTURE_KEEP_OLD and RX_VK_CAP_BLOCKS are on/off switches and
  were read as set-means-on, so =0 turned them on (NotRexed#2437). env_on, as the rest.
- mouse_native.c: the mouse's kept angles are let go when the camera leaves states 3
  and 4 (first-person aim, Z-targeting): they were written back on return, and the
  view snapped to where it was before (NotRexed#2617; test_mouse_native's yaw).
- menu_i18n.h: three English texts changed in vk_menu.cpp (NotRexed#1930, NotRexed#2362, NotRexed#2435), so
  their 13 translations are keyed and translated again (machine-made, as the file's
  others).
- Fixtures that cut source by its text and missed what the source gained:
  window_title (NotRexed#2116), dead_import_bytes (NotRexed#1906), env_on in reverb_frame,
  hos_xinput_pads (NotRexed#2435), wait_recorded's forward declaration (NotRexed#2458); and the
  Dockerfile check's parser, which took --no-update for a PPA.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
elkarbeenus pushed a commit to elkarbeenus/LakuenRecompBuilder that referenced this pull request Nov 12, 2026
….2.0

Kept: this fork's low-end VRAM defaults, the handheld texture limits (with upstream's small-VRAM mips rule), the
Steam fixes, the native file choosers and the name. Taken from upstream: its Linux sleep timer (NotRexed#2637, this
fork's handheld rule), the RADV mesh default (NotRexed#2362), the systemd scope for Play (NotRexed#2540).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C7fdTPXbwDRohew9qanvbp
dazemc added a commit to dazemc/Hookshot-rs that referenced this pull request Nov 12, 2026
On Linux AMD, Automatic now means Compute: RADV's native task/mesh path
deadlocks the GPU (the gfx ring and RADV's gang compute ring wait on each
other with no waves running), and a task+mesh-draws-only fallback still
hangs on a mesh-only draw, so only full Compute is stable there (issue
2245). The reports span Navi 2x (RX 6800, RX 6600 XT) and RDNA3 APUs (Steam
Deck OLED, Rog Xbox Ally X), so it keys on the vendor rather than a device
list. Native stays a choice in the row, and Windows keeps what it had.
RDNA1 and older have no mesh shaders on RADV: for them a no-op.

The Mesh shaders hint says so too.

Ported from upstream 434cdd3 (NotRexed#2362). RADV/AMD Linux hardware not
available here: the branch is checked, the hang is unverified.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux AMD (RADV): VK_ERROR_DEVICE_LOST after the opening cutscene and before the Great Deku Tree appears (RX 6600 XT)

6 participants