fix GXPeekZ when using aa
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3642 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
16bf555f7b
commit
b69d218a82
|
@ -467,13 +467,22 @@ u32 Video_AccessEFB(EFBAccessType type, u32 x, u32 y)
|
|||
if (!g_VideoInitialize.bUseDualCore)
|
||||
{
|
||||
u32 z = 0;
|
||||
|
||||
if (g_Config.iMultisampleMode != MULTISAMPLE_OFF)
|
||||
{
|
||||
// Find the proper dimensions
|
||||
TRectangle source, scaledTargetSource;
|
||||
ComputeBackbufferRectangle(&source);
|
||||
source.Scale(Renderer::GetTargetScaleX(), Renderer::GetTargetScaleY(), &scaledTargetSource);
|
||||
GLuint depth_tex = Renderer::ResolveAndGetDepthTarget(scaledTargetSource);
|
||||
// This will resolve and bind to the depth buffer
|
||||
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, Renderer::ResolveAndGetDepthTarget(scaledTargetSource));
|
||||
}
|
||||
|
||||
// Read the z value!
|
||||
glReadPixels(x, Renderer::GetTargetHeight()-y, 1, 1, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, &z);
|
||||
GL_REPORT_ERRORD();
|
||||
// mask away the stencil bits
|
||||
|
||||
// Mask away the stencil bits
|
||||
return z & 0xffffff;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue