fix(vk): the device line says whether the driver offers mesh shaders, not only whether this run uses them #865
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 @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8015c9a
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
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
testing wanted
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!865
Loading…
Reference in a new issue
No description provided.
Delete branch "zeldaootr/Longshot:log-mesh-capable"
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?
Type: fix · Risk: low · Tested on: Linux, the game-free checks (no GPU) · Needs: none
Why
On a Steam Deck every log says
mesh shaders noandvk: no mesh shaders: task and mesh programs run as compute shaders, although its driver (RADV) offers mesh shaders: Longshot leaves them unused on Linux AMD on purpose (Automatic takes the compute path there: https://github.com/NotRexed/Hookshot/issues/2245). People, us included, read those lines as "the Deck's driver has no mesh shaders" and drew the wrong conclusions about what the Deck can do. The log knew the driver's answer (dev.mesh_capable) and never said it.How to reproduce
Seen on: Steam Deck, SteamOS, RADV VANGOGH (Mesa)
Settings and switches: defaults
Steps: start the game and read the
vk:lines near the top oflongshot_log.txtExpected: the log says the driver offers mesh shaders and that this run does not use them, and why
Actual: on
main:What changed
The log states both facts: whether the driver offers mesh shaders, and whether this run uses them. On a Steam Deck with the defaults the three lines become:
Elsewhere the device line's field reads
used(it saidyes),offered by the driver but not used (Compute chosen)underRX_VK_MESH_SHADERS=computeorRX_VK_FORCE_MESH_FALLBACK=1, ornot offered by the driver(an RX 5000, a GTX 10). What runs is unchanged.mesh_rule::device_noteingpu/vk/mesh_mode.hwords the device line's field from the driver's answer (dev.mesh_capable), this run's (dev.mesh_shader) and the mode;create_deviceandmkwvk_initingpu/vk/vk_main.cpplog it, and the compute path's line and the mode line say the same. The comment that called the Steam Deck OLED an RDNA3 APU names Van Gogh, RDNA2 (and the ROG Xbox Ally X, RDNA3.5); mesh shaders(host/hos_crash_dialog.h,scripts/cpu_report.py,scripts/pipeline_tour.py,nx2/pipeline_share.py), which is unchanged; the note has no;of its own, and the checks hold it to thatRX_VK_MESH_SHADERS's row indocs/development.mdnames the device line's three answerstests/test_mesh_mode_switch.pycompilesdevice_noteand checks each case, and checks the source logs it and no longer says "no mesh shaders" on the compute path (it fails onmain). The log fixtures oftests/test_cpu_report.py,tests/test_crash_dialog.pyandtests/test_pipeline_share.pycarry the new wording; the fixtures that stand for older logs keepmesh shaders yesMeasurements
Verdict: nothing to measure: the change is log text only. The same lines are logged, once each at the start, and what runs is unchanged.
Flags and settings
None
Testing
Tested: the game-free checks on Linux, with g++ and with clang:
tests/test_mesh_mode_switch.pyfails at the test's commit (onmain's source: "the compute path's line says there are no mesh shaders where the driver offers them") and passes here,device_notecompiled with-Wall -Wextra -Werror.gpu/vk/vk_main.cpp,gpu/vk/mesh_mode.h,docs/development.mdor the device line, throughtests/run_all.py: all pass but 4 that fail the same way onmain@aa95d35fon this PC (test_appimage_player_build,test_crash_dialog,test_vk_pgo,test_walk_key).test_crash_dialogstops at an assertion of its own (line 415) before the fixture this PR changes;host/hos_crash_dialog.hfinds the device line by; mesh shaders, which the new line keeps.gpu/vk/vk_main.cppwith-fsyntax-only -Wall -Wextrafor Linux (clang) and Windows (llvm-mingw): the same diagnostics as onmain.Not tested: the full
tests/run_all.py(this PC was shared and loaded); the new lines in a game run: the change is the logged text alone, and each case ofdevice_noteis compiled and checked.Must be tested:
Risks
What could break: a script outside this repository that looks for
mesh shaders yesormesh shaders noin a log. The readers in this repository take the text before; mesh shaders, which is unchanged.Turning it off: revert the commit.
Compatibility: Nothing changes.
Checklist
Everyone
type(scope): description) of the status line's type.main. Onto main94abdd57(headfef2087e) with no conflict, with the commit subjects made Conventional Commits, which CI's lint job now checks for every commit, on a base that has CI's config (#417); each commit's change is the same as before bygit patch-id. The commits named in this description are from before this rebase:5cbc0e83is now98352756,1f44245ais nowfef2087e. Re-run on94abdd57:test_mesh_mode_switchfails at the test-only commit98352756and passes at the head, with g++ 13.3 and clang 23.1.5; of the 49 checks that are this PR's or read its files (g++ 13.3), 42 pass, 2 skip (a tool this PC lacks) and the 5 that fail fail on main94abdd57too (test_appimage_player_build,test_crash_dialog,test_vk_occlusion_queries,test_vk_pgo,test_walk_key). Its edit oftest_crash_dialogcan't pass on main, where that check fails for another reason (fixed by #626): with that PR's fix merged in, it passes with g++ and clang.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named). 527 passed, 16 failed, 50 skipped on Linux with g++. 15 of the failures also fail onmainon this PC:test_appimage_player_build,test_bake_portability,test_cpm_discovery,test_crash_dialog,test_env_on,test_lift_cache,test_lift_cleanup_error,test_make_game_cache,test_options_budget_once,test_pipeline_tour,test_readback_late,test_vk_pgo,test_walk_key,nx2/test_texture_init_barrierandtest_mods_size_table. The other one,test_pipeline_cache_save, is a timed wait that failed in the full run on a busy PC and passes when run alone, 2 of 2.third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.mainand passing here.tests/that reads changed source updated in this PR, not weakened.1f44245a14fef2087e09Rebased onto
main94abdd57(headfef2087e), with no conflict; the commit subjects are now Conventional Commits, which CircleCI's lint job checks for every commit of a pull request (#417), and the base has the CI's config, which a fork's pull request needs at its own head. No other change: each commit's change is the same as before bygit patch-id.Re-run on
94abdd57:test_mesh_mode_switchfails at the test-only commit98352756and passes at the head, with g++ 13.3 and clang 23.1.5; of the 49 checks that are this PR's or read its files (g++ 13.3), 42 pass, 2 skip (a tool this PC lacks) and the 5 that fail fail on main94abdd57too (test_appimage_player_build,test_crash_dialog,test_vk_occlusion_queries,test_vk_pgo,test_walk_key). Its edit oftest_crash_dialogcan't pass on main, where that check fails for another reason (fixed by #626): with that PR's fix merged in, it passes with g++ and clang. The description names the new commits.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.