Henri Verbeet : wined3d: Also change the resource' s format desc in IWineD3DBaseSurfaceImpl_SetFormat().

Alexandre Julliard julliard at winehq.org
Fri Mar 13 09:13:51 CDT 2009


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Fri Mar 13 10:44:17 2009 +0100

wined3d: Also change the resource's format desc in IWineD3DBaseSurfaceImpl_SetFormat().

---

 dlls/wined3d/surface_base.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c
index 54c20f0..4bd860c 100644
--- a/dlls/wined3d/surface_base.c
+++ b/dlls/wined3d/surface_base.c
@@ -508,7 +508,9 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetContainer(IWineD3DSurface *iface, IWin
 
 HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3DFORMAT format) {
     IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
-    const StaticPixelFormatDesc *formatEntry = getFormatDescEntry(format, NULL, NULL);
+    const struct GlPixelFormatDesc *format_desc;
+    const StaticPixelFormatDesc *formatEntry = getFormatDescEntry(format,
+            &This->resource.wineD3DDevice->adapter->gl_info, &format_desc);
 
     if (This->resource.format != WINED3DFMT_UNKNOWN) {
         FIXME("(%p) : The format of the surface must be WINED3DFORMAT_UNKNOWN\n", This);
@@ -540,6 +542,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3D
     This->Flags |= (WINED3DFMT_D16_LOCKABLE == format) ? SFLAG_LOCKABLE : 0;
 
     This->resource.format = format;
+    This->resource.format_desc = format_desc;
 
     TRACE("(%p) : Size %d, bytesPerPixel %d\n", This, This->resource.size, This->bytesPerPixel);
 




More information about the wine-cvs mailing list