Module: wine
Branch: master
Commit: badf3d8db77aa3db21d2bd41b05b730dd31c65ec
URL: http://source.winehq.org/git/wine.git/?a=commit;h=badf3d8db77aa3db21d2bd41b…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Fri Jan 10 12:40:46 2014 +0100
wined3d: Load surfaces into map binding memory on unload.
A surface can stay in DIB or user memory just fine. When buffers get
their own location an exception for them has to be added.
---
dlls/wined3d/surface.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 6e15c00..19ae138 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1369,7 +1369,7 @@ static void surface_unload(struct wined3d_resource *resource)
if (!(surface->flags & SFLAG_PBO))
{
surface_init_sysmem(surface);
- surface_validate_location(surface, SFLAG_INSYSMEM);
+ surface_validate_location(surface, surface->map_binding);
}
/* We also get here when the ddraw swapchain is destroyed, for example
* for a mode switch. In this case this surface won't necessarily be
@@ -1379,9 +1379,9 @@ static void surface_unload(struct wined3d_resource *resource)
}
else
{
- surface_load_location(surface, SFLAG_INSYSMEM);
+ surface_load_location(surface, surface->map_binding);
}
- surface_invalidate_location(surface, ~SFLAG_INSYSMEM);
+ surface_invalidate_location(surface, ~surface->map_binding);
surface->flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED);
context = context_acquire(device, NULL);
Module: wine
Branch: master
Commit: 18bf8b49b38709e39d4ccd4d60bbb98c49adc083
URL: http://source.winehq.org/git/wine.git/?a=commit;h=18bf8b49b38709e39d4ccd4d6…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Fri Jan 10 12:40:45 2014 +0100
wined3d: Move location flag updating out of surface_init_sysmem.
---
dlls/wined3d/surface.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index ee07e19..6e15c00 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1341,9 +1341,6 @@ static BOOL surface_init_sysmem(struct wined3d_surface *surface)
surface->resource.allocatedMemory = surface->resource.heap_memory;
}
- surface_validate_location(surface, SFLAG_INSYSMEM);
- surface_invalidate_location(surface, ~SFLAG_INSYSMEM);
-
return TRUE;
}
@@ -1370,7 +1367,10 @@ static void surface_unload(struct wined3d_resource *resource)
* and all flags get lost
*/
if (!(surface->flags & SFLAG_PBO))
+ {
surface_init_sysmem(surface);
+ surface_validate_location(surface, SFLAG_INSYSMEM);
+ }
/* We also get here when the ddraw swapchain is destroyed, for example
* for a mode switch. In this case this surface won't necessarily be
* an implicit surface. We have to mark it lost so that the
@@ -2784,11 +2784,12 @@ HRESULT CDECL wined3d_surface_update_desc(struct wined3d_surface *surface,
return hr;
}
surface->resource.allocatedMemory = surface->dib.bitmap_data;
- surface->flags |= SFLAG_INSYSMEM;
}
else if (!surface_init_sysmem(surface))
return E_OUTOFMEMORY;
+ surface_validate_location(surface, SFLAG_INSYSMEM);
+
return WINED3D_OK;
}
Module: wine
Branch: master
Commit: 5c1df19b16151dc9f0d3454c0a002c55652b1400
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5c1df19b16151dc9f0d3454c0…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Fri Jan 10 12:40:42 2014 +0100
wined3d: Use the map binding to reload surfaces on color key changes.
---
dlls/wined3d/surface.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 9cc8a71..45c3663 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2308,8 +2308,8 @@ void surface_load(struct wined3d_surface *surface, BOOL srgb)
/* To perform the color key conversion we need a sysmem copy of
* the surface. Make sure we have it. */
- surface_load_location(surface, SFLAG_INSYSMEM);
- surface_invalidate_location(surface, ~SFLAG_INSYSMEM);
+ surface_load_location(surface, surface->map_binding);
+ surface_invalidate_location(surface, ~surface->map_binding);
/* Switching color keying on / off may change the internal format. */
if (ck_changed)
surface_force_reload(surface);