Commit e56a4cb7 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

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

parent 24100cd0
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment