From: Stefan Dösinger Subject: [PATCH 3/3] wined3d: Remove texture locations after downloading all subresources. Message-Id: <1414007798-31392-3-git-send-email-stefan@codeweavers.com> Date: Wed, 22 Oct 2014 21:56:38 +0200 Otherwise the entire mipmap chain is lost after loading the first subresource from the texture into sysmem. Fixes bug 37406. --- dlls/wined3d/surface.c | 1 - dlls/wined3d/texture.c | 1 + dlls/wined3d/volume.c | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 75f48de..092cbe6 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1207,7 +1207,6 @@ static void surface_unload(struct wined3d_resource *resource) surface_load_location(surface, surface->resource.map_binding); surface_invalidate_location(surface, ~surface->resource.map_binding); } - wined3d_texture_force_reload(surface->container); context = context_acquire(device, NULL); gl_info = context->gl_info; diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 4f962f1..6ecd414 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -979,6 +979,7 @@ static void wined3d_texture_unload(struct wined3d_resource *resource) sub_resource->resource_ops->resource_unload(sub_resource); } + wined3d_texture_force_reload(texture); wined3d_texture_unload_gl_texture(texture); } diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index 0cbc7d4..58d7321 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -451,7 +451,6 @@ static void volume_unload(struct wined3d_resource *resource) } /* The texture name is managed by the container. */ - wined3d_texture_force_reload(volume->container); volume->flags &= ~WINED3D_VFLAG_CLIENT_STORAGE; resource_unload(resource); -- 2.0.4