mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-06-23 03:19:27 -04:00
[vk] Prevent OOM due to increased staging buffer on *nix (#4116)
*nix drivers for NVIDIA doesn't seem to like the increased size. Windows is fine with it however. Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4116 Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
parent
39be450fa3
commit
f8facda35f
1 changed files with 9 additions and 0 deletions
|
|
@ -27,8 +27,17 @@ using namespace Common::Literals;
|
|||
|
||||
// Maximum potential alignment of a Vulkan buffer
|
||||
constexpr VkDeviceSize MAX_ALIGNMENT = 256;
|
||||
|
||||
// Stream buffer size in bytes
|
||||
// *NIX drivers are more sensitive to increased buffers for streaming.
|
||||
// Windows ones however, can intake bigger buffers and generally do not OOM.
|
||||
// - GTX 960 on Windows will not OOM with 256mib
|
||||
// - GT 1030 on ^NIX will OOM with 256mib
|
||||
#ifdef _WIN32
|
||||
constexpr VkDeviceSize MAX_STREAM_BUFFER_SIZE = 256_MiB;
|
||||
#else
|
||||
constexpr VkDeviceSize MAX_STREAM_BUFFER_SIZE = 128_MiB;
|
||||
#endif
|
||||
|
||||
size_t GetStreamBufferSize(const Device& device) {
|
||||
if (!device.HasDebuggingToolAttached()) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue