mirror of
https://github.com/yuzu-emu/yuzu-mainline
synced 2024-11-24 05:58:19 +00:00
gl_rasterizer: Apply just the needed state on Clear
This commit is contained in:
parent
97648f4841
commit
6df25e9c7b
1 changed files with 4 additions and 4 deletions
|
@ -582,9 +582,6 @@ std::pair<bool, bool> RasterizerOpenGL::ConfigureFramebuffers(
|
|||
}
|
||||
|
||||
void RasterizerOpenGL::Clear() {
|
||||
const auto prev_state{state};
|
||||
SCOPE_EXIT({ prev_state.Apply(); });
|
||||
|
||||
const auto& regs = system.GPU().Maxwell3D().regs;
|
||||
bool use_color{};
|
||||
bool use_depth{};
|
||||
|
@ -656,7 +653,10 @@ void RasterizerOpenGL::Clear() {
|
|||
clear_state.EmulateViewportWithScissor();
|
||||
}
|
||||
|
||||
clear_state.Apply();
|
||||
clear_state.ApplyColorMask();
|
||||
clear_state.ApplyDepth();
|
||||
clear_state.ApplyStencilTest();
|
||||
clear_state.ApplyViewport();
|
||||
|
||||
if (use_color) {
|
||||
glClearBufferfv(GL_COLOR, regs.clear_buffers.RT, regs.clear_color);
|
||||
|
|
Loading…
Reference in a new issue