[PATCH 1/4] wined3d: Send a notification that the GL texture changed in flip_surface().

Henri Verbeet hverbeet at codeweavers.com
Wed Nov 17 05:38:57 CST 2010


Strictly speaking the texture doesn't get unloaded, but it does get associated
with a different surface. The FBO cache in particular is much happier when it
gets notified of these.
---
 dlls/wined3d/surface.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index fa715b1..432eb9b 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2710,6 +2710,9 @@ void flip_surface(IWineD3DSurfaceImpl *front, IWineD3DSurfaceImpl *back) {
         tmp = back->texture_name_srgb;
         back->texture_name_srgb = front->texture_name_srgb;
         front->texture_name_srgb = tmp;
+
+        resource_unload((IWineD3DResourceImpl *)back);
+        resource_unload((IWineD3DResourceImpl *)front);
     }
 
     {
-- 
1.7.2.2




More information about the wine-patches mailing list