wined3d: Also change the resource's format desc in IWineD3DBaseSurfaceImpl_SetFormat().
Henri Verbeet
hverbeet at codeweavers.com
Fri Mar 13 04:44:17 CDT 2009
---
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);
--
1.6.0.6
--------------060506010009090504060309--
More information about the wine-patches
mailing list