From a0e7463e86758e478993d59c339f590283e3532b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 2 Oct 2013 23:28:56 +0200
Subject: wined3d: Unload resources through the CS in uninit_3d.

---
 dlls/wined3d/device.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index e0e2c82..1d7d733 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1066,9 +1066,10 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
     LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
     {
         TRACE("Unloading resource %p.\n", resource);
-
-        resource->resource_ops->resource_unload(resource);
+        wined3d_cs_emit_evict_resource(device->cs, resource);
     }
+    if (wined3d_settings.cs_multithreaded)
+        device->cs->ops->finish(device->cs);
 
     wine_rb_clear(&device->samplers, device_free_sampler, NULL);
 
-- 
2.2.1

