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>
This commit is contained in:
Henri Verbeet 2019-06-20 01:42:20 +04:30 committed by Alexandre Julliard
parent f89a303bcb
commit c9046a3f4e
1 changed files with 10 additions and 4 deletions

View File

@ -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);