gl: Fix inconsistent state tracking

This commit is contained in:
kd-11 2017-08-07 19:35:16 +03:00
parent e5e6af41a6
commit 1e46cd255b
2 changed files with 6 additions and 6 deletions

View File

@ -377,9 +377,9 @@ void GLGSRender::end()
if (clear_depth)
{
glDepthMask(GL_TRUE);
glClearDepth(1.0);
glClearStencil(255);
gl_state.depth_mask(GL_TRUE);
gl_state.clear_depth(1.0);
gl_state.clear_stencil(255);
mask |= GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT;
}
@ -397,7 +397,7 @@ void GLGSRender::end()
}
if (clear_depth)
glDepthMask(rsx::method_registers.depth_write_enabled());
gl_state.depth_mask(rsx::method_registers.depth_write_enabled());
ds->set_cleared();
}

View File

@ -254,7 +254,7 @@ private:
u32 value = (u32&)depth;
if (!test_property(GL_DEPTH_CLEAR_VALUE, value))
{
glClearDepth(value);
glClearDepth(depth);
properties[GL_DEPTH_CLEAR_VALUE] = value;
}
}
@ -273,7 +273,7 @@ private:
u32 value = (u32&)stencil;
if (!test_property(GL_STENCIL_CLEAR_VALUE, value))
{
glClearStencil(value);
glClearStencil(stencil);
properties[GL_STENCIL_CLEAR_VALUE] = value;
}
}