diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2022-12-23 04:52:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-23 04:52:49 +0100 |
| commit | ce92350140ed4bf918147695a894f609e95452e9 (patch) | |
| tree | 9d91a09c292e7b80a6fab71589032eb0af4cbd98 /Source/Core/VideoBackends/Vulkan/VKVertexManager.cpp | |
| parent | 5b63f9aa5ee113c953175c462abfffb41217695d (diff) | |
| parent | 14179f7565b0f7d430aaa9c4ed2d0b5438c30d80 (diff) | |
Merge pull request #11366 from Minty-Meeo/old-ndk-bug
Follow-up on a four-year-old Android NDK workaround
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/VKVertexManager.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/VKVertexManager.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/VKVertexManager.cpp b/Source/Core/VideoBackends/Vulkan/VKVertexManager.cpp index 146eb2921e..be9e22d4d5 100644 --- a/Source/Core/VideoBackends/Vulkan/VKVertexManager.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKVertexManager.cpp @@ -3,6 +3,8 @@ #include "VideoBackends/Vulkan/VKVertexManager.h" +#include <algorithm> + #include "Common/Align.h" #include "Common/CommonTypes.h" #include "Common/Logging/Log.h" @@ -87,11 +89,9 @@ bool VertexManager::Initialize() // Prefer an 8MB buffer if possible, but use less if the device doesn't support this. // This buffer is potentially going to be addressed as R8s in the future, so we assume - // that one element is one byte. This doesn't use min() because of a NDK compiler bug.. - const u32 texel_buffer_size = - TEXEL_STREAM_BUFFER_SIZE > g_vulkan_context->GetDeviceLimits().maxTexelBufferElements ? - g_vulkan_context->GetDeviceLimits().maxTexelBufferElements : - TEXEL_STREAM_BUFFER_SIZE; + // that one element is one byte. + const u32 texel_buffer_size = std::min( + TEXEL_STREAM_BUFFER_SIZE, g_vulkan_context->GetDeviceLimits().maxTexelBufferElements); m_texel_stream_buffer = StreamBuffer::Create(VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, texel_buffer_size); if (!m_texel_stream_buffer) |
