revert(vk): the eviction's waits in presents again at any frame rate, as before #771 #873
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!873
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:revert/evict-seconds"
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: revert · Risk: low · Tested on: none (game-free: the tree is main before #771, fd770e7f's parent, byte for byte) · Needs: none
Why
#771 was merged while its review asked for a change. Its idea is right: below 60 fps, the waits before an unused texture is let go should be counted in seconds, not in frames. But the way it measures the frame rate goes wrong right after a load or a long hitch, even at a steady 60 fps.
It ages every texture by the frame rate averaged over the last ten seconds. A gap with no frames, such as an area load's stall, makes that average read far too low for the next ten seconds. At 60 fps after a 30 s gap it reads about 2 fps one second in and about 8.6 fps five seconds in, so textures look 7 to 30 times older than they are:
That happens just after an area loads, when VRAM is tightest. The textures let go are uploaded again, and one the GPU drew can come back empty, which the minute's wait exists to prevent. The review's details: #771 (comment)
This takes it back out so that main and the next release candidate don't ship it. The change comes back in its own pull request, with the age measured per texture in seconds instead of through one average rate.
See #771.
What changed
A plain
jj revertoffd770e7f(#771). Main goes back to counting the compaction's hold and reserve, and the GPU-drawn textures' keep, in presents at any frame rate, as before #771.gpu/vk/vk_texture.cpp: the frame-rate marks andpresent_rateremoved;hold_targetand the keep take the present counts again.gpu/vk/vram_compact.h:age_at_60removed.gpu/vk/keep_rendered.h:at_rateremoved.docs/development.md: theRX_VK_EVICT_BY_PRESENTSrow removed.tests/test_keep_rendered.*,tests/test_vram_compact.*: back to main's before #771.Measurements
Nothing to measure: this restores main's code from before #771 exactly (
jj diff --from fd770e7f- --tothis commit is empty), whose behaviour is what every release so far has shipped.Flags and settings
RX_VK_EVICT_BY_PRESENTS(added by #771) goes away with it: what it switched back to is the only behaviour again.RX_VK_EVICT_BY_PRESENTSTesting
Tested: game-free only, by reading: the reverted tree is identical to main before #771 (an empty diff against fd770e7f's parent). No tests were run on this PC; the checks are left to CI.
Not tested: nothing new to test: the code is what main ran before #771 merged, today.
Must be tested: None.
Risks
What could break: nothing that main didn't do before today: below 60 fps, the hold's ten and thirty seconds and the keep's minute stretch again (at 3.5 fps they are three, nine and seventeen minutes), which is what #771 set out to fix and its follow-up will fix again.
Turning it off: revert this commit.
Compatibility: Nothing changes: no save, option, cache or vk ABI is touched.
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). Left to CI: no tests are run on this PC.third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
d8c9a4aa28e020e46983WIP: revert(vk): the eviction's waits in presents again at any frame rate, as before #771to revert(vk): the eviction's waits in presents again at any frame rate, as before #771