GPU: implement IDXGIAdapter2::GetDesc2 #1891

Closed
DoubleD17 wants to merge 1 commit from upstream-pr/1893 into main
DoubleD17 commented 2026-11-25 00:16:54 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DoubleD17 on 2026-11-25T00:16:54Z.


The DXGI shim advertises IDXGIAdapter2 through QueryInterface, but its GetDesc2 entry is still unimplemented. Wire the descriptor method and reuse the logical adapter identity and memory information returned by GetDesc. Check the vtable slot and descriptor layout against the Windows bindings, and return E_INVALIDARG for a null output.

On Windows x64 with Rust 1.98.1 and MSVC, the new synthetic test detected the unwired method on base e82a6ad. The two DXGI unit tests passed on 211364a with cargo test --offline --locked --jobs 2 -p victory-gpu --features diagnostics --lib dxgi::tests::. This verifies the adapter API on the CPU.

Adapted from fxceless/victory-fork #345.

AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6594157292 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1893). Originally posted by [DoubleD17](https://github.com/DoubleD17) on 2026-11-25T00:16:54Z. --- The DXGI shim advertises IDXGIAdapter2 through QueryInterface, but its GetDesc2 entry is still unimplemented. Wire the descriptor method and reuse the logical adapter identity and memory information returned by GetDesc. Check the vtable slot and descriptor layout against the Windows bindings, and return E_INVALIDARG for a null output. On Windows x64 with Rust 1.98.1 and MSVC, the new synthetic test detected the unwired method on base e82a6ad. The two DXGI unit tests passed on 211364a with `cargo test --offline --locked --jobs 2 -p victory-gpu --features diagnostics --lib dxgi::tests::`. This verifies the adapter API on the CPU. Adapted from [fxceless/victory-fork #345](https://github.com/fxceless/victory-fork/pull/345). AI-assisted.
catminou4 commented 2026-11-25 01:07:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T00:32:46Z.

Review: COMMENTED


Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.

IDXGIAdapter2::GetDesc2 implemented: adapter description query — small DXGI completeness fix.

<!-- greyfinch-sync:Marvisak/VIctory:review:6049697399 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1893#pullrequestreview-6049697399). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T00:32:46Z. **Review:** COMMENTED --- Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff. IDXGIAdapter2::GetDesc2 implemented: adapter description query — small DXGI completeness fix.
Marvisak commented 2026-11-25 03:03:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T02:17:33Z.


Automated triage for the maintainers.

Needs work: evidence for the new return values. The rebase fixed the conflict, and the head merges cleanly. In crates/victory-gpu/src/dxgi.rs, the PR wires slot 11 (0x58) of ADAPTER_FUNCTIONS to a new adapter_description2. That matches the "adapter 3 + 1 + 1" layout already noted there. It reuses GetDesc's values through describe_adapter and checks the layout against the Windows bindings at compile time. The mechanics look right. However, this is a new runtime return value with no evidence behind it:

  • nothing shows that a title calls this slot (for example, a log of the missing 0x58 stub being hit);
  • flags = 0 and DMA-buffer preemption granularity are chosen, not taken from the console's behaviour or public documentation.

Please add the evidence for both. Also note that slot 10 (GetDesc1) is still unwired; if a title reaches GetDesc2, it likely reaches that one too.

CI: passing (check).


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7150541751 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1893#issuecomment-7150541751). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T02:17:33Z. --- <!-- victory-triage v1 head=15a1e539851b82461d2f9edccc312bc6a3b56012 verdict=needs-work at=2026-11-25T06:27:19Z --> Automated triage for the maintainers. **Needs work: evidence for the new return values.** The rebase fixed the conflict, and the head merges cleanly. In `crates/victory-gpu/src/dxgi.rs`, the PR wires slot 11 (0x58) of `ADAPTER_FUNCTIONS` to a new `adapter_description2`. That matches the "adapter 3 + 1 + 1" layout already noted there. It reuses `GetDesc`'s values through `describe_adapter` and checks the layout against the Windows bindings at compile time. The mechanics look right. However, this is a new runtime return value with no evidence behind it: - nothing shows that a title calls this slot (for example, a log of the missing 0x58 stub being hit); - `flags = 0` and DMA-buffer preemption granularity are chosen, not taken from the console's behaviour or public documentation. Please add the evidence for both. Also note that slot 10 (`GetDesc1`) is still unwired; if a title reaches `GetDesc2`, it likely reaches that one too. CI: passing (`check`). --- _Generated by [Claude Code](https://claude.ai/code)_
upstream-sync closed this pull request 2026-11-25 16:06:27 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!1891
No description provided.