Module: wine Branch: master Commit: c9046a3f4eba71d784d26495e74d56f3bc20f752 URL: https://source.winehq.org/git/wine.git/?a=commit;h=c9046a3f4eba71d784d26495e...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Thu Jun 20 02:00:20 2019 +0430
wined3d: Pass a wined3d_context_gl structure to destroy_dummy_textures().
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/device.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 81b5a3a..768375d 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -812,10 +812,11 @@ static void wined3d_device_gl_create_dummy_textures(struct wined3d_device_gl *de }
/* Context activation is done by the caller. */ -static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d_context *context) +static void wined3d_device_gl_destroy_dummy_textures(struct wined3d_device_gl *device_gl, + struct wined3d_context_gl *context_gl) { - struct wined3d_dummy_textures *dummy_textures = &wined3d_device_gl(device)->dummy_textures; - const struct wined3d_gl_info *gl_info = context->gl_info; + struct wined3d_dummy_textures *dummy_textures = &device_gl->dummy_textures; + const struct wined3d_gl_info *gl_info = context_gl->c.gl_info;
if (gl_info->supported[ARB_TEXTURE_MULTISAMPLE]) { @@ -1054,9 +1055,13 @@ void wined3d_device_delete_opengl_contexts_cs(void *object) { struct wined3d_resource *resource, *cursor; struct wined3d_device *device = object; + struct wined3d_context_gl *context_gl; + struct wined3d_device_gl *device_gl; struct wined3d_context *context; struct wined3d_shader *shader;
+ device_gl = wined3d_device_gl(device); + LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry) { TRACE("Unloading resource %p.\n", resource); @@ -1069,9 +1074,10 @@ void wined3d_device_delete_opengl_contexts_cs(void *object) }
context = context_acquire(device, NULL, 0); + context_gl = wined3d_context_gl(context); device->blitter->ops->blitter_destroy(device->blitter, context); device->shader_backend->shader_free_private(device, context); - destroy_dummy_textures(device, context); + wined3d_device_gl_destroy_dummy_textures(device_gl, context_gl); destroy_default_samplers(device, context); context_release(context);