Stefan Dösinger : wined3d: Do not allocate memory if there's a pbo.

Alexandre Julliard julliard at winehq.org
Mon Sep 17 07:59:47 CDT 2007


Module: wine
Branch: master
Commit: f42f228621b1216be4bf25389d21651530103168
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f42f228621b1216be4bf25389d21651530103168

Author: Stefan Dösinger <stefandoesinger at gmx.at>
Date:   Fri Sep 14 17:44:09 2007 +0200

wined3d: Do not allocate memory if there's a pbo.

---

 dlls/wined3d/surface.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index de7beae..fd0a94b 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -36,7 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface);
 HRESULT d3dfmt_convert_surface(BYTE *src, BYTE *dst, UINT pitch, UINT width, UINT height, UINT outpitch, CONVERT_TYPES convert, IWineD3DSurfaceImpl *surf);
 
 static void surface_download_data(IWineD3DSurfaceImpl *This) {
-    if (!This->resource.allocatedMemory) This->resource.allocatedMemory = HeapAlloc(GetProcessHeap(), 0, This->resource.size + 4);
+    if (!(This->resource.allocatedMemory || This->Flags & SFLAG_PBO)) This->resource.allocatedMemory = HeapAlloc(GetProcessHeap(), 0, This->resource.size + 4);
     if (This->resource.format == WINED3DFMT_DXT1 ||
             This->resource.format == WINED3DFMT_DXT2 || This->resource.format == WINED3DFMT_DXT3 ||
             This->resource.format == WINED3DFMT_DXT4 || This->resource.format == WINED3DFMT_DXT5) {




More information about the wine-cvs mailing list