Skip to content
Snippets Groups Projects
Commit 3bfa1fb3 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard
Browse files

IDirect3DTexture2Impl_Load: when the surface is not allocated and no

location are specified, set it to video memory.
parent 2c40e299
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment