IDirect3DTexture2Impl_Load: when the surface is not allocated and no

location are specified, set it to video memory.
This commit is contained in:
Christian Costa 2002-09-25 03:18:17 +00:00 committed by Alexandre Julliard
parent 2c40e29987
commit 3bfa1fb384
1 changed files with 6 additions and 0 deletions

View File

@ -382,6 +382,12 @@ HRESULT WINAPI IDirect3DTexture2Impl_Load(
TRACE("(%p)->(%p)\n", This, ilpD3DTexture2);
TRACE("Copied surface %p to surface %p\n", ilpD3DTexture2->surface, This->surface);
if ( This->surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_ALLOCONLOAD )
/* If the surface is not allocated and its location is not yet specified,
force it to video memory */
if ( !(This->surface->surface_desc.ddsCaps.dwCaps & (DDSCAPS_SYSTEMMEMORY|DDSCAPS_VIDEOMEMORY)) )
This->surface->surface_desc.ddsCaps.dwCaps |= DDSCAPS_VIDEOMEMORY;
/* Suppress the ALLOCONLOAD flag */
This->surface->surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_ALLOCONLOAD;