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

+1 -1
View File
@@ -92,7 +92,7 @@ fn query(kind: usize, iid: *const Iid, known: &[Iid], found: This, out: *mut Thi
/// The DXGI device also answers for the D3D12 device.
extern "system" fn device_query(this: This, iid: *const Iid, out: *mut This) -> HRESULT {
if object::is(iid, &[crate::device::IID]) {
if crate::device::is_device(iid) {
return object::answer(DXGI_DEVICE, iid, Some(crate::device::device()), out);
}
query(DXGI_DEVICE, iid, &DEVICE_IIDS, this, out)