Texture store: at most 8 textures wait for its thread (the copies piled up unbounded; #227) #288
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/288"
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 sharan104 on 2026-11-26T14:31:30Z.
Refs #227 (one of the items it lists as open to anyone).
texstore::keepsends a full copy of each texture's memory (tiled.to_vec()) over an unboundedmpsc::channelto the single "texture store" thread, which digests, detiles and writes each one. When textures arrive faster than that thread keeps up (streaming in a new area), the copies pile up in the channel with no limit: whole texture memories, held until the thread reaches them.Fix:
sync_channelofWAITING(8) jobs, filled withtry_send.seen, so it's stored the next time it's read whole. The store loses nothing; it just catches up later.seenand isn't copied again on every read.Test:
textures_wait_for_the_store_in_boundsqueues 13 textures into a channel nobody drains. Only the first 8 wait, and the other 5 are no longer inseen. With the receiver dropped, a texture stays seen. The test fails without theseenremoval and passed 10 runs out of 10.Results:
cargo test -p victory-gpu --lockedpasses, with and without--all-features.watch.rslint, which #241 fixes.This touches different lines of
texstore.rsfrom #283, which adds the asset-policy check to the store's folder. The two merge independently.🤖 Generated with Claude Code
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.