[9/10] WineD3D: Convert the full surface for now

Stefan Dösinger stefan at codeweavers.com
Thu Feb 15 06:52:21 CST 2007


-------------- next part --------------
From ae2462d184b6dd20425db02ff18e7d6d497d849b Mon Sep 17 00:00:00 2001
From: Stefan Doesinger <stefan at codeweavers.com>
Date: Sat, 10 Feb 2007 17:04:19 +0100
Subject: [PATCH] WineD3D: Convert the full surface for now

Until we have proper subrectangle handling for offscreen surfaces, surface conversion has to use the real surface sizes, and not the
size of the opengl subractangle that it is going to upload. Due to the power of 2 limitations the gl height may be bigger than the
real surface height. If that is not the case, the uploading function will pick the correct parts from the converted surface data
---
 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 a5fba65..462e569 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1714,7 +1714,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) {
     pitch = IWineD3DSurface_GetPitch(iface);
 
     if((convert != NO_CONVERSION) && This->resource.allocatedMemory) {
-        int height = This->glRect.bottom - This->glRect.top;
+        int height = This->currentDesc.Height;
 
         /* Stick to the alignment for the converted surface too, makes it easier to load the surface */
         outpitch = width * bpp;
-- 
1.4.4.3



More information about the wine-patches mailing list