Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
VideoCommon: fix "Buffer not large enough for all vertices!"
  • Loading branch information
degasus committed Jan 23, 2014
1 parent fd8757a commit 1898524
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Core/VideoCommon/VertexManagerBase.cpp
Expand Up @@ -61,7 +61,8 @@ void VertexManager::PrepareForAdditionalData(int primitive, u32 count, u32 strid
current_primitive_type = primitive_from_gx[primitive];

// Check for size in buffer, if the buffer gets full, call Flush()
if (count > IndexGenerator::GetRemainingIndices() || count > GetRemainingIndices(primitive) || needed_vertex_bytes > GetRemainingSize())
if ( !IsFlushed && ( count > IndexGenerator::GetRemainingIndices() ||
count > GetRemainingIndices(primitive) || needed_vertex_bytes > GetRemainingSize() ) )
{
Flush();

Expand Down

0 comments on commit 1898524

Please sign in to comment.