GPU: GetDevice and the DXGI device hand out the device at every level

The device answers QueryInterface for ID3D12Device and for its newer
levels (Grand Theft Auto VI creates it as ID3D12Device11). A device
child's GetDevice and the DXGI device's QueryInterface knew only the
first: asked for the device by the interface the title holds, they
answered E_NOINTERFACE with a null pointer.

Both now ask the device's own test (is_device).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Maraco91andClaude Fable 5.2 committed 2026-11-24 02:48:40 +01:00
1 parent 35e8407c9c
commit 60f3c5b71b
3 files changed
+54 -4

No files matched your search

+3 -2
View File
@@ -223,13 +223,14 @@ pub(crate) extern "system" fn set_name(this: This, name: *const u16) -> HRESULT
S_OK
}
/// The device-child method: the device that made the object.
/// The device-child method: the device that made the object, as any of
/// the interfaces the device itself answers to.
pub(crate) extern "system" fn parent_device(_: This, iid: *const Iid, out: *mut This) -> HRESULT {
let device = crate::device::device();
answer(
DEVICE,
iid,
is(iid, &[crate::device::IID]).then_some(device),
crate::device::is_device(iid).then_some(device),
out,
)
}