mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-28 22:23:23 +01:00
Workaround for MoltenVK barrier issues (#5118)
This commit is contained in:
parent
597388ecda
commit
96d1f0da2d
1 changed files with 13 additions and 0 deletions
|
@ -80,6 +80,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
private PipelineColorBlendAttachmentState[] _storedBlend;
|
||||
|
||||
private ulong _drawCountSinceBarrier;
|
||||
public ulong DrawCount { get; private set; }
|
||||
public bool RenderPassActive { get; private set; }
|
||||
|
||||
|
@ -133,6 +134,18 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
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()
|
||||
{
|
||||
SType = StructureType.MemoryBarrier,
|
||||
|
|
Loading…
Reference in a new issue