GPU: retry prelude reset with a fresh allocator on E_OUTOFMEMORY #3519
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3519
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3519"
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?
@tharun-37 on GitHub · 2026-11-27 12:28 UTC · original
tharun-37:gpu/prelude-oom-recovery→main· +165 −49 · 1 files · 2 commits · openRefs #3515.
At submission each host list resets its state-transition prelude allocator and list. A diagnostics run reached that reset with
0x8007000Ewhile system commit was still available; the failure is a driver-side allocation failure, not a process or system commit exhaustion, and the run aborted there.This makes the prelude allocator and list one replaceable object. If the reset fails with
E_OUTOFMEMORY, a fresh allocator/list pair is created and the same barriers are recorded into it once. Other errors, or a failure to create the replacement, keep the current behavior. The barriers are still built from the textures' real states and the state stores still happen after recording, so ordering is unchanged.A synthetic regression forces the reset error and checks that only an out-of-memory result retries, with one replacement and one extra attempt at most. No game files or GPU execution are needed.
Verification:
cargo test --locked -p victory-gpu --lib: 230 passed, 1 ignored; the 2 failures are pre-existing and adapter-specific. The new test passes.cargo clippy --locked -p victory-gpu --all-targets -- -A clippy::undocumented_unsafe_blocks -D warnings: clean.Claimed on #1633 before writing the code: #1633
AI-assisted (OpenCode).
@tharun-37 on GitHub · 2026-11-27 12:29 UTC · original
Baseline check on
main: 229 passed, same 2 failures, 1 ignored. This branch: 230 passed (the new test), same 2 failures, 1 ignored.@tharun-37 on GitHub · 2026-11-27 12:30 UTC · original
CI clippy failure was three undocumented unsafe blocks in the new code; safety comments added. Local \cargo clippy --workspace --all-targets --locked -- -D warnings\ now passes.
@oni-swr on GitHub · 2026-11-27 13:25 UTC · original
Independent WARP/CPU verification of #3519 at head
52f80c15(base: main63bcca43, merge-base of this PR). Head re-checked unchanged just before posting.Setup: Windows 11 Pro 10.0.26200, AMD Ryzen 7 5700X3D, D3D12 WARP only (
VICTORY_WARP=1 VICTORY_D3D12_WARP=1, dxil.dll on PATH). Base and head were built in separate worktrees with separate target dirs. Test command:cargo test -p victory-gpu --features diagnostics(the WARP switch is only honoured with that feature).The new
prelude_reset_retries_only_out_of_memorytest passes. This run had no baseline failures, unlike the 2 in the PR description's local run.cargo clippy -p victory-gpu --features diagnostics --all-targets -- -D warningspasses on the head and on base.Diff review: no bug found.
record_with_retryonly retries onE_OUTOFMEMORY, and only if the replacement prelude was created. Thecommandsclosure can safely run twice.twin::at_submissionis computed once beforehand,moves()only readscopy.state, and the real-state writes happen once inleft()after both attempts.HostListis submitted by one thread, so there is no race. On replace, the old list is closed and dropped before its allocator.AI-assisted: Claude Code, Claude Sonnet 5.5.
@oddmaniv on GitHub · 2026-11-27 14:16 UTC · original
Independent verification of the PR author's concurrent WARP pipeline/draw test at
52f80c15d3e898df72dae5ca0cab22c4339ade4e.cargo test --locked -p victory-shader --lib emit::host::tests::parallel_warp_pipelines_and_draws -- --exact --nocaptureMain baseline pin:
63bcca43c6a00a758510398fa43096ce7e4f7df0.Windows x86_64 MSVC native runs. Local and remote source snapshots matched before and after each check. The adaptation applies the PR diff without additional source edits.
This is focused regression coverage, not the full workspace suite, a gameplay test, or an independent validation of every behavior in the PR. No new fix is claimed.
AI-assisted verification.
@futurepro62 on GitHub · 2026-11-27 19:42 UTC · original
NVIDIA full-suite run, to go with the reports above by oddmaniv, oni-swr, since none of them names a GPU run. Tested exact head
52f80c1(on its base63bcca4).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 867 passed, 0 failed, 10 ignored.prelude_reset_retries_only_out_of_memory.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
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.