Commit 33449ed6 authored by Jan Sikorski's avatar Jan Sikorski Committed by Alexandre Julliard

wined3d: Do not call wined3d_device_destroy_default_samplers() in the CS thread.

parent 6d2d43bb
......@@ -4575,6 +4575,7 @@ static void adapter_gl_uninit_3d(struct wined3d_device *device)
{
TRACE("device %p.\n", device);
wined3d_device_destroy_default_samplers(device);
wined3d_cs_destroy_object(device->cs, wined3d_device_delete_opengl_contexts_cs, device);
wined3d_cs_finish(device->cs, WINED3D_CS_QUEUE_DEFAULT);
}
......
......@@ -748,7 +748,6 @@ static void adapter_vk_uninit_3d_cs(void *object)
device->shader_backend->shader_free_private(device, &context_vk->c);
wined3d_device_vk_destroy_null_views(device_vk, context_vk);
wined3d_device_vk_destroy_null_resources(device_vk, context_vk);
wined3d_device_destroy_default_samplers(device, &context_vk->c);
}
static void adapter_vk_uninit_3d(struct wined3d_device *device)
......@@ -761,6 +760,7 @@ static void adapter_vk_uninit_3d(struct wined3d_device *device)
device_vk = wined3d_device_vk(device);
context_vk = &device_vk->context_vk;
wined3d_device_destroy_default_samplers(device);
wined3d_cs_destroy_object(device->cs, adapter_vk_uninit_3d_cs, device_vk);
wined3d_cs_finish(device->cs, WINED3D_CS_QUEUE_DEFAULT);
......
......@@ -572,8 +572,7 @@ void wined3d_device_create_default_samplers(struct wined3d_device *device, struc
}
}
/* Context activation is done by the caller. */
void wined3d_device_destroy_default_samplers(struct wined3d_device *device, struct wined3d_context *context)
void wined3d_device_destroy_default_samplers(struct wined3d_device *device)
{
wined3d_sampler_decref(device->default_sampler);
device->default_sampler = NULL;
......@@ -982,7 +981,6 @@ void wined3d_device_delete_opengl_contexts_cs(void *object)
device->blitter->ops->blitter_destroy(device->blitter, context);
device->shader_backend->shader_free_private(device, context);
wined3d_device_gl_destroy_dummy_textures(device_gl, context_gl);
wined3d_device_destroy_default_samplers(device, context);
context_release(context);
while (device->context_count)
......
......@@ -3889,8 +3889,7 @@ void wined3d_device_create_default_samplers(struct wined3d_device *device,
struct wined3d_context *context) DECLSPEC_HIDDEN;
void wined3d_device_create_primary_opengl_context_cs(void *object) DECLSPEC_HIDDEN;
void wined3d_device_delete_opengl_contexts_cs(void *object) DECLSPEC_HIDDEN;
void wined3d_device_destroy_default_samplers(struct wined3d_device *device,
struct wined3d_context *context) DECLSPEC_HIDDEN;
void wined3d_device_destroy_default_samplers(struct wined3d_device *device) DECLSPEC_HIDDEN;
HRESULT wined3d_device_init(struct wined3d_device *device, struct wined3d *wined3d,
unsigned int adapter_idx, enum wined3d_device_type device_type, HWND focus_window, unsigned int flags,
BYTE surface_alignment, const enum wined3d_feature_level *levels, unsigned int level_count,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment