Textures the card had no memory for are made again later, not refused for good (port of avatarmanz#293) #287
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!287
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-287"
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?
@lerapeurdu62280-debug on GitHub · 2026-11-26 19:11 UTC · original
lerapeurdu62280-debug:fix/texture-retry-after-oom→a-publier· +111 −7 · 4 files · 1 commits · openPort of avatarmanz/VIctory-7900XTX#293 onto
a-publier(that tree has the same code). Fixes the first three points of avatarmanz/VIctory-7900XTX#256: a host texture refused withE_OUTOFMEMORYwas refused for the rest of the run.What and why
Before this change, one
E_OUTOFMEMORYfromCreateCommittedResourcesetrefused, andhosted()never asked for that texture again, even once the card had room. Two other places then made it permanent for bindless slots:draw.rstookhost_resource() == Noneas "nothing to upload" and marked the slot done;HostHeap::mirrornoted the slot as made from that record, holding the null view, so the quick path kept returning it.Changes:
resource.rs:refused: AtomicBoolbecomesrefused_until: AtomicU64. When the card was out of memory, the texture is asked again afterRETRY_MS(500 ms, the same as the upload backoff). Any other error is still refused for good (u64::MAX). A success resets it to 0.retrying(this)tells the other two places.residency.rs:allocation_erroralso sets a thread-local flag thathosted()takes, the same pattern asSTAGING_DEFERRED. A failedresident()/mapped()now callsallocation_errortoo.draw.rs: a slot whose texture isretryingis held withtexture_slot_held(.., frame + 1)instead of done.descriptor/host.rs:mirrordoes not note such a slot as made (madeandquickstay 0), so the next ask makes it again.Tested (Windows 10, RX 6600 (RDNA 2, Adrenalin 32.0.21045), MSVC 14.51, Rust 1.98.1)
resource::tests::a_texture_refused_for_want_of_memory_is_made_later. It injects oneE_OUTOFMEMORYinto the realhost_texture_aspath (a#[cfg(test)]thread-local, and the test checks the injection was consumed). The texture is not made during the wait and is made after it.E_INVALIDARGstays refused. 5 runs out of 5.cargo test -p victory-gpu --locked: 380 passed, 2 failed.--all-features --test-threads=1: 432 passed, 2 failed. Both failures (views_are_made_beside_the_heap_and_copied_in,depth_bounds_pipeline_loads_and_filters_draws) fail the same way on a cleanmainon this machine; the second one is what avatarmanz/VIctory-7900XTX#169 fixes.cargo clippy -p victory-gpu --all-targets -D warnings, default and--all-features: clean once avatarmanz/VIctory-7900XTX#241's one-line fix is applied (main's own lint).Not covered
crate::pool::texture) runs out of memory and the committed fallback then fails for another reason, the texture is treated as retryable. The worst case is one failed creation every 500 ms for that texture.AI-assisted: yes (Claude Code)
🤖 Generated with Claude Code
On
a-publier(cd8dfc0)Cherry-picked without conflict; the only change is that
#256in the code comments now readsavatarmanz/VIctory-7900XTX#256, since #256 here is another PR. Windows 10 Pro 19045, AMD RX 6600 (RDNA 2, Adrenalin 32.0.21045):cargo test -p victory-gpu --locked: 386 passed, 2 failed. The two (depth_bounds_pipeline_loads_and_filters_draws, which fails on WARP-less hosts too and avatarmanz/VIctory-7900XTX#169 fixes, and the flakywatch::tests::a_block_just_written_rests) fail ona-publieralone as well.a-publieritself fails-D warningsonhost/panel.rs:386andtexture.rs:46(andwatch.rs:3626, which avatarmanz/VIctory-7900XTX#241 fixes).@MamaLeVrai on GitHub · 2026-11-26 20:45 UTC · original
Tested on an RX 6950 XT 16 GB (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release, at
4e95a78:cargo test --release -p victory-gpu --lib387 passed, 1 failed, 34 ignored. The newa_texture_refused_for_want_of_memory_is_made_laterpasses. The one failure isviews_are_made_beside_the_heap_and_copied_in, which fails the same way oncd8dfc0on this card (fixed by #288).AI-assisted (Claude Code); no game data.
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.