// ------------------------------------------------------------------------------
// <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="ID3D12ShaderReflectionVariable"]/*' />
/// <unmanaged>ID3D12ShaderReflectionVariable</unmanaged>
[Guid("8337a8a6-a216-444a-b2f4-314733a73aea")]
public unsafe partial struct ID3D12ShaderReflectionVariable : ID3D12ShaderReflectionVariable.Interface, INativeGuid
{
	public static ref readonly Guid IID_ID3D12ShaderReflectionVariable
	{
		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		get
		{
			ReadOnlySpan<byte> data = new byte[] {
				0xA6, 0xA8, 0x37, 0x83,
				0x16, 0xA2,
				0x4A, 0x44,
				0xB2,
				0xF4,
				0x31,
				0x47,
				0x33,
				0xA7,
				0x3A,
				0xEA
			};

			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_ID3D12ShaderReflectionVariable));
#else
	public static Guid* NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_ID3D12ShaderReflectionVariable));
#endif

	public void** lpVtbl;

	/// <include file='../Direct3D12.xml' path='doc/member[@name="ID3D12ShaderReflectionVariable::GetDesc"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(0)]
	public HResult GetDesc(ShaderVariableDescription* pDesc)
	{
		return ((delegate* unmanaged[Stdcall]<ID3D12ShaderReflectionVariable*, ShaderVariableDescription*, int>)(lpVtbl[0]))((ID3D12ShaderReflectionVariable*)Unsafe.AsPointer(ref this), pDesc);
	}

	/// <include file='../Direct3D12.xml' path='doc/member[@name="ID3D12ShaderReflectionVariable::GetType"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(1)]
	public new ID3D12ShaderReflectionType GetType()
	{
		return ((delegate* unmanaged[Stdcall]<ID3D12ShaderReflectionVariable*, ID3D12ShaderReflectionType>)(lpVtbl[1]))((ID3D12ShaderReflectionVariable*)Unsafe.AsPointer(ref this));
	}

	/// <include file='../Direct3D12.xml' path='doc/member[@name="ID3D12ShaderReflectionVariable::GetBuffer"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(2)]
	public ID3D12ShaderReflectionConstantBuffer GetBuffer()
	{
		return ((delegate* unmanaged[Stdcall]<ID3D12ShaderReflectionVariable*, ID3D12ShaderReflectionConstantBuffer>)(lpVtbl[2]))((ID3D12ShaderReflectionVariable*)Unsafe.AsPointer(ref this));
	}

	/// <include file='../Direct3D12.xml' path='doc/member[@name="ID3D12ShaderReflectionVariable::GetInterfaceSlot"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(3)]
	public uint GetInterfaceSlot(uint uArrayIndex)
	{
		return ((delegate* unmanaged[Stdcall]<ID3D12ShaderReflectionVariable*, uint, uint>)(lpVtbl[3]))((ID3D12ShaderReflectionVariable*)Unsafe.AsPointer(ref this), uArrayIndex);
	}
	public interface Interface 
	{
		[VtblIndex(0)]
		HResult GetDesc(ShaderVariableDescription* pDesc);

		[VtblIndex(1)]
		ID3D12ShaderReflectionType GetType();

		[VtblIndex(2)]
		ID3D12ShaderReflectionConstantBuffer GetBuffer();

		[VtblIndex(3)]
		uint GetInterfaceSlot(uint uArrayIndex);
	}
}

