Compartilhar via


Testing for DMA Support (Windows CE 5.0)

Send Feedback

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::GetCaps method, then look for the DDCAPS_CANBLTSYSMEM flag in the dwCaps member of the associated DDCAPS structure.

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 DDCAPS structure 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, dwSVBFXCaps and dwSVBRops members.

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 dwFXCaps members, with respect to that member's blit type.

For example, the dwSVBCaps member contains general blit capabilities as specified by the same flags you might find in the dwCaps member.

Likewise, the raster operation values in the dwSVBRops, dwVSBRops, and dwSSBRops members provide information about the raster operations supported for a given type of blit operation.

A key capability 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 is set in the dwSVBCaps, dwVSBCaps, or dwSSBCaps member. (Generally, you see the best support for system-memory-to-video-memory surfaces.)

If the flag is not present, the driver is not reporting support for asynchronous DMA blit operations.

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.