Windows Graphics Architecture Leonardo Blanco Development Lead Desktop

Windows Graphics Architecture Leonardo Blanco Development Lead Desktop and Graphics Team Microsoft Corporation

Session Outline Windows graphics big picture Windows Display Driver Model Rendering APIs (D 3 D, Open. GL, GDI) Device APIs (DXGI) Media APIs (Direct. X Video Acceleration) Presentation APIs (WPF) Desktop Window Manager

The Vision Windows delivers unparalleled graphics and multimedia experience in all application areas Games Workstation (CAD, Content Creation, etc) Presentation Imaging Video Eagerly driving new technologies together with our hardware and software partners

Graphics/Gaming/Multimedia/ Presentation Stacks Game (e. g. Halo) HEWS/DCC (e. g. Maya) MCE Imaging (e. g. DIS) Desktop WM Presentation (e. g. Office) Control Panels Shell/UX Win. Forms 3 rd party Game Engine Video (e. g. , WMP) WPF Help System Application IE Application Framework MFC/ATL Splash DUser Managed Direct. X D 3 DX/ HLSL Open. GL MILCore Direct 3 D Common Controls Avalon Core. UI DDraw GDI+ WPF/E CLR Windows Codecs WCS DShow DXVA Trident MS HTML PIX/ Da. Vinci Media Foundation GDI Mid-Level Abstraction User DDI/User Mode Driver Memory Management, Scheduling, Device Management 3 D Engine High-Level Abstraction Low-Level Abstraction DDI/user-mode Driver Display Controller User Application 2 D Engine/ De-interlace… Video Decode Win 32 k Video Encode kstream Print Kernel Driver/ Hardware

Big Picture Simplified Workstation (Inventor) Games (Oblivion) Windows Presentation Foundation UI Frameworks WIC PIX Imaging (Photo. Viewer) Media Foundation Video (Media. Player) Desktop Window Manager Windows Explorer DShow MIL Text Layout Windows Color System Open. GL Direct 3 D XPDM DXVA WDDM DXGI User Presentation (Office) GDI+ GDI Print Terminal Server Remote Assistance … …

Graphics Core In Windows Vista WPF Media Foundation GDI+ GDI D 3 D <9 DX VA DWM PIX D 3 D 9 Ex Microsoftwritten code D 3 D 10 WIC IHVwritten code MIL DXGI Open. GL ICD User-mode driver Common pipeline (DDI) User mode Kernel mode Win 32 Kernel-mode driver DXG Kernel

Windows Display Driver Model WPF Media Foundation GDI+ GDI D 3 D <9 DX VA DWM PIX D 3 D 9 Ex Microsoftwritten code D 3 D 10 WIC IHVwritten code MIL DXGI Open. GL ICD User-mode driver Common pipeline (DDI) User mode Kernel mode Win 32 Kernel-mode driver DXG Kernel

Windows Display Driver Model Bedrock upon which all graphics are built Fundamental principle Graphics Just Works Re-architect entire driver stack Consolidate 10 years of evolution New driver model delivers Stability Security Availability (application virtualization) Performance

Windows Display Driver Model Staged evolution of driver model WDDM 1. 0 model supports current hardware E. g. , pre-Windows Vista hardware Advanced model (WDDM 2. x) utilizes new hardware features Post Windows Vista More efficient virtualization Old Windows XP driver model still supported for compatibility No new features

Rendering APIs Lots to choose from GDI/GDI+ Direct. Draw Direct 3 D [3. . 10] Open. GL Windows Presentation Foundation Break into categories Legacy Mainline (GDI, Direct 3 D 9/9 Ex) New (Direct 3 D 10, WPF)

GDI And GDI+ WPF Media Foundation GDI+ GDI D 3 D <9 DX VA DWM PIX D 3 D 9 Ex Microsoftwritten code D 3 D 10 WIC IHVwritten code MIL DXGI Open. GL ICD User-mode driver Common pipeline (DDI) User mode Kernel mode Win 32 Kernel-mode driver DXG Kernel

GDI/GDI+ Workhorse for Windows Presentation/UI, device control, etc Reduced hardware acceleration in Windows Vista Necessary to accomplish WDDM implementation Continue to invest in GDI in future Protect API investment Enhance where feasible

Legacy Direct 3 D APIs WPF Media Foundation GDI+ GDI D 3 D <9 DX VA DWM PIX D 3 D 9 Ex Microsoftwritten code D 3 D 10 WIC IHVwritten code MIL DXGI Open. GL ICD User-mode driver Common pipeline (DDI) User mode Kernel mode Win 32 Kernel-mode driver DXG Kernel

Legacy Direct 3 D APIs Older Direct 3 D immediate mode APIs supported D 3 DRM (retained mode) API retired Map older runtimes onto Direct 3 D 9 DDIs E. g. , runtimes ≤ Direct 3 D 8, Direct. Draw Fixed-function onto shaders, etc Direct 3 D 9 interface matches Direct. X 9. 0 c Same behavior as Direct 3 D 9 on Windows XP Maintain application compatibility

Direct 3 D 9 Ex WPF Media Foundation GDI+ GDI D 3 D <9 DX VA DWM PIX D 3 D 9 Ex Microsoftwritten code D 3 D 10 WIC IHVwritten code MIL DXGI Open. GL ICD User-mode driver Common pipeline (DDI) User mode Kernel mode Win 32 Kernel-mode driver DXG Kernel

Direct 3 D 9 Ex Enhanced version of Direct 3 D 9 Also known as “DX 9. L” Cross-process shared surfaces “Unlimited memory” All memory resources are “managed” Resource management controls Prioritization of resources Antialiased text rendering support Monochrome texture filter with large kernel size No more “device lost” Less frequent “device removed”

Open. GL WPF Media Foundation GDI+ GDI D 3 D <9 DX VA DWM PIX D 3 D 9 Ex Microsoftwritten code D 3 D 10 WIC IHVwritten code MIL DXGI Open. GL ICD User-mode driver Common pipeline (DDI) User mode Kernel mode Win 32 Kernel-mode driver DXG Kernel

Open. GL Three options for Windows Vista Developers Open. GL 1. 1 software implementation Windows XP driver model Open. GL ICDs Not DWM-compatible, DWM shuts off 3 rd party WDDM Open. GL ICDs DWM compliant Limited inbox support for application compatibility Using Direct 3 D 9

Direct 3 D 10 And DXGI WPF Media Foundation GDI+ GDI D 3 D <9 DX VA DWM PIX D 3 D 9 Ex Microsoftwritten code D 3 D 10 WIC IHVwritten code MIL DXGI Open. GL ICD User-mode driver Common pipeline (DDI) User mode Kernel mode Win 32 Kernel-mode driver DXG Kernel

Direct 3 D 10 Latest version of Direct 3 D Supported in Windows Vista Premium Logo requirement in ‘ 08 Major improvements in Hardware consistency Programmer expressiveness WDDM + Direct 3 D 10 are fundamental improvement to the Windows gaming platform

DXGI Separate rendering from device management DXGI (eventually) does Adapter management Display mode management Present to monitor Output management Gamma/Color Improvements of GDI 256 entry table Monitor controls Long term, subsumes functionality from GDI Currently only works with Direct 3 D 10

Media Integration Layer WPF Media Foundation GDI+ GDI D 3 D <9 DX VA DWM PIX D 3 D 9 Ex Microsoftwritten code D 3 D 10 WIC IHVwritten code MIL DXGI Open. GL ICD User-mode driver Common pipeline (DDI) User mode Kernel mode Win 32 Kernel-mode driver DXG Kernel

Media Integration Layer New for Windows Vista Serves WPF and DWM Integrates text, 2 D, images, video, animation Supports remote desktop Composition model Use Direct 3 D for HW acceleration Software fallback Text services (line services) Paragraph, line layout Font mapping Rendering/Rasterization

Windows Presentation Foundation Highly integrated stack Layout, text, video, audio, imaging Builds on other parts of stack Media Integration Layer Media Foundation Imaging Direct 3 D 9 Ex Windows Color System

Media And Imaging WPF Media Foundation GDI+ GDI D 3 D <9 DX VA DWM PIX D 3 D 9 Ex Microsoftwritten code D 3 D 10 WIC IHVwritten code MIL DXGI Open. GL ICD User-mode driver Common pipeline (DDI) User mode Kernel mode Win 32 Kernel-mode driver DXG Kernel

Video Acceleration Relies on more specialized hardware support Decode: IDCT, motion compensation Processing: Deinterlace, denoise, scale, mixing Content protection of high value data OPM, Protected Video Path Supported through Direct. X Video Acceleration (DXVA) APIs Media Center and Media Player use same pipeline

Imaging Hardware accelerated photo experience 12 -16 Mpix @ 60 fps Builds on Direct 3 D 9 API Uses texture mapping + shading for image processing Rely on Shader Model 2. 0 capabilities Float 16 processing Lots of accelerator memory Large texture images (> 2 Kx 2 K)

Image Codecs Image I/O, parsing Metadata, thumbnails Compress, Decompress Popular formats built-in Extension for others Secure, Reliable Central source (WIC)

Desktop Window Manager WPF Media Foundation GDI+ GDI D 3 D <9 DX VA DWM PIX D 3 D 9 Ex Microsoftwritten code D 3 D 10 WIC IHVwritten code MIL DXGI Open. GL ICD User-mode driver Common pipeline (DDI) User mode Kernel mode Win 32 Kernel-mode driver DXG Kernel

Desktop Window Manager New desktop experience using MIL and Direct. X Uses new D 3 D 9 Ex interfaces Desktop Window Manager (DWM) Composited desktop Window movement without repainting underlying windows No more dragging garbage Client areas from applications GDI, Direct 3 D, WPF Video Non-client areas from the Window Manager Allows different views of application windows

Desktop Window Manager WPF Application Direct 3 D Application GDI Application surface Desktop Window Manager

Desktop Window Manager Supports high-DPI displays Composition with magnification Supports video playback Takes advantage of Direct 3 D 9 shaders Animated transitions, etc New D 3 D 9 Ex cross-process shared surfaces Allows DWM to access application back buffers Turns off when certain application types running Overlay planes, front buffer rendering, …

Full Screen Exclusive, Multimon, And DWM Continue to allow apps to have exclusive monitor access Control video mode, gamma, etc… Desktop Window Manager disappears Other applications can continue to run May bump the priorities of the output-exclusive app Applications should recognize case where client area is occluded Background processing on the GPU Multiple monitors independent Composited desktop image per monitor Exclusive output independent for each monitor

Future Technologies Warning: These are directions not commitments Continue the vision Rich graphics and media experience Available all the time to all applications Robust, efficient, applications don’t interfere Scales across mobile, desktop, … Seamless print, remote, Terminal Server

Windows Display Driver Model Lots of areas to address Move to preemptive context switching and page-level memory management ASAP WDDM 2. x Flexible multi-GPU, linked adapters (LDA) Graphics multiprocessing Power management Boot video, VGA, ACPI/BIOS Virtual Machine support

Display/Device Technologies Color managed desktop Hi-def color (float 16) Consumer Electronics (TV) devices Greater format coverage Multimon Improve the fullscreen/windowed experience Multi-desktop support Magnification Monitor controls DDC/CI Rationalize GDI/DXGI device control

Rendering Technologies Interoperability of rendering APIs Game applications Higher-def, procedural content Surface tessellation, order-independent transparency Shader expressiveness Mainstream API Native code access Text, antialiasing, 2 D rendering Rendering quality Multicore CPU investments Process or move data faster

Media Technologies Imaging Direct 3 D 10 provides ideal base Move to “HDR” (actually 16 -bit MDR) Minor improvements for additional image formats 16 -bit fixed in addition to 16 -bit float Video Content Protection (Protected Video Path) Glitch-resilience Preemptive context switching in WDDM 2. x is key Hardware Encode/Analysis Background transcoding Processing HD-DVD compositing scenarios

General Compute (GPGPU) GPU rapidly generalizing Good at high-bandwidth, data-parallel compute Image processing, video processing, physics, … 100 GB/s, 300+ GFlops Looking at more generalized infrastructure Don’t draw triangles to trigger computations Enabled by Hardware implementation consistency Fast CPU ↔ GPU data transfer Multi-GPU support

Call To Action Windows Vista Hardware-accelerated graphics all the time WDDM 1. 0 Direct 3 D 9/9 Ex is everywhere – now Rapid adoption of Direct 3 D 10 – it delivers the future DXVA, content protection, glitch reduction Next WDDM 2. x – efficient GPU virtualization Direct 3 D 10. 1 – incremental changes to 10 Greater generalization of GPU capabilities Hi-def color, HD-DVD

Additional Resources E-mail: Directx @ microsoft. com Related content CLN-T 359 – Windows Display Driver Model Drivers: Key Features CLN-C 364 – Direct 3 D Test Framework CLN-C 362 – Kernel Graphics Infrastructure for Display Devices and Mobiles CLN-P 365 – CPU and GPU Directions

Questions?

FACT: 29 digital cameras carry the “Certified for Windows Vista” logo as of April 1

© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U. S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
- Slides: 44