Share via


DirectDraw Interface Tests (Compact 7)

3/12/2014

The DirectDraw Interface Tests attempt to call every method on every interface.

This test runs only if the display hardware on the target device supports DirectDraw. They are organized into two groups.

Functionality IDirectDraw methods

Cooperative levels

IDirectDraw::SetCooperativeLevel, IDirectDraw::TestCooperativeLevel

Creating objects

IDirectDraw::CreateClipper, IDirectDraw::CreateSurface

Device capabilities

IDirectDraw::GetCaps, IDirectDraw::GetDeviceIdentifier

Display modes

IDirectDraw::EnumDisplayModes, IDirectDraw::GetDisplayMode, IDirectDraw::GetMonitorFrequency, IDirectDraw::RestoreDisplayMode, IDirectDraw::SetDisplayMode, IDirectDraw::WaitForVerticalBlank

Display status

IDirectDraw::GetScanLine, IDirectDraw::GetVerticalBlankStatus

Miscellaneous

IDirectDraw::GetAvailableVidMem, IDirectDraw::GetFourCCCodes

Surface management

IDirectDraw::EnumSurfaces, IDirectDraw::FlipToGDISurface, IDirectDraw::GetGDISurface, IDirectDraw::GetSurfaceFromDC, IDirectDraw::RestoreAllSurfaces

Functionality IDirectDrawSurface methods

Allocating memory

IDirectDrawSurface::IsLost, IDirectDrawSurface::Restore

Attaching surfaces

IDirectDrawSurface::EnumAttachedSurfaces

Blitting

IDirectDrawSurface::AlphaBlt, IDirectDrawSurface::Blt, IDirectDrawSurface::GetBltStatus

Color keying

IDirectDrawSurface::GetColorKey, IDirectDrawSurface::SetColorKey,

Device capabilities

IDirectDrawSurface::GetCaps

Device contexts

IDirectDrawSurface::GetDC, IDirectDrawSurface::ReleaseDC

Flipping

IDirectDrawSurface::Flip, IDirectDrawSurface::GetFlipStatus

Locking surfaces

IDirectDrawSurface::Lock, IDirectDrawSurface::Unlock

Miscellaneous

IDirectDrawSurface::GetDDInterface

Overlays

IDirectDrawSurface::EnumOverlayZOrders, IDirectDrawSurface::GetOverlayPosition, IDirectDrawSurface::SetOverlayPosition, IDirectDrawSurface::UpdateOverlay, IDirectDrawSurface::UpdateOverlayZOrder

Surface clipper

IDirectDrawSurface::GetClipper, IDirectDrawSurface::SetClipper

Surface characteristics

IDirectDrawSurface::GetPixelFormat, IDirectDrawSurface::GetSurfaceDesc

Surface palettes

IDirectDrawSurface::GetPalette, IDirectDrawSurface::SetPalette

Test Prerequisites

Your device must meet the following requirements before you run this test.

The following table shows the hardware requirement for the DirectDraw Interface Test.

Requirement Description

Video subsystem

A video subsystem that supports DirectDraw

The following table shows the software requirements for the DirectDraw Interface Test.

Requirements Description

Tux.exe

Tux test harness, required for executing the test

Kato.dll

Kato logging engine, required for logging test data

DDints.dll

Test library

Before you run the DirectDraw InterfaceTest, you must include DirectX and DirectDraw in your OS design. The SYSGEN_DDRAW=1 sysgen variable adds the required functionality to your OS design.

Note When you run the DirectDraw Interface Test, the Windows Embedded Compact Test Kit (CTK) temporarily copies files to the root directory of the target device. While the test runs, the test dynamically consumes program memory on the device. Before running the test, verify that there is at least 0.9 MB of free storage memory on the device. Also verify that there is at least 1.5 MB of free program memory on the device. If there is not sufficient space in the root directory of the device or there is not sufficient program memory, the test cannot run.

Subtests

The table below lists the subtests included in this test.

SubTest ID Description

256

DirectDrawCreate

257

DirectDrawEnumerate

258

DirectDrawCreateClipper

2560

Blt from palletized surface to 16-bit surface

2816

Asynchronous Blts

512

IDirectDraw::AddRef, IDirectDraw::ReleaseRef

513

IDirectDraw::Compact

514

IDirectDraw::CreateClipper

515

IDirectDraw::CreatePalette

516

IDirectDraw::CreateSurface

517

IDirectDraw::DuplicateSurface

518

IDirectDraw::EnumDisplayModes

519

IDirectDraw::EnumSurfaces

520

IDirectDraw::FlipToGDISurface

521

IDirectDraw::GetCaps

522

IDirectDraw::GetDisplayMode

523

IDirectDraw::GetFourCCCodes

The test uses SupportedFourCCCodes.xml which has some FourCC Codes listed in it. If there are any additional codes that are supported by the DirectDraw object, the user should update the xml file with those codes.

524

IDirectDraw::GetGDISurface

525

IDirectDraw::GetMonitorFrequency

526

IDirectDraw::GetScanLine

527

IDirectDraw::GetVerticalBlankStatus, IDirectDraw::WaitForVerticalBlank

529

IDirectDraw::QueryInterface

530

IDirectDraw::RestoreDisplayMode

531

IDirectDraw::SetCooperativeLevel

769

IDirectDraw2::GetAvailableVidMem

771

IDirectDraw2::SetDisplayMode

3073

IDirectDraw4::GetDeviceIdentifier

3074

IDirectDraw4::GetSurfaceFromDC

3076

IDirectDraw4::RestoreAllSurfaces

3077

IDirectDraw4::TestCooperativeLevel

3078

IDirectDraw4::CreateSurface (client)

1024

IDirectDrawClipper::AddRef, IDirectDrawClipper::ReleaseRef

1025

IDirectDrawClipper::GetClipList, IDirectDrawClipper::SetClipList

1026

IDirectDrawClipper::GetHWnd, IDirectDrawClipper::SetHWnd

1028

IDirectDrawClipper::IsClipListChanged

1029

IDirectDrawClipper::QueryInterface

1280

IDirectDrawColorControl::AddRef, IDirectDrawColorControl::ReleaseRef

1281

IDirectDrawColorControl::GetColorControls, IDirectDrawColorControl::SetColorControls

1282

IDirectDrawColorControl::QueryInterface

1536

IDirectDrawPalette::AddRef, IDirectDrawPalette::ReleaseRef

1537

IDirectDrawPalette::GetCaps

1538

IDirectDrawPalette::GetEntries, IDirectDrawPalette::SetEntries

1540

IDirectDrawPalette::QueryInterface

1793

IDirectDrawSurface::AddOverlayDirtyRect

1794

IDirectDrawSurface::AddRef, IDirectDrawSurface::ReleaseRef

1795

IDirectDrawSurface::Blt

1799

IDirectDrawSurface::EnumAttachedSurfaces

1800

IDirectDrawSurface::EnumOverlayZOrders

1801

IDirectDrawSurface::Flip

1803

IDirectDrawSurface::GetBltStatus

1804

IDirectDrawSurface::GetCaps

1805

IDirectDrawSurface::GetClipper, IDirectDrawSurface::SetClipper

1806

IDirectDrawSurface::GetColorKey, IDirectDrawSurface::SetColorKey

1807

IDirectDrawSurface::GetDC

1808

IDirectDrawSurface::GetFlipStatus

1809

IDirectDrawSurface::GetOverlayPosition

1810

IDirectDrawSurface::GetPalette, IDirectDrawSurface::SetPalette

1811

IDirectDrawSurface::GetPixelFormat

1812

IDirectDrawSurface::GetSurfaceDesc

1814

IDirectDrawSurface::IsLost

1815

IDirectDrawSurface::Lock, IDirectDrawSurface::Unlock

1816

IDirectDrawSurface::QueryInterface

1817

IDirectDrawSurface::ReleaseDC

1818

IDirectDrawSurface::Restore

1820

IDirectDrawSurface::SetOverlayPosition

1821

IDirectDrawSurface::UpdateOverlay

1823

IDirectDrawSurface::UpdateOverlayZOrder

2049

IDirectDrawSurface2::GetDDInterface

2306

IDirectDrawSurface3::SetSurfaceDesc

3585

IDirectDrawSurface5::AlphaBlt

Setting Up the Test

This test has no additional requirements, beyond the standard test environment setup.

Running the Test

Test executes the tux -o -d ddints command line on default execution.

There are no other command line options used.

Verifying the Test

When the test completes running, verify that "PASS" appears in the test log for all subtests.

Troubleshooting the Test

The following table describes some problems that you may encounter while running the DirectDraw Interface Test and provides suggestions for resolving each problem.

Description Resolution

Multiple test cases abort with the message "Set Display Mode Failed". The driver may be returning display modes other than the current display mode in the HALInit function and display mode switching is not supported.

Verify that the driver returns an appropriate display mode in the HALInit function.

Multiple test cases fail when trying to create surfaces in system memory. The driver may be returning an incorrect error when the CreateSurface callback function is called.

When the CreateSurface callback function is called with a surface type that the driver cannot handle, the driver should return DDHAL_DRIVER_HANDLED with ddRVal=DDERR_UNSUPPORTEDFORMAT.

Test cases fail while locking or unlocking. The driver may not be allocating video memory outside of the Graphics, Windowing, and Events Subsystem (GWES) process space.

Allocate video memory outside of the GWES process space with file mapping.

For additional platform specific issues, consult the CTK articles on the TechNet wiki.

See Also

Other Resources

Display - DirectDraw Tests