Improve bindings logic.

This commit is contained in:
Amer Koleci
2022-11-18 14:45:41 +01:00
parent 8dc88313e8
commit 8951f5b092
25 changed files with 62 additions and 60 deletions

View File

@@ -4,6 +4,7 @@
using System.Dynamic;
using System.Globalization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
namespace Generator;
@@ -1022,24 +1023,12 @@ public static class Program
{ "IDXGIDevice::CreateSurface::Usage", "DXGI_USAGE" },
{ "IDXGIOutput::GetDisplayModeList::Flags", "DXGI_ENUM_MODES" },
{ "IDXGISwapChain::Present::Flags", "DXGI_PRESENT" },
{ "IDXGISwapChain1::Present::Flags", "DXGI_PRESENT" },
{ "IDXGISwapChain2::Present::Flags", "DXGI_PRESENT" },
{ "IDXGISwapChain3::Present::Flags", "DXGI_PRESENT" },
{ "IDXGISwapChain4::Present::Flags", "DXGI_PRESENT" },
{ "IDXGISwapChain::ResizeBuffers::SwapChainFlags", "DXGI_SWAP_CHAIN_FLAG" },
{ "IDXGISwapChain1::ResizeBuffers::SwapChainFlags", "DXGI_SWAP_CHAIN_FLAG" },
{ "IDXGISwapChain2::ResizeBuffers::SwapChainFlags", "DXGI_SWAP_CHAIN_FLAG" },
{ "IDXGISwapChain3::ResizeBuffers::SwapChainFlags", "DXGI_SWAP_CHAIN_FLAG" },
{ "IDXGISwapChain4::ResizeBuffers::SwapChainFlags", "DXGI_SWAP_CHAIN_FLAG" },
{ "IDXGIFactory::MakeWindowAssociation::Flags", "DXGI_MWA" },
// D3D11
{ "ID3D11DeviceContext::Map::MapFlags", "D3D11_MAP_FLAG" },
{ "ID3D11DeviceContext::ClearDepthStencilView::ClearFlags", "D3D11_CLEAR_FLAG" },
{ "ID3D11DeviceContext1::ClearDepthStencilView::ClearFlags", "D3D11_CLEAR_FLAG" },
{ "ID3D11DeviceContext2::ClearDepthStencilView::ClearFlags", "D3D11_CLEAR_FLAG" },
{ "ID3D11DeviceContext3::ClearDepthStencilView::ClearFlags", "D3D11_CLEAR_FLAG" },
{ "ID3D11DeviceContext4::ClearDepthStencilView::ClearFlags", "D3D11_CLEAR_FLAG" },
// D3D12
@@ -2532,7 +2521,10 @@ public static class Program
{
if (string.IsNullOrEmpty(memberLookup) == false)
{
string interfaceType = memberLookup.Split("::")[0];
string parameterNameLookup = $"{memberLookup}::{parameter.Name}";
retryLookup:
if (s_mapFunctionParameters.TryGetValue(parameterNameLookup, out string? remapType))
{
if (remapType.Contains('.'))
@@ -2551,6 +2543,16 @@ public static class Program
}
else
{
var result = Regex.Match(interfaceType, @"\d+$", RegexOptions.RightToLeft);
if (result.Success)
{
string interfaceTypeNoNumber = interfaceType.Replace(result.Value, string.Empty);
memberLookup = memberLookup.Replace(interfaceType, interfaceTypeNoNumber);
parameterNameLookup = $"{memberLookup}::{parameter.Name}";
interfaceType = interfaceTypeNoNumber;
goto retryLookup;
}
parameterType = GetTypeName(parameter.Type, asPointer);
}
}

View File

@@ -51,9 +51,9 @@ public unsafe partial struct IWICImagingFactory2 : INativeGuid
/// <inheritdoc cref="IWICImagingFactory.CreateDecoderFromFilename" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(0)]
public HResult CreateDecoderFromFilename(ushort* wzFilename, Guid* pguidVendor, uint dwDesiredAccess, Graphics.Imaging.WICDecodeOptions metadataOptions, Graphics.Imaging.IWICBitmapDecoder** ppIDecoder)
public HResult CreateDecoderFromFilename(ushort* wzFilename, Guid* pguidVendor, NativeFileAccess dwDesiredAccess, Graphics.Imaging.WICDecodeOptions metadataOptions, Graphics.Imaging.IWICBitmapDecoder** ppIDecoder)
{
return ((delegate* unmanaged[Stdcall]<IWICImagingFactory2*, ushort*, Guid*, uint, Graphics.Imaging.WICDecodeOptions, Graphics.Imaging.IWICBitmapDecoder**, int>)(lpVtbl[0]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), wzFilename, pguidVendor, dwDesiredAccess, metadataOptions, ppIDecoder);
return ((delegate* unmanaged[Stdcall]<IWICImagingFactory2*, ushort*, Guid*, NativeFileAccess, Graphics.Imaging.WICDecodeOptions, Graphics.Imaging.IWICBitmapDecoder**, int>)(lpVtbl[0]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), wzFilename, pguidVendor, dwDesiredAccess, metadataOptions, ppIDecoder);
}
/// <inheritdoc cref="IWICImagingFactory.CreateDecoderFromStream" />

View File

@@ -477,9 +477,9 @@ public unsafe partial struct ID3D11DeviceContext1 : INativeGuid
/// <inheritdoc cref="ID3D11DeviceContext.ClearDepthStencilView" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(53)]
public void ClearDepthStencilView(ID3D11DepthStencilView* pDepthStencilView, ClearFlags ClearFlags, float Depth, byte Stencil)
public void ClearDepthStencilView(ID3D11DepthStencilView* pDepthStencilView, uint ClearFlags, float Depth, byte Stencil)
{
((delegate* unmanaged[Stdcall]<ID3D11DeviceContext1*, ID3D11DepthStencilView*, ClearFlags, float, byte, void>)(lpVtbl[53]))((ID3D11DeviceContext1*)Unsafe.AsPointer(ref this), pDepthStencilView, ClearFlags, Depth, Stencil);
((delegate* unmanaged[Stdcall]<ID3D11DeviceContext1*, ID3D11DepthStencilView*, uint, float, byte, void>)(lpVtbl[53]))((ID3D11DeviceContext1*)Unsafe.AsPointer(ref this), pDepthStencilView, ClearFlags, Depth, Stencil);
}
/// <inheritdoc cref="ID3D11DeviceContext.GenerateMips" />

View File

@@ -165,9 +165,9 @@ public unsafe partial struct ID3D11DeviceContext2 : INativeGuid
/// <inheritdoc cref="ID3D11DeviceContext.Map" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(14)]
public HResult Map(ID3D11Resource* pResource, uint Subresource, MapMode MapType, uint MapFlags, MappedSubresource* pMappedResource)
public HResult Map(ID3D11Resource* pResource, uint Subresource, MapMode MapType, MapFlags MapFlags, MappedSubresource* pMappedResource)
{
return ((delegate* unmanaged[Stdcall]<ID3D11DeviceContext2*, ID3D11Resource*, uint, MapMode, uint, MappedSubresource*, int>)(lpVtbl[14]))((ID3D11DeviceContext2*)Unsafe.AsPointer(ref this), pResource, Subresource, MapType, MapFlags, pMappedResource);
return ((delegate* unmanaged[Stdcall]<ID3D11DeviceContext2*, ID3D11Resource*, uint, MapMode, MapFlags, MappedSubresource*, int>)(lpVtbl[14]))((ID3D11DeviceContext2*)Unsafe.AsPointer(ref this), pResource, Subresource, MapType, MapFlags, pMappedResource);
}
/// <inheritdoc cref="ID3D11DeviceContext.Unmap" />

View File

@@ -477,9 +477,9 @@ public unsafe partial struct ID3D11DeviceContext3 : INativeGuid
/// <inheritdoc cref="ID3D11DeviceContext.ClearDepthStencilView" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(53)]
public void ClearDepthStencilView(ID3D11DepthStencilView* pDepthStencilView, ClearFlags ClearFlags, float Depth, byte Stencil)
public void ClearDepthStencilView(ID3D11DepthStencilView* pDepthStencilView, uint ClearFlags, float Depth, byte Stencil)
{
((delegate* unmanaged[Stdcall]<ID3D11DeviceContext3*, ID3D11DepthStencilView*, ClearFlags, float, byte, void>)(lpVtbl[53]))((ID3D11DeviceContext3*)Unsafe.AsPointer(ref this), pDepthStencilView, ClearFlags, Depth, Stencil);
((delegate* unmanaged[Stdcall]<ID3D11DeviceContext3*, ID3D11DepthStencilView*, uint, float, byte, void>)(lpVtbl[53]))((ID3D11DeviceContext3*)Unsafe.AsPointer(ref this), pDepthStencilView, ClearFlags, Depth, Stencil);
}
/// <inheritdoc cref="ID3D11DeviceContext.GenerateMips" />

View File

@@ -165,9 +165,9 @@ public unsafe partial struct ID3D11DeviceContext4 : INativeGuid
/// <inheritdoc cref="ID3D11DeviceContext.Map" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(14)]
public HResult Map(ID3D11Resource* pResource, uint Subresource, MapMode MapType, uint MapFlags, MappedSubresource* pMappedResource)
public HResult Map(ID3D11Resource* pResource, uint Subresource, MapMode MapType, MapFlags MapFlags, MappedSubresource* pMappedResource)
{
return ((delegate* unmanaged[Stdcall]<ID3D11DeviceContext4*, ID3D11Resource*, uint, MapMode, uint, MappedSubresource*, int>)(lpVtbl[14]))((ID3D11DeviceContext4*)Unsafe.AsPointer(ref this), pResource, Subresource, MapType, MapFlags, pMappedResource);
return ((delegate* unmanaged[Stdcall]<ID3D11DeviceContext4*, ID3D11Resource*, uint, MapMode, MapFlags, MappedSubresource*, int>)(lpVtbl[14]))((ID3D11DeviceContext4*)Unsafe.AsPointer(ref this), pResource, Subresource, MapType, MapFlags, pMappedResource);
}
/// <inheritdoc cref="ID3D11DeviceContext.Unmap" />

View File

@@ -117,9 +117,9 @@ public unsafe partial struct IDXGIDevice1 : INativeGuid
/// <inheritdoc cref="IDXGIDevice.CreateSurface" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult CreateSurface(SurfaceDescription* pDesc, uint NumSurfaces, uint Usage, SharedResource* pSharedResource, IDXGISurface** ppSurface)
public HResult CreateSurface(SurfaceDescription* pDesc, uint NumSurfaces, Usage Usage, SharedResource* pSharedResource, IDXGISurface** ppSurface)
{
return ((delegate* unmanaged[Stdcall]<IDXGIDevice1*, SurfaceDescription*, uint, uint, SharedResource*, IDXGISurface**, int>)(lpVtbl[8]))((IDXGIDevice1*)Unsafe.AsPointer(ref this), pDesc, NumSurfaces, Usage, pSharedResource, ppSurface);
return ((delegate* unmanaged[Stdcall]<IDXGIDevice1*, SurfaceDescription*, uint, Usage, SharedResource*, IDXGISurface**, int>)(lpVtbl[8]))((IDXGIDevice1*)Unsafe.AsPointer(ref this), pDesc, NumSurfaces, Usage, pSharedResource, ppSurface);
}
/// <inheritdoc cref="IDXGIDevice.QueryResourceResidency" />

View File

@@ -117,9 +117,9 @@ public unsafe partial struct IDXGIDevice2 : INativeGuid
/// <inheritdoc cref="IDXGIDevice.CreateSurface" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult CreateSurface(SurfaceDescription* pDesc, uint NumSurfaces, uint Usage, SharedResource* pSharedResource, IDXGISurface** ppSurface)
public HResult CreateSurface(SurfaceDescription* pDesc, uint NumSurfaces, Usage Usage, SharedResource* pSharedResource, IDXGISurface** ppSurface)
{
return ((delegate* unmanaged[Stdcall]<IDXGIDevice2*, SurfaceDescription*, uint, uint, SharedResource*, IDXGISurface**, int>)(lpVtbl[8]))((IDXGIDevice2*)Unsafe.AsPointer(ref this), pDesc, NumSurfaces, Usage, pSharedResource, ppSurface);
return ((delegate* unmanaged[Stdcall]<IDXGIDevice2*, SurfaceDescription*, uint, Usage, SharedResource*, IDXGISurface**, int>)(lpVtbl[8]))((IDXGIDevice2*)Unsafe.AsPointer(ref this), pDesc, NumSurfaces, Usage, pSharedResource, ppSurface);
}
/// <inheritdoc cref="IDXGIDevice.QueryResourceResidency" />

View File

@@ -117,9 +117,9 @@ public unsafe partial struct IDXGIDevice3 : INativeGuid
/// <inheritdoc cref="IDXGIDevice.CreateSurface" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult CreateSurface(SurfaceDescription* pDesc, uint NumSurfaces, uint Usage, SharedResource* pSharedResource, IDXGISurface** ppSurface)
public HResult CreateSurface(SurfaceDescription* pDesc, uint NumSurfaces, Usage Usage, SharedResource* pSharedResource, IDXGISurface** ppSurface)
{
return ((delegate* unmanaged[Stdcall]<IDXGIDevice3*, SurfaceDescription*, uint, uint, SharedResource*, IDXGISurface**, int>)(lpVtbl[8]))((IDXGIDevice3*)Unsafe.AsPointer(ref this), pDesc, NumSurfaces, Usage, pSharedResource, ppSurface);
return ((delegate* unmanaged[Stdcall]<IDXGIDevice3*, SurfaceDescription*, uint, Usage, SharedResource*, IDXGISurface**, int>)(lpVtbl[8]))((IDXGIDevice3*)Unsafe.AsPointer(ref this), pDesc, NumSurfaces, Usage, pSharedResource, ppSurface);
}
/// <inheritdoc cref="IDXGIDevice.QueryResourceResidency" />

View File

@@ -117,9 +117,9 @@ public unsafe partial struct IDXGIDevice4 : INativeGuid
/// <inheritdoc cref="IDXGIDevice.CreateSurface" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult CreateSurface(SurfaceDescription* pDesc, uint NumSurfaces, uint Usage, SharedResource* pSharedResource, IDXGISurface** ppSurface)
public HResult CreateSurface(SurfaceDescription* pDesc, uint NumSurfaces, Usage Usage, SharedResource* pSharedResource, IDXGISurface** ppSurface)
{
return ((delegate* unmanaged[Stdcall]<IDXGIDevice4*, SurfaceDescription*, uint, uint, SharedResource*, IDXGISurface**, int>)(lpVtbl[8]))((IDXGIDevice4*)Unsafe.AsPointer(ref this), pDesc, NumSurfaces, Usage, pSharedResource, ppSurface);
return ((delegate* unmanaged[Stdcall]<IDXGIDevice4*, SurfaceDescription*, uint, Usage, SharedResource*, IDXGISurface**, int>)(lpVtbl[8]))((IDXGIDevice4*)Unsafe.AsPointer(ref this), pDesc, NumSurfaces, Usage, pSharedResource, ppSurface);
}
/// <inheritdoc cref="IDXGIDevice.QueryResourceResidency" />

View File

@@ -117,9 +117,9 @@ public unsafe partial struct IDXGIFactory : INativeGuid
/// <include file='../Dxgi.xml' path='doc/member[@name="IDXGIFactory::MakeWindowAssociation"]/*' />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult MakeWindowAssociation(IntPtr WindowHandle, uint Flags)
public HResult MakeWindowAssociation(IntPtr WindowHandle, WindowAssociationFlags Flags)
{
return ((delegate* unmanaged[Stdcall]<IDXGIFactory*, IntPtr, uint, int>)(lpVtbl[8]))((IDXGIFactory*)Unsafe.AsPointer(ref this), WindowHandle, Flags);
return ((delegate* unmanaged[Stdcall]<IDXGIFactory*, IntPtr, WindowAssociationFlags, int>)(lpVtbl[8]))((IDXGIFactory*)Unsafe.AsPointer(ref this), WindowHandle, Flags);
}
/// <include file='../Dxgi.xml' path='doc/member[@name="IDXGIFactory::GetWindowAssociation"]/*' />

View File

@@ -117,9 +117,9 @@ public unsafe partial struct IDXGIFactory1 : INativeGuid
/// <inheritdoc cref="IDXGIFactory.MakeWindowAssociation" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult MakeWindowAssociation(IntPtr WindowHandle, uint Flags)
public HResult MakeWindowAssociation(IntPtr WindowHandle, WindowAssociationFlags Flags)
{
return ((delegate* unmanaged[Stdcall]<IDXGIFactory1*, IntPtr, uint, int>)(lpVtbl[8]))((IDXGIFactory1*)Unsafe.AsPointer(ref this), WindowHandle, Flags);
return ((delegate* unmanaged[Stdcall]<IDXGIFactory1*, IntPtr, WindowAssociationFlags, int>)(lpVtbl[8]))((IDXGIFactory1*)Unsafe.AsPointer(ref this), WindowHandle, Flags);
}
/// <inheritdoc cref="IDXGIFactory.GetWindowAssociation" />

View File

@@ -117,9 +117,9 @@ public unsafe partial struct IDXGIFactory2 : INativeGuid
/// <inheritdoc cref="IDXGIFactory.MakeWindowAssociation" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult MakeWindowAssociation(IntPtr WindowHandle, uint Flags)
public HResult MakeWindowAssociation(IntPtr WindowHandle, WindowAssociationFlags Flags)
{
return ((delegate* unmanaged[Stdcall]<IDXGIFactory2*, IntPtr, uint, int>)(lpVtbl[8]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), WindowHandle, Flags);
return ((delegate* unmanaged[Stdcall]<IDXGIFactory2*, IntPtr, WindowAssociationFlags, int>)(lpVtbl[8]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), WindowHandle, Flags);
}
/// <inheritdoc cref="IDXGIFactory.GetWindowAssociation" />

View File

@@ -117,9 +117,9 @@ public unsafe partial struct IDXGIFactory3 : INativeGuid
/// <inheritdoc cref="IDXGIFactory.MakeWindowAssociation" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult MakeWindowAssociation(IntPtr WindowHandle, uint Flags)
public HResult MakeWindowAssociation(IntPtr WindowHandle, WindowAssociationFlags Flags)
{
return ((delegate* unmanaged[Stdcall]<IDXGIFactory3*, IntPtr, uint, int>)(lpVtbl[8]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), WindowHandle, Flags);
return ((delegate* unmanaged[Stdcall]<IDXGIFactory3*, IntPtr, WindowAssociationFlags, int>)(lpVtbl[8]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), WindowHandle, Flags);
}
/// <inheritdoc cref="IDXGIFactory.GetWindowAssociation" />

View File

@@ -117,9 +117,9 @@ public unsafe partial struct IDXGIFactory4 : INativeGuid
/// <inheritdoc cref="IDXGIFactory.MakeWindowAssociation" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult MakeWindowAssociation(IntPtr WindowHandle, uint Flags)
public HResult MakeWindowAssociation(IntPtr WindowHandle, WindowAssociationFlags Flags)
{
return ((delegate* unmanaged[Stdcall]<IDXGIFactory4*, IntPtr, uint, int>)(lpVtbl[8]))((IDXGIFactory4*)Unsafe.AsPointer(ref this), WindowHandle, Flags);
return ((delegate* unmanaged[Stdcall]<IDXGIFactory4*, IntPtr, WindowAssociationFlags, int>)(lpVtbl[8]))((IDXGIFactory4*)Unsafe.AsPointer(ref this), WindowHandle, Flags);
}
/// <inheritdoc cref="IDXGIFactory.GetWindowAssociation" />

View File

@@ -117,9 +117,9 @@ public unsafe partial struct IDXGIFactory5 : INativeGuid
/// <inheritdoc cref="IDXGIFactory.MakeWindowAssociation" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult MakeWindowAssociation(IntPtr WindowHandle, uint Flags)
public HResult MakeWindowAssociation(IntPtr WindowHandle, WindowAssociationFlags Flags)
{
return ((delegate* unmanaged[Stdcall]<IDXGIFactory5*, IntPtr, uint, int>)(lpVtbl[8]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), WindowHandle, Flags);
return ((delegate* unmanaged[Stdcall]<IDXGIFactory5*, IntPtr, WindowAssociationFlags, int>)(lpVtbl[8]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), WindowHandle, Flags);
}
/// <inheritdoc cref="IDXGIFactory.GetWindowAssociation" />

View File

@@ -117,9 +117,9 @@ public unsafe partial struct IDXGIFactory6 : INativeGuid
/// <inheritdoc cref="IDXGIFactory.MakeWindowAssociation" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult MakeWindowAssociation(IntPtr WindowHandle, uint Flags)
public HResult MakeWindowAssociation(IntPtr WindowHandle, WindowAssociationFlags Flags)
{
return ((delegate* unmanaged[Stdcall]<IDXGIFactory6*, IntPtr, uint, int>)(lpVtbl[8]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), WindowHandle, Flags);
return ((delegate* unmanaged[Stdcall]<IDXGIFactory6*, IntPtr, WindowAssociationFlags, int>)(lpVtbl[8]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), WindowHandle, Flags);
}
/// <inheritdoc cref="IDXGIFactory.GetWindowAssociation" />

View File

@@ -117,9 +117,9 @@ public unsafe partial struct IDXGIFactory7 : INativeGuid
/// <inheritdoc cref="IDXGIFactory.MakeWindowAssociation" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult MakeWindowAssociation(IntPtr WindowHandle, uint Flags)
public HResult MakeWindowAssociation(IntPtr WindowHandle, WindowAssociationFlags Flags)
{
return ((delegate* unmanaged[Stdcall]<IDXGIFactory7*, IntPtr, uint, int>)(lpVtbl[8]))((IDXGIFactory7*)Unsafe.AsPointer(ref this), WindowHandle, Flags);
return ((delegate* unmanaged[Stdcall]<IDXGIFactory7*, IntPtr, WindowAssociationFlags, int>)(lpVtbl[8]))((IDXGIFactory7*)Unsafe.AsPointer(ref this), WindowHandle, Flags);
}
/// <inheritdoc cref="IDXGIFactory.GetWindowAssociation" />

View File

@@ -117,9 +117,9 @@ public unsafe partial struct IDXGIOutput1 : INativeGuid
/// <inheritdoc cref="IDXGIOutput.GetDisplayModeList" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult GetDisplayModeList(Common.Format EnumFormat, uint Flags, uint* pNumModes, Common.ModeDescription* pDesc)
public HResult GetDisplayModeList(Common.Format EnumFormat, EnumModesFlags Flags, uint* pNumModes, Common.ModeDescription* pDesc)
{
return ((delegate* unmanaged[Stdcall]<IDXGIOutput1*, Common.Format, uint, uint*, Common.ModeDescription*, int>)(lpVtbl[8]))((IDXGIOutput1*)Unsafe.AsPointer(ref this), EnumFormat, Flags, pNumModes, pDesc);
return ((delegate* unmanaged[Stdcall]<IDXGIOutput1*, Common.Format, EnumModesFlags, uint*, Common.ModeDescription*, int>)(lpVtbl[8]))((IDXGIOutput1*)Unsafe.AsPointer(ref this), EnumFormat, Flags, pNumModes, pDesc);
}
/// <inheritdoc cref="IDXGIOutput.FindClosestMatchingMode" />

View File

@@ -117,9 +117,9 @@ public unsafe partial struct IDXGIOutput2 : INativeGuid
/// <inheritdoc cref="IDXGIOutput.GetDisplayModeList" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult GetDisplayModeList(Common.Format EnumFormat, uint Flags, uint* pNumModes, Common.ModeDescription* pDesc)
public HResult GetDisplayModeList(Common.Format EnumFormat, EnumModesFlags Flags, uint* pNumModes, Common.ModeDescription* pDesc)
{
return ((delegate* unmanaged[Stdcall]<IDXGIOutput2*, Common.Format, uint, uint*, Common.ModeDescription*, int>)(lpVtbl[8]))((IDXGIOutput2*)Unsafe.AsPointer(ref this), EnumFormat, Flags, pNumModes, pDesc);
return ((delegate* unmanaged[Stdcall]<IDXGIOutput2*, Common.Format, EnumModesFlags, uint*, Common.ModeDescription*, int>)(lpVtbl[8]))((IDXGIOutput2*)Unsafe.AsPointer(ref this), EnumFormat, Flags, pNumModes, pDesc);
}
/// <inheritdoc cref="IDXGIOutput.FindClosestMatchingMode" />

View File

@@ -117,9 +117,9 @@ public unsafe partial struct IDXGIOutput3 : INativeGuid
/// <inheritdoc cref="IDXGIOutput.GetDisplayModeList" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult GetDisplayModeList(Common.Format EnumFormat, uint Flags, uint* pNumModes, Common.ModeDescription* pDesc)
public HResult GetDisplayModeList(Common.Format EnumFormat, EnumModesFlags Flags, uint* pNumModes, Common.ModeDescription* pDesc)
{
return ((delegate* unmanaged[Stdcall]<IDXGIOutput3*, Common.Format, uint, uint*, Common.ModeDescription*, int>)(lpVtbl[8]))((IDXGIOutput3*)Unsafe.AsPointer(ref this), EnumFormat, Flags, pNumModes, pDesc);
return ((delegate* unmanaged[Stdcall]<IDXGIOutput3*, Common.Format, EnumModesFlags, uint*, Common.ModeDescription*, int>)(lpVtbl[8]))((IDXGIOutput3*)Unsafe.AsPointer(ref this), EnumFormat, Flags, pNumModes, pDesc);
}
/// <inheritdoc cref="IDXGIOutput.FindClosestMatchingMode" />

View File

@@ -117,9 +117,9 @@ public unsafe partial struct IDXGIOutput4 : INativeGuid
/// <inheritdoc cref="IDXGIOutput.GetDisplayModeList" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult GetDisplayModeList(Common.Format EnumFormat, uint Flags, uint* pNumModes, Common.ModeDescription* pDesc)
public HResult GetDisplayModeList(Common.Format EnumFormat, EnumModesFlags Flags, uint* pNumModes, Common.ModeDescription* pDesc)
{
return ((delegate* unmanaged[Stdcall]<IDXGIOutput4*, Common.Format, uint, uint*, Common.ModeDescription*, int>)(lpVtbl[8]))((IDXGIOutput4*)Unsafe.AsPointer(ref this), EnumFormat, Flags, pNumModes, pDesc);
return ((delegate* unmanaged[Stdcall]<IDXGIOutput4*, Common.Format, EnumModesFlags, uint*, Common.ModeDescription*, int>)(lpVtbl[8]))((IDXGIOutput4*)Unsafe.AsPointer(ref this), EnumFormat, Flags, pNumModes, pDesc);
}
/// <inheritdoc cref="IDXGIOutput.FindClosestMatchingMode" />

View File

@@ -117,9 +117,9 @@ public unsafe partial struct IDXGIOutput5 : INativeGuid
/// <inheritdoc cref="IDXGIOutput.GetDisplayModeList" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult GetDisplayModeList(Common.Format EnumFormat, uint Flags, uint* pNumModes, Common.ModeDescription* pDesc)
public HResult GetDisplayModeList(Common.Format EnumFormat, EnumModesFlags Flags, uint* pNumModes, Common.ModeDescription* pDesc)
{
return ((delegate* unmanaged[Stdcall]<IDXGIOutput5*, Common.Format, uint, uint*, Common.ModeDescription*, int>)(lpVtbl[8]))((IDXGIOutput5*)Unsafe.AsPointer(ref this), EnumFormat, Flags, pNumModes, pDesc);
return ((delegate* unmanaged[Stdcall]<IDXGIOutput5*, Common.Format, EnumModesFlags, uint*, Common.ModeDescription*, int>)(lpVtbl[8]))((IDXGIOutput5*)Unsafe.AsPointer(ref this), EnumFormat, Flags, pNumModes, pDesc);
}
/// <inheritdoc cref="IDXGIOutput.FindClosestMatchingMode" />

View File

@@ -117,9 +117,9 @@ public unsafe partial struct IDXGIOutput6 : INativeGuid
/// <inheritdoc cref="IDXGIOutput.GetDisplayModeList" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult GetDisplayModeList(Common.Format EnumFormat, uint Flags, uint* pNumModes, Common.ModeDescription* pDesc)
public HResult GetDisplayModeList(Common.Format EnumFormat, EnumModesFlags Flags, uint* pNumModes, Common.ModeDescription* pDesc)
{
return ((delegate* unmanaged[Stdcall]<IDXGIOutput6*, Common.Format, uint, uint*, Common.ModeDescription*, int>)(lpVtbl[8]))((IDXGIOutput6*)Unsafe.AsPointer(ref this), EnumFormat, Flags, pNumModes, pDesc);
return ((delegate* unmanaged[Stdcall]<IDXGIOutput6*, Common.Format, EnumModesFlags, uint*, Common.ModeDescription*, int>)(lpVtbl[8]))((IDXGIOutput6*)Unsafe.AsPointer(ref this), EnumFormat, Flags, pNumModes, pDesc);
}
/// <inheritdoc cref="IDXGIOutput.FindClosestMatchingMode" />