fix(gpu): clear last-use stamp when releasing streamed-out textures #3531
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3531"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by mrDeShock on 2026-11-30T00:34:19Z.
<html>
Problem
The streamed-out texture release path in
resource.rs, insidelet_go_idle(), resetshost.wantedand releases the host copy but leaveshost.usedunchanged.This differs from the existing eviction paths that clear the last-use timestamp when releasing a host resource. A stale timestamp may cause unnecessary consideration of textures that no longer have a host copy during subsequent eviction searches.
Proposed fix
Reset
r.host.usedto zero under the existing lock before releasing the host copy.The patch adds a single line and does not introduce new configuration options, locks, or memory thresholds.
Related work
This follows the eviction bookkeeping approach described in:
https://github.com/readmet3xt-lab/foxhound/issues/12
https://github.com/readmet3xt-lab/foxhound/commit/3d52ac8
Credit for the original approach goes to the Foxhound contributors. This PR extends the same bookkeeping invariant to the additional streamed-out release path.
Testing
Test system:
Intel Core i7-11700KF (8C/16T)
NVIDIA RTX 4070 SUPER 12 GB
32 GB DDR4 RAM
Windows 11
DLSS Quality, native Frame Generation 2X
The patch was previously compiled and tested locally against
Texture eviction diagnostics | Before patch | Early patched session | Extended patched session -- | -- | -- | -- Eviction searches | 2016 | 123 | 451 Average search time | 59.31 ms | 1.57 ms | 54.09 ms Maximum search time | 166.4 ms | 8.2 ms | 103.3 msf889bb07as part of an extended performance investigation.These were exploratory runs with different session lengths, memory pressure and additional configuration changes, not an isolated A/B benchmark.
The extended patched session completed normally, but eviction search costs still increased under sustained memory pressure. Therefore, this change is proposed as a targeted bookkeeping consistency fix rather than a complete solution to texture eviction slowdown.
Current upstream compatibility
The one-line patch applies cleanly against upstream commit
41adb55167fa778fcaa5dc36fa18a1fa8dacd657.The PR contains only the timestamp reset in
resource.rs. The rebased version has not been separately compiled or benchmarked.Further investigation of sustained eviction overhead is planned separately.
</html>Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:51:21Z.
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed