kenji-nx/src/Ryujinx.Graphics.GAL/Multithreading/Commands/ImageArray/ImageArraySetFormatsCommand.cs
KeatonTheBot 02a5f75fab Revert PRs 7226(1.1.1385), 7311(1.1.1392), and 7312 (1.1.1396).
* "Vulkan: Feedback loop detection and barriers (#7226)"

* "Change image format view handling to allow view incompatible formats (#7311)"

* "Add support for sampler sRGB disable (#7312)"

* These changes prevent slowdowns in several areas in Paper Mario: The Thousand Year Door, possibly other games.
2024-10-22 18:12:51 -05:00

26 lines
1 KiB
C#

using Ryujinx.Graphics.GAL.Multithreading.Model;
using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.ImageArray
{
struct ImageArraySetFormatsCommand : IGALCommand, IGALCommand<ImageArraySetFormatsCommand>
{
public readonly CommandType CommandType => CommandType.ImageArraySetFormats;
private TableRef<ThreadedImageArray> _imageArray;
private int _index;
private TableRef<Format[]> _imageFormats;
public void Set(TableRef<ThreadedImageArray> imageArray, int index, TableRef<Format[]> imageFormats)
{
_imageArray = imageArray;
_index = index;
_imageFormats = imageFormats;
}
public static void Run(ref ImageArraySetFormatsCommand command, ThreadedRenderer threaded, IRenderer renderer)
{
ThreadedImageArray imageArray = command._imageArray.Get(threaded);
imageArray.Base.SetFormats(command._index, command._imageFormats.Get(threaded));
}
}
}