mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-10 10:01:44 +00:00
Vulkan: Fix buffer texture storage not being updated on buffer handle reuse (#3731)
This commit is contained in:
parent
7539e26144
commit
5437d6cb13
2 changed files with 9 additions and 1 deletions
|
@ -38,6 +38,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
private readonly IdList<BufferHolder> _buffers;
|
||||
|
||||
public int BufferCount { get; private set; }
|
||||
|
||||
public StagingBuffer StagingBuffer { get; }
|
||||
|
||||
public BufferManager(VulkanRenderer gd, PhysicalDevice physicalDevice, Device device)
|
||||
|
@ -56,6 +58,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
return BufferHandle.Null;
|
||||
}
|
||||
|
||||
BufferCount++;
|
||||
|
||||
ulong handle64 = (uint)_buffers.Add(holder);
|
||||
|
||||
return Unsafe.As<ulong, BufferHandle>(ref handle64);
|
||||
|
|
|
@ -16,6 +16,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
private Auto<DisposableBufferView> _bufferView;
|
||||
private Dictionary<GAL.Format, Auto<DisposableBufferView>> _selfManagedViews;
|
||||
|
||||
private int _bufferCount;
|
||||
|
||||
public int Width { get; }
|
||||
public int Height { get; }
|
||||
|
||||
|
@ -107,7 +109,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
{
|
||||
if (_bufferHandle == buffer.Handle &&
|
||||
_offset == buffer.Offset &&
|
||||
_size == buffer.Size)
|
||||
_size == buffer.Size &&
|
||||
_bufferCount == _gd.BufferManager.BufferCount)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -115,6 +118,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
_bufferHandle = buffer.Handle;
|
||||
_offset = buffer.Offset;
|
||||
_size = buffer.Size;
|
||||
_bufferCount = _gd.BufferManager.BufferCount;
|
||||
|
||||
ReleaseImpl();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue