https://bugs.winehq.org/show_bug.cgi?id=37406
Stefan Dösinger stefan@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan@codeweavers.com
--- Comment #5 from Stefan Dösinger stefan@codeweavers.com --- Created attachment 49776 --> https://bugs.winehq.org/attachment.cgi?id=49776 wined3d: Remove texture locations after unloading all subresources.
The problem is that surface_unload calls wined3d_texture_force_reload, which invalidates the texture location of all mipmaps and not just the one that was unloaded. If the other mipmaps only have a valid texture copy, which is quite likely, they are lost.
The attached patch changes this behavior and controls the invalidation of the texture location from the container, which is also the place where the GL texture is actually deleted. Ideally we should call unload only on containers and not on subresources. I am not yet sure if the attached patch has any negative side effects because of that.