Repository navigation
GPU: every object answers for IUnknown - #270
Merged
Marvisak merged 1 commit intoNov 25, 2026
Merged
Conversation
No graphics object's interface list holds IUnknown, so QueryInterface for it (and every call that hands out an object by interface id) said E_NOINTERFACE and returned null. COM code asks for it to compare two pointers for identity, to keep an object as a plain reference, or to pass it on to an API that takes any object. object::is, which all of those go through, now also matches IUnknown. The DXGI device answers with the D3D12 device, which it already stands for: one pointer whichever of the object's interfaces is asked. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
muhammed-aksoy
pushed a commit
to muhammed-aksoy/VIctory
that referenced
this pull request
Nov 24, 2026
edsuuu
referenced
this pull request
in edsuuu/VI-BR-PORT
Nov 24, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Tested this open PR at head
|
Closed
mercuryVM
approved these changes
Nov 24, 2026
mercuryVM
left a comment
There was a problem hiding this comment.
Tested 92f2c60 on Windows 11, RTX 5070, MSVC: cargo test --workspace --no-fail-fast passes (265 passed, 0 failed), including every_object_answers_for_iunknown.
- COM's rule is that every object answers
IUnknown, with the same pointer whichever interface is asked. PuttingIUNKNOWNintoobject::iscovers every query path in one place. - I checked the identity part. The device's
query_interfacetriesis_device(iid)first, soIUnknownreturns the device. The DXGI device'sdevice_querychecks[device::IID]first, so itsIUnknownalso returns the D3D12 device. One pointer, as the test asserts. - Callers that use
isfor something other than a query (the creation paths indevice.rs:92anddescriptor.rs:637) now acceptIUnknownas a requested interface and hand back the object. That is also what native D3D12 does forCreateX(..., IID_IUnknown, ...).
No issues found.
AI-assisted (Claude Code).
mercuryVM
added a commit
to mercuryVM/VIctory
that referenced
this pull request
Nov 24, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 24, 2026
edsuuu
referenced
this pull request
in edsuuu/VI-BR-PORT
Nov 24, 2026
…itives, capture), verified together Merges #124 #119 #515 #934 #484 #143 #1191 #278 #553 #153 #270 #1158 #1204 #1220 #488 #1146 #631 onto main (ffe310e), each head unchanged, no conflicts, no changes of mine. cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features, is clean and cargo test --workspace --locked passes (372 passed, 8 ignored; main has 342 passed, 6 ignored). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
github-actions Bot
added a commit
to KevinPratap/VIctory
that referenced
this pull request
Nov 24, 2026
github-actions Bot
added a commit
to KevinPratap/VIctory
that referenced
this pull request
Nov 24, 2026
github-actions Bot
added a commit
to KevinPratap/VIctory
that referenced
this pull request
Nov 24, 2026
github-actions Bot
added a commit
to KevinPratap/VIctory
that referenced
this pull request
Nov 25, 2026
…e, DXGI, objects, primitives, capture): 9 PRs, Marvisak#553 Marvisak#153 Marvisak#270 Marvisak#1158 Marvisak#1204 Marvisak#1220 Marvisak#488 Marvisak#1146 Marvisak#631 (rebuilt on main 70564ae)
github-actions Bot
added a commit
to KevinPratap/VIctory
that referenced
this pull request
Nov 25, 2026
…e, DXGI, objects, primitives, capture): 9 PRs, Marvisak#553 Marvisak#153 Marvisak#270 Marvisak#1158 Marvisak#1204 Marvisak#1220 Marvisak#488 Marvisak#1146 Marvisak#631 (rebuilt on main 70564ae)
github-actions Bot
added a commit
to KevinPratap/VIctory
that referenced
this pull request
Nov 26, 2026
…e, DXGI, objects, primitives, capture): 9 PRs, Marvisak#553 Marvisak#153 Marvisak#270 Marvisak#1158 Marvisak#1204 Marvisak#1220 Marvisak#488 Marvisak#1146 Marvisak#631 (rebuilt on main 70564ae)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
QueryInterface(IID_IUnknown)fails on every graphics object: the device, the DXGI objects, fences, queues, lists, allocators, heaps, resources, pipelines, root signatures.Each object's query matches the id against its own list (
FENCE_IIDS,QUEUE_IIDS, ..) throughobject::is, and no list holdsIUnknown(00000000-0000-0000-c000-000000000046). So the answer isE_NOINTERFACEand a null pointer, with anunknown interfacewarning. The same goes for every other call that hands out an object by interface id (creation,GetDevice,GetParent).COM requires every object to answer for it, and code relies on that: to compare two interface pointers for identity (
QueryInterface(IID_IUnknown)on both, asComPtr/CComPtrcomparisons do), to hold an object as a plain reference, or to hand it to an API that takes any object.object::isnow also matchesIUnknown; every caller listed above goes through it, and all of them answer with the object that was asked (or, forGetDevice/GetParent, with the object they name), which is right forIUnknowntoo. The DXGI device answers with the D3D12 device, as it already does for the device's own id: one pointer whichever of the object's interfaces is asked, which is what identity comparisons need.I have not seen the title or its middleware ask (I have no game files); it would show in the log as
unknown interfacewith the id above.Tested
Windows 11 Pro 10.0.26200, NVIDIA RTX 3080 Ti (driver 32.0.16.1656), rustc 1.98.1 (
x86_64-pc-windows-msvc), no game data. The test needs no GPU.New unit test
every_object_answers_for_iunknowninobject.rs:QueryInterfaceforIUnknownthrough slot 0 of the device, of a fence, and of the DXGI device returnsS_OK; the device and the fence answer with themselves, the DXGI device with the device. Control: an id no object has still getsE_NOINTERFACEand a nulled pointer from the fence.main(d2a4bae) + the test and the constant only:cargo test -p victory-gpu --lib every_object_answersfails at the device:left: (-2147467262, 0x0)(E_NOINTERFACE, null).cargo test -p victory-gpu --lib: 44 passed, 0 failed, 1 ignored;cargo test -p victory-hle --lib: 86 passed, 0 failed (it drives these objects throughd3d12x).cargo clippy -p victory-gpu --tests: nothing inobject.rs.rustfmt --check object.rs: clean.cargo xtask policy: 151 files ok.git merge-tree) with GPU: fence waits, direct memory-write wakes, queue timeline and host list pool #32, GPU: seek directly to private data on final release #153 and GPU: GetDevice and the DXGI device hand out the device at every level #249, which changeobject.rs: all clean.Not tested: a title run.
AI-assisted (Claude Code); the tests above were run on the machine described.
🤖 Generated with Claude Code