GPU: Use max vertex count based on buffer size
This commit is contained in:
parent
a58b687352
commit
1bb794dd39
3 changed files with 10 additions and 11 deletions
|
|
@ -379,7 +379,9 @@ void GPU_HW::DispatchRenderCommand(RenderCommand rc, u32 num_vertices)
|
|||
// flush when the command changes
|
||||
if (!m_batch_vertices.empty())
|
||||
{
|
||||
if (m_batch_vertices.size() >= MAX_BATCH_VERTEX_COUNT || m_batch_command.bits != rc.bits)
|
||||
// including the degenerate triangles for strips
|
||||
const u32 max_added_vertices = num_vertices + 2;
|
||||
if ((m_batch_vertices.size() + max_added_vertices) >= MAX_BATCH_VERTEX_COUNT || m_batch_command.bits != rc.bits)
|
||||
FlushRender();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue