mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
Merge pull request #7604 from weihuoya/vulkan-index-buffer
Vulkan: fx index buffer reserve size
This commit is contained in:
commit
c675ef148e
@ -98,7 +98,8 @@ void VertexManager::ResetBuffer(u32 stride)
|
|||||||
|
|
||||||
// Attempt to allocate from buffers
|
// Attempt to allocate from buffers
|
||||||
bool has_vbuffer_allocation = m_vertex_stream_buffer->ReserveMemory(MAXVBUFFERSIZE, stride);
|
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)
|
if (!has_vbuffer_allocation || !has_ibuffer_allocation)
|
||||||
{
|
{
|
||||||
// Flush any pending commands first, so that we can wait on the fences
|
// 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)
|
if (!has_vbuffer_allocation)
|
||||||
has_vbuffer_allocation = m_vertex_stream_buffer->ReserveMemory(MAXVBUFFERSIZE, stride);
|
has_vbuffer_allocation = m_vertex_stream_buffer->ReserveMemory(MAXVBUFFERSIZE, stride);
|
||||||
if (!has_ibuffer_allocation)
|
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 we still failed, that means the allocation was too large and will never succeed, so panic
|
||||||
if (!has_vbuffer_allocation || !has_ibuffer_allocation)
|
if (!has_vbuffer_allocation || !has_ibuffer_allocation)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user