quarks/app-emulation/wine/files/reset_stencil.patch
2012-04-01 14:16:25 -07:00

24 lines
984 B
Diff

--- a/dlls/wined3d/device.c
+++ a/dlls/wined3d/device.c
@@ -5294,6 +5294,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
wined3d_surface_decref(device->onscreen_depth_stencil);
device->onscreen_depth_stencil = NULL;
}
+ wined3d_device_set_depth_stencil(device, NULL);
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
{
@@ -5393,11 +5394,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
device->onscreen_depth_stencil = NULL;
}
- /* Reset the depth stencil */
+ /* Apply the auto depth stencil if the app requested one */
if (swapchain_desc->enable_auto_depth_stencil)
wined3d_device_set_depth_stencil(device, device->auto_depth_stencil);
- else
- wined3d_device_set_depth_stencil(device, NULL);
TRACE("Resetting stateblock\n");
wined3d_stateblock_decref(device->updateStateBlock);