emb306 building windows ce devices with dx support john l. marcantonio program manager windows ce...

32
EMB306 EMB306 Building Windows CE Building Windows CE Devices With DX Devices With DX Support Support John L. Marcantonio John L. Marcantonio Program Manager Program Manager Windows CE Multimedia Windows CE Multimedia Microsoft Corporation Microsoft Corporation

Upload: damian-porter

Post on 16-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

EMB306EMB306

Building Windows CE Building Windows CE Devices With DX SupportDevices With DX Support

John L. MarcantonioJohn L. MarcantonioProgram ManagerProgram ManagerWindows CE MultimediaWindows CE MultimediaMicrosoft CorporationMicrosoft Corporation

Page 2: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation
Page 3: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

MManagementanagementTToolsools

CCommunicationsommunications& & MMessagingessaging

Device Update Agent

Software Update Services

Live Communications Server

Exchange Server

Internet Security and Acceleration Server

Speech Server

Image Update

LLocation ocation SServiceservices

MMultimediaultimedia

MapPoint

DirectX

Windows Media

Visual Studio 2005DDevelopment evelopment TToolsools

MFC 8.0, ATL 8.0

Win32NNativeative

MManagedanaged

SServer erver SSideide

LLightweightightweight

RRelationalelationalSQL Server 2005 Express EditionEDB

DDa

taata

PPro

gra

mm

ing

ro

gra

mm

ing

MM

od

el

od

el

DDevice evice BBuilding uilding TToolsools

HHardware/ardware/DDriversrivers

Windows XP DDK

Windows Embedded Studio

Platform Builder

OEM/IHV SuppliedBSP

(ARM, SH4, MIPS)OEM Hardware and Standard Drivers

Standard PC Hardware and Drivers

SQL Server 2005SQL Server 2005 Mobile Edition

ASP.NET Mobile Controls ASP.NET

.NET Compact Framework .NET Framework

Microsoft Operations Manager

Systems Management Server

Page 4: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

AgendaAgenda

Types of Graphics SupportTypes of Graphics Support

Device ConsiderationsDevice Considerations

Building Devices With DX Graphics Building Devices With DX Graphics SupportSupport

Driver Design and API FeaturesDriver Design and API Features

DemosDemos

QuestionsQuestions

Page 5: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

Types Of Graphics SupportTypes Of Graphics Support

Two Dimensional (2D)Two Dimensional (2D)Ranging from SW windowing controls to Ranging from SW windowing controls to HW accelerated routinesHW accelerated routinesPrimarily Surface management and Primarily Surface management and presentationpresentation

Ex: Text generation, images, overlays, color Ex: Text generation, images, overlays, color space conversionspace conversion

Three Dimensional (3D)Three Dimensional (3D)3D Scene generation3D Scene generationModel design and animationModel design and animationScene rendered special effectsScene rendered special effects

Ex: Lighting, texturing, fogEx: Lighting, texturing, fog

Page 6: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

Application ClassesApplication Classes

2D application development2D application development““Windows” applicationsWindows” applications

Ex: Common Controls, window formsEx: Common Controls, window forms

Media ApplicationsMedia ApplicationsVideo playback, still imagingVideo playback, still imaging

Gaming ContentGaming ContentCasual gaming (Solitaire)Casual gaming (Solitaire)

3D application development3D application developmentTelematicsTelematicsHigh performance gamingHigh performance gamingApplication UIApplication UI

Page 7: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

Device ConsiderationsDevice Considerations

What is the end goal of the device?What is the end goal of the device?Game machineGame machine

Pachinko, ‘Gizmondo’Pachinko, ‘Gizmondo’Consider HW accelerated 2D and 3DConsider HW accelerated 2D and 3D

Media playerMedia playerPortable media playersPortable media playersConsider 2D accelerated APIConsider 2D accelerated API

Portable texting devicePortable texting deviceSW 2D may be sufficientSW 2D may be sufficient3D may be too much3D may be too much

Chose the technologies that will enable Chose the technologies that will enable the key device scenariosthe key device scenarios

Deliver on device strengths while minimizing BOMDeliver on device strengths while minimizing BOMHW acceleration might not be required HW acceleration might not be required to achieve device scenariosto achieve device scenariosHW acceleration is not only about performanceHW acceleration is not only about performance

Power consumptionPower consumption

Page 8: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

Graphics OptionsGraphics Options

Graphics Device Interface (GDI)Graphics Device Interface (GDI)Controls display of text and graphicsControls display of text and graphicsDerived from desktop GDI modelDerived from desktop GDI model

DirectDrawDirectDrawHW accelerated support for 2D graphicsHW accelerated support for 2D graphicsDerived from DX 6.4Derived from DX 6.4

Direct3D MobileDirect3D MobileHW / SW acceleration for 3D developmentHW / SW acceleration for 3D development

All technologies architected to provide All technologies architected to provide maximum functionality while balancing maximum functionality while balancing characteristics of embedded devicescharacteristics of embedded devices

Memory footprint, RAM utilization, Memory footprint, RAM utilization, breadth of HW architecturesbreadth of HW architectures

Page 9: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

Building DX Devices Building DX Devices With Platform BuilderWith Platform Builder

Page 10: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

GDI DesignGDI Design

Based on the desktop Based on the desktop GDI graphics modelGDI graphics model

Creates uniform knowledge base Creates uniform knowledge base and consistent platformsand consistent platformsFamiliarity with desktop APIs Familiarity with desktop APIs and behaviorand behavior

Does not include all desktop Does not include all desktop functionalityfunctionality

Created for devices with limited resourcesCreated for devices with limited resourcesAllows for low footprint implementation Allows for low footprint implementation while providing breadth of GDI while providing breadth of GDI functionalityfunctionality

Page 11: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

GDI Driver CreationGDI Driver Creation

GPE (Graphics Primitive Engine)GPE (Graphics Primitive Engine)Device Independent Bitmap (DIB) designDevice Independent Bitmap (DIB) designClasses used to aid driver developmentClasses used to aid driver developmentHandles all communication with the DDIHandles all communication with the DDIHandles default drawingHandles default drawing

Video buffers are accessible in system address space Video buffers are accessible in system address space Video buffer is non-banked Video buffer is non-banked Video buffer is non-planar and has one plane Video buffer is non-planar and has one plane Video buffers have one of the following bits-per-pixel: 1, Video buffers have one of the following bits-per-pixel: 1, 2, 4, 8, 16, 24, or 32 2, 4, 8, 16, 24, or 32

A 5-, 6-, or 15-bpp driver cannot be GPE-based – though can A 5-, 6-, or 15-bpp driver cannot be GPE-based – though can be exposedbe exposed

GPE enables device-specific accelerations for the GPE enables device-specific accelerations for the drawing of either raster (bitmap) or vector drawing of either raster (bitmap) or vector (lines and filled areas) graphic primitives (lines and filled areas) graphic primitives

Page 12: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

GPEGPE

Page 13: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

GDI Raster Operations (ROPs)GDI Raster Operations (ROPs)

Also known as BLTsAlso known as BLTs

GPE uses an emulation library for GPE uses an emulation library for basic raster opsbasic raster ops

Found at: Found at: %_WINCEROOT%\Public\Common\OAK\Drivers\%_WINCEROOT%\Public\Common\OAK\Drivers\

Display\EmulDisplay\Emul

Can be removed for driver development to Can be removed for driver development to leverage HW accelerated pathsleverage HW accelerated paths

Set SYSGEN_GPE_NOEMULSet SYSGEN_GPE_NOEMUL

Page 14: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

GDI Device ContextsGDI Device Contexts

Determines target of GDI functionalityDetermines target of GDI functionalityPhysical devicesPhysical devices

Display controllerDisplay controller

PrinterPrinter

Logical devicesLogical devicesMemory deviceMemory device

Contains device interaction attributesContains device interaction attributesAbstracts information required Abstracts information required to output to deviceto output to device

Control operating modesControl operating modesText and background colorsText and background colors

Pen or brush mixing modes with display surface colorsPen or brush mixing modes with display surface colors

Page 15: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

GDI Drawing ObjectsGDI Drawing Objects

PensPensUsed to draw lines and curvesUsed to draw lines and curves

BrushesBrushesFills the interiors of enclosed surfacesFills the interiors of enclosed surfaces

FontsFontsOutput text to the target deviceOutput text to the target device

Page 16: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

DirectX DesignDirectX Design

Designed to abstract device Designed to abstract device characteristicscharacteristics

HW and SW paths abstracted from the HW and SW paths abstracted from the application developerapplication developer

DirectX Capability Bits (CAPS Bits)DirectX Capability Bits (CAPS Bits)Foundation of DX architectureFoundation of DX architectureCan be queried to determine device Can be queried to determine device functionality and ‘fast paths’ (HW functionality and ‘fast paths’ (HW acceleration)acceleration)Queried from application at runtimeQueried from application at runtime

Single application can leverage breadth of Single application can leverage breadth of target architecturestarget architectures

Page 17: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

DirectDraw FeaturesDirectDraw Features

Functional overlaps with GDIFunctional overlaps with GDIBit-block transfers (BLTs) Bit-block transfers (BLTs) Page flipping and multiple back buffers Page flipping and multiple back buffers OverlaysOverlays

Placing one image surface over another Placing one image surface over another on the video display on the video display

Alpha source over destination blendingAlpha source over destination blendingBlending two surfaces using the source Blending two surfaces using the source alpha image component alpha image component

Video YUV pixel formats and color conversion Video YUV pixel formats and color conversion Direct video access to the frame buffer Direct video access to the frame buffer

Page 18: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

DirectDraw ArchitectureDirectDraw Architecture

Page 19: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

DDGPEDDGPE

Similar to GDI GPE driver classesSimilar to GDI GPE driver classesCan be derived from GPE classes to Can be derived from GPE classes to streamline driver developmentstreamline driver development

Emulation and HW supportEmulation and HW supportDDHELDDHEL

Hardware Emulation LayerHardware Emulation LayerDesigned for SW fallback of routines not Designed for SW fallback of routines not supported in device HWsupported in device HW

DDHALDDHALHardware Abstraction LayerHardware Abstraction Layer

Leverage device HW acceleration for specific routinesLeverage device HW acceleration for specific routinesCalls passed directly to acceleratorsCalls passed directly to accelerators

Page 20: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

DDGPEDDGPE

Page 21: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

DirectDraw Driver ConsiderationsDirectDraw Driver Considerations

Port or scratch development?Port or scratch development?Do have you an existing driver for your target platform / Do have you an existing driver for your target platform / graphics chipset?graphics chipset?

Existing driver code could be leveraged for many routines – Existing driver code could be leveraged for many routines – particularly HW accessparticularly HW access

What version was the driver developed for?What version was the driver developed for?D3D9 driver might require too much back portingD3D9 driver might require too much back porting

Porting from an earlier CE driver might be cost effectivePorting from an earlier CE driver might be cost effective

What functionality are you looking to expose?What functionality are you looking to expose?Limited features for device scenarios or general purposeLimited features for device scenarios or general purpose

Color conversion or overlays for videoColor conversion or overlays for video

HW flipping for high speed game applicationsHW flipping for high speed game applications

Are you leveraging an existing GPE driver for CE?Are you leveraging an existing GPE driver for CE?This will provide a solid foundation for the graphics This will provide a solid foundation for the graphics system to start fromsystem to start from

Page 22: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

Direct3D MobileDirect3D Mobile

Complete 3D API derived from the desktop modelComplete 3D API derived from the desktop modelBased on DX8 API signaturesBased on DX8 API signaturesIncludes some aspects of DX9Includes some aspects of DX9Architected specifically for mobile and embedded devicesArchitected specifically for mobile and embedded devicesUltra small footprint (~65KB)Ultra small footprint (~65KB)

No SW fallback in runtimeNo SW fallback in runtime

Type Independent Data SupportType Independent Data SupportA compliant D3DM driver requires support for bothA compliant D3DM driver requires support for both

IEEE 32-bit FloatsIEEE 32-bit Floats16.16 Fixed Point16.16 Fixed Point

Fixed Function Pipeline OnlyFixed Function Pipeline OnlyD3DM does not support programmable pipelinesD3DM does not support programmable pipelinesVS/PS support being considered for future revisionsVS/PS support being considered for future revisions

D3DM is not tied explicitly to Direct DrawD3DM is not tied explicitly to Direct DrawDirect Draw surface management can be leveraged Direct Draw surface management can be leveraged by SW based D3DM driversby SW based D3DM drivers

Page 23: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

D3DM ArchitectureD3DM Architecture

D3DM is based on a Thin API / Thick Driver D3DM is based on a Thin API / Thick Driver ArchitectureArchitecture

API MiddlewareAPI MiddlewareCall TransportCall TransportSynchronizationSynchronizationOS IntegrationOS Integration

Driver (~100KB+) – Actual Drawing ServicesDriver (~100KB+) – Actual Drawing ServicesPure SW (CPU Only)Pure SW (CPU Only)SW + HW Assist (SIMD, DSP)SW + HW Assist (SIMD, DSP)Pure HW (External Graphics Controller)Pure HW (External Graphics Controller)

Simplified DDISimplified DDICompared to the desktop the DDI complexity has Compared to the desktop the DDI complexity has been reduced significantly (~30 to ~10)been reduced significantly (~30 to ~10)

Page 24: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

D3DM Driver TypesD3DM Driver Types

Locally Hooked DriverLocally Hooked DriverLoads the D3DM driver in app process spaceLoads the D3DM driver in app process space

Leverage Direct Draw for surface management to Leverage Direct Draw for surface management to frame bufferframe buffer

Primarily for SW based driversPrimarily for SW based drivers

Remotely Hooked DriverRemotely Hooked DriverLoaded in GWESLoaded in GWES

Identical to CE display driver architectureIdentical to CE display driver architecture

Designed to access graphics HWDesigned to access graphics HW

Hybrid ModelHybrid ModelCombined traits of local and remote hookedCombined traits of local and remote hooked

Page 25: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

D3DM NULL DriverD3DM NULL Driver

Created specifically for D3DM driver writersCreated specifically for D3DM driver writers‘‘Fill in the functions’Fill in the functions’

Strongly recommended as a starting point for Strongly recommended as a starting point for D3DM driver developmentD3DM driver development

Core functionality and design already created for youCore functionality and design already created for you

Provides a stable starting point to work fromProvides a stable starting point to work from

Skeletal framework for D3DM driver design Skeletal framework for D3DM driver design includingincluding

Entry pointsEntry points

Command token generationCommand token generation

Debug zones and error checkingDebug zones and error checking

Page 26: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

D3DM Reference DriverD3DM Reference Driver

Complete SW driver implementation Complete SW driver implementation of D3DM v1.0 definitionof D3DM v1.0 definition

NotNot performance oriented, designed performance oriented, designed as a QA toolas a QA tool

Used extensively in the D3DM CETK suiteUsed extensively in the D3DM CETK suite

Completely functional in a runtime Completely functional in a runtime environmentenvironment

Can be used for prototype development if no Can be used for prototype development if no production driver is currently availableproduction driver is currently available

While a non-optimized solution, ‘reasonable’ performance While a non-optimized solution, ‘reasonable’ performance can be obtained on high end devicescan be obtained on high end devices

Page 27: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

Direct3D Mobile Direct3D Mobile ResourcesResources

Page 28: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

While at MEDC 2005…While at MEDC 2005…Fill outFill out an evaluation for this session an evaluation for this session

Randomly selected instant Randomly selected instant WINWIN prizes! prizes!

Use Use real technology in a labreal technology in a lab Instructor led Instructor led Reef E/FReef E/F & & Breakers LBreakers L

Self-paced Self-paced Reef B/CReef B/C

VisitVisit the Microsoft Product Pavilion the Microsoft Product Pavilion

in the Exhibit Hall in the Exhibit Hall Shorelines BShorelines B

Page 29: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

After The Conference…After The Conference…

DevelopDevelop

BuildBuild

InstallInstall

BuildBuild

JoinJoin

InstallInstall

EnterEnter

JoinJoin

Full-featured trial versions of Windows CE Full-featured trial versions of Windows CE and/or Windows XP Embeddedand/or Windows XP Embedded

Cool stuff & tell us about it: Cool stuff & tell us about it: msdn.microsoft.com/embedded/community

Windows Embedded Partner Program:Windows Embedded Partner Program:www.mswep.com

Windows Mobile 5.0 Eval Kit including Windows Mobile 5.0 Eval Kit including Visual Studio 2005 Beta 2Visual Studio 2005 Beta 2

Mobile2Market Contest and win up to $25000: Mobile2Market Contest and win up to $25000: mobile2marketcontest.com

Microsoft Solutions Partner Program:Microsoft Solutions Partner Program:partner.microsoft.com

Page 30: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

Tools & ResourcesTools & Resources

msdn.microsoft.com/msdn.microsoft.com/ embeddedembedded

microsoft.public.microsoft.public. windowsxp.embeddedwindowsxp.embedded windowsce.platbuilderwindowsce.platbuilder windowsce.embedded.vcwindowsce.embedded.vc

blogs.msdn.com/blogs.msdn.com/ mikehallmikehall

Windows CE 5.0 Eval KitWindows CE 5.0 Eval KitWindows XP Embedded Eval KitWindows XP Embedded Eval Kit

msdn.microsoft.com/msdn.microsoft.com/ mobilitymobility

microsoft.public.microsoft.public. pocketpc.developer pocketpc.developer smartphone.developer smartphone.developer dotnet.framework.compactframeworkdotnet.framework.compactframework

blogs.msdn.com/blogs.msdn.com/ windowsmobilewindowsmobile vsdteamvsdteam netcfteamnetcfteam

Windows Mobile 5.0 Eval KitWindows Mobile 5.0 Eval Kit

WebsitesWebsites

NewsgroupsNewsgroups

BlogsBlogs

ToolsTools

BuildBuild DevelopDevelop

Page 31: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

QuestionsQuestions

Page 32: EMB306 Building Windows CE Devices With DX Support John L. Marcantonio Program Manager Windows CE Multimedia Microsoft Corporation

© 2005 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.