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:
1 parent
d2a4bae1f4
commit
717f322c3c
3 files changed
+54
-4
No files matched your search
@@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user