using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using Windows.Graphics.Effects;
#if WINDOWS_UWP
namespace ComputeSharp.D2D1.Uwp.Buffers;
#else
namespace ComputeSharp.D2D1.WinUI.Buffers;
#endif
///
/// A fixed buffer type containing 16 fields.
///
internal struct GraphicsEffectSourceBuffer
{
///
/// The instance at index 0.
///
public SourceReference Source0;
///
/// The instance at index 1.
///
public SourceReference Source1;
///
/// The instance at index 2.
///
public SourceReference Source2;
///
/// The instance at index 3.
///
public SourceReference Source3;
///
/// The instance at index 4.
///
public SourceReference Source4;
///
/// The instance at index 5.
///
public SourceReference Source5;
///
/// The instance at index 6.
///
public SourceReference Source6;
///
/// The instance at index 7.
///
public SourceReference Source7;
///
/// The instance at index 8.
///
public SourceReference Source8;
///
/// The instance at index 9.
///
public SourceReference Source9;
///
/// The instance at index 10.
///
public SourceReference Source10;
///
/// The instance at index 11.
///
public SourceReference Source11;
///
/// The instance at index 12.
///
public SourceReference Source12;
///
/// The instance at index 13.
///
public SourceReference Source13;
///
/// The instance at index 14.
///
public SourceReference Source14;
///
/// The instance at index 15.
///
public SourceReference Source15;
///
/// Gets a reference to the value at a given index.
///
/// The index of the value to get a reference to.
/// A reference to the value at a given index.
/// Thrown if is not a valid index for the current effect.
[UnscopedRef]
public ref SourceReference this[int index]
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
default(ArgumentOutOfRangeException).ThrowIfNotInRange(index, 0, 16);
ref SourceReference r0 = ref Unsafe.As(ref this);
ref SourceReference r1 = ref Unsafe.Add(ref r0, index);
return ref r1;
}
}
}