wined3d: Only copy the depth buffer if there is one.

This commit is contained in:
H. Verbeet 2006-11-18 17:08:17 +01:00 committed by Alexandre Julliard
parent d1e6e81bbe
commit 9d6f22002c
1 changed files with 3 additions and 0 deletions

View File

@ -2237,6 +2237,9 @@ static void depth_copy(IWineD3DDevice *iface) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
IWineD3DSurfaceImpl *depth_stencil = (IWineD3DSurfaceImpl *)This->depthStencilBuffer;
/* Only copy the depth buffer if there is one. */
if (!depth_stencil) return;
/* TODO: Make this work for modes other than FBO */
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) return;