wined3d: Adjust the video mem when dropping the pow2 size in GDISurface.
This commit is contained in:
parent
349b93ae57
commit
5de8cd3bd6
|
@ -1458,6 +1458,7 @@ IWineGDISurfaceImpl_PrivateSetup(IWineD3DSurface *iface)
|
||||||
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
|
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
|
long oldsize = This->resource.size;
|
||||||
|
|
||||||
/* Sysmem textures have memory already allocated -
|
/* Sysmem textures have memory already allocated -
|
||||||
* release it, this avoids an unnecessary memcpy
|
* release it, this avoids an unnecessary memcpy
|
||||||
|
@ -1472,6 +1473,9 @@ IWineGDISurfaceImpl_PrivateSetup(IWineD3DSurface *iface)
|
||||||
This->pow2Height = This->currentDesc.Height;
|
This->pow2Height = This->currentDesc.Height;
|
||||||
This->Flags &= ~SFLAG_NONPOW2;
|
This->Flags &= ~SFLAG_NONPOW2;
|
||||||
|
|
||||||
|
/* Adjust the opengl mem counter */
|
||||||
|
globalChangeGlRam(This->resource.size - oldsize);
|
||||||
|
|
||||||
/* Call GetDC to create a DIB section. We will use that
|
/* Call GetDC to create a DIB section. We will use that
|
||||||
* DIB section for rendering
|
* DIB section for rendering
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue