[PATCH 1/5] wined3d: Don't bother about client storage in wined3d_surface_set_mem.
Stefan Dösinger
stefan at codeweavers.com
Thu Oct 3 17:03:17 CDT 2013
---
dlls/wined3d/surface.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 9d7accd..1f81914 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2860,6 +2860,9 @@ HRESULT CDECL wined3d_surface_set_mem(struct wined3d_surface *surface, void *mem
ERR("Not supported on render targets.\n");
return WINED3DERR_INVALIDCALL;
}
+ /* Should not happen. This means ddraw/d3d9 created the surface incorrectly. */
+ if (surface->resource.pool != WINED3D_POOL_SYSTEM_MEM)
+ ERR("Called on non-sysmem surface.\n");
if (mem && mem != surface->resource.allocatedMemory)
{
@@ -2883,10 +2886,6 @@ HRESULT CDECL wined3d_surface_set_mem(struct wined3d_surface *surface, void *mem
/* Now the surface memory is most up do date. Invalidate drawable and texture. */
surface_validate_location(surface, SFLAG_INSYSMEM);
surface_invalidate_location(surface, ~SFLAG_INSYSMEM);
-
- /* For client textures OpenGL has to be notified. */
- if (surface->flags & SFLAG_CLIENT)
- surface_release_client_storage(surface);
}
else if (surface->flags & SFLAG_USERPTR)
{
@@ -2899,9 +2898,6 @@ HRESULT CDECL wined3d_surface_set_mem(struct wined3d_surface *surface, void *mem
surface->resource.allocatedMemory = NULL;
surface->flags &= ~(SFLAG_USERPTR | SFLAG_INSYSMEM);
- if (surface->flags & SFLAG_CLIENT)
- surface_release_client_storage(surface);
-
surface_prepare_system_memory(surface);
}
--
1.8.1.5
More information about the wine-patches
mailing list