2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

RasterizerGL: Use the correct framebuffer when clearing via the CLEAR_BUFFERS register.

Previously we were clearing the default backbuffer framebuffer.

Found thanks to a Piglit test :)
This commit is contained in:
Subv 2018-09-20 22:31:53 -05:00
parent f237265187
commit 9cd5c61fcf

View file

@ -383,7 +383,7 @@ void RasterizerOpenGL::Clear() {
bool use_stencil{}; bool use_stencil{};
OpenGLState clear_state; OpenGLState clear_state;
clear_state.draw.draw_framebuffer = state.draw.draw_framebuffer; clear_state.draw.draw_framebuffer = framebuffer.handle;
clear_state.color_mask.red_enabled = regs.clear_buffers.R ? GL_TRUE : GL_FALSE; clear_state.color_mask.red_enabled = regs.clear_buffers.R ? GL_TRUE : GL_FALSE;
clear_state.color_mask.green_enabled = regs.clear_buffers.G ? GL_TRUE : GL_FALSE; clear_state.color_mask.green_enabled = regs.clear_buffers.G ? GL_TRUE : GL_FALSE;
clear_state.color_mask.blue_enabled = regs.clear_buffers.B ? GL_TRUE : GL_FALSE; clear_state.color_mask.blue_enabled = regs.clear_buffers.B ? GL_TRUE : GL_FALSE;