OpenGLDevice: Set glColorMask() on clear
Adreno doesn't appear to clear all channels otherwise.
This commit is contained in:
parent
2bdc691111
commit
60b91a1cdb
|
@ -609,7 +609,10 @@ void OpenGLDevice::RenderBlankFrame()
|
|||
{
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
glClearBufferfv(GL_COLOR, 0, s_clear_color.data());
|
||||
glColorMask(m_last_blend_state.write_r, m_last_blend_state.write_g, m_last_blend_state.write_b,
|
||||
m_last_blend_state.write_a);
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
m_gl_context->SwapBuffers();
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_current_framebuffer ? m_current_framebuffer->GetGLId() : 0);
|
||||
|
@ -707,7 +710,10 @@ bool OpenGLDevice::BeginPresent(bool skip_present)
|
|||
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
glClearBufferfv(GL_COLOR, 0, s_clear_color.data());
|
||||
glColorMask(m_last_blend_state.write_r, m_last_blend_state.write_g, m_last_blend_state.write_b,
|
||||
m_last_blend_state.write_a);
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
|
||||
const Common::Rectangle<s32> window_rc =
|
||||
|
|
|
@ -492,7 +492,10 @@ void OpenGLDevice::CommitClear(OpenGLTexture* tex)
|
|||
{
|
||||
const auto color = tex->GetUNormClearColor();
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
glClearBufferfv(GL_COLOR, 0, color.data());
|
||||
glColorMask(m_last_blend_state.write_r, m_last_blend_state.write_g, m_last_blend_state.write_b,
|
||||
m_last_blend_state.write_a);
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
}
|
||||
|
||||
|
@ -531,7 +534,10 @@ void OpenGLDevice::CommitClear(OpenGLFramebuffer* fb)
|
|||
{
|
||||
const auto color = FB->GetUNormClearColor();
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
glClearBufferfv(GL_COLOR, 0, color.data());
|
||||
glColorMask(m_last_blend_state.write_r, m_last_blend_state.write_g, m_last_blend_state.write_b,
|
||||
m_last_blend_state.write_a);
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
FB->SetState(GPUTexture::State::Dirty);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue