mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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:
@ -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:
|
||||
|
Reference in New Issue
Block a user