aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Vulkan/PipelineBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Vulkan/PipelineBase.cs')
-rw-r--r--Ryujinx.Graphics.Vulkan/PipelineBase.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Vulkan/PipelineBase.cs b/Ryujinx.Graphics.Vulkan/PipelineBase.cs
index f779305d..583bb953 100644
--- a/Ryujinx.Graphics.Vulkan/PipelineBase.cs
+++ b/Ryujinx.Graphics.Vulkan/PipelineBase.cs
@@ -150,6 +150,28 @@ namespace Ryujinx.Graphics.Vulkan
null);
}
+ public void ComputeBarrier()
+ {
+ MemoryBarrier memoryBarrier = new MemoryBarrier()
+ {
+ SType = StructureType.MemoryBarrier,
+ SrcAccessMask = AccessFlags.MemoryReadBit | AccessFlags.MemoryWriteBit,
+ DstAccessMask = AccessFlags.MemoryReadBit | AccessFlags.MemoryWriteBit
+ };
+
+ Gd.Api.CmdPipelineBarrier(
+ CommandBuffer,
+ PipelineStageFlags.ComputeShaderBit,
+ PipelineStageFlags.AllCommandsBit,
+ 0,
+ 1,
+ new ReadOnlySpan<MemoryBarrier>(memoryBarrier),
+ 0,
+ ReadOnlySpan<BufferMemoryBarrier>.Empty,
+ 0,
+ ReadOnlySpan<ImageMemoryBarrier>.Empty);
+ }
+
public void BeginTransformFeedback(GAL.PrimitiveTopology topology)
{
_tfEnabled = true;
@@ -803,6 +825,11 @@ namespace Ryujinx.Graphics.Vulkan
_descriptorSetUpdater.SetImage(binding, image, imageFormat);
}
+ public void SetImage(int binding, Auto<DisposableImageView> image)
+ {
+ _descriptorSetUpdater.SetImage(binding, image);
+ }
+
public void SetIndexBuffer(BufferRange buffer, GAL.IndexType type)
{
if (buffer.Handle != BufferHandle.Null)