In-depth explanation-detailed analysis of Windows 7 core graphics Architecture)

Source: Internet
Author: User

Original post address: http://technet.microsoft.com/zh-cn/library/ee921514.aspx

As we all think, Windows 7 is actually the ultimate version of Windows Vista. On the basis of Windows Vista, Windows 7 has made a lot of improvements and added many new features. Compared with the previous generation of XP, Vista provides great improvements. However, on the one hand, these improvements are too huge, and users and even corresponding software vendors (such as DirectX 10 app developers) cannot fully accept them at the moment, on the other hand, because the features are not fully available, Vista is not as good as imagined. In Windows 7, including the operating system itself, software vendors and users are ready, so it is easier to understand the response than Vista.
Graphical interfaces have always been the core of Windows systems. Since Windows Vista, Windows has started to provide a graphic desktop GUI, not only is the desktop of Vista and 7 itself a 3D application, but because Vista and 7 can better play the role of graphics acceleration hardware. From Windows Vista to Windows 7, the operating system and GPU are becoming closer and closer together.


Although people often hear that the major update of Windows 7 is a DirectX 11.0 API, DirectX is also very important for the graphic architecture of Windows systems, but this is not all. A graphic architecture includes how to use GPU to accelerate a variety of graphic applications (2d, 3D, printing, etc.), how to display to the final display device, and including device detection and control.

 

Window 7 updates the graphic architecture in the following aspects:


Wddm 1.1: New Driver Model
DirectX 11: Updated direct3d 11 and related new direct2d APIs
DXVA-HD: HD video playback Acceleration
Display Device connection and Configuration
Color Management
High DPI output and readability
Multi-GPU System
Combined display adapter (also called combined rendering)
Next, we will give a brief introduction to these improvements.

Windows 7 core graphics Architecture

Windows applications use APIs such as the Graphics Device Interface (the main graphic interface of the 2D era), direct3d, and OpenGL to communicate with system graphics components, the system components interact with hardware through wddm (Windows display driver model, also known as Longhorn display driver model, windows adopts a new driver model different from the xpdm used by XP: wddm. The driver model used determines the graphics characteristics of a system to a large extent. The wddm version used by Vista is 1.0, and the ultimate version used by Windows 7 is wddm 1.1.


Wddm 1.1 has many changes. Let's take a look at the changes of wddm 1.0 to xpdm, that is, the changes of Vista to XP.


Xpdm: Non-merging Model


Wddm: Merging Model

In the vertical synchronization puzzle XP/Vista and 3D performance tests, I have explained the Differences Between XP/Vista models. In the wddm model, the display screen generated by all applications is finally merged into a single final output screen in DWM (desktop Windows Manager, desktop window manager, therefore, it achieves better display effects (vertical synchronization of all programs by nature), additional effects (thumbnails, scaling), and support for larger left surfaces. However, the original wddm 1.0 only implements the conversion of this big architecture, and the details are still not perfect:

In Vista, GDI (an API for drawing common 2D windows, and using GDI for many other graphic operations) and DirectX (3D application API) have different processing methods: direct3d is accelerated by hardware, while GDI is not (GDI is accelerated by hardware in xpdm). Therefore, Vista users may feel slower than XP in some graphics programs; furthermore, the GDI application is first processed by the CPU software to the system memory, and then transmitted to the GDI display area allocated by the graphics card driver (also in the system memory ), DWM is responsible for merging the screen and outputting it to the display.

In Windows 7, GDI has achieved hardware acceleration (see below)-however, when using both the GDI and direct3d APIs, GDI still cannot achieve hardware acceleration. However, GDI directly outputs the output to the driver's GDI display area, reducing one step and memory consumption (also effective for the direct3d APIs). Obviously, it is not a good idea to use a hybrid API to program graphics (of course, using both GDI and direct3d means that this is an old, window-mode 3D application, such as Windows-based old 3D games)

OldWddm 1.0ProcessingGDIThe application is the same as previously mentioned.

In the Windows 7 wddm 1.1 model, a separate GDI will use wddm and GPU for hardware acceleration and output to DWM through the GDI display area, as shown in actual operations, that is, most window operations become smoother than Vista, and daily work is faster (most 2D applications use the gdi api, because the GDI contains too much content, so it must be compatible; for more information about GDI, see the following content)


Windows XPDirect3d/GDI driver architecture


Windows VistaCore graphics architecture, comparedXPTo enrich

Windows 7 core graphics architecture, the old GDI/GDI + is still independently supported, however, Windows 7 provides a new implementation method for their corresponding functions, compared to the DirectX 10 in Vista, windows 7 comes with DirectX 11, which is different from wddm 1.0 to 1.1. The version number of DirectX 11 indicates that the change is larger. Windows 7 DirectX 11 has changed the previous working mode and upgraded direct3d 10.1 to direct3d 11, at the same time, we need to re-divide the work of GDI/GDI + that previously could not be accelerated by hardware by Vista, and introduce new direct2d and directwrite APIs to accomplish this:

Most of the previous graphic operations were completed by diredt3d and GDI/GDI + (In addition, there is a WIC-Windows Image component, which manages scanning, printing, and image decoding). In Vista, GDI cannot accelerate hardware. Therefore, Vista is very slow. In Windows 7, in addition to obtaining hardware acceleration by changing the wddm model, they are also divided into direct2d (2d acceleration), directwrite (text processing), and dxgi 1.1 (Device Control) based on oriented applications ), these new APIs or newly assigned APIs have hardware acceleration. For example, direct2d actually uses direct3d 10 for acceleration:

Direct2d:
The real-time mode of hardware acceleration is a 2-dimensional graphics API, which has high performance and quality in 2D geometric images, bitmaps, and text. Direct2d APIs are designed for interoperability with GDI, GDI +, and direct3d.

Directwrite:
Directwrite provides high-quality text rendering, contour fonts with independent resolutions, complete Unicode text, and layout support. When using direct2d, directwrite is accelerated by hardware.

When the system does not support direct3d 10, Windows 7 will use d3d9 on an additional 10level9 software layer. Obviously, for the best efficiency, you need to use the direct3d10 video card, because Windows 7 DWM is based on direct3d 10


Font anti-aliasing: directwrite Effect


Direct3d 11

Windows 7 with direct3d 11 is a superset of d3d10. It features that it can run on both the Direct3D9 and direct3d10.1 hardware. In fact, DirectX 11 will provide Vista support, instead of supporting only Vista and not being compatible with the previous generation of systems as when direct 10 came out, this led to a slow transfer from software development vendors to DirectX 10.

DirectX 11 supports multiple hardware platforms and features of multiple operating systems to make it more acceptable. At the same time, direc3d 11 also has many improvements, which will be discussed in a special article (in the Plan). Here we will first talk about Windows 7's improvements to the entire graphic operation, by incorporating more GDI/GDI + into the DirectX System for hardware acceleration, the graphic interface performance will get better and better (of course, this requires software vendors to write with the new direct2d/directwrite ). Microsoft wants to build all graphic operations on DirectX.

Integrate the missing GDI hardware acceleration in Vista into the DirectX System for hardware acceleration again, and the performance will be faster. In the future, graphics card manufacturers will no longer need to provide GDI acceleration.

Display Technology

Windows 7 supports a series of display technologies, including digital output as native output (supports hdmi and displayport, while the old VGA analog output is recommended to be discarded ), windows 7 also supports more native content sources such as Blu-ray, JPEG-XR, HDR images, etc.

In Windows 7, the default sRGB color space is used as a unified workflow for all devices, but the precision is increased to 30 bits-two more entries are added for each color channel; windows 7 supports up to 48-bit scrgb mode, high precision + extended range + high dynamic


Wddm 1.1Required Driver SupportBgra,BgraIs the fastest color format

Display Device connection and Configuration


InWindows 7All applications are displayed in a unified virtual desktop. The resolution of this virtual desktop is64 k x 64 K(65536x65536)

A virtual desktop is divided into different views by display. Each view corresponds to an adapter. An adapter does not mean a video card. When a video card is connected to multiple monitors, it contains multiple adapters. Similarly, A single display connected to SLI or crossfirex means that it is a single adapter (added from Vista, called the linked-adapter feature ).


HoweverVistaCannot use multiple differentGPUThe manufacturer's graphics card, andWindows 7You can

In LDA configuration, the program interface roaming in different outputs is basically transparent, called dynamic adapter switching dynamic adapter Switching

Under Multiple monitors, Windows 7 provides a new global shortcut key function: Win + P, which allows you to quickly set the working status of multiple monitors. This shortcut key was originally designed for projector applications.

In general, the graphic architecture of Windows 7 is more perfect than Vista, and its applications are more convenient. The most obvious thing is the change of the gdi api, and now the GDI application has also achieved hardware acceleration, just like in XP, it can only be processed by the processor under its vista, therefore, users can feel that their daily applications will become smoother.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.