GPU: expose IDXGIObject on emulated DXGI interfaces #2443
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2443
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@Damokles2 on GitHub · 2026-11-25 13:38 UTC · original
Damokles2:fix-dxgi-idxgiobject-query-interface→main· +132 −10 · 1 files · 1 commits · openProblem
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.
@kotekompotek on GitHub · 2026-11-25 14:02 UTC · original
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).
@oni-swr on GitHub · 2026-11-25 14:13 UTC · original
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.@Marvisak on GitHub · 2026-11-25 15:53 UTC · original
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
View 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.