370 likes | 926 Views
DirectX Graphics: Direct3D 10 and Beyond . Sam Z. Glassenberg Lead Program Manager Graphics Platforms Unit Microsoft Corporation. Graphics Core In Windows Vista. Microsoft- written code. IHV-written code. WPF. DWM. PIX. Media Foundation. MIL. GDI. Legacy D3D APIs. DX VA. D3D9.
E N D
DirectX Graphics: Direct3D 10 and Beyond Sam Z. GlassenbergLead Program ManagerGraphics Platforms UnitMicrosoft Corporation
Graphics Core In Windows Vista Microsoft- written code IHV-written code WPF DWM PIX Media Foundation MIL GDI Legacy D3D APIs DX VA D3D9 D3D9 Ex Direct3D 10 DXGI OpenGL OpenGL ICD Common pipeline (DDI) User-Mode Driver User Mode Kernel Mode Win32Kernel DXGKernel Kernel-Mode Driver
Graphics Core In Windows Vista Direct3D 10
OutlineThe next few years • Direct3D 10 and Direct3D “10.1” • Design Imperatives • Features and Capabilities • Applications
GPU CPU The Situation Today • No single graphics hardware target • CPU-bound games and applications • Bandwidth and CPU cycles are the bottleneck in multiple areas (physics, AI) • Large amount of CPU resources spent directing the GPU
The Situation Today • No single graphics hardware target • CPU-bound games and applications • Bandwidth and CPU cycles are the bottleneck in multiple areas (physics, AI) • Large amount of CPU resources spent directing the GPU • GPU overly-specialized
Direct3D 10Unleashing the power of the GPU • Consistency – guarantee a common feature-set with strict requirements • Performance – Render MORE objects, materials, clutter, vegetation, shadows with LESS CPU cycles, stalls, and bandwidth cost • Visual Effects – unprecedented graphics • Capability – empower the GPU to handle a new series of applications
Direct3D 10 Rebuilt from the ground-up • Direct3D 10 changes the way applications think about… • Material management • GPU State, constants, shaders, … • CPU/GPU load-balancing • Vastly reduced API/driver overhead • More robust GPU capability • CPU-like precision and behavior requirements
Direct3D 10 ApplicationsIncreasing breadth of applicability • Cutting-edge Windows Vista games • Workstation graphics • Image, video, and data processing
Texture Arrays Format Reinterpretation Stream Output Resource Views Input Assembler Immediate offset on Memory Access Integer/Bitwise Instructions Comparison Filtering Constant Buffers State Objects Shared-Exponent HDR Compression (RGBE) Block-Compressed Formats for bump/normal maps 128 texture slots 8 Render targets More interstage communication Instance, Vertex, Primitive identifiers Per-primitive Clip distance Predicated Rendering Alpha-to-Coverage Multisample Readback Better cubemap filtering Input Assembler … Direct3D 10 Features Vertex Buffer InputAssembler Index Buffer VertexShader Texture GeometryShader Texture Stream Output Rasterizer/Interpolator PixelShader Texture Depth/Stencil OutputMerger Render Target
Direct3D 10Geometry Shader Applications • Full control over the whole triangle • All-GPU Material Systems • Better materials • Hi-quality interpolation and derivatives • Wrinkle models • Cartoon and falloff effects • Geometry/data amplification • Fur/Fins • Procedural geometry/detailing • All-GPU Particle Systems • Data visualization techniques • Wide lines and strokes • … Geometry Shader
Geometry Shader ExampleGeneralized displacement maps • Normal mapping (Direct3D 9)
Geometry Shader ExampleGeneralized displacement maps • Displacement Mapping (Direct3D 10)
Single Pass Render-To-Cubemap Geometry Shader
Render-To-Volume Geometry Shader
Shader Model 4.0A new level of programmability • Common Shader Core • Full integer/bitwise instruction set • Massively parallel image and data processing • Custom decompression schemes • Buffer Load – CPU-like unfiltered memory access • Switch statements and subroutines • No limits • More interstage registers, samplers, textures • Unlimited instruction count
Direct3D 10 PerformanceDoing more in a single call • Set a bulk of render state with state objects • Render to an entire cubemap/volume • Render multiple specialized objects using advanced instancing features • Generate procedural detail • Juggle multiple materials in a single shader
Direct3D 10GPU material management • Render a multitude of unique materials without taxing the CPU • Unlimited instruction length • Switch statements • Texture arrays • Geometry shader • Constant buffers • Access to material descriptions
Direct3D 10 PerformanceMaximizing bandwidth efficiency • Constant Buffers • Update shader constant data (light positions, material info, camera info, etc.) in bulk, only when needed • Streamlined GPU resource update mechanisms • Fast CPU readback via staging • New compression formats
Consistency • Strictly-defined, consistent behavior throughout • IEEE floating-point compliance (almost) • Precise FP32 sampling/blending/math/conversion rules; i.e. • FP32 shader ops – precise to 1.0 ULP • FP32 to Integer – precise to 0.6 ULP per op • FP16 blending – precise to 0.6 ULP per op • 32-bit blending required • Exact line/triangle/anti-aliased drawing rules
No Caps In Direct3D 10! • Direct3D 10 Optional Format Support • >1 Sample MSAA • 32-bit FP filtering • RGB32 Rendertarget (RGBA32 is required) • Hardware (and applications) will scale on perf, not feature selection • Increases breadth of applicability • Performance is criticalfor a good experience
Direct3D10: An Inflection Point • The API exposes Direct3D 10-class hardware • Performance-focused API • No downlevel hardware support • Clean and consistent API • All features guaranteed • Direct3D 10 takes full advantage of WDDM • Direct3D 10 is Windows Vista/WDDM-only • WDDM-basic guaranteed to Direct3D 10 developers User Mode Application User-Mode Driver Direct3D Kernel Mode DXGKml GPUMem Mgr. GPUScheduler Kernel-Mode Driver Graphics Hardware
Direct3D 10 Status • Hardware spec frozen for over a year • First publicly-available Tech Preview in December 2005 • Aligned with Windows Vista CTP’s • Updates bimonthly • Direct3D 10 Beta in Windows Vista Beta 2 • RTM in Windows Vista • Currently underway • IHV driver development • Conformance test development • Launch titles
Direct3D 10.1 Design imperatives • Incremental hardware and software update to Direct3D 10 • Strict superset of Direct3D 10 features • API support for Direct3D 10 and 10.1 hardware
Direct3D 10.1 Goals • Guarantee WDDM 2.1-level capability to developers and end-users • Lower CPU overhead • Massive datasets • Increase capability and performance • “Complete” Direct3D 10 • Boost image quality: Improved anti-aliasing
Direct3D 10.1 FeaturesFull anti-aliasing control • Application control over: • Multi-sample AA (smooth edges) or • Super-sample AA (smooth edges and interior) • Selecting sample patterns • Pixel coverage mask • High-quality vegetation, motion blur, particles… • Minimum of 4 samples/pixel required
Direct3D 10.1 FeaturesIncreased pipeline and shader capability • Improved shader resource access • Greater control over MSAA readback • Custom downsample filters • Improved shadow filtering • Float32 filtering requirement • Better HDR • Enhanced blending • Independent blend modes per-rendertarget • New blend-able rendertarget formats • Increased pipeline precision
Direct3D 10.1 FeaturesPerformance enhancements • Enable applications to further exploit multicore for rendering • Fewer API calls for reflections and refractions • Support for indexable, generalized cubemap arrays
Call To Action • Invest in performant Direct3D graphics – end-user value scales with performance • Not just games! (but games will look much better) • Direct3D 10 and WDDM for 2007 • Direct3D 10.1 and WDDM 2.1 for “next”
Additional Resources • DirectX Developer Center http://msdn.microsoft.com/DirectX • Direct3D 10 Tech Preview • Available in the DirectX SDK • Includes ~25 samples and tutorials – with videos • Direct3D 10 reference rasterizer, documentation, tools… • Game Developer Conference 2006and PDC 2005 Direct3D 10 presentations • Related sessions • Future Directions in Graphics • WDDM v2 and Beyond
© 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.