Permalink
Fetching contributors…
Cannot retrieve contributors at this time
145 lines (108 sloc) 13.4 KB
title ms.custom ms.date ms.prod ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
Graphics Rendering Tiers
03/30/2017
.net-framework
dotnet-wpf
article
graphics, performance
rendering graphics
rendering tiers
graphics rendering tiers
graphics, rendering tiers
08dd1606-02a2-4122-9351-c0afd2ec3a70
44
dotnet-bot
dotnetcontent
wpickett

Graphics Rendering Tiers

A rendering tier defines a level of graphics hardware capability and performance for a device that runs a [!INCLUDETLA2#tla_winclient] application.

Graphics Hardware

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 [!INCLUDETLA2#tla_winclient] application. The [!INCLUDETLA2#tla_winclient] system defines three rendering tiers:

  • Rendering Tier 0 No graphics hardware acceleration. All graphics features use software acceleration. The [!INCLUDETLA2#tla_dx] version level is less than version 9.0.

  • Rendering Tier 1 Some graphics features use graphics hardware acceleration. The [!INCLUDETLA2#tla_dx] version level is greater than or equal to version 9.0.

  • Rendering Tier 2 Most graphics features use graphics hardware acceleration. The [!INCLUDETLA2#tla_dx] version level is greater than or equal to version 9.0.

The xref:System.Windows.Media.RenderCapability.Tier%2A?displayProperty=nameWithType 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 [!INCLUDETLA2#tla_dx] version that is less than 9.0.

Rendering Tier 1 and Rendering Tier 2

[!NOTE] Starting in the .NET Framework 4, rendering tier 1 has been redefined to only include graphics hardware that supports [!INCLUDETLA2#tla_dx] 9.0 or greater. Graphics hardware that supports [!INCLUDETLA2#tla_dx] 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 [!INCLUDETLA2#tla_winclient] will use hardware acceleration if the necessary system resources are available and have not been exhausted. This corresponds to a [!INCLUDETLA2#tla_dx] 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
[!INCLUDETLA2#tla_dx] 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:

Feature Notes
2D rendering Most 2D rendering is supported.
3D rasterization Most 3D rasterization is supported.
3D anisotropic filtering [!INCLUDETLA2#tla_winclient] 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 [!INCLUDETLA2#tla_winclient] 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 xref:System.Windows.Controls.Viewport3D.
Radial gradients While supported, avoid the use of xref:System.Windows.Media.RadialGradientBrush on large objects.
3D lighting calculations [!INCLUDETLA2#tla_winclient] 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:

Feature Notes
3D anti-aliasing 3D anti-aliasing is supported only on operating systems that support Windows Display Driver Model (WDDM), such as [!INCLUDETLA2#tla_winvista] and [!INCLUDEwin7].

The following features and capabilities are not hardware accelerated:

Feature Notes
Printed content All printed content is rendered using the [!INCLUDETLA2#tla_winclient] software pipeline.
Rasterized content that uses xref:System.Windows.Media.Imaging.RenderTargetBitmap Any content rendered by using the xref:System.Windows.Media.Imaging.RenderTargetBitmap.Render%2A method of xref:System.Windows.Media.Imaging.RenderTargetBitmap.
Tiled content that uses xref:System.Windows.Media.TileBrush Any tiled content in which the xref:System.Windows.Media.TileBrush.TileMode%2A property of the xref:System.Windows.Media.TileBrush is set to xref:System.Windows.Media.TileMode.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 [!INCLUDETLA2#tla_winclient] applications to render content to the screen in a non-rectangular window. On operating systems that support Windows Display Driver Model (WDDM), such as [!INCLUDETLA2#tla_winvista] and [!INCLUDEwin7], layered windows are hardware accelerated. On other systems, such as [!INCLUDEwinxp], layered windows are rendered by software with no hardware acceleration.

You can enable layered windows in [!INCLUDETLA2#tla_winclient] by setting the following xref:System.Windows.Window properties:

- xref:System.Windows.Window.WindowStyle%2A = xref:System.Windows.WindowStyle.None
- xref:System.Windows.Window.AllowsTransparency%2A = true
- xref:System.Windows.Controls.Control.Background%2A = xref:System.Windows.Media.Brushes.Transparent%2A

Other Resources

The following resources can help you analyze the performance characteristics of your [!INCLUDETLA2#tla_winclient] application.

Graphics Rendering Registry Settings

[!INCLUDETLA2#tla_winclient] provides four registry settings for controlling [!INCLUDETLA2#tla_winclient] rendering:

Setting Description
Disable Hardware Acceleration Option Specifies whether hardware acceleration should be enabled.
Maximum Multisample Value Specifies the degree of multisampling for antialiasing [!INCLUDETLA2#tla_3d] 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 [!INCLUDETLA2#tla_winclient] should use the reference rasterizer.

These settings can be accessed by any external configuration utility that knows how to reference the [!INCLUDETLA2#tla_winclient] registry settings. These settings can also be created or modified by accessing the values directly by using the [!INCLUDETLA#tla_mswin] Registry Editor. For more information, see Graphics Rendering Registry Settings.

WPF Performance Profiling Tools

[!INCLUDETLA2#tla_winclient] 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 [!INCLUDETLA2#tla_lhsdk] tool, WPF Performance Suite:

Tool Description
Perforator Use for analyzing rendering behavior.
Visual Profiler Use for profiling the use of [!INCLUDETLA2#tla_winclient] 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 [!INCLUDETLA2#tla_dx] Diagnostic Tool, Dxdiag.exe, is designed to help you troubleshoot [!INCLUDETLA2#tla_dx]-related issues. The default installation folder for the [!INCLUDETLA2#tla_dx] Diagnostic Tool is:

~\Windows\System32

When you run the [!INCLUDETLA2#tla_dx] Diagnostic Tool, the main window contains a set of tabs that allow you to display and diagnose [!INCLUDETLA2#tla_dx]-related information. For example, the System tab provides system information about your computer and specifies the version of [!INCLUDETLA2#tla_dx] that is installed on your computer.

Screenhot: DirectX Diagnostic Tool
DirectX Diagnostic Tool main window

See Also

xref:System.Windows.Media.RenderCapability
xref:System.Windows.Media.RenderOptions
Optimizing WPF Application Performance
WPF Performance Suite
Graphics Rendering Registry Settings
Animation Tips and Tricks