GPU: expose IDXGIObject on emulated DXGI interfaces #2441
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2443"
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 Damokles2 on 2026-11-25T13:38:24Z.
Problem
The emulated DXGI device, adapter, factory, and output expose the inherited IDXGIObject vtable prefix, but their QueryInterface discovery lists omit IID_IDXGIObject. Code querying that base interface receives E_NOINTERFACE.
Fix
Append IID_IDXGIObject to the four discovery lists. Existing interface pointers, canonical IUnknown identity, reference ownership, and private-data behavior are preserved. This change covers interface discovery. The existing private-data stubs remain.
The regression uses the actual emulated COM vtables and checks interface discovery, canonical identity, derived-interface round trips, implemented parent queries, and rejection of an unsupported IID.
Regression and validation
The test-only baseline at
940d32f69b22265690a0b5a15d6ded572ba33bafcompiled and ran exactly one regression. Each QueryInterface call returned E_NOINTERFACE (0x80004002) with a null output pointer.The same regression passed with the fix. The fork-only Windows-MSVC run validated contribution commit
d4672a6f15f9c944a4d0bbd856b6b2aec1e81d74.Validation ran selected CPU-only tests. The full package and workspace suites, native GPU execution, and game compatibility were outside its scope.
Microsoft IDXGIObject documentation · Existing coordination claim
AI disclosure: OpenAI Codex assisted with implementation, test design, review, and preparation of the validation workflow. The results above were verified in GitHub Actions.
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T13:58:22Z.
Review: APPROVED
Verified against
origin/main(940d32f):IDXGIObjecton emulated DXGI interfaces is clean and well-tested.cargo test -p victory-gpu dxgi::: 3/3 passed (includingdxgi_interfaces_expose_their_base_object).cargo clippy -p victory-gpu --all-targets -- -D warnings: 0 warnings.cargo xtask policy: 183 files ok.AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T14:02:37Z.
Correct minimal fix: the emulated vtables already carry the IDXGIObject methods (GetParent at 0x30 works — the parent test passes), only the IID was missing from the query tables, so a QueryInterface for the base interface failed where PC returns the same pointer. The test pins the full COM contract: canonical IUnknown identity, same-vtable base, round-trip query, parent chain, and clean rejection of unknown IIDs (no stale pointer left).
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T14:11:20Z.
Review: COMMENTED
Expose IDXGIObject on emulated DXGI interfaces. Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1.
Imported from Marvisak/VIctory. Originally posted by oni-swr on 2026-11-25T14:13:01Z.
Independent WARP verification of #2443 at
d4672a6Commands (Rust 1.98.1, Windows 11, merged cleanly with
origin/main940d32fpergit merge-tree):cargo test -p victory-gpu --features diagnostics --lib -- --test-threads=1,cargo clippy -p victory-gpu --all-targets -- -D warnings(with and without--features diagnostics),cargo xtask policy.dxgi_interfaces_expose_their_base_object); clippy clean both ways; policy OK.dxgi.rsreverted toorigin/mainwith the new test kept -> the test FAILS, so it covers the added IDXGIObject IID on device/adapter/factory/output.DEVICE_IIDS[0]etc.) are unchanged.AI-assisted verification by Claude Code (Claude Sonnet 5.5). Software-only: Microsoft Basic Render Driver (WARP, vendor 0x1414, forced by
VICTORY_D3D12_WARP=1+--features diagnostics;warp_adapter()refuses a non-software adapter), no physical GPU, no game files, dumps or hashes.Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T15:53:23Z.
Automated triage for the maintainers.
Merge candidate. It appends the IDXGIObject IID ({aec22fb8-76f3-4639-9be0-28eb43a67a2e}, checked against the public documentation) to
DEVICE_IIDS,ADAPTER_IIDS,FACTORY_IIDSandOUTPUT_IIDSincrates/victory-gpu/src/dxgi.rs, so a QueryInterface for the base interface returns the same object, as COM requires; the entries go at the end, so the indexed uses (ADAPTER_IIDS[0],OUTPUT_IIDS[0], the tests'[2]) are unchanged, anddevice.rsrouting the D3D12 device's query throughDEVICE_IIDSstays consistent. The new test exercises the real vtables and fails on main. CI: passing.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T02:20:40Z.
Review: COMMENTED
Reviewed and verified against
main(63bcca43) on Windows 11 (RTX 5090 + WARP,VICTORY_D3D12_DEBUG=1) — clean and ready to merge:IDXGI_OBJECT_IID({aec22fb8-76f3-4639-9be0-28eb43a67a2e}) toDEVICE_IIDS,ADAPTER_IIDS,FACTORY_IIDS, andOUTPUT_IIDSexposesIDXGIObjectthrough bothQueryInterfaceandGetParentwithout shifting existing[0]default indices.Local verification:
victory-gpu(dxgi::3/3,device::8/8 on both RTX 5090 and WARP, default &--features diagnostics,VICTORY_D3D12_DEBUG=1)cargo clippy --all-targets -p victory-gpu -- -D warnings(default &--features diagnostics) +cargo xtask policy(191 files ok): 0 warningsView 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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.