fix(vk): RX_VK_PASS_TIMING names the mesh fallback's compute and the indirect mesh argument conversion #864
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
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!864
Loading…
Reference in a new issue
No description provided.
Delete branch "zeldaootr/Longshot:pass-timing-names-fallback"
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, Steam Deck (RADV VANGOGH), the labels in a profile run; the game-free checks on Linux · Needs: none
Why
On a GPU that runs task and mesh programs as compute shaders (the mesh fallback: every Steam Deck by default, Linux AMD, cards without mesh shaders),
RX_VK_PASS_TIMINGdid not time the fallback's work before each of its draws, nor the copy of an indirect mesh draw's arguments. That GPU time showed only as unnamed time between the spans, and its barriers asbarrier (other): on a Steam Deck in Hyrule Field we reported it as 9.8 ms of gaps between command buffers and aimed work at the wrong thing. Named, it is the fallback (4.2 ms a frame in the profile below).How to reproduce
Seen on: Steam Deck, SteamOS, RADV VANGOGH (Mesa)
Settings and switches: defaults (Automatic mesh shaders: the compute path on Linux AMD),
RX_VK_PASS_TIMING=2Steps: stand in Hyrule Field for 600 presents and read the
GPU pass timingblock inlongshot_log.txtExpected: the fallback's fills, barriers and compute dispatches, and the indirect mesh argument copies, each under a kind of their own in
by kindActual: neither appears: their time is counted in
ms between them: glue the spans do not name, and the fallback's full barriers asbarrier (other)What changed
Two spans for
RX_VK_PASS_TIMING. The workfallback_recordputs before each fallback draw is one span labelledfallback prog <key>(kindfallback), andmesh_indirect_convert's copies and barriers one labelledmeshconv. Each opens right afterend_pass, which closes the pass's own span, so no pass loses its timing. Log text only: nothing changes with the switch off.fallback_recordandmesh_indirect_convertingpu/vk/vk_draw.cppopen aGprofSpan(gpu/vk/vk_gprof.h) afterend_passRX_VK_PASS_TIMING's row indocs/development.mdnames the two kinds;vk_gprof.h's header says which work they holdtests/test_pass_timing_fallback.pychecks that both spans exist, open afterend_passand before the first command they cover, and are documented. It fails onmainMeasurements
Verdict: nothing to measure: the change adds two labels to an opt-in diagnostic (
RX_VK_PASS_TIMING) and does nothing with the switch off. With it on, the spans add two timestamps per fallback draw and per indirect mesh draw, as every other labelled span does.Flags and settings
None:
RX_VK_PASS_TIMINGis unchanged as a switch; its report names two more kinds.Testing
Tested:
RX_VK_PASS_TIMING=2, on 2026-11-14, from a build with this change (the same patch, with the span as a local struct rather thanGprofSpan) and the narrow-barrier work beside it, switched off. The fallback's time is named, and only 0.37 ms a frame is left between spans:tests/test_pass_timing_fallback.pyfails at the test's commit onmainand passes here. The 120 checks that readvk_draw.cpp,vk_gprof.hordocs/development.md, throughtests/run_all.py, give the same results as onmain@aa95d35f: 7 fail on both on this PC (test_bake_portability,test_crash_dialog,test_make_game_cache,test_pipeline_tour,test_shader_module_guard,test_vk_pgo,test_walk_key), andtest_pipeline_cache_savefails now and then on both, a timed wait.gpu/vk/vk_draw.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); this exact commit in the game: the build that showed the labels had the earlier form of the same span.Must be tested:
RX_VK_PASS_TIMINGoff nothing is recorded differently, and with it on the labels were seen on a Steam Deck.Risks
What could break: with
RX_VK_PASS_TIMINGon, a pass that a fallback draw ormeshconvends is timed as before, as the spans open afterend_pass; nothing changes with it off.Turning it off: leave
RX_VK_PASS_TIMINGunset (the default), or revert the commit.Compatibility: Nothing changes.
Checklist
Everyone
type(scope): description) of the status line's type.main. Onto main94abdd57(head26cabcbe) 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:02de4b8bis nowb4768a56,f4e53b0ais now26cabcbe. Re-run on94abdd57:test_pass_timing_fallbackfails at the test-only commitb4768a56and passes at the head, with g++ 13.3 and clang 23.1.5; of the 123 checks that are this PR's or read its files (g++ 13.3), 115 pass, 1 skips (a tool this PC lacks), the 6 that fail fail on main94abdd57too (test_crash_dialog,test_pipeline_tour,test_shader_module_guard,test_vk_occlusion_queries,test_vk_pgo,test_walk_key), andtest_pipeline_cache_savefailed once in that loaded run (a timed wait) and passed twice alone at the head and on main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named). 526 passed, 18 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 three (test_pipeline_cache_save,test_appimage_package_retry,test_oot_state_tap) failed in the full run on a busy PC and pass when run alone, 2 of 2; none reads a changed file.third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.mainand passing here.RX_VK_PASS_TIMINGtimes the mesh fallback's compute andmeshconvas spans of their own 02de4b8b55RX_VK_PASS_TIMINGnames the mesh fallback's compute and the indirect mesh argument conversionf4e53b0aff26cabcbe07Rebased onto
main94abdd57(head26cabcbe), 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_pass_timing_fallbackfails at the test-only commitb4768a56and passes at the head, with g++ 13.3 and clang 23.1.5; of the 123 checks that are this PR's or read its files (g++ 13.3), 115 pass, 1 skips (a tool this PC lacks), the 6 that fail fail on main94abdd57too (test_crash_dialog,test_pipeline_tour,test_shader_module_guard,test_vk_occlusion_queries,test_vk_pgo,test_walk_key), andtest_pipeline_cache_savefailed once in that loaded run (a timed wait) and passed twice alone at the head and on main. The description names the new commits.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.