perf(vk): Descriptor reuse on by default (options_version 4) #1625
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!1625
Loading…
Reference in a new issue
No description provided.
Delete branch "perf/descriptor-reuse-default"
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?
Turns on Descriptor reuse by default (
RX_VK_DESC_SLOTGEN, the row on the Debug tab). With it, a draw keeps its descriptors while the texture slots it samples are unchanged, so texture streaming elsewhere no longer rebuilds every descriptor set each frame.Measured (RTX, 2560x1440 docked, Hyrule Field walk, four runs interleaved off/on/off/on on one build)
That's 25–30% fewer stutters, a better 1% low and p99, and the same median fps.
Flash checks (every frame shot, reuse on)
Options migration
options_version4 always wrotedescriptor_reuse=0, because off was the default then. They're moved to on, and the next save writesoptions_version=4.RX_VK_DESC_SLOTGENstill decides over both.menu_env_on, which reads the row before the menu loads, follows the same rule; it now takes a default and the version that default holds from. Sampler cache's behaviour is unchanged.host/nn_hid.cchecksversion < 3, so version 4 doesn't affect it.Tests
tests/test_menu_env_on.pycompiles the realmenu_env_onand covers: no file, no line, v3 with 0, v4 with 0 and with 1, and the env override.test_audio_output_menu,test_menu_restartandtest_menu_keyspass locally (llvm-mingw clang++).🤖 Generated with Claude Code
Some numbers from another setup, in case they help: RTX 4070 Ti Super, driver 621.14, Windows 11, Ryzen 7 9800X3D. The scripted 10-minute first-visit route from #1429 (boot, Hyrule Field, Kakariko, Market, Lost Woods, Gerudo Valley), each run from the same warmed folder state, on
7d1562dwith #1586, #1627 and #1714 underneath. RX_VK_DESC_SLOTGEN off for three runs, on for two:No change I can tell apart from run-to-run noise, and nothing broke. This route mostly measures first-visit hitches and keeps few descriptors through other slots' registrations (0 to 4 draws a frame, 0 in most windows), so it doesn't exercise what your Hyrule Field walk does. I only have screenshots every 60 presents, not every frame, so this says nothing about the one-frame flashes.
Looks good. The migration reads right: menu_init forces descriptor_reuse=1 for files below options_version 4, keeps the saved choice from 4 on, and save() writes 4. menu_env_on reads the same rule before the menu loads (no file, no line, or version below
sincegives the default; the env var still wins). The new test is registered in run_all.py, and CI is green.One thing outside the code: the description says not to merge before the same-route off/on/off A/B for the rare dark frame comes back, so I'd hold for that.