fix(vk): Auto settings take SteamDeck=1 as a handheld only on an integrated GPU #559
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
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!559
Loading…
Reference in a new issue
No description provided.
Delete branch "zeldaootr/Longshot:auto-steamdeck-flag-discrete-gpu"
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 x86-64 (game-free check) · Needs: Linux desktop with a discrete GPU in Steam's Gaming Mode; Steam Deck (unchanged case)
Why
On a desktop PC with a graphics card, running the game from Steam's Gaming Mode (Big Picture on SteamOS-like systems such as Bazzite) makes Auto (this PC) pick the Steam Deck's lowest settings, because Steam sets
SteamDeck=1there too.How to reproduce
Seen on: Linux x86-64, game-free (the real
auto_profilechoice with a stand-in GPU); in the game it needs a desktop in Steam's Gaming Mode, which nobody has run yetSettings and switches: a first start (no
longshot_options.ini), Quality preset Auto (this PC);SteamDeck=1in the environment, as Steam's Gaming Mode sets itSteps: on
mainaa95d35fwith this PR's test added (57edd6c3), runpython -I -B tests/test_auto_handheld.py; in the game, start from Gaming Mode on a desktop with a discrete card and read thevk: Auto (this PC)lines inlongshot_log.txtExpected: an RX 7900 XTX gets tier 5 and an RX 6600 tier 3, as on the desktop
Actual: both are taken for a handheld:
handheld 1 (want 0), tier 1 (want 5): handheld: MinimumWhat changed
Auto (this PC) now takes
SteamDeck=1as a handheld only when the GPU is integrated, so a desktop card under Gaming Mode gets its own tier; the Deck is still known by its APU's names.auto_profile()ingpu/vk/vk_main.cppcountsSteamDeck=1as a handheld only when the GPU is integrated; the Deck's own APU names (Custom GPU 0405,Custom GPU 0932) still count on their own.tests/test_auto_handheld.pyruns the realauto_profilechoice for an RX 7900 XTX and an RX 6600 with and withoutSteamDeck=1, the Deck itself, and another integrated GPU under Gaming Mode.Measurements
Verdict: fixed in the game-free test (2 of 2 desktop cards under
SteamDeck=1taken for a handheld onmain, 0 with this PR, two interleaved rounds); not yet seen in the game: waiting for test request T-WX8A.Hardware: Linux x86-64 server (Ubuntu 24.04), no GPU or game used; gcc 13.3, clang 23.1.5
Scene: no game: the game-free check
Method:
python3 -I -B tests/test_auto_handheld.pyat the test-only commit57edd6c3(mainaa95d35fplus the test) and atf6b7e719, twice each, alternatingHow to reproduce: check out each commit and run the command above
aa95d35f(with the test,57edd6c3)f6b7e719SteamDeck=1taken for a handheld, of 2 (both rounds the same)Flags and settings
None
Testing
Tested: Linux x86-64, game-free. The new test fails on the test-only commit
57edd6c3and passes atf6b7e719(this branch rebased ontomainaa95d35f), twice each, alternating, and undertests/run_all.pywith g++ 13.3 and with clang 23.1.5 asCXXat both commits. At the tip, the 32 checks that readgpu/vk/vk_main.cppor the new test: 29 passed, 2 skipped, andtest_appimage_player_buildfailed as it does onmainaa95d35f. Before the rebase the same ate995566fand9762f1a6(main7ff5256e).Not tested: The case fixed, in the game: a desktop with a discrete card under Steam's Gaming Mode (this PC has no Gaming Mode session). The unchanged case on a Steam Deck (still Minimum).
Must be tested:
longshot_options.ini, start the game from Gaming Mode, expecting thevk: Auto (this PC)lines inlongshot_log.txtto name the card's tier, not handheld or Minimum (by hand, test request T-WX8A: post those lines,SteamDeckfrom the launch environment, the GPU and OS)vk: Auto (this PC)lines still to say Minimum (by hand, T-WX8A)Risks
What could break: a handheld whose GPU Vulkan reports as discrete, or another handheld that relies on
SteamDeck=1alone with a discrete-typed GPU, would now get desktop settings from Auto. The Deck itself is matched by its APU name as before.Turning it off: revert the commit; a player can always pick a preset by hand.
Compatibility: only a first start's Auto choice changes, on a desktop under Gaming Mode; an existing
longshot_options.inikeeps its settings.Issues
None filed. Conflicts in intent with #225 (a Steam Deck profile, on by itself on a Deck), also open: the two should be read together and one chosen (or reconciled) before either merges.
Checklist
Everyone
type(scope): description) of the status line's type.main. Onto mainaa95d35f, no conflict; the test and fix commits are the same changes as before (git patch-id).python -I -B tests/run_all.pypasses (any failure that also fails onmainis named). The full suite on mainaa95d35f(Linux, g++ 13.3, the Vulkan headers set): 528 passed, 15 failed, 50 skipped; on this branch the new test and the 32 checks that read the changed file ran, with no failure thatmaindoes not have (see Testing). The 15 that fail on main: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_mods_size_table,test_options_budget_once,test_pipeline_tour,test_readback_late,test_vk_pgo,test_walk_keyandnx2/test_texture_init_barrier.py.third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.mainand passing here.gpu/vk/vk_main.cppatf6b7e719checked whole (-fsyntax-only -Wall -Wextra, the build's defines) with clang 23.1.5 for Linux and llvm-mingw 20261104 for Windows: the same diagnostics asmainaa95d35f's (50 and 53), none new. Before the rebase, the combined branch 27553c83 linkedlongshot_vk.dll(llvm-mingw 20261104,RX_VK_ONLY=1 RX_RELEASE=1 RX_TARGET=windows) andlongshot_vk.so.SteamDeck=1) for a handheld e995566f25SteamDeck=1as a handheld only on an integrated GPUFilled in: the full game-free suite on the combined branch, the Windows and Linux builds, and the test request T-WX8A. Still work in progress until a Steam Deck run is in.
Rebased onto
mainaa95d35fwith no conflict (the same two changes,git patch-id;mainchangedgpu/vk/vk_main.cppin four merges since7ff5256e, none inauto_profile()) and the description moved to the current template.The game-free test was run again on the new base (2 of 2 desktop cards taken for a handheld at the test-only commit, 0 at the tip, two rounds, g++ and clang); still WIP until T-WX8A has a desktop Gaming Mode run and a Deck run.
9762f1a690f6b7e71916WIP: fix(vk): Auto settings take SteamDeck=1 as a handheld only on an integrated GPUto fix(vk): Auto settings take SteamDeck=1 as a handheld only on an integrated GPU