|
@@ -80,6 +80,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|
|
|
|
|
|
|
private PipelineColorBlendAttachmentState[] _storedBlend;
|
|
private PipelineColorBlendAttachmentState[] _storedBlend;
|
|
|
|
|
|
|
|
|
|
+ private ulong _drawCountSinceBarrier;
|
|
|
public ulong DrawCount { get; private set; }
|
|
public ulong DrawCount { get; private set; }
|
|
|
public bool RenderPassActive { get; private set; }
|
|
public bool RenderPassActive { get; private set; }
|
|
|
|
|
|
|
@@ -133,6 +134,18 @@ namespace Ryujinx.Graphics.Vulkan
|
|
|
|
|
|
|
|
public unsafe void Barrier()
|
|
public unsafe void Barrier()
|
|
|
{
|
|
{
|
|
|
|
|
+ if (_drawCountSinceBarrier != DrawCount)
|
|
|
|
|
+ {
|
|
|
|
|
+ _drawCountSinceBarrier = DrawCount;
|
|
|
|
|
+
|
|
|
|
|
+ // Barriers apparently have no effect inside a render pass on MoltenVK.
|
|
|
|
|
+ // As a workaround, end the render pass.
|
|
|
|
|
+ if (Gd.IsMoltenVk)
|
|
|
|
|
+ {
|
|
|
|
|
+ EndRenderPass();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
MemoryBarrier memoryBarrier = new MemoryBarrier()
|
|
MemoryBarrier memoryBarrier = new MemoryBarrier()
|
|
|
{
|
|
{
|
|
|
SType = StructureType.MemoryBarrier,
|
|
SType = StructureType.MemoryBarrier,
|