// ------------------------------------------------------------------------------
// <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="D3D12_CLEAR_VALUE"]/*' />
/// <unmanaged>D3D12_CLEAR_VALUE</unmanaged>
public partial struct ClearValue
{
	/// <include file='../Direct3D12.xml' path='doc/member[@name="D3D12_CLEAR_VALUE::Format"]/*' />
	public Graphics.Dxgi.Common.Format Format;

	/// <include file='../Direct3D12.xml' path='doc/member[@name="D3D12_CLEAR_VALUE::Anonymous"]/*' />
	public _Anonymous_e__Union Anonymous;

	[UnscopedRef]
	public unsafe Span<float> Color
	{
		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		get
		{
			return MemoryMarshal.CreateSpan(ref Anonymous.Color[0], 4);
		}
	}

	[UnscopedRef]
	public ref DepthStencilValue DepthStencil
	{
		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		get
		{
			return ref Anonymous.DepthStencil;
		}
	}

	[StructLayout(LayoutKind.Explicit)]
	public partial struct _Anonymous_e__Union
	{
		/// <include file='../Direct3D12.xml' path='doc/member[@name="_Anonymous_e__Union::Color"]/*' />
		[FieldOffset(0)]
		public unsafe fixed float Color[4];

		/// <include file='../Direct3D12.xml' path='doc/member[@name="_Anonymous_e__Union::DepthStencil"]/*' />
		[FieldOffset(0)]
		public DepthStencilValue DepthStencil;
	}
}
