GS/OpenGL: Force UBO reupload on restore api state

This commit is contained in:
Connor McLaughlin 2022-08-01 13:43:50 +10:00 committed by refractionpcsx2
parent a228582984
commit 800aca6f0f
1 changed files with 8 additions and 0 deletions

View File

@ -319,6 +319,10 @@ bool GSDeviceOGL::Create()
return false;
}
// Force UBOs to be uploaded on first use.
std::memset(&m_vs_cb_cache, 0xFF, sizeof(m_vs_cb_cache));
std::memset(&m_ps_cb_cache, 0xFF, sizeof(m_ps_cb_cache));
// rebind because of VAO state
m_vertex_stream_buffer->Bind();
m_index_stream_buffer->Bind();
@ -704,6 +708,10 @@ void GSDeviceOGL::RestoreAPIState()
if (GLState::point_size)
glEnable(GL_PROGRAM_POINT_SIZE);
// Force UBOs to be reuploaded, we don't know what else was bound there.
std::memset(&m_vs_cb_cache, 0xFF, sizeof(m_vs_cb_cache));
std::memset(&m_ps_cb_cache, 0xFF, sizeof(m_ps_cb_cache));
}
void GSDeviceOGL::DrawPrimitive()