Graphics Rendering Tiers
A rendering tier defines a level of graphics hardware capability and performance for a device that runs a WPF application.
The features of the graphics hardware that most impact the rendering tier levels are:
Video RAM The amount of video memory on the graphics hardware determines the size and number of buffers that can be used for compositing graphics.
Pixel Shader A pixel shader is a graphics processing function that calculates effects on a per-pixel basis. Depending on the resolution of the displayed graphics, there could be several million pixels that need to be processed for each display frame.
Vertex Shader A vertex shader is a graphics processing function that performs mathematical operations on the vertex data of the object.
Multitexture Support Multitexture support refers to the ability to apply two or more distinct textures during a blending operation on a 3D graphics object. The degree of multitexture support is determined by the number of multitexture units on the graphics hardware.
Rendering Tier Definitions
The features of the graphics hardware determine the rendering capability of a WPF application. The WPF system defines three rendering tiers:
Rendering Tier 0 No graphics hardware acceleration. All graphics features use software acceleration. The DirectX version level is less than version 9.0.
Rendering Tier 1 Some graphics features use graphics hardware acceleration. The DirectX version level is greater than or equal to version 9.0.
Rendering Tier 2 Most graphics features use graphics hardware acceleration. The DirectX version level is greater than or equal to version 9.0.
The RenderCapability.Tier property allows you to retrieve the rendering tier at application run time. You use the rendering tier to determine whether the device supports certain hardware-accelerated graphics features. Your application can then take different code paths at run time depending on the rendering tier supported by the device.
Rendering Tier 0
A rendering tier value of 0 means that there is no graphics hardware acceleration available for the application on the device. At this tier level, you should assume that all graphics will be rendered by software with no hardware acceleration. This tier's functionality corresponds to a DirectX version that is less than 9.0.
Rendering Tier 1 and Rendering Tier 2
Starting in the .NET Framework 4, rendering tier 1 has been redefined to only include graphics hardware that supports DirectX 9.0 or greater. Graphics hardware that supports DirectX 7 or 8 is now defined as rendering tier 0.
A rendering tier value of 1 or 2 means that most of the graphics features of WPF will use hardware acceleration if the necessary system resources are available and have not been exhausted. This corresponds to a DirectX version that is greater than or equal to 9.0.
The following table shows the differences in graphics hardware requirements for rendering tier 1 and rendering tier 2:
|Feature||Tier 1||Tier 2|
|DirectX version||Must be greater than or equal to 9.0.||Must be greater than or equal to 9.0.|
|Video RAM||Must be greater than or equal to 60MB.||Must be greater than or equal to 120MB.|
|Pixel shader||Version level must greater than or equal to 2.0.||Version level must greater than or equal to 2.0.|
|Vertex shader||No requirement.||Version level must greater than or equal to 2.0.|
|Multitexture units||No requirement.||Number of units must greater than or equal to 4.|
The following features and capabilities are hardware accelerated for rendering tier 1 and rendering tier 2:
|2D rendering||Most 2D rendering is supported.|
|3D rasterization||Most 3D rasterization is supported.|
|3D anisotropic filtering||WPF attempts to use anisotropic filtering when rendering 3D content. Anisotropic filtering refers to enhancing the image quality of textures on surfaces that are far away and steeply angled with respect to the camera.|
|3D MIP mapping||WPF attempts to use MIP mapping when rendering 3D content. MIP mapping improves the quality of texture rendering when a texture occupies a smaller field of view in a Viewport3D.|
|Radial gradients||While supported, avoid the use of RadialGradientBrush on large objects.|
|3D lighting calculations||WPF performs per-vertex lighting, which means that a light intensity must be calculated at each vertex for each material applied to a mesh.|
|Text rendering||Sub-pixel font rendering uses available pixel shaders on the graphics hardware.|
The following features and capabilities are hardware accelerated only for rendering tier 2:
|3D anti-aliasing||3D anti-aliasing is supported only on operating systems that support Windows Display Driver Model (WDDM), such as Windows Vista and Windows 7.|
The following features and capabilities are not hardware accelerated:
|Printed content||All printed content is rendered using the WPF software pipeline.|
|Rasterized content that uses RenderTargetBitmap||Any content rendered by using the Render method of RenderTargetBitmap.|
|Tiled content that uses TileBrush||Any tiled content in which the TileMode property of the TileBrush is set to Tile.|
|Surfaces that exceed the maximum texture size of the graphics hardware||For most graphics hardware, large surfaces are 2048x2048 or 4096x4096 pixels in size.|
|Any operation whose video RAM requirement exceeds the memory of the graphics hardware||You can monitor application video RAM usage by using the Perforator tool that is included in the WPF Performance Suite in the Windows SDK.|
|Layered windows||Layered windows allow WPF applications to render content to the screen in a non-rectangular window. On operating systems that support Windows Display Driver Model (WDDM), such as Windows Vista and Windows 7, layered windows are hardware accelerated. On other systems, such as Windows XP, layered windows are rendered by software with no hardware acceleration.
You can enable layered windows in WPF by setting the following Window properties:
- WindowStyle = None
- AllowsTransparency =
- Background = Transparent
The following resources can help you analyze the performance characteristics of your WPF application.
Graphics Rendering Registry Settings
WPF provides four registry settings for controlling WPF rendering:
|Disable Hardware Acceleration Option||Specifies whether hardware acceleration should be enabled.|
|Maximum Multisample Value||Specifies the degree of multisampling for antialiasing 3-D content.|
|Required Video Driver Date Setting||Specifies whether the system disables hardware acceleration for drivers released before November 2004.|
|Use Reference Rasterizer Option||Specifies whether WPF should use the reference rasterizer.|
These settings can be accessed by any external configuration utility that knows how to reference the WPF registry settings. These settings can also be created or modified by accessing the values directly by using the Windows Registry Editor. For more information, see Graphics Rendering Registry Settings.
WPF Performance Profiling Tools
WPF provides a suite of performance profiling tools that allow you to analyze the run-time behavior of your application and determine the types of performance optimizations you can apply. The following table lists the performance profiling tools that are included in the Windows SDK tool, WPF Performance Suite:
|Perforator||Use for analyzing rendering behavior.|
|Visual Profiler||Use for profiling the use of WPF services, such as layout and event handling, by elements in the visual tree.|
The WPF Performance Suite provides a rich, graphical view of performance data. For more information about WPF performance tools, see WPF Performance Suite.
DirectX Diagnostic Tool
The DirectX Diagnostic Tool, Dxdiag.exe, is designed to help you troubleshoot DirectX-related issues. The default installation folder for the DirectX Diagnostic Tool is:
When you run the DirectX Diagnostic Tool, the main window contains a set of tabs that allow you to display and diagnose DirectX-related information. For example, the System tab provides system information about your computer and specifies the version of DirectX that is installed on your computer.
DirectX Diagnostic Tool main window
Send feedback about: