Basics Graphics Reviews

2D power in reverse? A comprehensive analysis! | Retro 10 years ago

Disclaimer: The following article is machine translated from the original German, and has not been edited or checked for errors. Thank you for understanding!

Windows XP: Clear fronts due to lack of competition

Up to and including Windows XP, the GDI plays the central role in the output of all 2D content, as can be seen from the (slightly simplified) diagram. Let’s now follow the process by looking at the creation and output of a line. Our mouse movements for drawing a line first go as information to win32k.sys, the central point for all possible events. Whether mouse or keyboard inputs or all graphical tasks, information is collected here and distributed in a targeted manner. Our application now receives this information and converts it into a GDI character command. This ends up in the GDI and thus again in win32k.sys. Let’s just follow the purple arrows.

Under XP the old 2D world is still ok

So under XP the old 2D world is still fine. This simple scheme also shows why 2D hardare acceleration is quite easy to implement, provided of course that the graphics card used has the appropriate capabilities. By the way, the blue arrow indicates the feedback to the program, so that it knows that window contents have changed (e.g. if another window no longer covers parts) and that the contents must be redrawn by the program.

Up to and including the Radeon HD1xxx series at ATI and the Geforce 7xxx at Nvidia, all consumer graphics cards also have a separate 2 unit. This was dropped with the introduction of DX10 cards with the unified shader architecture from both manufacturers.

Vista: CPU instead of GPU – Buffer instead of direct delivery

Under Windows Vista, as already explained in the first part, a completely new path was taken. To understand it better, we need to simplify it further. Up to the GDI the drawing is analogous to XP, but the task of the win32k.sys to manage the windows is now taken over by the DWM (Dynamic Window Manager). In addition, as of Windows Vista, the window management is done completely via Direct3D. The window of each application is therefore stored in the texture memory of the graphics card as a 3D texture. Actually a practical matter, but the GDI can no longer address this content directly. The chain of communication therefore seems to be interrupted.  This is where the aforementioned double buffering comes into play.

Memory waste and detours lead to the subjectively perceived sluggishness of Vista

Memory waste and detours lead to the subjectively perceived sluggishness of Vista

What happens exactly? Let’s look at the red arrows. Instead of the actual graphics driver (under XP the DDI display driver) the new CDD (Canonical Display Driver) is addressed, which is a direct part of Vista independent of the graphics card. While the final window content already resides as a texture in the graphics card’s memory, an additional equivalent buffer must now be created in system memory for each window (window width x window height x 4 bytes for the color). In the system memory buffer, the later window view is first created as a bitmap using the conventional method and only then transferred to the video memory as a texture as the final product. The DWM in turn manages the windows and creates the content via Direct3D. The DWM also receives the information when an area in a window has changed and thus needs to be redrawn (blue arrow). At this moment, the DWM copies the contents of the system memory into the video memory and lets Dirct3D (D3D) re-render the window. The program itself (in contrast to the solution under XP) does not have to draw the contents again.

We quickly notice that hardware acceleration is no longer possible with these detours and that direct drawing also loses a lot of performance compared to XP. All this then manifests itself in the well-known symptoms, by which one quickly assumes Vista to have a certain sluggishness and above all a high memory requirement.

Windows 7: Hardware acceleration in homeopathic doses

We already mentioned that Windows 7 can support parts of the GDI commands via hardware acceleration again as long as WDDM 1.1 drivers are used. If these are missing, as is the case with some older Intel graphics solutions, Windows 7 will again behave much like Vista. So what does that mean for us exactly?  It is important to note that it is no longer necessary to create a double buffer for each window. The system memory is replaced by the so-called “non local memory” (also called “aperture space”). This is a specific area of normal system memory that the graphics card can also access directly. If a window area changes now by moving or fading in, the contents of this area are copied simply and without detours into the video memory of the graphics card.

Compared to XP, however, only a few GDI commands can hope for GPU support: rendering text, ColorFill, BitBlt with the default ROPS, AlphaBlend, TransparentBlt and StretchBlt. In short, for non-insiders: outputting text, full area filling with simple colors, copying image content and transparencies. While the drawing of geometric figures is not supported at all, the copying of image contents and the filling can even be directly passed by the “aperture space” and directly output.

Interim summary

Windows 7 reduces memory requirements by eliminating double buffering. Even Vista benefits from the new driver model in retrospect. Hardware acceleration has been possible again since the platform update (which also introduced DirectX11), similar to Windows 7. However, the disadvantage is the complexity and possible driver problems. These, in turn, we were on the trail of.

 

Kommentar

Lade neue Kommentare

B
Besterino

Urgestein

6,826 Kommentare 3,405 Likes

Erinnere mich sogar noch dunkel an das Thema damals. Heutzutage aber reicht mir irgendwie selbst eine AST-BMC-Grafik um nicht negativ im Desktop-Betrieb aufzufallen… ;)

Antwort 1 Like

Igor Wallossek

1

10,327 Kommentare 19,151 Likes

Seitdem hassen die mich :D

Antwort 2 Likes

B
Besterino

Urgestein

6,826 Kommentare 3,405 Likes

Kleingeister halt. ;)

Antwort Gefällt mir

Igor Wallossek

1

10,327 Kommentare 19,151 Likes

Oder so. Dafür ist mittlerweile die AMD-Implementierung besser als bei NV. Hat auch was Positives :D

Antwort Gefällt mir

h
hoppel

Neuling

8 Kommentare 1 Likes

An den Artikel konnte ich mich auch noch erinnern, die Zeit rennt schneller als man möchte :eek:

Antwort Gefällt mir

FfFCMAD

Urgestein

682 Kommentare 181 Likes

Ich finde es ehrlich gesagt immer noch peinlich. Ich weiß noch wie meine GTX480 bei 2D (Obwohl in 3D ein echtes Monster) vor sich hin kroch und meine uralte Voodoo 3 3500 in nem Pentium 3 Kreise und das Ding rannte. Die 2D Performance war teilweise echt mies. Aber es hat sich mit der Zeit zum Glueck gebessert. Ideal finde ich es aber immer noch nicht. Ich bin ein Fan davon, soetwas von der CPU fern zu halten und in irgendeiner Form abzuladen. Nicht nur 2D-Grafik. Auch beim Sound.

Antwort Gefällt mir

D
Deridex

Urgestein

2,218 Kommentare 851 Likes

So ändern sich die Zeiten. Dennoch habe ich den Eindruck, dass uns GDI noch lange bleiben wird.

Antwort Gefällt mir

Danke für die Spende



Du fandest, der Beitrag war interessant und möchtest uns unterstützen? Klasse!

Hier erfährst Du, wie: Hier spenden.

Hier kannst Du per PayPal spenden.

About the author

Igor Wallossek

Editor-in-chief and name-giver of igor'sLAB as the content successor of Tom's Hardware Germany, whose license was returned in June 2019 in order to better meet the qualitative demands of web content and challenges of new media such as YouTube with its own channel.

Computer nerd since 1983, audio freak since 1979 and pretty much open to anything with a plug or battery for over 50 years.

Follow Igor:
YouTube Facebook Instagram Twitter

Werbung

Werbung