Overallocate dynamic buffers on resize.
This commit is contained in:
parent
6b5b50c2cf
commit
99770c9f43
@ -3398,7 +3398,7 @@ namespace bgfx
|
||||
return NonLocalAllocator::kInvalidBlock;
|
||||
}
|
||||
|
||||
const uint32_t allocSize = bx::max<uint32_t>(BGFX_CONFIG_DYNAMIC_INDEX_BUFFER_SIZE, _size);
|
||||
const uint32_t allocSize = bx::max<uint32_t>(BGFX_CONFIG_DYNAMIC_INDEX_BUFFER_SIZE, bx::alignUp(_size, 1<<20) );
|
||||
|
||||
IndexBuffer& ib = m_indexBuffers[indexBufferHandle.idx];
|
||||
ib.m_size = allocSize;
|
||||
@ -3582,7 +3582,7 @@ namespace bgfx
|
||||
return NonLocalAllocator::kInvalidBlock;
|
||||
}
|
||||
|
||||
const uint32_t allocSize = bx::max<uint32_t>(BGFX_CONFIG_DYNAMIC_VERTEX_BUFFER_SIZE, _size);
|
||||
const uint32_t allocSize = bx::max<uint32_t>(BGFX_CONFIG_DYNAMIC_VERTEX_BUFFER_SIZE, bx::alignUp(_size, 1<<20) );
|
||||
|
||||
VertexBuffer& vb = m_vertexBuffers[vertexBufferHandle.idx];
|
||||
vb.m_size = allocSize;
|
||||
|
Loading…
Reference in New Issue
Block a user