GPU: clear DXGI outputs on out-of-range enumeration #553

Manually merged
github merged 1 commit from gh-pr/553/head into gh-pr/553/base 2026-11-26 04:08:05 +00:00
Owner

@⁠broccolize on GitHub · 2026-11-24 04:49 UTC · original
broccolize:gpu/clear-dxgi-enumeration-outputs → main · +24 −2 · 1 files · 1 commits · merged 2026-11-25 00:20 UTC

EnumAdapters, EnumAdapters1, and EnumOutputs now clear the caller’s output pointer when an index is out of range and return DXGI_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 main and 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 --check passed.

AI-assisted with Codex. The regression used synthetic objects.

**@⁠broccolize** on GitHub · 2026-11-24 04:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/553) `broccolize:gpu/clear-dxgi-enumeration-outputs` → `main` · +24 −2 · 1 files · 1 commits · merged 2026-11-25 00:20 UTC `EnumAdapters`, `EnumAdapters1`, and `EnumOutputs` now clear the caller’s output pointer when an index is out of range and return `DXGI_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 `main` and 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 --check` passed. AI-assisted with Codex. The regression used synthetic objects.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:08:04 +00:00
github manually merged commit b796c8b8b8 into gh-pr/553/base 2026-11-26 04:08:05 +00:00
Author
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-24 12:13 UTC · original

Independent verification & code review on Windows 11 Pro (build 26100) + AMD Radeon RX 9060 XT (RDNA4, driver 32.0.32029.2010, Rust 1.98.1), cleanly merged onto main (ffe310e):

  • cargo xtask policy: PASS (154 files ok)
  • cargo clippy -p victory-gpu --all-targets --locked -- -D warnings: PASS
  • cargo clippy -p victory-gpu --all-targets --features diagnostics --locked -- -D warnings: PASS
  • cargo test -p victory-gpu --locked: 51 passed, 0 failed, 1 ignored (including new dxgi::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 *out on DXGI_ERROR_NOT_FOUND prevents callers reusing a slot across loop iterations from seeing a stale pointer.

AI-assisted; synthetic tests only, no game files.

**@⁠geiyiliyabumo** on GitHub · 2026-11-24 12:13 UTC · [original](https://github.com/Marvisak/VIctory/pull/553#issuecomment-7131135748) Independent verification & code review on Windows 11 Pro (build 26100) + AMD Radeon RX 9060 XT (RDNA4, driver `32.0.32029.2010`, Rust `1.98.1`), cleanly merged onto `main` (`ffe310e`): - `cargo xtask policy`: PASS (`154 files ok`) - `cargo clippy -p victory-gpu --all-targets --locked -- -D warnings`: PASS - `cargo clippy -p victory-gpu --all-targets --features diagnostics --locked -- -D warnings`: PASS - `cargo test -p victory-gpu --locked`: **51 passed, 0 failed, 1 ignored** (including new `dxgi::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 `*out` on `DXGI_ERROR_NOT_FOUND` prevents callers reusing a slot across loop iterations from seeing a stale pointer. *AI-assisted; synthetic tests only, no game files.*
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/Marvisak--VIctory!553
No description provided.