[PATCH] wined3d: Reset the CS state before unbinding the device state.

Zebediah Figura z.figura12 at gmail.com
Sun Sep 15 10:38:22 CDT 2019


Otherwise the CS might later try to unbind a resource that has already been
freed.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/wined3d/device.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 92259e3ea5b..0d92177cd0c 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1142,6 +1142,7 @@ void wined3d_device_uninit_3d(struct wined3d_device *device)
         wined3d_texture_decref(texture);
     }
 
+    wined3d_cs_emit_reset_state(device->cs);
     state_unbind_resources(&device->state);
     for (i = 0; i < device->adapter->d3d_info.limits.max_rt_count; ++i)
     {
-- 
2.23.0




More information about the wine-devel mailing list