Fixes: c065b4fe0b3622e0c737a4c7c1c514273ad2d8a7
From: Zebediah Figura zfigura@codeweavers.com
Fixes: c065b4fe0b3622e0c737a4c7c1c514273ad2d8a7 --- dlls/wined3d/device.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index dce2b65b6d3..0b4f56000bd 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1407,6 +1407,8 @@ void wined3d_device_uninit_3d(struct wined3d_device *device) struct wined3d_resource *resource, *cursor; struct wined3d_rendertarget_view *view; struct wined3d_texture *texture; + struct wined3d_buffer *buffer; + unsigned int i;
TRACE("device %p.\n", device);
@@ -1432,6 +1434,13 @@ void wined3d_device_uninit_3d(struct wined3d_device *device) wined3d_texture_decref(texture); }
+ for (i = 0; i < ARRAY_SIZE(device->push_constants); ++i) + { + if ((buffer = device->push_constants[i])) + wined3d_buffer_decref(buffer); + } + memset(device->push_constants, 0, sizeof(device->push_constants)); + wined3d_device_context_emit_reset_state(&device->cs->c, true); state_cleanup(state);
This doesn't fix the memory leak regression in GTA San Andreas when using WineD3D (which is caused by the commit in the Fixes header)
I should really make a bug report for that issue :frog:
This doesn't fix the memory leak regression in GTA San Andreas when using WineD3D (which is caused by the commit in the Fixes header)
That's unfortunate. This is definitely still a leak with fixing, though.
This merge request was approved by Jan Sikorski.