Alexander Dorofeyev : wined3d: Get rid of spurious err when locking with WINED3DLOCK_DISCARD.
Alexandre Julliard
julliard at winehq.org
Mon Mar 10 07:16:59 CDT 2008
Module: wine
Branch: master
Commit: 8f8076c3f7203451d030567f3421ac5e2fded77f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8f8076c3f7203451d030567f3421ac5e2fded77f
Author: Alexander Dorofeyev <alexd4 at inbox.lv>
Date: Sun Mar 9 16:08:57 2008 +0200
wined3d: Get rid of spurious err when locking with WINED3DLOCK_DISCARD.
---
dlls/wined3d/surface.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index fdc16cd..1b7439a 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -986,7 +986,9 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED
if (Flags & WINED3DLOCK_DISCARD) {
/* Set SFLAG_INSYSMEM, so we'll never try to download the data from the texture. */
TRACE("WINED3DLOCK_DISCARD flag passed, marking local copy as up to date\n");
+ surface_prepare_system_memory(This); /* Makes sure memory is allocated */
This->Flags |= SFLAG_INSYSMEM;
+ goto lock_end;
}
if (This->Flags & SFLAG_INSYSMEM) {
More information about the wine-cvs
mailing list