mirror of
https://git.zaroz.cloud/nintendo-back-up/Ryujinx.git
synced 2025-06-06 19:25:26 +00:00

* WIP barrier batch * Add store op to image usage barrier * Dispose the barrier batch * Fix encoding? * Handle read and write on the load op barrier. Load op consumes read accesses but does not add one, as the only other operation that can read is another load. * Simplify null check * Insert barriers on program change in case stale bindings are reintroduced * Not sure how I messed this one up * Improve location of bindings barrier update This is also important for emergency deferred clear * Update src/Ryujinx.Graphics.Vulkan/BarrierBatch.cs Co-authored-by: Mary Guillemard <thog@protonmail.com> --------- Co-authored-by: Mary Guillemard <thog@protonmail.com>
29 lines
1.0 KiB
C#
29 lines
1.0 KiB
C#
using Ryujinx.Graphics.GAL.Multithreading.Model;
|
|
using Ryujinx.Graphics.GAL.Multithreading.Resources;
|
|
using Ryujinx.Graphics.Shader;
|
|
|
|
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
|
|
{
|
|
struct SetImageCommand : IGALCommand, IGALCommand<SetImageCommand>
|
|
{
|
|
public readonly CommandType CommandType => CommandType.SetImage;
|
|
private ShaderStage _stage;
|
|
private int _binding;
|
|
private TableRef<ITexture> _texture;
|
|
private Format _imageFormat;
|
|
|
|
public void Set(ShaderStage stage, int binding, TableRef<ITexture> texture, Format imageFormat)
|
|
{
|
|
_stage = stage;
|
|
_binding = binding;
|
|
_texture = texture;
|
|
_imageFormat = imageFormat;
|
|
}
|
|
|
|
public static void Run(ref SetImageCommand command, ThreadedRenderer threaded, IRenderer renderer)
|
|
{
|
|
renderer.Pipeline.SetImage(command._stage, command._binding, command._texture.GetAs<ThreadedTexture>(threaded)?.Base, command._imageFormat);
|
|
}
|
|
}
|
|
}
|