fix(vk): six rows of the switch table say what the code does #1302
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
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
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
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1302
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/switch-table-rows"
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, RTX 3090 · Needs: none
Why
The switch table of #1300 was written from one reading of each switch's code. A second reading of the 106 rows that decide defaults (the
hwandattemptkinds) found six that say something the code doesn't do. The worst:RX_VK_PRESENT_THREADwas listed as on for NVIDIA GPUs, and it is off on every PC unless set. A wrong row misleads whoever decides which switches to remove or turn on.How to reproduce
Seen on: any PC, by reading
gpu/vk/switches.defon mainSettings and switches: none
Steps: read the row of
RX_VK_PRESENT_THREAD, thenpresent_thread_on()ingpu/vk/vk_replay.cppExpected: the row says the presenter thread is off unless the switch is set
Actual: the row says "on for NVIDIA GPUs (vendor 0x10DE), off elsewhere" (that rule only reserves the thread's queue, in
gpu/vk/vk_main.cpp)What changed
Six rows of
gpu/vk/switches.defsay what the code does. No code changes.RX_VK_PRESENT_THREAD: kindhwtoattempt; off on every PC unless set.RX_VK_MESH_OPT: every AMD driver but RADV, not only AMD's proprietary one.RX_VK_IMAGE_PREALLOC: 8% of the heap in 2 to 12 blocks under 8 GB, 15% in 2 to 24 above.RX_VK_READBACK_EARLY: off with the render thread too; on for every GPU that is not discrete.RX_VK_TEX_MAX_DIM,RX_VK_TEX_SKIP_MB: the low-VRAM rule spelled out (Minimum's settings, and 4.5 GiB or less allowed or an integrated GPU with 16 GB of RAM or less).Measurements
Verdict: nothing to measure: six texts in a table the start's report prints a kind from.
Flags and settings
None
Testing
Tested: Linux, RTX 3090 (NVIDIA 620.70), a dev pack over base
8e9cfc3a: started from the Kokiri Forest save, standing and turning, withRX_VK_PRESENT_THREAD=0and a misspeltRX_VK_FRAME_LOG_X=1set. The start loggedRX_VK_PRESENT_THREAD=0 (attempt), the misspelt name as no switch, and a path's value as<a path>(the last edit of #1300, not run in the game until now).Not tested:
tests/test_switch_table.pywas not run on this PC (no checks are run here). The other 465 rows (diag,kill,tune,player) have had one reading only.Must be tested:
Risks
What could break: nothing in the game: the table's texts are only printed.
Turning it off: revert the commit
Compatibility: Nothing changes
Issues
See #1300
Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named). Not run on this PC; left to the forge's checks.third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.🤖 Generated with Claude Code
https://claude.ai/code/session_017vw8dzCsAL3UdW7ft8ptL9
Tested in game: RTX 3090, NVIDIA 620.70, Linux: a dev pack over base
8e9cfc3a, from the Kokiri Forest save, standing and turning at 2560x1440 with RX_VK_PRESENT_THREAD=0 and a misspelt RX_VK_FRAME_LOG_X=1 set. The start logged RX_VK_PRESENT_THREAD=0 (attempt), the misspelt name as no switch and a path as ; the scene drew.WIP: fix(vk): six rows of the switch table say what the code doesto fix(vk): six rows of the switch table say what the code doesHumanBean referenced this pull request2026-11-17 02:36:56 +00:00