mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-21 16:43:35 +00:00
Increase light command buffer pool to 2 command buffers, throw rather than returning invalid cbs
This commit is contained in:
parent
cd3ad0a6ab
commit
3b9bf0666f
1 changed files with 4 additions and 3 deletions
|
@ -77,7 +77,8 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
api.CreateCommandPool(device, commandPoolCreateInfo, null, out _pool).ThrowOnError();
|
api.CreateCommandPool(device, commandPoolCreateInfo, null, out _pool).ThrowOnError();
|
||||||
|
|
||||||
_totalCommandBuffers = isLight ? 1 : MaxCommandBuffers;
|
// We need at least 2 command buffers to get texture data in some cases.
|
||||||
|
_totalCommandBuffers = isLight ? 2 : MaxCommandBuffers;
|
||||||
_totalCommandBuffersMask = _totalCommandBuffers - 1;
|
_totalCommandBuffersMask = _totalCommandBuffers - 1;
|
||||||
|
|
||||||
_commandBuffers = new ReservedCommandBuffer[_totalCommandBuffers];
|
_commandBuffers = new ReservedCommandBuffer[_totalCommandBuffers];
|
||||||
|
@ -236,9 +237,9 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
cursor = (cursor + 1) & _totalCommandBuffersMask;
|
cursor = (cursor + 1) & _totalCommandBuffersMask;
|
||||||
}
|
}
|
||||||
|
|
||||||
return default;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
throw new InvalidOperationException($"Out of command buffers (In use: {_inUseCount}, queued: {_queuedCount}, total: {_totalCommandBuffers})");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Return(CommandBufferScoped cbs)
|
public void Return(CommandBufferScoped cbs)
|
||||||
|
|
Loading…
Reference in a new issue