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.

@hckrman101 hckrman101 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the careful write-up, and the devcoredump reading from DuxMuxxy in #2245 makes the case well that task-only fallback (the #1747 Windows default) isn't enough on RADV. The code itself is small and correct: mesh_mode stays the row's value, so the log still says "Automatic (the compute path)", Native still opts back in, and task_mesh_fallback is moot once dev.mesh_shader is off. No test pins the touched lines.

Before this goes in as the default, though, I think it should be checked against #2311. That PR finds that on RADV the hang comes from building mesh programs without the driver's optimizer (the AMD workaround from #461/#484 in build_graphics), and turns the optimizer back on for VK_DRIVER_ID_MESA_RADV. It was tested on a Steam Deck LCD with the same symptom (ring gfx timeout ~30 s into Kokiri, then a reset). That fits what's described here: the culprit program moves between runs, and both task+mesh and mesh-only draws hang, which is what you'd expect if many mesh programs are built the bad way rather than one shader being wrong. #2312 (index map sizing) is a rendering fix and doesn't look related to the hang.

If #2311 fixes #2245 on the RX 6600 / RX 6800, Compute-by-default on every Linux AMD card would cost performance for nothing: the compute path runs task/mesh as compute dispatches writing vertices to buffers plus an ordinary draw, which the menu itself calls "usually a little slower", and DuxMuxxy saw a cost too. That matters most on the Steam Deck and the Ally, the RDNA2/3 APUs this would also switch, which are the ones with the least headroom. Could you (or DuxMuxxy) run #2311 on top of main with Mesh shaders on Automatic through the post-intro cutscene? If it holds, I'd drop this PR or keep it only for whatever still hangs; if it doesn't, this is a fine stopgap, ideally with an fps number for Native vs Compute on one RDNA2 card so the cost is known.

One thing on the check itself, inline. CI: only the title check ran; the build and source-regression workflows are waiting for maintainer approval.

Comment thread gpu/vk/vk_main.cpp
// a choice in the row. RDNA1 and older have no mesh shaders on RADV: for them a no-op.
int mesh_mode_used = mesh_mode;
#ifndef _WIN32
if (mesh_mode_used == 0 && dev.props.vendorID == 0x1002) mesh_mode_used = 2; // (Linux AMD is RADV)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

vendorID == 0x1002 under #ifndef _WIN32 is a stand-in for "the driver is RADV", but it isn't quite that: AMDVLK / AMD's own Vulkan driver can still be installed on Linux (and gets the optimizer-off workaround that worked for it on Windows), and the Windows build run under Proton on a Deck is RADV with _WIN32 defined, so it misses this. Keying on VkPhysicalDeviceDriverProperties::driverID == VK_DRIVER_ID_MESA_RADV (as #2311 does) covers both. dev.driver_id is only filled further down (the subgroup block), so it'd need a vkGetPhysicalDeviceProperties2 with the driver properties here, or that query moved up.

@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?

@hckrman101 hckrman101 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Quick follow-up, since there's new data on the thread (the head hasn't changed since my last review).

On the cost question: simonwjackson's RX 7900 XT numbers above show full Compute as the fastest of the three modes on that card (46 fps vs 45 native), and Fortich's RX 6800 XT run in #2245 holds 60 fps through the point where it used to lose the device. So on desktop RDNA2/3 the default looks free and it does stop the hang. What's still unmeasured is the Deck and the Ally, the APUs this also switches.

On #2311: it was closed as a duplicate of #1965, which is still open. Its author now says it fixes the reset while the save loads and that other RADV hangs remain, so it likely won't cover the post-intro cutscene hang here on its own. That makes this a reasonable stopgap to me, and the two don't conflict (#1965 only matters once Native is picked).

Still open, as Joey-Magnus also noted: the check on gpu/vk/vk_main.cpp:258 keys on vendorID == 0x1002 under #ifndef _WIN32, so it catches AMDVLK on Linux and misses the Windows build under Proton on a Deck (RADV with _WIN32 defined). driver_id == VK_DRIVER_ID_MESA_RADV (#1965 now reads dev.driver_id for the same reason) would cover both; it needs that query to happen before this point. The menu hint's "on Linux AMD" would then read "on RADV".

CI: only the title check has run; the build and source-regression workflows still wait for maintainer approval.

@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>
hckrman101 pushed a commit that referenced this pull request Nov 12, 2026
**What this is for:** make the current controls, automatic mesh-shader
and automatic button-prompt hints find their translations ([current main
CI](https://github.com/NotRexed/Hookshot/actions/runs/43151254256)).
**What is measured:** the affected game-free check before and after,
with GCC 16.2.1 and Clang 23.1.3 selected, plus one strict full-suite
run, as recorded below. This check is Python-only; the two environment
runs do not claim compiler coverage. **Not measured:** a game run or
Windows execution.

## Cause

#1864 imported all thirteen catalogs after #1930, #2362 and #2435 had
changed those three complete English hints; runtime lookup is exact, so
their old keys no longer match (`gpu/vk/menu_i18n.h`, `vk_menu.cpp`,
`vk_menu_i18n.cpp`).

The relevant failure in [main's CI
log](https://github.com/NotRexed/Hookshot/actions/runs/43151254256) is:

```text
'Gamepad: the D-pad moves, A binds, B goes back.' is no text of vk_menu.cpp (renamed? then translate it again)
```

## What changed

Update all 39 keys and their full translations; leave English help and
runtime lookup unchanged. Retain exact membership, order, count,
formatting and whitespace checks, and require all three current hints in
every language so deleting an entry cannot hide the mismatch.

## How it was tested

Recorded on 2026-11-11, Linux kernel `7.2.15-1-omarchy`, base
`de866017`, head `f9a7e70f` (version and test records).

- Untouched main `a016b7a6`: the affected check fails independently in
both compiler environments with the diagnostic above; the branch passes
independently in both (`python -I -B tests/run_all.py --strict --jobs 1
tests/test_menu_i18n.py` records).
- Each old key was restored independently, and each replacement was
separately removed with its table count reduced: all six mutations fail
in both environments (12 records), including the new completeness check.
- One full `python -I -B tests/run_all.py --strict`: **`456 passed, 14
failed, 20 skipped in 162 s (linux, 32 at once)`**, load 81.38 → 42.70
(complete suite output).
- That run's remaining failures are: `test_wayland_libdecor_hint.py`,
`test_display_startup_failure.py`, `test_texel_buffer_ownership.py`,
`test_audio_aux.py`, `test_audio_biquad.py`, `test_dlss_checks.py`,
`test_env_on.py`, `test_framegen_preset.py`, `test_hdr_encode.py`,
`test_linux_docker_packages.py`, `test_mods_size_table.py`,
`test_mouse_native.py`, `test_readback_part.py`, `test_rumble_menu.py`
(complete suite output). The companion fixture, capture-switch,
PPA-parser and camera-handover branches address their separate causes;
#2614 owns the HDR check and is not duplicated here.

## About the translations

The added clauses in the 39 entries were written with a language model,
in the wording of each catalogue's existing entry (the part that was
already translated is kept word for word). Nobody who speaks these
languages natively has read them; corrections are welcome and will not
break the check, which compares only the English keys.

## Not tested / risks

No game or layout screenshot was taken, and no native-speaker review was
performed; the checks establish key coverage and structural consistency,
not linguistic or visual polish.

## Overlaps

#2417 is an alternative localization implementation, not a repair of
these catalogs; it and #2566 merge cleanly with this change in the
recorded overlap comparison.

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra <noreply@openai.com>

Co-authored-by: GPT-6 Astra <noreply@openai.com>
hckrman101 pushed a commit that referenced this pull request Nov 12, 2026
The worklist was behind the forum and the merges. Since v2.1.0, many fix
PRs have merged, several rows already shipped, and the most-reported
problems in Discord #bug-reporting had no row. This PR brings
`docs/worklist.md` back in line, following the rules in the worklist and
in `docs/workflow.md`.

## Method
- **Forum snapshot.** All 409 #bug-reporting posts as of Nov 11, ~11:10
PM ET (Nov 7-11). Each post is dated by its thread ID, so the submit
time is in ET.
- **How dates were used.**
- v2.1.0 was cut from `main` at about 8:32 PM ET on Nov 10 and published
at 9:29 PM ET. A PR merged before the cut counts as shipped; I checked
this with `git merge-base --is-ancestor <merge commit> v2.1.0`.
- A report sent before a fix shipped and not repeated after it counts as
fixed.
- A report sent after v2.1.0, or before a fix that merged later, counts
as still open or waiting for a release.
- **Score.** Severity x reach x confidence.
- Reach comes from workflow.md's 2026-11-10 reporter shares. Where the
affected subset is unknown, it is marked as an upper bound.
- Confidence is 0.7 only where the GitHub tracker has logs from several
commenters; otherwise it is 0.4.
- **Owners.** New rows have no owner. Existing owners are kept.

## Changes
- **Added 20 rows (18 Open, 2 Fixed-waiting).**
- Open: RAM/VRAM fill-up to OOM (#993, 5.6; 13 threads after v2.1.0),
shader preparation stalls (3.2), AMD Windows crashes (#996, 2.9),
CPU-bound fps in Castle Town and Hyrule Field (#995), invisible objects
and doors (#1002), build.py stopped on v2.1.0, cutscene audio desync,
shadow artifacts, coloured lighting, HDR black screen and flicker, frame
generation stutter, the block grid around lights and fog, the v2.1.0
update failing, AF outlines, wrong button glyphs, Steam Deck at 6 fps,
Linux AMD slower than Windows, and the FSR 4 tick not rebuilding.
- Fixed-waiting: the pick-up counter above 60 fps (#2006) and RADV
device lost after the intro (#2362).
- **Updated 6 rows.**
- The Link-jump row is now the "above a 60 fps cap" row (#1742),
covering the Scarecrow's Song softlock, Gohma and the item hanging above
Link's head. It goes from S2 to S1 and is re-scored from 1.2 to 3.5.
- New forum links or scores on the antivirus, Intel black screen (0.11
to 0.2, #999 has logs), fairy grotto, voices (#2506) and RX 580 (#2343)
rows.
- **Moved 10 rows to Fixed, waiting for a release.** #2545 (ground
garbling), #2451 (RTX 30 crash), #2286, #2275, #2449, #2096, #2406,
#2515, #1954 and #2367.
- **Deleted 8 rows** whose fix shipped in v2.1.0: #1792, #1922, #1819,
#1863, #1447, #1451, #1769-#1810 and the HDR10 overlay.

## Not done
- PRs listed as "candidate" fixes are matched by title and description
only. None is confirmed against the reports.
- Long forum threads were judged from their summaries.
- `tests/run_all.py` was not run (docs-only change).

Co-authored-by: Joey Magnus <joey.magnus@cxalloy.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)

7 participants