Getting Dirtier: Graphics

With the majority of the under the hood work focusing on graphics, there’s a lot to cover, so let’s get started.

Although it is being released for Vista too, Windows 7 marks the official introduction of Direct3D 11. As a superset of Direct3D 10.1, Direct3D 11 adds support for tessellation, multi-threaded rendering, and GPGPU abilities via the Compute Shader. We’ve already covered a great deal on Direct3D 11, so please see our introduction article on it for more details.

Next up we have the Windows Display Driver Model 1.1, which in turn is the lynchpin for several other graphics related features. WDDM 1.1 itself is not particularly impressive, but it’s what it allows that is. For all practical purposes, all we need to know about WDDM 1.1 is that it’s a minor revision of WDDM that requires DX10-class hardware (rather than DX9-class on WDDM 1.0) and as such allows the operating system additional features.

So what can you do with WDDM 1.1? For starters, you can significantly curtail memory usage for the Desktop Window Manager when it’s enabled for Aero. With the DWM enabled, every window is an uncompressed texture in order for it to be processed by the video card. The problem with this is that when it comes to windows drawn with Microsoft’s older GDI/GDI+ technology, the DWM needs two copies of the data – one on the video card for rendering purposes, and another copy in main memory for the DWM to work on. Because these textures are uncompressed, the amount of memory a single window takes is the product of its size, specifically: Width X Height x 4 bytes of color information.


Image courtesy Microsoft

Furthermore while a single window may not be too bad, additional windows compound this problem. In this case Microsoft lists the memory consumption of 15 1600x1200 windows at 109MB. This isn’t a problem for the video card, which has plenty of memory dedicated for the task, but for system memory it’s another issue since it’s eating into memory that could be used for something else. With WDDM 1.1, Microsoft has been able remove the copy of the texture from system memory and operate solely on the contents in video memory. As a result the memory consumption of Windows is immediately reduced, potentially by hundreds of megabytes.

What makes this even more interesting is how this was accomplished. With WinXP, GDI+ was partially accelerated, but this ability was lost to little fanfare when the DWM was introduced for Vista and thereby made GDI+ acceleration impossible, pushing all GDI work back to the CPU. This in turn is responsible for the need for a local copy of GDI and GDI+ windows and the increased memory usage of Vista, as reading data back from the video memory for the CPU to work on is too slow to be practical. The solution as it turns out is that by reintroducing GDI acceleration, the amount of read-backs can be minimized to the point that a local copy of the texture is no longer necessary. Now GDI isn’t completely accelerated, only the most common calls are, but this is enough that when the least common calls trigger a read-back, the performance hit is negligible.

This is one of the bigger changes in Windows to get memory consumption under control. The problem was particularly bad on netbooks and other systems with integrated graphics, as the video memory is the system memory, resulting in two copies of the texture being in the system memory (something such a machine probably has little of in the first place). The fact that this requires a DX10-class card with a WDDM 1.1 driver needs to be reinforced however – this won’t be of any help for systems with lesser GPUs, such as Atoms paired with the 945G chipset, as the GMA 950 GPU on that chipset is only DX9-class. NVIDIA, no doubt, is grinning from ear to ear on this one.

The other big trick as a result of WDDM 1.1 is that support for heterogeneous display drivers has returned. With WDDM 1.0 and its homogenous driver requirement, computers were limited to using video cards that would work with a single driver – in turn limiting a computer to video cards from a single vendor. With heterogeneous driver support, computers are once again free to use non-matching video cards, so long as they have a WDDM 1.1 driver. Besides that, this also is a boon for GPGPU use, as GPUs continue to interface with Windows via WDDM regardless of whether they’re actually displaying something or not. For example, this would allow NVIDIA to sell video cards as GPGPU processors to ATI owners, and vice versa.

WDDM 1.1 also brings a few lesser features to Windows 7. The DWM can now run in DX10 mode and new controls are introduced for aspect ratio scaling and controlling monitor modes.

Moving on from WDDM 1.1, Microsoft has also introduced some changes to GDI that do not require new display drivers. Along with requiring a local copy of window textures, the GDI stack was locked so that only a single GDI application could access it at a time. The GDI stack has been rebuilt so that the lock is more or less removed. Multiple GDI applications can now issue commands to it at the same time, and this is all pushed off to the video card to be its problem.



Images courtesy Microsoft

Unfortunately Microsoft has not provided us with any examples of this in action, so we’re not sure just what the real-world benefit is.

Next up, more DRM. Although we’re not entirely sure what has been changed, Microsoft has told us that they have made some changes with respect to DRM and GPU acceleration. Previously some applications playing DRMed content needed to switch to overlay mode to ensure the content was protected the entire way through. Likely this is a new low-level API for such functionality; Microsoft’s notes mention a standardized API for CPU to GPU encryption.

Last but not least, we have two new high-level graphics APIs in Windows 7. The first is Direct2D, the successor to GDI and a replacement for some Direct3D functionality. Like Direct3D, Direct2D is a fully hardware accelerated API, but it’s only for 2D operations. When Microsoft deprecated DirectDraw, the intention was for developers to use Direct3D for all of their 2D needs, but this never quite worked out as well as they intended. So now we have Direct2D, which gives developers a dedicated 2D API once again, along with a clear replacement for GDI.

Also introduced is an API specifically for text, DirectWrite. Where Direct2D works on 2D primitives, DirectWrite is responsible for the hardware anti-aliasing of text. NVIDIA sent us some documentation on the matter, and apparently the anti-aliasing method used (YDirection Antialiasing) can provide even better smoothing than ClearType can alone. It does not sound like any Windows components are currently using DirectWrite however.


Hardware font anti-aliasing in action. Image courtesy NVIDIA

We should note that while the “Direct” name implies these APIs are a part of DirectX, all of the material we have on the matter only mentions Windows 7. They may not be part of DirectX, in which case they would not be added to Vista as part of DirectX 11.

Getting Dirty: What’s Changing Under the Hood Windows Media : New Codecs, New Looks, New Features
Comments Locked

121 Comments

View All Comments

  • strikeback03 - Thursday, May 7, 2009 - link

    In some things I can understand moving stuff, but there are also some that were moved for no good reason. For example, in XP to get display properties, you right click the desktop and click properties. In Vista there is at least one additional page to click through to get that. Ultimately, it seems to me that MS tries too hard to hide the settings, likely to protect the users who don't know what they are doing, but a pain for the users who do. For the record, I had the same complaint about XP coming from win2000, that whenever you hop on a system that wasn't set to all the classic settings, it is a pain to get around.
  • Jackattak - Thursday, May 7, 2009 - link

    But Strikeback you're talking about probably 10% of the users (power users). The majority of Windows users don't give a crap about modification, and that's who they're "protecting" based on your explanation.

    If you were running Microsoft, wouldn't you find it a small issue that you were "inconveniencing" 10% of your user base by making them go "one page deeper" in order to "protect" 90% of your users?
  • strikeback03 - Friday, May 8, 2009 - link

    Then do like the GPU companies do and have both simple and advanced versions of the interface. Allow them to change one setting to show or hide all the "advanced" stuff across the OS. And put it somewhere easy to find, like the start menu.
  • mathew7 - Wednesday, May 6, 2009 - link

    I'm also a XP-lover. Even in XP I'm using it with classic view (2K view).
    My main problem is removal of old start-menu (cascading menus). I really hate the Vista style-menu.
    Also, I prefer UAC disabled and using run-as different user. Unfortunately (in Beta), explorer would not take the new permissions (launch in separate process was enabled for both users), which means configurations had to be done with admin logon. I have not tried this yet in RC. Also, once UAC was disabled, the UAC menu items (with the shield) were still present with no actions (again I don't know about RC).

    On the other hand, the new taskbar (with previews) and the multimedia settings are good-enough reason for me to switch.
  • ssj4Gogeta - Wednesday, May 6, 2009 - link

    Start menu is one of the best features that were introduced in Vista. It's great on a netbook or a small monitor. You also don't need to move your mouse, just type in the first few letters of the app name. It also searches your documents for you.

    And about that RAM issue, what did you expect? I'm surprised it even runs on 512MB. Even netbooks have at least a gig of RAM.
  • SirKronan - Wednesday, May 6, 2009 - link

    I like the revamped start menu as well. Love instant search!

    But did they add Blu-ray support to Media Center? This has been one of my complaints from the beginning about Media Center. It has to launch a separate program to play Blu-rays & HD DVD's, and I haven't found any way around it short of ripping the movies to a hard disk. I realize there are anti-trust/competitive laws, and I honestly don't mind having to buy PowerDVD or WinDVD to get their decoder, but I want the movie to play back in MEDIA CENTER with all of the interface's great features, like the smooth playback and intuitive controls, guide information, zoom feature (get rid of black letterbox - with 1080p you certainly have enough resolution to scale a tad!), etc.

    Have they added that yet? If not, PLEASE, Anand, ask them to for us!
  • KingViper - Wednesday, May 6, 2009 - link

    Archsoft and the newest version of PowerDVD both have plugins for Media Center..from what I hear. Although Media Center itself isn't actually playing the Blu-Ray..it looks like it integrates well. You might try out the trial versions.
  • chrnochime - Wednesday, May 6, 2009 - link

    Just because netbooks have more ram(and not every one of them has 1G, some has 512MB), doesn't mean the OS should try to gobble up as much as is available. I don't get why every iteration of their OS just keep getting bigger and bigger, with little discernible improvements to the average user.

    and this? "Ultimately, with Microsoft throwing Windows 7 RC1 out to the masses, we can't think of a good reason not to try it."

    Unless they have ways to export the settings in programs and whatever document users have when they were using W7, it'd be really hard to convince the average user to try out just for sake of novelty.
  • KingViper - Wednesday, May 6, 2009 - link

    "I don't get why every iteration of their OS just keep getting bigger and bigger, with little discernible improvements to the average user. "

    Many things an OS is responsible for is not necessarily obvious to the average user. Compatibility with almost all hardware available, including keeping the OS as secure as possible. DX10\DX11 and h264 codecs etc. etc. etc. TONS of stuff is added, but it isn't necessarily used everyday. Of course it's going to get bigger.

    I don't understand how XP users are about as bitter with Microsoft as Mac users are. Can you just not afford a Mac or what?
  • mathew7 - Wednesday, May 6, 2009 - link

    I also would like to say about W7RC and low-RAM:
    Windows 7 on 512MB RAM (desktop Intel G45 MB w/laptop HDD) feels to me like XP din on a 64MB RAM laptop years ago. It's good for internet/light work, but even for that you need patience because of swapping.

Log in

Don't have an account? Sign up now