wined3d: Free shader backend and fragment pipe context data in device_context_remove().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2019-05-03 15:26:02 +04:30 committed by Alexandre Julliard
parent 6bb5724a8a
commit a9dca944cb
2 changed files with 3 additions and 2 deletions

View File

@ -2347,8 +2347,6 @@ void wined3d_context_destroy(struct wined3d_context *context)
return;
}
device->shader_backend->shader_free_context_data(context);
device->adapter->fragment_pipe->free_context_data(context);
device_context_remove(device, context);
wined3d_context_gl_destroy(wined3d_context_gl(context));

View File

@ -168,6 +168,9 @@ void device_context_remove(struct wined3d_device *device, struct wined3d_context
TRACE("Removing context %p.\n", context);
device->adapter->fragment_pipe->free_context_data(context);
device->shader_backend->shader_free_context_data(context);
for (i = 0; i < device->context_count; ++i)
{
if (device->contexts[i] == context)