#![allow(
non_snake_case,
clippy::too_many_arguments,
clippy::missing_safety_doc,
dead_code
)]
use core::ffi::c_void;
pub unsafe trait Dred12Methods: Sized {
fn inner(&self) -> *mut c_void;
unsafe fn QueryInterface(
&self,
iid: *const windows::core::GUID,
out: *mut *mut c_void,
) -> windows::core::HRESULT;
unsafe fn AddRef(&self) -> u32;
unsafe fn Release(&self) -> u32;
unsafe fn GetAutoBreadcrumbsOutput(
&self,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT,
) -> windows::core::HRESULT {
unsafe { real::GetAutoBreadcrumbsOutput(self.inner(), a0) }
}
unsafe fn GetPageFaultAllocationOutput(
&self,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_PAGE_FAULT_OUTPUT,
) -> windows::core::HRESULT {
unsafe { real::GetPageFaultAllocationOutput(self.inner(), a0) }
}
unsafe fn GetAutoBreadcrumbsOutput1(
&self,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT1,
) -> windows::core::HRESULT {
unsafe { real::GetAutoBreadcrumbsOutput1(self.inner(), a0) }
}
unsafe fn GetPageFaultAllocationOutput1(
&self,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_PAGE_FAULT_OUTPUT1,
) -> windows::core::HRESULT {
unsafe { real::GetPageFaultAllocationOutput1(self.inner(), a0) }
}
unsafe fn GetPageFaultAllocationOutput2(
&self,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_PAGE_FAULT_OUTPUT2,
) -> windows::core::HRESULT {
unsafe { real::GetPageFaultAllocationOutput2(self.inner(), a0) }
}
unsafe fn GetDeviceState(&self) -> windows::Win32::Graphics::Direct3D12::D3D12_DRED_DEVICE_STATE {
unsafe { real::GetDeviceState(self.inner()) }
}
}
pub mod real {
use core::ffi::c_void;
pub unsafe fn GetAutoBreadcrumbsOutput(
inner: *mut c_void,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Direct3D12::ID3D12DeviceRemovedExtendedData2_Vtbl))).base__.base__.GetAutoBreadcrumbsOutput)(inner, a0)
}
}
pub unsafe fn GetPageFaultAllocationOutput(
inner: *mut c_void,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_PAGE_FAULT_OUTPUT,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Direct3D12::ID3D12DeviceRemovedExtendedData2_Vtbl))).base__.base__.GetPageFaultAllocationOutput)(inner, a0)
}
}
pub unsafe fn GetAutoBreadcrumbsOutput1(
inner: *mut c_void,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT1,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Direct3D12::ID3D12DeviceRemovedExtendedData2_Vtbl))).base__.GetAutoBreadcrumbsOutput1)(inner, a0)
}
}
pub unsafe fn GetPageFaultAllocationOutput1(
inner: *mut c_void,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_PAGE_FAULT_OUTPUT1,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Direct3D12::ID3D12DeviceRemovedExtendedData2_Vtbl))).base__.GetPageFaultAllocationOutput1)(inner, a0)
}
}
pub unsafe fn GetPageFaultAllocationOutput2(
inner: *mut c_void,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_PAGE_FAULT_OUTPUT2,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Direct3D12::ID3D12DeviceRemovedExtendedData2_Vtbl))).GetPageFaultAllocationOutput2)(inner, a0)
}
}
pub unsafe fn GetDeviceState(
inner: *mut c_void,
) -> windows::Win32::Graphics::Direct3D12::D3D12_DRED_DEVICE_STATE {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Direct3D12::ID3D12DeviceRemovedExtendedData2_Vtbl))).GetDeviceState)(inner)
}
}
}
unsafe extern "system" fn QueryInterface<T: Dred12Methods>(
this: *mut c_void,
iid: *const windows::core::GUID,
out: *mut *mut c_void,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).QueryInterface(iid, out) }
}
unsafe extern "system" fn AddRef<T: Dred12Methods>(this: *mut c_void) -> u32 {
unsafe { (*(this as *const T)).AddRef() }
}
unsafe extern "system" fn Release<T: Dred12Methods>(this: *mut c_void) -> u32 {
unsafe { (*(this as *const T)).Release() }
}
unsafe extern "system" fn GetAutoBreadcrumbsOutput<T: Dred12Methods>(
this: *mut c_void,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetAutoBreadcrumbsOutput(a0) }
}
unsafe extern "system" fn GetPageFaultAllocationOutput<T: Dred12Methods>(
this: *mut c_void,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_PAGE_FAULT_OUTPUT,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetPageFaultAllocationOutput(a0) }
}
unsafe extern "system" fn GetAutoBreadcrumbsOutput1<T: Dred12Methods>(
this: *mut c_void,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT1,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetAutoBreadcrumbsOutput1(a0) }
}
unsafe extern "system" fn GetPageFaultAllocationOutput1<T: Dred12Methods>(
this: *mut c_void,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_PAGE_FAULT_OUTPUT1,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetPageFaultAllocationOutput1(a0) }
}
unsafe extern "system" fn GetPageFaultAllocationOutput2<T: Dred12Methods>(
this: *mut c_void,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_PAGE_FAULT_OUTPUT2,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetPageFaultAllocationOutput2(a0) }
}
unsafe extern "system" fn GetDeviceState<T: Dred12Methods>(
this: *mut c_void,
) -> windows::Win32::Graphics::Direct3D12::D3D12_DRED_DEVICE_STATE {
unsafe { (*(this as *const T)).GetDeviceState() }
}
#[allow(clippy::let_and_return)] unsafe impl Dred12Methods for crate::d3d12::Object {
fn inner(&self) -> *mut c_void {
self.real()
}
unsafe fn QueryInterface(
&self,
iid: *const windows::core::GUID,
out: *mut *mut c_void,
) -> windows::core::HRESULT {
unsafe { self.query(iid, out) }
}
unsafe fn AddRef(&self) -> u32 {
self.add_ref()
}
unsafe fn Release(&self) -> u32 {
unsafe { self.release() }
}
unsafe fn GetAutoBreadcrumbsOutput(
&self,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT,
) -> windows::core::HRESULT {
unsafe {
let result = real::GetAutoBreadcrumbsOutput(self.real(), a0);
result
}
}
unsafe fn GetPageFaultAllocationOutput(
&self,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_PAGE_FAULT_OUTPUT,
) -> windows::core::HRESULT {
unsafe {
let result = real::GetPageFaultAllocationOutput(self.real(), a0);
result
}
}
unsafe fn GetAutoBreadcrumbsOutput1(
&self,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT1,
) -> windows::core::HRESULT {
unsafe {
let result = real::GetAutoBreadcrumbsOutput1(self.real(), a0);
result
}
}
unsafe fn GetPageFaultAllocationOutput1(
&self,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_PAGE_FAULT_OUTPUT1,
) -> windows::core::HRESULT {
unsafe {
let result = real::GetPageFaultAllocationOutput1(self.real(), a0);
result
}
}
unsafe fn GetPageFaultAllocationOutput2(
&self,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_DRED_PAGE_FAULT_OUTPUT2,
) -> windows::core::HRESULT {
unsafe {
let result = real::GetPageFaultAllocationOutput2(self.real(), a0);
result
}
}
unsafe fn GetDeviceState(&self) -> windows::Win32::Graphics::Direct3D12::D3D12_DRED_DEVICE_STATE {
unsafe {
let result = real::GetDeviceState(self.real());
result
}
}
}
pub const fn vtable<T: Dred12Methods>()
-> windows::Win32::Graphics::Direct3D12::ID3D12DeviceRemovedExtendedData2_Vtbl {
windows::Win32::Graphics::Direct3D12::ID3D12DeviceRemovedExtendedData2_Vtbl {
base__: windows::Win32::Graphics::Direct3D12::ID3D12DeviceRemovedExtendedData1_Vtbl {
base__: windows::Win32::Graphics::Direct3D12::ID3D12DeviceRemovedExtendedData_Vtbl {
base__: windows::core::IUnknown_Vtbl {
QueryInterface: QueryInterface::<T>,
AddRef: AddRef::<T>,
Release: Release::<T>,
},
GetAutoBreadcrumbsOutput: GetAutoBreadcrumbsOutput::<T>,
GetPageFaultAllocationOutput: GetPageFaultAllocationOutput::<T>,
},
GetAutoBreadcrumbsOutput1: GetAutoBreadcrumbsOutput1::<T>,
GetPageFaultAllocationOutput1: GetPageFaultAllocationOutput1::<T>,
},
GetPageFaultAllocationOutput2: GetPageFaultAllocationOutput2::<T>,
GetDeviceState: GetDeviceState::<T>,
}
}