// ------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

namespace Win32.Graphics.Direct3D12;

/// <include file='../Direct3D12.xml' path='doc/member[@name="ID3D12DeviceConfiguration"]/*' />
/// <unmanaged>ID3D12DeviceConfiguration</unmanaged>
[Guid("78dbf87b-f766-422b-a61c-c8c446bdb9ad")]
[NativeTypeName("struct ID3D12DeviceConfiguration : IUnknown")]
[NativeInheritance("IUnknown")]
public unsafe partial struct ID3D12DeviceConfiguration : ID3D12DeviceConfiguration.Interface, INativeGuid
{
	public static ref readonly Guid IID_ID3D12DeviceConfiguration
	{
		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		get
		{
			ReadOnlySpan<byte> data = new byte[] {
				0x7B, 0xF8, 0xDB, 0x78,
				0x66, 0xF7,
				0x2B, 0x42,
				0xA6,
				0x1C,
				0xC8,
				0xC4,
				0x46,
				0xBD,
				0xB9,
				0xAD
			};

			Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
			return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
		}
	}

#if NET6_0_OR_GREATER
	static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_ID3D12DeviceConfiguration));
#else
	public static Guid* NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_ID3D12DeviceConfiguration));
#endif

	public void** lpVtbl;

	/// <inheritdoc cref="IUnknown.QueryInterface" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(0)]
	public HResult QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject)
	{
#if NET6_0_OR_GREATER
		return ((delegate* unmanaged<ID3D12DeviceConfiguration*, Guid*, void**, int>)(lpVtbl[0]))((ID3D12DeviceConfiguration*)Unsafe.AsPointer(ref this), riid, ppvObject);
#else
		return ((delegate* unmanaged[Stdcall]<ID3D12DeviceConfiguration*, Guid*, void**, int>)(lpVtbl[0]))((ID3D12DeviceConfiguration*)Unsafe.AsPointer(ref this), riid, ppvObject);
#endif
	}

	/// <inheritdoc cref="IUnknown.AddRef" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(1)]
	[return: NativeTypeName("ULONG")]
	public uint AddRef()
	{
#if NET6_0_OR_GREATER
		return ((delegate* unmanaged<ID3D12DeviceConfiguration*, uint>)(lpVtbl[1]))((ID3D12DeviceConfiguration*)Unsafe.AsPointer(ref this));
#else
		return ((delegate* unmanaged[Stdcall]<ID3D12DeviceConfiguration*, uint>)(lpVtbl[1]))((ID3D12DeviceConfiguration*)Unsafe.AsPointer(ref this));
#endif
	}

	/// <inheritdoc cref="IUnknown.Release" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(2)]
	[return: NativeTypeName("ULONG")]
	public uint Release()
	{
#if NET6_0_OR_GREATER
		return ((delegate* unmanaged<ID3D12DeviceConfiguration*, uint>)(lpVtbl[2]))((ID3D12DeviceConfiguration*)Unsafe.AsPointer(ref this));
#else
		return ((delegate* unmanaged[Stdcall]<ID3D12DeviceConfiguration*, uint>)(lpVtbl[2]))((ID3D12DeviceConfiguration*)Unsafe.AsPointer(ref this));
#endif
	}

	/// <include file='../Direct3D12.xml' path='doc/member[@name="ID3D12DeviceConfiguration::GetDesc"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(3)]
	public DeviceConfigurationDescription GetDesc()
	{
		DeviceConfigurationDescription result;
#if NET6_0_OR_GREATER
		return *((delegate* unmanaged<ID3D12DeviceConfiguration*, DeviceConfigurationDescription*, DeviceConfigurationDescription*>)(lpVtbl[3]))((ID3D12DeviceConfiguration*)Unsafe.AsPointer(ref this), &result);
#else
		return *((delegate* unmanaged[Stdcall]<ID3D12DeviceConfiguration*, DeviceConfigurationDescription*, DeviceConfigurationDescription*>)(lpVtbl[3]))((ID3D12DeviceConfiguration*)Unsafe.AsPointer(ref this), &result);
#endif
	}

	/// <include file='../Direct3D12.xml' path='doc/member[@name="ID3D12DeviceConfiguration::GetEnabledExperimentalFeatures"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(4)]
	public HResult GetEnabledExperimentalFeatures(Guid* pGuids, uint NumGuids)
	{
#if NET6_0_OR_GREATER
		return ((delegate* unmanaged<ID3D12DeviceConfiguration*, Guid*, uint, int>)(lpVtbl[4]))((ID3D12DeviceConfiguration*)Unsafe.AsPointer(ref this), pGuids, NumGuids);
#else
		return ((delegate* unmanaged[Stdcall]<ID3D12DeviceConfiguration*, Guid*, uint, int>)(lpVtbl[4]))((ID3D12DeviceConfiguration*)Unsafe.AsPointer(ref this), pGuids, NumGuids);
#endif
	}

	/// <include file='../Direct3D12.xml' path='doc/member[@name="ID3D12DeviceConfiguration::SerializeVersionedRootSignature"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(5)]
	public HResult SerializeVersionedRootSignature(VersionedRootSignatureDescription* pDesc, Graphics.Direct3D.ID3DBlob** ppResult, Graphics.Direct3D.ID3DBlob** ppError)
	{
#if NET6_0_OR_GREATER
		return ((delegate* unmanaged<ID3D12DeviceConfiguration*, VersionedRootSignatureDescription*, Graphics.Direct3D.ID3DBlob**, Graphics.Direct3D.ID3DBlob**, int>)(lpVtbl[5]))((ID3D12DeviceConfiguration*)Unsafe.AsPointer(ref this), pDesc, ppResult, ppError);
#else
		return ((delegate* unmanaged[Stdcall]<ID3D12DeviceConfiguration*, VersionedRootSignatureDescription*, Graphics.Direct3D.ID3DBlob**, Graphics.Direct3D.ID3DBlob**, int>)(lpVtbl[5]))((ID3D12DeviceConfiguration*)Unsafe.AsPointer(ref this), pDesc, ppResult, ppError);
#endif
	}

	/// <include file='../Direct3D12.xml' path='doc/member[@name="ID3D12DeviceConfiguration::CreateVersionedRootSignatureDeserializer"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(6)]
	public HResult CreateVersionedRootSignatureDeserializer(void* pBlob, nuint Size, Guid* riid, void** ppvDeserializer)
	{
#if NET6_0_OR_GREATER
		return ((delegate* unmanaged<ID3D12DeviceConfiguration*, void*, nuint, Guid*, void**, int>)(lpVtbl[6]))((ID3D12DeviceConfiguration*)Unsafe.AsPointer(ref this), pBlob, Size, riid, ppvDeserializer);
#else
		return ((delegate* unmanaged[Stdcall]<ID3D12DeviceConfiguration*, void*, nuint, Guid*, void**, int>)(lpVtbl[6]))((ID3D12DeviceConfiguration*)Unsafe.AsPointer(ref this), pBlob, Size, riid, ppvDeserializer);
#endif
	}

	public interface Interface : IUnknown.Interface
	{
		[VtblIndex(3)]
		DeviceConfigurationDescription GetDesc();

		[VtblIndex(4)]
		HResult GetEnabledExperimentalFeatures(Guid* pGuids, uint NumGuids);

		[VtblIndex(5)]
		HResult SerializeVersionedRootSignature(VersionedRootSignatureDescription* pDesc, Graphics.Direct3D.ID3DBlob** ppResult, Graphics.Direct3D.ID3DBlob** ppError);

		[VtblIndex(6)]
		HResult CreateVersionedRootSignatureDeserializer(void* pBlob, nuint Size, Guid* riid, void** ppvDeserializer);
	}
}

