OpenGL: Don't attempt to draw empty triangle batches
Our code did not handle this well, causing random crashes inside drivers. Fixes #1251.
This commit is contained in:
parent
b5ca152389
commit
0b0230e27d
1 changed files with 3 additions and 0 deletions
|
@ -190,6 +190,9 @@ void RasterizerOpenGL::AddTriangle(const Pica::Shader::OutputVertex& v0,
|
|||
}
|
||||
|
||||
void RasterizerOpenGL::DrawTriangles() {
|
||||
if (vertex_batch.empty())
|
||||
return;
|
||||
|
||||
SyncFramebuffer();
|
||||
SyncDrawState();
|
||||
|
||||
|
|
Loading…
Reference in a new issue