wined3d: Don't leak texture in wined3d_unordered_access_view_destroy_object().

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2017-03-02 09:44:29 +01:00 committed by Alexandre Julliard
parent adb6a9074d
commit b5b26c204f
1 changed files with 15 additions and 1 deletions

View File

@ -673,7 +673,21 @@ ULONG CDECL wined3d_unordered_access_view_incref(struct wined3d_unordered_access
static void wined3d_unordered_access_view_destroy_object(void *object)
{
HeapFree(GetProcessHeap(), 0, object);
struct wined3d_unordered_access_view *view = object;
if (view->gl_view.name)
{
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
context = context_acquire(view->resource->device, NULL, 0);
gl_info = context->gl_info;
gl_info->gl_ops.gl.p_glDeleteTextures(1, &view->gl_view.name);
checkGLcall("glDeleteTextures");
context_release(context);
}
HeapFree(GetProcessHeap(), 0, view);
}
ULONG CDECL wined3d_unordered_access_view_decref(struct wined3d_unordered_access_view *view)