Losing Driver-Managed Textures

Driver-managed texture surfaces, which consume video memory, need the ability to be placed in a suspended state (lost). Because the driver controls the allocation of video memory for driver-managed texture surfaces, a method notifies the driver when such texture surfaces need to be lost through an extension to the DdDestroySurface call.

When a driver-managed texture surface (marked with the DDSCAPS2_TEXTUREMANAGE flag) is lost, the driver receives a special DdDestroySurface call with DDRAWISURF_INVALID specified in the dwFlags member of the texture surface structure. The driver should free video memory associated with the managed texture surface, but should not free any other private surface information including the backing (system memory) image of the video memory copy of the surface. There will be no new DdCreateSurface call to restore the lost driver-managed texture surfaces because they are not really lost from the driver's point of view. For the most part, this special DdDestroySurface call is used to inform the driver that it should evict its video memory copy.



Send comments about this topic to Microsoft