mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
Merge pull request #11366 from Minty-Meeo/old-ndk-bug
Follow-up on a four-year-old Android NDK workaround
This commit is contained in:
commit
ce92350140
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include "VideoBackends/Vulkan/VKVertexManager.h"
|
#include "VideoBackends/Vulkan/VKVertexManager.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "Common/Align.h"
|
#include "Common/Align.h"
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
#include "Common/Logging/Log.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.
|
// 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
|
// 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..
|
// that one element is one byte.
|
||||||
const u32 texel_buffer_size =
|
const u32 texel_buffer_size = std::min(
|
||||||
TEXEL_STREAM_BUFFER_SIZE > g_vulkan_context->GetDeviceLimits().maxTexelBufferElements ?
|
TEXEL_STREAM_BUFFER_SIZE, g_vulkan_context->GetDeviceLimits().maxTexelBufferElements);
|
||||||
g_vulkan_context->GetDeviceLimits().maxTexelBufferElements :
|
|
||||||
TEXEL_STREAM_BUFFER_SIZE;
|
|
||||||
m_texel_stream_buffer =
|
m_texel_stream_buffer =
|
||||||
StreamBuffer::Create(VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, texel_buffer_size);
|
StreamBuffer::Create(VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, texel_buffer_size);
|
||||||
if (!m_texel_stream_buffer)
|
if (!m_texel_stream_buffer)
|
||||||
|
Loading…
Reference in New Issue
Block a user