GPU: clear DXGI outputs on out-of-range enumeration #553
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/553"
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 broccolize on 2026-11-24T04:49:37Z.
EnumAdapters,EnumAdapters1, andEnumOutputsnow clear the caller’s output pointer when an index is out of range and returnDXGI_ERROR_NOT_FOUND. I verified that native DXGI clears the pointer at the first missing index for all three methods.The regression starts each output slot with a non-null pointer. It failed on
mainand passes with this change.On Windows with Rust 1.98.1 (GNU), the GPU suite passed 44 tests by default and 46 with diagnostics. Both runs had zero failures and one ignored benchmark. The asset policy and
git diff --checkpassed.AI-assisted with Codex. The regression used synthetic objects.
Imported from Marvisak/VIctory. Originally posted by LAKSHYA-cmd-tech on 2026-11-24T04:55:08Z.
Review: APPROVED
Verified on Windows 11 D3D12:
Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T11:46:20Z.
Review: APPROVED
Tested
b796c8bon Windows 11, RTX 5070, MSVC:cargo test -p victory-gpu -- --test-threads=144 passed, includingout_of_range_enumeration_clears_output. Clippy's 1 warning is the existing one in host.rs.*outbefore returningDXGI_ERROR_NOT_FOUNDmatches native DXGI. Titles that loopEnumAdaptersuntilNOT_FOUNDand then release whatever*outholds no longer touch a stale pointer.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-24T12:13:21Z.
Independent verification & code review on Windows 11 Pro (build 26100) + AMD Radeon RX 9060 XT (RDNA4, driver
32.0.32029.2010, Rust1.98.1), cleanly merged ontomain(ffe310e):cargo xtask policy: PASS (154 files ok)cargo clippy -p victory-gpu --all-targets --locked -- -D warnings: PASScargo clippy -p victory-gpu --all-targets --features diagnostics --locked -- -D warnings: PASScargo test -p victory-gpu --locked: 51 passed, 0 failed, 1 ignored (including newdxgi::tests::out_of_range_enumeration_clears_output)Diff review (
crates/victory-gpu/src/dxgi.rs): clean, minimal, and matches COM/DXGI contract — zeroing non-null*outonDXGI_ERROR_NOT_FOUNDprevents callers reusing a slot across loop iterations from seeing a stale pointer.AI-assisted; synthetic tests only, no game files.