mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-22 00:53:35 +00:00
Add missing barriers around CmdFillBuffer (fixes Monster Hunter Rise flickering on NVIDIA)
This commit is contained in:
parent
80d72504d4
commit
7c32e4a3fe
2 changed files with 23 additions and 1 deletions
|
@ -140,7 +140,29 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
var dst = Gd.BufferManager.GetBuffer(CommandBuffer, destination, true).Get(Cbs, offset, size).Value;
|
||||
|
||||
BufferHolder.InsertBufferBarrier(
|
||||
Gd,
|
||||
Cbs.CommandBuffer,
|
||||
dst,
|
||||
BufferHolder.DefaultAccessFlags,
|
||||
AccessFlags.AccessTransferWriteBit,
|
||||
PipelineStageFlags.PipelineStageAllCommandsBit,
|
||||
PipelineStageFlags.PipelineStageTransferBit,
|
||||
offset,
|
||||
size);
|
||||
|
||||
Gd.Api.CmdFillBuffer(CommandBuffer, dst, (ulong)offset, (ulong)size, value);
|
||||
|
||||
BufferHolder.InsertBufferBarrier(
|
||||
Gd,
|
||||
Cbs.CommandBuffer,
|
||||
dst,
|
||||
AccessFlags.AccessTransferWriteBit,
|
||||
BufferHolder.DefaultAccessFlags,
|
||||
PipelineStageFlags.PipelineStageTransferBit,
|
||||
PipelineStageFlags.PipelineStageAllCommandsBit,
|
||||
offset,
|
||||
size);
|
||||
}
|
||||
|
||||
public unsafe void ClearRenderTargetColor(int index, ColorF color)
|
||||
|
|
|
@ -192,7 +192,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
if (componentMask != 0xf)
|
||||
{
|
||||
// We can't use CmdClearAttachments if the clear has a custom scissor or is not writing all components,
|
||||
// We can't use CmdClearAttachments if not writing all components,
|
||||
// because on Vulkan, the pipeline state does not affect clears.
|
||||
var dstTexture = FramebufferParams.GetAttachment(index);
|
||||
if (dstTexture == null)
|
||||
|
|
Loading…
Reference in a new issue