// ------------------------------------------------------------------------------
//
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// ------------------------------------------------------------------------------
namespace Win32.Graphics.Dxgi;
///
/// IDXGIDevice2
[Guid("05008617-fbfd-4051-a790-144884b4f6a9")]
[NativeTypeName("struct IDXGIDevice2 : IDXGIDevice1")]
[NativeInheritance("IDXGIDevice1")]
public unsafe partial struct IDXGIDevice2 : INativeGuid
{
public static ref readonly Guid IID_IDXGIDevice2
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan data = new byte[] {
0x17, 0x86, 0x00, 0x05,
0xFD, 0xFB,
0x51, 0x40,
0xA7,
0x90,
0x14,
0x48,
0x84,
0xB4,
0xF6,
0xA9
};
Debug.Assert(data.Length == Unsafe.SizeOf());
return ref Unsafe.As(ref MemoryMarshal.GetReference(data));
}
}
#if NET6_0_OR_GREATER
static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IDXGIDevice2));
#else
public static Guid* NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IDXGIDevice2));
#endif
public void** lpVtbl;
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(0)]
public HResult QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IUnknown*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(1)]
[return: NativeTypeName("ULONG")]
public uint AddRef()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IUnknown*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(2)]
[return: NativeTypeName("ULONG")]
public uint Release()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IUnknown*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(3)]
public HResult SetPrivateData(Guid* Name, uint DataSize, void* pData)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDXGIDevice2*)Unsafe.AsPointer(ref this), Name, DataSize, pData);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(4)]
public HResult SetPrivateDataInterface(Guid* Name, IUnknown* pUnknown)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDXGIDevice2*)Unsafe.AsPointer(ref this), Name, pUnknown);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(5)]
public HResult GetPrivateData(Guid* Name, uint* pDataSize, void* pData)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDXGIDevice2*)Unsafe.AsPointer(ref this), Name, pDataSize, pData);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(6)]
public HResult GetParent(Guid* riid, void** ppParent)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDXGIDevice2*)Unsafe.AsPointer(ref this), riid, ppParent);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(7)]
public HResult GetAdapter(IDXGIAdapter** pAdapter)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDXGIDevice2*)Unsafe.AsPointer(ref this), pAdapter);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult CreateSurface(SurfaceDescription* pDesc, uint NumSurfaces, uint Usage, SharedResource* pSharedResource, IDXGISurface** ppSurface)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDXGIDevice2*)Unsafe.AsPointer(ref this), pDesc, NumSurfaces, Usage, pSharedResource, ppSurface);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(9)]
public HResult QueryResourceResidency(IUnknown** ppResources, Residency* pResidencyStatus, uint NumResources)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDXGIDevice2*)Unsafe.AsPointer(ref this), ppResources, pResidencyStatus, NumResources);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(10)]
public HResult SetGPUThreadPriority(int Priority)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDXGIDevice2*)Unsafe.AsPointer(ref this), Priority);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(11)]
public HResult GetGPUThreadPriority(int* pPriority)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IDXGIDevice2*)Unsafe.AsPointer(ref this), pPriority);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(12)]
public HResult SetMaximumFrameLatency(uint MaxLatency)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IDXGIDevice2*)Unsafe.AsPointer(ref this), MaxLatency);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(13)]
public HResult GetMaximumFrameLatency(uint* pMaxLatency)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGIDevice2*)Unsafe.AsPointer(ref this), pMaxLatency);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(14)]
public HResult OfferResources(uint NumResources, IDXGIResource** ppResources, OfferResourcePriority Priority)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IDXGIDevice2*)Unsafe.AsPointer(ref this), NumResources, ppResources, Priority);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(15)]
public HResult ReclaimResources(uint NumResources, IDXGIResource** ppResources, Bool32* pDiscarded)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IDXGIDevice2*)Unsafe.AsPointer(ref this), NumResources, ppResources, pDiscarded);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(16)]
public HResult EnqueueSetEvent(Handle hEvent)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IDXGIDevice2*)Unsafe.AsPointer(ref this), hEvent);
}
}