GPU: split duplicate HostList entries into separate ExecuteCommandLists batches #1400
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1400"
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 Marvisak/VIctory. Originally posted by piyonchu on 2026-11-24T17:45:52Z.
Summary
Fixes a D3D12 prelude-clobbering and duplicate-command-list submission bug when the same
HostListappears more than once inHost::execute(runs).Cause
HostListowns a single(allocator, list)pair inself.prelude. PreviouslyHost::executeiterated every entry ofruns, calledlist.prelude(), and appended the returnedID3D12CommandListto onelistsslice passed to a singleExecuteCommandListsbatch:list.prelude()a second time on the sameHostListin the samerunsslice reset itsallocatorandlist, overwriting the barriers recorded for the first occurrence beforeExecuteCommandListsran.ID3D12GraphicsCommandListtwice in oneExecuteCommandListsbatch violates D3D12 batch uniqueness and triggersDXGI_ERROR_DEVICE_HUNG(0x887A0006) even with separate preludes.Change
crates/victory-gpu/src/host.rs:run_deferred(&mut batch)acrossrunsup front, then partitionrunsinto contiguous duplicate-free slices insideHost::execute, runninglist.prelude()->ExecuteCommandLists-> fenceSignal+WaitForSingleObjectper slice.host::tests::duplicate_list_in_submission_runs_without_clobbering_preludesubmitting[&list_a, &list_b, &list_a]twice in a row with intervening texture state changes (COMMON -> COPY_DEST -> RENDER_TARGET -> PIXEL_SHADER_RESOURCE).Verification
Hardware: Intel Core i9-14900HX, NVIDIA GeForce RTX 4060 Laptop GPU (driver
32.0.16.1656), Windows 11 x64 (10.0.26100),rustc 1.98.1.cargo clippy --workspace --locked -- -D warnings: passcargo clippy --workspace --all-features --locked -- -D warnings: passcargo test -p victory-gpu --locked: 51 passed, 0 failed, 1 ignored (texture_checks_per_submission)cargo test -p victory-gpu --all-features --locked: 54 passed, 0 failed, 1 ignoredcargo test -p xtask --locked: 4 passed, 0 failed (includesrepository_passes_policy)cargo test --workspace --locked -- --skip v_med3_f32_matches_rdna2_with_nan: passed (v_med3_f32_matches_rdna2_with_nanfails at baseline on NVIDIA as tracked in #726 / #745)git diff --check: cleanAI Disclosure
Prepared, implemented, tested, and verified locally with Antigravity (Google DeepMind); no proprietary game assets, bytes, or dumps were used or included.
Imported from Marvisak/VIctory. Originally posted by piyonchu on 2026-11-25T01:06:14Z.
Closing
#1400in favor of#1414, which solves the same duplicate-HostListExecuteCommandListssubmission bug (with the same batch-splitting boundary approach) and already has maintainer/contributor reviews across multiple GPUs and#595coordination.upstream-sync referenced this pull request2026-11-25 14:07:18 +00:00
Pull request closed