mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
D3D9: Fall back to just creating a depth surface instead of a depth texture if the latter one isn't supported by the hardware.
This is a workaround for issue 3256. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6737 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -513,6 +513,11 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// if depth textures aren't supported by the hardware, just return
|
||||
if (type == PEEK_Z)
|
||||
if (FramebufferManager::GetEFBDepthTexture() == NULL)
|
||||
return 0;
|
||||
|
||||
// We're using three surfaces here:
|
||||
// - pEFBSurf: EFB Surface. Source surface when peeking, destination surface when poking.
|
||||
// - pBufferRT: A render target surface. When peeking, we render a textured quad to this surface.
|
||||
@ -646,7 +651,7 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
|
||||
val += ((float)(z & 0xFF)) * ffrac;
|
||||
break;
|
||||
};
|
||||
|
||||
|
||||
|
||||
pSystemBuf->UnlockRect();
|
||||
// TODO: in RE0 this value is often off by one, which causes lighting to disappear
|
||||
|
Reference in New Issue
Block a user