Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/device.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 92259e3ea5b..c8fae1275c3 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -537,8 +537,6 @@ void wined3d_device_cleanup(struct wined3d_device *device) ERR("Something's still holding the recording stateblock.\n"); device->recording = NULL;
- state_cleanup(&device->state); - for (i = 0; i < ARRAY_SIZE(device->multistate_funcs); ++i) { heap_free(device->multistate_funcs[i]); @@ -1142,7 +1140,7 @@ void wined3d_device_uninit_3d(struct wined3d_device *device) wined3d_texture_decref(texture); }
- state_unbind_resources(&device->state); + state_cleanup(&device->state); for (i = 0; i < device->adapter->d3d_info.limits.max_rt_count; ++i) { wined3d_device_set_rendertarget_view(device, i, NULL, FALSE);
Otherwise the CS might later try to unbind a resource that has already been freed.
Signed-off-by: Zebediah Figura z.figura12@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 c8fae1275c3..62341290ffa 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1140,6 +1140,7 @@ void wined3d_device_uninit_3d(struct wined3d_device *device) wined3d_texture_decref(texture); }
+ wined3d_cs_emit_reset_state(device->cs); state_cleanup(&device->state); for (i = 0; i < device->adapter->d3d_info.limits.max_rt_count; ++i) {
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com