mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-22 09:03:36 +00:00
Cleanup, disable device local buffers for now.
This commit is contained in:
parent
4994e50d1c
commit
dc0d0f49b1
6 changed files with 9 additions and 18 deletions
|
@ -180,8 +180,9 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
if (_map != IntPtr.Zero)
|
if (_map != IntPtr.Zero)
|
||||||
{
|
{
|
||||||
// If persistently mapped, set the data directly if the buffer is not currently in use.
|
// If persistently mapped, set the data directly if the buffer is not currently in use.
|
||||||
//bool needsFlush = _gd.CommandBufferPool.HasWaitableOnRentedCommandBuffer(_waitable, offset, dataSize);
|
// TODO: Reintroduce waitable & granular use tracking.
|
||||||
bool needsFlush = _buffer.HasRentedCommandBufferDependency(_gd.CommandBufferPool);// (_waitable, offset, dataSize);
|
// bool needsFlush = _gd.CommandBufferPool.HasWaitableOnRentedCommandBuffer(_waitable, offset, dataSize);
|
||||||
|
bool needsFlush = _buffer.HasRentedCommandBufferDependency(_gd.CommandBufferPool);
|
||||||
|
|
||||||
if (!needsFlush)
|
if (!needsFlush)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,8 +19,6 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
private readonly CommandPool _pool;
|
private readonly CommandPool _pool;
|
||||||
private readonly Thread _owner;
|
private readonly Thread _owner;
|
||||||
|
|
||||||
public int PerFrame = 0;
|
|
||||||
|
|
||||||
public bool OwnedByCurrentThread => _owner == Thread.CurrentThread;
|
public bool OwnedByCurrentThread => _owner == Thread.CurrentThread;
|
||||||
|
|
||||||
private struct ReservedCommandBuffer
|
private struct ReservedCommandBuffer
|
||||||
|
@ -125,12 +123,6 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
entry.Waitables.Add(waitable);
|
entry.Waitables.Add(waitable);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool HasWaitable(int cbIndex, MultiFenceHolder waitable)
|
|
||||||
{
|
|
||||||
ref var entry = ref _commandBuffers[cbIndex];
|
|
||||||
return entry.Waitables.Contains(waitable);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool HasWaitableOnRentedCommandBuffer(MultiFenceHolder waitable, int offset, int size)
|
public bool HasWaitableOnRentedCommandBuffer(MultiFenceHolder waitable, int offset, int size)
|
||||||
{
|
{
|
||||||
lock (_commandBuffers)
|
lock (_commandBuffers)
|
||||||
|
@ -200,7 +192,6 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
public CommandBufferScoped Rent()
|
public CommandBufferScoped Rent()
|
||||||
{
|
{
|
||||||
PerFrame++;
|
|
||||||
lock (_commandBuffers)
|
lock (_commandBuffers)
|
||||||
{
|
{
|
||||||
CheckConsumption(_cursor);
|
CheckConsumption(_cursor);
|
||||||
|
|
|
@ -31,11 +31,6 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
_pool.AddDependency(CommandBufferIndex, dependencyCbs);
|
_pool.AddDependency(CommandBufferIndex, dependencyCbs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool HasWaitable(MultiFenceHolder waitable)
|
|
||||||
{
|
|
||||||
return _pool.HasWaitable(CommandBufferIndex, waitable);
|
|
||||||
}
|
|
||||||
|
|
||||||
public FenceHolder GetFence()
|
public FenceHolder GetFence()
|
||||||
{
|
{
|
||||||
return _pool.GetFence(CommandBufferIndex);
|
return _pool.GetFence(CommandBufferIndex);
|
||||||
|
|
|
@ -82,6 +82,11 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
{
|
{
|
||||||
scoped.Dispose();
|
scoped.Dispose();
|
||||||
}
|
}
|
||||||
|
else if (_gd.IsIntelWindows)
|
||||||
|
{
|
||||||
|
// Not flushing commands here causes glitches on Intel (driver bug?)
|
||||||
|
_gd.FlushAllCommands();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PushDataImpl(CommandBufferScoped cbs, BufferHolder dst, int dstOffset, ReadOnlySpan<byte> data)
|
private void PushDataImpl(CommandBufferScoped cbs, BufferHolder dst, int dstOffset, ReadOnlySpan<byte> data)
|
||||||
|
|
|
@ -746,7 +746,6 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
if (loadInline)
|
if (loadInline)
|
||||||
{
|
{
|
||||||
_gd.PipelineInternal.EndRenderPass();
|
_gd.PipelineInternal.EndRenderPass();
|
||||||
Common.Logging.Logger.Error?.PrintMsg(Common.Logging.LogClass.Gpu, "Loaded inline!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CopyDataToBuffer(bufferHolder.GetDataStorage(0, bufferDataLength), data);
|
CopyDataToBuffer(bufferHolder.GetDataStorage(0, bufferDataLength), data);
|
||||||
|
|
|
@ -197,7 +197,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
public BufferHandle CreateBuffer(int size)
|
public BufferHandle CreateBuffer(int size)
|
||||||
{
|
{
|
||||||
return BufferManager.CreateWithHandle(this, size, true);
|
return BufferManager.CreateWithHandle(this, size, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IProgram CreateProgram(IShader[] shaders, ShaderInfo info)
|
public IProgram CreateProgram(IShader[] shaders, ShaderInfo info)
|
||||||
|
|
Loading…
Reference in a new issue