Józef Kucia : wined3d: Pass context to destroy_dummy_textures().
Module: wine Branch: master Commit: 3edc4b27cde9bbaad7a396368855d687fa0a7b7c URL: http://source.winehq.org/git/wine.git/?a=commit;h=3edc4b27cde9bbaad7a3963688... Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Wed Oct 5 11:17:09 2016 +0200 wined3d: Pass context to destroy_dummy_textures(). Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/device.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 94ea4c5..de6d5a4 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -772,8 +772,10 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_ } /* Context activation is done by the caller. */ -static void destroy_dummy_textures(struct wined3d_device *device, const struct wined3d_gl_info *gl_info) +static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d_context *context) { + const struct wined3d_gl_info *gl_info = context->gl_info; + if (gl_info->supported[EXT_TEXTURE_ARRAY]) gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_2d_array); @@ -1182,7 +1184,7 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device) /* Destroy the shader backend. Note that this has to happen after all shaders are destroyed. */ device->blitter->free_private(device); device->shader_backend->shader_free_private(device); - destroy_dummy_textures(device, gl_info); + destroy_dummy_textures(device, context); destroy_default_samplers(device, context); context_release(context); @@ -4559,7 +4561,7 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d device->blitter->free_private(device); device->shader_backend->shader_free_private(device); - destroy_dummy_textures(device, gl_info); + destroy_dummy_textures(device, context); destroy_default_samplers(device, context); context_release(context);
participants (1)
-
Alexandre Julliard