OpenGLDevice: Cache intermediate state

This commit is contained in:
Stenzek
2023-10-08 01:47:29 +10:00
parent eb080834ad
commit ce7f6128e9
5 changed files with 75 additions and 36 deletions

View File

@ -26,6 +26,8 @@ OpenGLDevice::OpenGLDevice()
std::memset(&m_last_rasterization_state, 0xFF, sizeof(m_last_rasterization_state));
std::memset(&m_last_depth_state, 0xFF, sizeof(m_last_depth_state));
std::memset(&m_last_blend_state, 0xFF, sizeof(m_last_blend_state));
m_last_blend_state.enable = false;
m_last_blend_state.constant = 0;
}
OpenGLDevice::~OpenGLDevice()
@ -425,6 +427,7 @@ bool OpenGLDevice::CheckFeatures(bool* buggy_pbo)
m_features.dual_source_blend =
(max_dual_source_draw_buffers > 0) &&
(GLAD_GL_VERSION_3_3 || GLAD_GL_ARB_blend_func_extended || GLAD_GL_EXT_blend_func_extended);
m_features.dual_source_blend = false;
#ifdef __APPLE__
// Partial texture buffer uploads appear to be broken in macOS's OpenGL driver.