diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index fc7a8964923..6cc2f0cd9a8 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -4577,7 +4577,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_destroy_object(device->cs, wined3d_device_gl_delete_opengl_contexts_cs, wined3d_device_gl(device)); wined3d_cs_finish(device->cs, WINED3D_CS_QUEUE_DEFAULT); } diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 067d54d58e3..93c738ad955 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -955,18 +955,18 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi wined3d_device_context_set_depth_stencil_view(context, ds_enable ? device->auto_depth_stencil_view : NULL); } -void wined3d_device_delete_opengl_contexts_cs(void *object) +void wined3d_device_gl_delete_opengl_contexts_cs(void *object) { + struct wined3d_device_gl *device_gl = object; struct wined3d_swapchain_gl *swapchain_gl; - struct wined3d_device *device = object; struct wined3d_context_gl *context_gl; - struct wined3d_device_gl *device_gl; struct wined3d_context *context; + struct wined3d_device *device; struct wined3d_shader *shader; - TRACE("device %p.\n", device); + TRACE("device %p.\n", device_gl); - device_gl = wined3d_device_gl(device); + device = &device_gl->d; LIST_FOR_EACH_ENTRY(shader, &device->shaders, struct wined3d_shader, shader_list_entry) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index e814cff5c39..46ea6a7ee3a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3920,7 +3920,6 @@ BOOL device_context_add(struct wined3d_device *device, struct wined3d_context *c void device_context_remove(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN; void wined3d_device_create_default_samplers(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN; -void wined3d_device_delete_opengl_contexts_cs(void *object) 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, @@ -3964,6 +3963,7 @@ static inline struct wined3d_device_gl *wined3d_device_gl(struct wined3d_device } void wined3d_device_gl_create_primary_opengl_context_cs(void *object) DECLSPEC_HIDDEN; +void wined3d_device_gl_delete_opengl_contexts_cs(void *object) DECLSPEC_HIDDEN; struct wined3d_null_resources_vk {