Module: wine Branch: master Commit: 9e0ba3eab0a20fdcadeb252e793adfcdd221ff36 URL: http://source.winehq.org/git/wine.git/?a=commit;h=9e0ba3eab0a20fdcadeb252e79...
Author: Stefan Dösinger stefan@codeweavers.com Date: Thu Oct 24 14:43:42 2013 +0200
ddraw: Make default pool resources dynamic.
To make DDLOCK_DISCARDCONTENTS actually do anything. The MAPPABLE flag is now redundant.
---
dlls/ddraw/ddraw.c | 2 +- dlls/ddraw/surface.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index e01f923..964428a 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -2873,7 +2873,7 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD, * the surface isn't mapped, and that updates done this way will be * visible on the screen. The game Nox is such an application, * Commandos: Behind Enemy Lines is another. */ - const DWORD flags = WINED3D_SURFACE_MAPPABLE | WINED3D_SURFACE_PIN_SYSMEM; + const DWORD flags = WINED3D_SURFACE_PIN_SYSMEM;
TRACE("ddraw %p, surface_desc %p, surface %p, outer_unknown %p.\n", ddraw, DDSD, surface, UnkOuter);
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index e11b633..bbe7d0e 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -5623,7 +5623,7 @@ HRESULT ddraw_surface_create_texture(struct ddraw_surface *surface, DWORD surfac } else { - wined3d_desc.usage = WINED3DUSAGE_TEXTURE; + wined3d_desc.usage = WINED3DUSAGE_TEXTURE | WINED3DUSAGE_DYNAMIC; pool = WINED3D_POOL_DEFAULT; }
@@ -5771,6 +5771,7 @@ HRESULT ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, /* Videomemory adds localvidmem. This is mutually exclusive with * systemmemory and texturemanage. */ desc->ddsCaps.dwCaps |= DDSCAPS_LOCALVIDMEM; + usage |= WINED3DUSAGE_DYNAMIC; }
format = wined3dformat_from_ddrawformat(&desc->u4.ddpfPixelFormat);