Creating the Compressed Texture Surface
Whenever DirectDraw requests the driver to create a surface, the driver must determine whether it is being asked to create a compressed texture surface. To determine this, the driver must check for information that has previously been set by DirectDraw in the DDSURFACEDESC2 structure for the surface being created. Your driver must include the following verification steps (as with any surface):
Check for the DDSCAPS_TEXTURE flag in the dwFlags member of the DDSCAPS structure.
Check for the DDPF_FOURCC flag in the dwFlags member of the DDPIXELFORMAT structure for the surface being created. This check should occur before the following dwFourCC check.
Check for one of the DXT codes in the dwFourCC member of the DDPIXELFORMAT structure for the surface being created.
Check the width and height members (dwWidth and dwHeight) of the DDSURFACEDESC2 structure. DirectDraw sets these members to multiples of 4 pixels.