OGL: Fix binding error on shutdown

This was occurring if the imgui vertex format was bound on shutdown,
which is destroyed before the vertex buffers
This commit is contained in:
Stenzek
2019-04-21 14:28:14 +10:00
parent 9577d0641b
commit f2a594fad5
3 changed files with 8 additions and 0 deletions
@@ -494,6 +494,12 @@ void ProgramShaderCache::InvalidateVertexFormat()
s_last_VAO = 0;
}
void ProgramShaderCache::InvalidateVertexFormatIfBound(GLuint vao)
{
if (s_last_VAO == vao)
s_last_VAO = 0;
}
void ProgramShaderCache::InvalidateLastProgram()
{
CurrentProgram = 0;