aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Vulkan/FramebufferParams.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Vulkan/FramebufferParams.cs')
-rw-r--r--Ryujinx.Graphics.Vulkan/FramebufferParams.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Vulkan/FramebufferParams.cs b/Ryujinx.Graphics.Vulkan/FramebufferParams.cs
index 0a1cdcce..658468d1 100644
--- a/Ryujinx.Graphics.Vulkan/FramebufferParams.cs
+++ b/Ryujinx.Graphics.Vulkan/FramebufferParams.cs
@@ -218,5 +218,23 @@ namespace Ryujinx.Graphics.Vulkan
AccessFlags.DepthStencilAttachmentWriteBit,
PipelineStageFlags.ColorAttachmentOutputBit);
}
+
+ public void InsertClearBarrier(CommandBufferScoped cbs, int index)
+ {
+ if (_colors != null)
+ {
+ int realIndex = Array.IndexOf(AttachmentIndices, index);
+
+ if (realIndex != -1)
+ {
+ _colors[realIndex].Storage?.InsertReadToWriteBarrier(cbs, AccessFlags.ColorAttachmentWriteBit, PipelineStageFlags.ColorAttachmentOutputBit);
+ }
+ }
+ }
+
+ public void InsertClearBarrierDS(CommandBufferScoped cbs)
+ {
+ _depthStencil?.Storage?.InsertReadToWriteBarrier(cbs, AccessFlags.DepthStencilAttachmentWriteBit, PipelineStageFlags.EarlyFragmentTestsBit);
+ }
}
}