#![allow(
non_snake_case,
clippy::too_many_arguments,
clippy::missing_safety_doc,
dead_code
)]
use core::ffi::c_void;
pub unsafe trait WorkGraph12Methods: 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 GetNumWorkGraphs(&self) -> u32 {
unsafe { real::GetNumWorkGraphs(self.inner()) }
}
unsafe fn GetProgramName(&self, a0: u32) -> windows::core::PCWSTR {
unsafe { real::GetProgramName(self.inner(), a0) }
}
unsafe fn GetWorkGraphIndex(&self, a0: windows::core::PCWSTR) -> u32 {
unsafe { real::GetWorkGraphIndex(self.inner(), a0) }
}
unsafe fn GetNumNodes(&self, a0: u32) -> u32 {
unsafe { real::GetNumNodes(self.inner(), a0) }
}
unsafe fn GetNodeID(
&self,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_NODE_ID,
a1: u32,
a2: u32,
) {
unsafe { real::GetNodeID(self.inner(), a0, a1, a2) }
}
unsafe fn GetNodeIndex(&self, a0: u32, a1: windows::Win32::Graphics::Direct3D12::D3D12_NODE_ID) -> u32 {
unsafe { real::GetNodeIndex(self.inner(), a0, a1) }
}
unsafe fn GetNodeLocalRootArgumentsTableIndex(&self, a0: u32, a1: u32) -> u32 {
unsafe { real::GetNodeLocalRootArgumentsTableIndex(self.inner(), a0, a1) }
}
unsafe fn GetNumEntrypoints(&self, a0: u32) -> u32 {
unsafe { real::GetNumEntrypoints(self.inner(), a0) }
}
unsafe fn GetEntrypointID(
&self,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_NODE_ID,
a1: u32,
a2: u32,
) {
unsafe { real::GetEntrypointID(self.inner(), a0, a1, a2) }
}
unsafe fn GetEntrypointIndex(
&self,
a0: u32,
a1: windows::Win32::Graphics::Direct3D12::D3D12_NODE_ID,
) -> u32 {
unsafe { real::GetEntrypointIndex(self.inner(), a0, a1) }
}
unsafe fn GetEntrypointRecordSizeInBytes(&self, a0: u32, a1: u32) -> u32 {
unsafe { real::GetEntrypointRecordSizeInBytes(self.inner(), a0, a1) }
}
unsafe fn GetWorkGraphMemoryRequirements(
&self,
a0: u32,
a1: *mut windows::Win32::Graphics::Direct3D12::D3D12_WORK_GRAPH_MEMORY_REQUIREMENTS,
) {
unsafe { real::GetWorkGraphMemoryRequirements(self.inner(), a0, a1) }
}
unsafe fn GetEntrypointRecordAlignmentInBytes(&self, a0: u32, a1: u32) -> u32 {
unsafe { real::GetEntrypointRecordAlignmentInBytes(self.inner(), a0, a1) }
}
}
pub mod real {
use core::ffi::c_void;
pub unsafe fn GetNumWorkGraphs(inner: *mut c_void) -> u32 {
unsafe {
((*(*(inner
as *const *const windows::Win32::Graphics::Direct3D12::ID3D12WorkGraphProperties_Vtbl)))
.GetNumWorkGraphs)(inner)
}
}
pub unsafe fn GetProgramName(inner: *mut c_void, a0: u32) -> windows::core::PCWSTR {
unsafe {
((*(*(inner
as *const *const windows::Win32::Graphics::Direct3D12::ID3D12WorkGraphProperties_Vtbl)))
.GetProgramName)(inner, a0)
}
}
pub unsafe fn GetWorkGraphIndex(inner: *mut c_void, a0: windows::core::PCWSTR) -> u32 {
unsafe {
((*(*(inner
as *const *const windows::Win32::Graphics::Direct3D12::ID3D12WorkGraphProperties_Vtbl)))
.GetWorkGraphIndex)(inner, a0)
}
}
pub unsafe fn GetNumNodes(inner: *mut c_void, a0: u32) -> u32 {
unsafe {
((*(*(inner
as *const *const windows::Win32::Graphics::Direct3D12::ID3D12WorkGraphProperties_Vtbl)))
.GetNumNodes)(inner, a0)
}
}
pub unsafe fn GetNodeID(
inner: *mut c_void,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_NODE_ID,
a1: u32,
a2: u32,
) {
unsafe {
((*(*(inner
as *const *const windows::Win32::Graphics::Direct3D12::ID3D12WorkGraphProperties_Vtbl)))
.GetNodeID)(inner, a0, a1, a2)
}
}
pub unsafe fn GetNodeIndex(
inner: *mut c_void,
a0: u32,
a1: windows::Win32::Graphics::Direct3D12::D3D12_NODE_ID,
) -> u32 {
unsafe {
((*(*(inner
as *const *const windows::Win32::Graphics::Direct3D12::ID3D12WorkGraphProperties_Vtbl)))
.GetNodeIndex)(inner, a0, a1)
}
}
pub unsafe fn GetNodeLocalRootArgumentsTableIndex(inner: *mut c_void, a0: u32, a1: u32) -> u32 {
unsafe {
((*(*(inner
as *const *const windows::Win32::Graphics::Direct3D12::ID3D12WorkGraphProperties_Vtbl)))
.GetNodeLocalRootArgumentsTableIndex)(inner, a0, a1)
}
}
pub unsafe fn GetNumEntrypoints(inner: *mut c_void, a0: u32) -> u32 {
unsafe {
((*(*(inner
as *const *const windows::Win32::Graphics::Direct3D12::ID3D12WorkGraphProperties_Vtbl)))
.GetNumEntrypoints)(inner, a0)
}
}
pub unsafe fn GetEntrypointID(
inner: *mut c_void,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_NODE_ID,
a1: u32,
a2: u32,
) {
unsafe {
((*(*(inner
as *const *const windows::Win32::Graphics::Direct3D12::ID3D12WorkGraphProperties_Vtbl)))
.GetEntrypointID)(inner, a0, a1, a2)
}
}
pub unsafe fn GetEntrypointIndex(
inner: *mut c_void,
a0: u32,
a1: windows::Win32::Graphics::Direct3D12::D3D12_NODE_ID,
) -> u32 {
unsafe {
((*(*(inner
as *const *const windows::Win32::Graphics::Direct3D12::ID3D12WorkGraphProperties_Vtbl)))
.GetEntrypointIndex)(inner, a0, a1)
}
}
pub unsafe fn GetEntrypointRecordSizeInBytes(inner: *mut c_void, a0: u32, a1: u32) -> u32 {
unsafe {
((*(*(inner
as *const *const windows::Win32::Graphics::Direct3D12::ID3D12WorkGraphProperties_Vtbl)))
.GetEntrypointRecordSizeInBytes)(inner, a0, a1)
}
}
pub unsafe fn GetWorkGraphMemoryRequirements(
inner: *mut c_void,
a0: u32,
a1: *mut windows::Win32::Graphics::Direct3D12::D3D12_WORK_GRAPH_MEMORY_REQUIREMENTS,
) {
unsafe {
((*(*(inner
as *const *const windows::Win32::Graphics::Direct3D12::ID3D12WorkGraphProperties_Vtbl)))
.GetWorkGraphMemoryRequirements)(inner, a0, a1)
}
}
pub unsafe fn GetEntrypointRecordAlignmentInBytes(inner: *mut c_void, a0: u32, a1: u32) -> u32 {
unsafe {
((*(*(inner
as *const *const windows::Win32::Graphics::Direct3D12::ID3D12WorkGraphProperties_Vtbl)))
.GetEntrypointRecordAlignmentInBytes)(inner, a0, a1)
}
}
}
unsafe extern "system" fn QueryInterface<T: WorkGraph12Methods>(
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: WorkGraph12Methods>(this: *mut c_void) -> u32 {
unsafe { (*(this as *const T)).AddRef() }
}
unsafe extern "system" fn Release<T: WorkGraph12Methods>(this: *mut c_void) -> u32 {
unsafe { (*(this as *const T)).Release() }
}
unsafe extern "system" fn GetNumWorkGraphs<T: WorkGraph12Methods>(this: *mut c_void) -> u32 {
unsafe { (*(this as *const T)).GetNumWorkGraphs() }
}
unsafe extern "system" fn GetProgramName<T: WorkGraph12Methods>(
this: *mut c_void,
a0: u32,
) -> windows::core::PCWSTR {
unsafe { (*(this as *const T)).GetProgramName(a0) }
}
unsafe extern "system" fn GetWorkGraphIndex<T: WorkGraph12Methods>(
this: *mut c_void,
a0: windows::core::PCWSTR,
) -> u32 {
unsafe { (*(this as *const T)).GetWorkGraphIndex(a0) }
}
unsafe extern "system" fn GetNumNodes<T: WorkGraph12Methods>(this: *mut c_void, a0: u32) -> u32 {
unsafe { (*(this as *const T)).GetNumNodes(a0) }
}
unsafe extern "system" fn GetNodeID<T: WorkGraph12Methods>(
this: *mut c_void,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_NODE_ID,
a1: u32,
a2: u32,
) {
unsafe { (*(this as *const T)).GetNodeID(a0, a1, a2) }
}
unsafe extern "system" fn GetNodeIndex<T: WorkGraph12Methods>(
this: *mut c_void,
a0: u32,
a1: windows::Win32::Graphics::Direct3D12::D3D12_NODE_ID,
) -> u32 {
unsafe { (*(this as *const T)).GetNodeIndex(a0, a1) }
}
unsafe extern "system" fn GetNodeLocalRootArgumentsTableIndex<T: WorkGraph12Methods>(
this: *mut c_void,
a0: u32,
a1: u32,
) -> u32 {
unsafe { (*(this as *const T)).GetNodeLocalRootArgumentsTableIndex(a0, a1) }
}
unsafe extern "system" fn GetNumEntrypoints<T: WorkGraph12Methods>(this: *mut c_void, a0: u32) -> u32 {
unsafe { (*(this as *const T)).GetNumEntrypoints(a0) }
}
unsafe extern "system" fn GetEntrypointID<T: WorkGraph12Methods>(
this: *mut c_void,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_NODE_ID,
a1: u32,
a2: u32,
) {
unsafe { (*(this as *const T)).GetEntrypointID(a0, a1, a2) }
}
unsafe extern "system" fn GetEntrypointIndex<T: WorkGraph12Methods>(
this: *mut c_void,
a0: u32,
a1: windows::Win32::Graphics::Direct3D12::D3D12_NODE_ID,
) -> u32 {
unsafe { (*(this as *const T)).GetEntrypointIndex(a0, a1) }
}
unsafe extern "system" fn GetEntrypointRecordSizeInBytes<T: WorkGraph12Methods>(
this: *mut c_void,
a0: u32,
a1: u32,
) -> u32 {
unsafe { (*(this as *const T)).GetEntrypointRecordSizeInBytes(a0, a1) }
}
unsafe extern "system" fn GetWorkGraphMemoryRequirements<T: WorkGraph12Methods>(
this: *mut c_void,
a0: u32,
a1: *mut windows::Win32::Graphics::Direct3D12::D3D12_WORK_GRAPH_MEMORY_REQUIREMENTS,
) {
unsafe { (*(this as *const T)).GetWorkGraphMemoryRequirements(a0, a1) }
}
unsafe extern "system" fn GetEntrypointRecordAlignmentInBytes<T: WorkGraph12Methods>(
this: *mut c_void,
a0: u32,
a1: u32,
) -> u32 {
unsafe { (*(this as *const T)).GetEntrypointRecordAlignmentInBytes(a0, a1) }
}
#[allow(clippy::let_and_return)] unsafe impl WorkGraph12Methods 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 GetNumWorkGraphs(&self) -> u32 {
unsafe {
let result = real::GetNumWorkGraphs(self.real());
result
}
}
unsafe fn GetProgramName(&self, a0: u32) -> windows::core::PCWSTR {
unsafe {
let result = real::GetProgramName(self.real(), a0);
result
}
}
unsafe fn GetWorkGraphIndex(&self, a0: windows::core::PCWSTR) -> u32 {
unsafe {
let result = real::GetWorkGraphIndex(self.real(), a0);
result
}
}
unsafe fn GetNumNodes(&self, a0: u32) -> u32 {
unsafe {
let result = real::GetNumNodes(self.real(), a0);
result
}
}
unsafe fn GetNodeID(
&self,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_NODE_ID,
a1: u32,
a2: u32,
) {
unsafe {
real::GetNodeID(self.real(), a0, a1, a2);
}
}
unsafe fn GetNodeIndex(&self, a0: u32, a1: windows::Win32::Graphics::Direct3D12::D3D12_NODE_ID) -> u32 {
unsafe {
let result = real::GetNodeIndex(self.real(), a0, a1);
result
}
}
unsafe fn GetNodeLocalRootArgumentsTableIndex(&self, a0: u32, a1: u32) -> u32 {
unsafe {
let result = real::GetNodeLocalRootArgumentsTableIndex(self.real(), a0, a1);
result
}
}
unsafe fn GetNumEntrypoints(&self, a0: u32) -> u32 {
unsafe {
let result = real::GetNumEntrypoints(self.real(), a0);
result
}
}
unsafe fn GetEntrypointID(
&self,
a0: *mut windows::Win32::Graphics::Direct3D12::D3D12_NODE_ID,
a1: u32,
a2: u32,
) {
unsafe {
real::GetEntrypointID(self.real(), a0, a1, a2);
}
}
unsafe fn GetEntrypointIndex(
&self,
a0: u32,
a1: windows::Win32::Graphics::Direct3D12::D3D12_NODE_ID,
) -> u32 {
unsafe {
let result = real::GetEntrypointIndex(self.real(), a0, a1);
result
}
}
unsafe fn GetEntrypointRecordSizeInBytes(&self, a0: u32, a1: u32) -> u32 {
unsafe {
let result = real::GetEntrypointRecordSizeInBytes(self.real(), a0, a1);
result
}
}
unsafe fn GetWorkGraphMemoryRequirements(
&self,
a0: u32,
a1: *mut windows::Win32::Graphics::Direct3D12::D3D12_WORK_GRAPH_MEMORY_REQUIREMENTS,
) {
unsafe {
real::GetWorkGraphMemoryRequirements(self.real(), a0, a1);
}
}
unsafe fn GetEntrypointRecordAlignmentInBytes(&self, a0: u32, a1: u32) -> u32 {
unsafe {
let result = real::GetEntrypointRecordAlignmentInBytes(self.real(), a0, a1);
result
}
}
}
pub const fn vtable<T: WorkGraph12Methods>()
-> windows::Win32::Graphics::Direct3D12::ID3D12WorkGraphProperties_Vtbl {
windows::Win32::Graphics::Direct3D12::ID3D12WorkGraphProperties_Vtbl {
base__: windows::core::IUnknown_Vtbl {
QueryInterface: QueryInterface::<T>,
AddRef: AddRef::<T>,
Release: Release::<T>,
},
GetNumWorkGraphs: GetNumWorkGraphs::<T>,
GetProgramName: GetProgramName::<T>,
GetWorkGraphIndex: GetWorkGraphIndex::<T>,
GetNumNodes: GetNumNodes::<T>,
GetNodeID: GetNodeID::<T>,
GetNodeIndex: GetNodeIndex::<T>,
GetNodeLocalRootArgumentsTableIndex: GetNodeLocalRootArgumentsTableIndex::<T>,
GetNumEntrypoints: GetNumEntrypoints::<T>,
GetEntrypointID: GetEntrypointID::<T>,
GetEntrypointIndex: GetEntrypointIndex::<T>,
GetEntrypointRecordSizeInBytes: GetEntrypointRecordSizeInBytes::<T>,
GetWorkGraphMemoryRequirements: GetWorkGraphMemoryRequirements::<T>,
GetEntrypointRecordAlignmentInBytes: GetEntrypointRecordAlignmentInBytes::<T>,
}
}