diff options
| author | weihuoya <zwdreams@gmail.com> | 2018-12-03 19:23:36 +0800 |
|---|---|---|
| committer | weihuoya <zwdreams@gmail.com> | 2018-12-03 19:23:36 +0800 |
| commit | 3ab0f02cec6136c42d5bb7168f3cf2a5dd84b8b6 (patch) | |
| tree | 064d825e7f6a83867a604f1bc242736765fdee3f /Source/Core/VideoBackends/Vulkan/VertexManager.cpp | |
| parent | f5e9135912561cb805a8d0f907d84991f023d016 (diff) | |
vulkan: fx index buffer reserve size
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/VertexManager.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/VertexManager.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/VertexManager.cpp b/Source/Core/VideoBackends/Vulkan/VertexManager.cpp index d6059a0062..4fa3a92b09 100644 --- a/Source/Core/VideoBackends/Vulkan/VertexManager.cpp +++ b/Source/Core/VideoBackends/Vulkan/VertexManager.cpp @@ -98,7 +98,8 @@ void VertexManager::ResetBuffer(u32 stride) // Attempt to allocate from buffers bool has_vbuffer_allocation = m_vertex_stream_buffer->ReserveMemory(MAXVBUFFERSIZE, stride); - bool has_ibuffer_allocation = m_index_stream_buffer->ReserveMemory(MAXIBUFFERSIZE, sizeof(u16)); + bool has_ibuffer_allocation = + m_index_stream_buffer->ReserveMemory(MAXIBUFFERSIZE * sizeof(u16), sizeof(u16)); if (!has_vbuffer_allocation || !has_ibuffer_allocation) { // Flush any pending commands first, so that we can wait on the fences @@ -109,7 +110,8 @@ void VertexManager::ResetBuffer(u32 stride) if (!has_vbuffer_allocation) has_vbuffer_allocation = m_vertex_stream_buffer->ReserveMemory(MAXVBUFFERSIZE, stride); if (!has_ibuffer_allocation) - has_ibuffer_allocation = m_index_stream_buffer->ReserveMemory(MAXIBUFFERSIZE, sizeof(u16)); + has_ibuffer_allocation = + m_index_stream_buffer->ReserveMemory(MAXIBUFFERSIZE * sizeof(u16), sizeof(u16)); // If we still failed, that means the allocation was too large and will never succeed, so panic if (!has_vbuffer_allocation || !has_ibuffer_allocation) |
