using Ryujinx.Graphics.GAL.Multithreading.Commands.ImageArray;
using Ryujinx.Graphics.GAL.Multithreading.Model;
namespace Ryujinx.Graphics.GAL.Multithreading.Resources
{
///
/// Threaded representation of a image array.
///
class ThreadedImageArray : IImageArray
{
private readonly ThreadedRenderer _renderer;
public IImageArray Base;
public ThreadedImageArray(ThreadedRenderer renderer)
{
_renderer = renderer;
}
private TableRef Ref(T reference)
{
return new TableRef(_renderer, reference);
}
public void SetFormats(int index, Format[] imageFormats)
{
_renderer.New().Set(Ref(this), index, Ref(imageFormats));
_renderer.QueueCommand();
}
public void SetImages(int index, ITexture[] images)
{
_renderer.New().Set(Ref(this), index, Ref(images));
_renderer.QueueCommand();
}
}
}