OpenGLDevice: Keep scissor active on present clear

And disable depth test if set to always (match DX11).
This commit is contained in:
Stenzek
2023-09-23 13:11:25 +10:00
parent aa1e59c9f1
commit 8dc9c225d7
2 changed files with 5 additions and 5 deletions

View File

@ -612,7 +612,8 @@ ALWAYS_INLINE static void ApplyDepthState(const GPUPipeline::DepthState& ds)
GL_EQUAL, // Equal
}};
(ds.depth_test != GPUPipeline::DepthFunc::Never) ? glEnable(GL_DEPTH_TEST) : glDisable(GL_DEPTH_TEST);
(ds.depth_test != GPUPipeline::DepthFunc::Always || ds.depth_write) ? glEnable(GL_DEPTH_TEST) :
glDisable(GL_DEPTH_TEST);
glDepthFunc(func_mapping[static_cast<u8>(ds.depth_test.GetValue())]);
glDepthMask(ds.depth_write);
}