VideoBackends: Use the new divisor when clearing the depth buffer.
This commit is contained in:
parent
1a409a2e16
commit
84a5f4abb0
|
@ -549,7 +549,7 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaE
|
||||||
|
|
||||||
// Color is passed in bgra mode so we need to convert it to rgba
|
// Color is passed in bgra mode so we need to convert it to rgba
|
||||||
u32 rgbaColor = (color & 0xFF00FF00) | ((color >> 16) & 0xFF) | ((color << 16) & 0xFF0000);
|
u32 rgbaColor = (color & 0xFF00FF00) | ((color >> 16) & 0xFF) | ((color << 16) & 0xFF0000);
|
||||||
D3D::drawClearQuad(rgbaColor, (z & 0xFFFFFF) / float(0xFFFFFF));
|
D3D::drawClearQuad(rgbaColor, (z & 0xFFFFFF) / 16777216.0f);
|
||||||
|
|
||||||
D3D::stateman->PopDepthState();
|
D3D::stateman->PopDepthState();
|
||||||
D3D::stateman->PopBlendState();
|
D3D::stateman->PopBlendState();
|
||||||
|
|
|
@ -1139,7 +1139,7 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
|
||||||
ResetAPIState();
|
ResetAPIState();
|
||||||
|
|
||||||
glDepthMask(GL_TRUE);
|
glDepthMask(GL_TRUE);
|
||||||
glClearDepthf(float(poke_data & 0xFFFFFF) / float(0xFFFFFF));
|
glClearDepthf(float(poke_data & 0xFFFFFF) / 16777216.0f);
|
||||||
|
|
||||||
glEnable(GL_SCISSOR_TEST);
|
glEnable(GL_SCISSOR_TEST);
|
||||||
glScissor(targetPixelRc.left, targetPixelRc.bottom, targetPixelRc.GetWidth(), targetPixelRc.GetHeight());
|
glScissor(targetPixelRc.left, targetPixelRc.bottom, targetPixelRc.GetWidth(), targetPixelRc.GetHeight());
|
||||||
|
@ -1273,7 +1273,7 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaE
|
||||||
// depth
|
// depth
|
||||||
glDepthMask(zEnable ? GL_TRUE : GL_FALSE);
|
glDepthMask(zEnable ? GL_TRUE : GL_FALSE);
|
||||||
|
|
||||||
glClearDepthf(float(z & 0xFFFFFF) / float(0xFFFFFF));
|
glClearDepthf(float(z & 0xFFFFFF) / 16777216.0f);
|
||||||
|
|
||||||
// Update rect for clearing the picture
|
// Update rect for clearing the picture
|
||||||
glEnable(GL_SCISSOR_TEST);
|
glEnable(GL_SCISSOR_TEST);
|
||||||
|
|
Loading…
Reference in New Issue