don't return stencil bits in the response for PEEK_Z. compensate for ogl's upside-down coords...

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3632 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman
2009-07-01 19:29:35 +00:00
parent c3547effe6
commit 2fc917dd79
2 changed files with 10 additions and 8 deletions

View File

@ -462,7 +462,7 @@ u32 Video_AccessEFB(EFBAccessType type, u32 x, u32 y)
{
switch (type)
{
case EFBAccessType::PEEK_Z:
case PEEK_Z:
{
if (!g_VideoInitialize.bUseDualCore)
{
@ -471,20 +471,21 @@ u32 Video_AccessEFB(EFBAccessType type, u32 x, u32 y)
ComputeBackbufferRectangle(&source);
source.Scale(Renderer::GetTargetScaleX(), Renderer::GetTargetScaleY(), &scaledTargetSource);
GLuint depth_tex = Renderer::ResolveAndGetDepthTarget(scaledTargetSource);
glReadPixels(x, y, 1, 1, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, &z);
glReadPixels(x, Renderer::GetTargetHeight()-y, 1, 1, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, &z);
GL_REPORT_ERRORD();
return z;
// mask away the stencil bits
return z & 0xffffff;
}
}
break;
case EFBAccessType::POKE_Z:
case POKE_Z:
break;
case EFBAccessType::PEEK_COLOR:
case PEEK_COLOR:
break;
case EFBAccessType::POKE_COLOR:
case POKE_COLOR:
break;
default: