mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-21 00:23:36 +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();
|
||||
|
||||
_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;
|
||||
|
||||
_commandBuffers = new ReservedCommandBuffer[_totalCommandBuffers];
|
||||
|
@ -236,9 +237,9 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue