Microsoft Windows CE 3.0  

Testing for DMA Support

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Before using DMA operations, you must test the device for DMA support and, if it does support DMA, how much support it provides. Begin by retrieving the driver capabilities by calling the IDirectDraw4::GetCapsmethod, then look for the DDCAPS_CANBLTSYSMEM flag in the dwCapsmember of the associated DDCAPSstructure. If the flag is set, the device supports DMA.

If you know that DMA is generally supported, you also need to find out how well the driver supports it. You do so by looking at some other structure members that provide information about system-to-video, video-to-system, and system-to-system blit operations. These capabilities are provided in 12 DDCAPSstructure members that are named according to blit and capability type. The following table shows these new members.

System-to-video Video-to-system System-to-system
   dwSVBCaps    dwVSBCaps    dwSSBCaps
   dwSVBCKeyCaps    dwVSBCKeyCaps    dwSSBCKeyCaps
   dwSVBFXCaps    dwVSBFXCaps    dwSSBFXCaps
   dwSVBRops    dwVSBRops    dwSSBRops

For example, the system-to-video blit capability flags are provided in the dwSVBCaps, dwSVBCKeyCaps, dwSVBFXCapsand dwSVBRopsmembers. Similarly, video-to-system blit capabilities are in the members whose names begin with " dwVSB," and system-to system capabilities are in the " dwSSB" members. Examine the flags present in these members to determine the level of hardware support for that blit category.

The flags in these members are parallel with the blit-related flags included in the dwCaps, dwCKeyCaps, and dwFXCapsmembers, with respect to that member's blit type. For example, the dwSVBCapsmember contains general blit capabilities as specified by the same flags you might find in the dwCapsmember. Likewise, the raster operation values in the dwSVBRops, dwVSBRops, and dwSSBRopsmembers provide information about the raster operations supported for a given type of blit operation.

One of the key features to look for in these members is support for asynchronous DMA blit operations. If the driver supports asynchronous DMA blits between surfaces, the DDCAPS_BLTQUEUE flag will be set in the dwSVBCaps, dwVSBCaps, or dwSSBCapsmember. (Generally, you'll see the best support for system-memory-to-video-memory surfaces.) If the flag isn't present, the driver isn't reporting support for asynchronous DMA blit operations.



 Last updated on Tuesday, May 18, 2004

© 2004 Microsoft Corporation. All rights reserved.