mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-08 14:39:00 +00:00
[video_core] Fix crash using RenderDoc (#4188)
This fixes a crash issue when RenderDoc is attached. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4188 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
This commit is contained in:
@@ -33,7 +33,7 @@ constexpr VkDeviceSize MAX_ALIGNMENT = 256;
|
|||||||
// Windows ones however, can intake bigger buffers and generally do not OOM.
|
// Windows ones however, can intake bigger buffers and generally do not OOM.
|
||||||
// - GTX 960 on Windows will not OOM with 256mib
|
// - GTX 960 on Windows will not OOM with 256mib
|
||||||
// - GT 1030 on ^NIX will OOM with 256mib
|
// - GT 1030 on ^NIX will OOM with 256mib
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32) || defined(__ANDROID__)
|
||||||
constexpr VkDeviceSize MAX_STREAM_BUFFER_SIZE = 256_MiB;
|
constexpr VkDeviceSize MAX_STREAM_BUFFER_SIZE = 256_MiB;
|
||||||
#else
|
#else
|
||||||
constexpr VkDeviceSize MAX_STREAM_BUFFER_SIZE = 128_MiB;
|
constexpr VkDeviceSize MAX_STREAM_BUFFER_SIZE = 128_MiB;
|
||||||
@@ -61,7 +61,7 @@ size_t GetStreamBufferSize(const Device& device) {
|
|||||||
} else {
|
} else {
|
||||||
size = MAX_STREAM_BUFFER_SIZE;
|
size = MAX_STREAM_BUFFER_SIZE;
|
||||||
}
|
}
|
||||||
return Common::AlignUp(size, MAX_ALIGNMENT);
|
return (std::min)(Common::AlignUp(size, MAX_ALIGNMENT), MAX_STREAM_BUFFER_SIZE);
|
||||||
}
|
}
|
||||||
} // Anonymous namespace
|
} // Anonymous namespace
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user