Textures the card had no memory for are made again later, not refused for good (#256) #293
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!293
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-293"
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 14:37 UTC · original
lerapeurdu62280-debug:fix/texture-retry-after-oom→main· +111 −7 · 4 files · 1 commits · openFixes the first three points of #256: a host texture refused with
E_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 #169 fixes.cargo clippy -p victory-gpu --all-targets -D warnings, default and--all-features: clean once #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
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.