Henri Verbeet : wined3d: Wait for the resource to become idle when destroying user memory textures.
Alexandre Julliard
julliard at winehq.org
Tue Sep 20 10:45:01 CDT 2016
Module: wine
Branch: master
Commit: 6fc546114b660f7c26208a617a37e826a4173908
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6fc546114b660f7c26208a617a37e826a4173908
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Sep 20 11:41:40 2016 +0200
wined3d: Wait for the resource to become idle when destroying user memory textures.
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/texture.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 8e5a5f1..1c44a5d 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -871,6 +871,12 @@ ULONG CDECL wined3d_texture_decref(struct wined3d_texture *texture)
if (!refcount)
{
+ /* Wait for the texture to become idle if it's using user memory,
+ * since the application is allowed to free that memory once the
+ * texture is destroyed. Note that this implies that
+ * wined3d_texture_destroy_object() can't access that memory either. */
+ if (texture->user_memory)
+ wined3d_resource_wait_idle(&texture->resource);
wined3d_texture_sub_resources_destroyed(texture);
texture->resource.parent_ops->wined3d_object_destroyed(texture->resource.parent);
resource_cleanup(&texture->resource);
More information about the wine-cvs
mailing list