Restart the idle texture sweep when its cursor passes the last texture #198
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/198"
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 avatarmanz/VIctory-7900XTX. Originally posted by feanorsun on 2026-11-26T11:21:53Z.
Refs #182
The idle texture sweep visits up to 8,192 addresses per pass when the runtime is keeping textures for minutes. If a full batch ends at the last address, the next cursor is past the end. The old loop only reset the cursor while visiting a texture, so subsequent passes could stay empty indefinitely. Releasing the remaining textures between passes has the same effect.
When the saved cursor has no remaining addresses, restart the batch at the first address. A cursor with a nonempty tail continues from that tail. The age, reference-count and memory-budget checks still govern which resources can be released.
Verified on Windows against
0dec5dcc228b, using ordered sets with three or four integer addresses and a batch size of two. Both regression assertions returned an empty batch before the fix and[1, 3]afterwards.Both cases ran on the CPU, with zero GPU allocations. The same cursor loop exists in the reporter's source revision. Their log does not show that the sweep reached this boundary, and the high-pressure eviction path uses a different traversal.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.