Retry temporary stand-in texture allocation failures #4864

Closed
github-bot wants to merge 1 commit from github-bot/gh-4863 into main AGit
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-12-01 12:00 UTC · original
andrewpozdnakov7-jpg:codex2/fix/retry-neutral-textures → main · +21 −3 · 1 files · 1 commits · closed without merging

What it changes

The gray stand-in textures are created lazily. If the first creation returns None, the current OnceLock<Option<_>> caches that failure until the program exits. All later requests for that texture kind fall back to a null view even after memory is available again.

Cache only successful creations. When an attempt fails, wait one second before trying that kind again. A successful cached lookup still uses one OnceLock::get.

How it was tested

  • Ran the exact initializer on Windows with Rust 1.98.1 and a synthetic allocator that fails the first flat-texture request. Main 5fabb46e and release v2026.11.30.03 stayed empty after the allocator could succeed. c9e0b97a1ff739fe5287a2544edb175350618337 skipped the attempt at 999 ms, recovered at 1,000 ms, and reused the new texture.
  • A separate texture kind still initialized during the flat kind's cooldown, and four concurrent calls initialized one cube texture.
  • cargo xtask policy --staged passed for the one changed file. This fixture covers initialization and retry.
  • Main's CI check has five existing Clippy errors tracked in #4708.

Checked for overlap

  • Searched for stand-in allocation failures and retry logic. #3241 concerns ordinary cached views and their eviction, #4807 concerns two fallback descriptor heaps, and #4860 reports slot rewrites. The slot counts in #4860 do not identify a stand-in allocation failure.

Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the change into another commit.

AI-assisted with OpenAI Codex.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-12-01 12:00 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4863) `andrewpozdnakov7-jpg:codex2/fix/retry-neutral-textures` → `main` · +21 −3 · 1 files · 1 commits · closed without merging ## What it changes The gray stand-in textures are created lazily. If the first creation returns `None`, the current `OnceLock<Option<_>>` caches that failure until the program exits. All later requests for that texture kind fall back to a null view even after memory is available again. Cache only successful creations. When an attempt fails, wait one second before trying that kind again. A successful cached lookup still uses one `OnceLock::get`. ## How it was tested - Ran the exact initializer on Windows with Rust 1.98.1 and a synthetic allocator that fails the first flat-texture request. Main `5fabb46e` and release `v2026.11.30.03` stayed empty after the allocator could succeed. `c9e0b97a1ff739fe5287a2544edb175350618337` skipped the attempt at 999 ms, recovered at 1,000 ms, and reused the new texture. - A separate texture kind still initialized during the flat kind's cooldown, and four concurrent calls initialized one cube texture. - `cargo xtask policy --staged` passed for the one changed file. This fixture covers initialization and retry. - Main's [CI check](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46563306780/job/142355972539) has five existing Clippy errors tracked in #4708. ## Checked for overlap - [x] Searched for stand-in allocation failures and retry logic. #3241 concerns ordinary cached views and their eviction, #4807 concerns two fallback descriptor heaps, and #4860 reports slot rewrites. The slot counts in #4860 do not identify a stand-in allocation failure. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the change into another commit. AI-assisted with OpenAI Codex.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 12:04:24 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:30 UTC · original

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.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:30 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4863#issuecomment-7321051049) 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.
github-bot closed this pull request 2026-12-01 18:36:21 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!4864
No description provided.