Commit 87f667b4 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Send shader destruction through the command stream.

parent 29788075
......@@ -2650,6 +2650,12 @@ ULONG CDECL wined3d_shader_incref(struct wined3d_shader *shader)
return refcount;
}
static void wined3d_shader_destroy_object(void *object)
{
shader_cleanup(object);
HeapFree(GetProcessHeap(), 0, object);
}
ULONG CDECL wined3d_shader_decref(struct wined3d_shader *shader)
{
ULONG refcount = InterlockedDecrement(&shader->ref);
......@@ -2658,9 +2664,8 @@ ULONG CDECL wined3d_shader_decref(struct wined3d_shader *shader)
if (!refcount)
{
shader_cleanup(shader);
shader->parent_ops->wined3d_object_destroyed(shader->parent);
HeapFree(GetProcessHeap(), 0, shader);
wined3d_cs_emit_destroy_object(shader->device->cs, wined3d_shader_destroy_object, shader);
}
return refcount;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment