DirectX 11

Page 1

ROUTER SHOWDOWN FREE DVD!

57 MUST-PLAY GAMES

GETTING THE MOST FROM YOUR ISP? PAGE 8 ISSUE 233 DEC 2009

ISSUE 233 THE DUDE ABIDES

THE DUDE ABIDES

GAMIN

G’S EX

PLOSI

Missi ng d Tell y isc? our n

and w ewsagen t e’ll un the F leash ord!

WWW.PCFORMAT.CO.UK PCF233.cover 1

VE FU

TURE

REVE

ALED

Radeon 58 7 AMD grabs 0 the performan ce crown E... EVEN MOR ips and tricks 7t ¤ Hot Win ssis roundup ha ¤ Gaming c cade table ar ¤ Make an ning new CPU un ¤ AMD’s st dows Update in ¤ Repair W Issue 233 Dec 2009 £5.99 Outside UK & ROI £6.49

6/10/09 5:21:7 pm


Illustration: Chris Stocker 52

PCF233.feature1 52

December 2009

7/10/09 5:07:47 pm


H

ave you read our coverage this month of AMD’s new Radeon HD 5870 graphics card? If you have you’ll already be marvelling at the sheer, giddy silliness of the frame rates it’s capable of, not to mention basking in the glory of nearly three teraflops of raw processing power. It’s simply the sexiest slice of silicon since a sliver of Megatron’s mainboard accidentally slipped down Megan Fox’s frilly bits. Of course, the 5870 is also the very first graphics card to support DirectX 11. For the uninitiated, that’s the latest in a long line of multimedia APIs from

A revolution in graphics rendering? Jeremy Laird believes DirectX 11 is a very big deal indeed… Microsoft and apparently it’s going to rock more than just your PC gaming world. At least that’s what both AMD and Microsoft would have you believe. But perhaps you’ve heard it all before. While similar claims were made for DirectX 10, that API pointedly failed to either ignite the imagination of gamers or generate enthusiastic support from game developers. Believe us, therefore, when we say we understand your skepticism. Ultimately, only time will tell whether DirectX 11 really turns out to be a game changer. Nevertheless, we’re going to ask you to roll with us on the DX11 thing for the next few pages. There are many good reasons to expect that it will bring a big step forward in entertainment on the PC, at least since the concept of

programmability appeared in DX8 and quite possibly ever. Certainly, some aspects of DX11 have far wider reaching implications than any previous DirectX API. There’s much more to DX11 than the usual tweaks to shader definitions or a spot of funky lighting technology. Not only does it debut a major new rendering technology in tessellation, it also aims to bring general purpose processing on the GPU into the mainstream, all the while delivering a more widely compatible DirectX API than ever before. It’s ambitious stuff that’s been a long time coming. But with the arrival of Windows 7 and the Radeon HD 5800 series, along with the promise of a rapid uptake by game developers, there’s plenty to get excited about. Read on… December 2009

PCF233.feature1 53

53

7/10/09 5:08:4 pm


DirectX 11

THE TROUBLE WITH DX10 Why hasn’t DirectX 10 changed your world?

D

ay follows night. Summer follows spring. April showers bring May flowers. And with every new DirectX API from Microsoft and associated generation of supporting graphics cards from AMD and NVIDIA follow claims of an earth shattering revolution in PC gaming and entertainment. Sadly, the reality in the case of DirectX 10 failed to live up to the highly vocal hubris. Why? The most obvious anvil hanging around DX10’s neck as it plummeted to the metaphorical ocean floor was none other than the Antichrist OS, also known as Windows Vista. DX10 wasn’t just associated with the awfulness of Vista. It was irrevocably bound to it. If you wanted access to DX10, you had to have Vista. XP was off limits. That might not have been a problem if Microsoft had ensured that any DX10 game engine codepath was backwards compatible with DX9 on XP. But thanks to the enormous changes made to Vista, in particular the shunting of the graphics driver out of kernel space and into user space in the name of stability, that simply wasn’t possible. With all of those stumbling blocks, you can hardly blame game developers for frequently steering well clear. Despite all that, there would have been hope for DX10 if it delivered a killer feature or a major boost in performance. It certainly didn’t do the former. It was more an incremental overhaul than an all round revolution. As for the latter, often it seemed to do the opposite. DX10 simply wasn’t good enough. It will therefore be remembered as little more than a footnote in the history of PC graphics. Microsoft famously promised so much with the release of DirectX 10…

…and then later admitted that this image was just an artist’s impression.

54

PCF233.feature1 54

B

efore we get down to business with details of DirectX 11, let’s quickly remind ourselves of what exactly DirectX is and does. In simple terms, it’s a software layer known specifically in codemonkey jargon as an application programming interface, or API for short. Its job is essentially twofold. Firstly, it makes it easier for application developers to access the multimedia capabilities of various PC components, including sound and graphics hardware. These days, it’s most commonly associated with the

key developments delivered by DX11. Known as Direct Compute, it effectively opens out DirectX, or perhaps more accurately the Direct3D pipeline, to almost any kind of computational task. The only really significant requirement is that the task lends itself to parallel processing. The target component, of course, is the GPU, by far the most parallelised chip inside the PC and potentially the most powerful, if only its resources could be harnessed for general computing. At this point, you may sense a whiff of déjà vu in the air. Isn’t the idea of general purpose computing on the GPU already well established under the

“Direct Compute guarantees compatibility whatever the branding of the graphics card” latter, but graphics on the PC is actually only a subset of DirectX, known as Direct3D. Anyway, along with providing a framework for software developers, DirectX sets the parameters for multimedia tasks on the PC in terms of the hardware definitions for various components, again most notably graphics and sound chips. Consequently, Microsoft works closely with the likes of NVIDIA and AMD when developing the next version of DirectX. Over time, the PC’s remit has expanded to the point where today it has become arguably the most flexible and adaptable machine on the planet, equally adept at hardcore scientific number crunching as it is keeping the frag-happy teenagers entertained. Inevitably, as this remit has broadened, so has the scope of DirectX. With the arrival of version 11 comes perhaps the most significant expansion yet for DirectX and the first of three

GPGPU banner? There are indeed several ongoing GPGPU initiatives that predate the arrival of Direct Compute and DX11, the most high profile of which is NVIDIA’s CUDA platform. But the key difference with Direct Compute is that it sets out common standards to which both application and hardware developers must adhere. In other words, where CUDA requires the presence of NVIDIA graphics cards, Direct Compute will guarantee compatibility whatever the branding of your graphics card.

Definite plus

However, Direct Compute does more than just guarantee compatibility. It also provides hardware definitions that ensure graphics chips are actually up to the job of general purpose computation. Admittedly, DirectX 10 also included an early version of the Direct Compute standard. But it was, frankly, an afterthought that reflected the abilities of graphics-centric hardware rather

December 2009

7/10/09 5:08:7 pm


DirectX 11

DX11 creates true transparencies, which avoid the previous visual glitches

than attempting to extend to better support general purpose processing. To take just one example, DX11 chips must provide 32kb of shared access memory for each general purpose thread. Previous versions of DirectX only required a pitiful 256 bytes per thread. Hence, you could say that all previous implementations of GPGPU have really been the side effect of efforts to create more programmable graphics rendering pipelines. With Direct Compute 11, graphics vendors are required from the get-go to architect their graphics chips with general purpose computing in mind. We’ve touched on the sort of applications GPGPU will power on several occasions in previous issues of PCF. Suffice to say here that the impact of a truly general purpose GPU on the likes of physics and AI simulation or media encoding will be massive. For such highly parallel tasks, graphics chips could well turn out to be 10, 20, perhaps even 30 times faster than even the most powerful CPUs. And it will be DirectX’s Compute Shader that enables all that parallelised goodness.

simulation of materials such as metal, water and even human skin. Likewise, programmable shaders have also enabled realistic dynamic lighting and therefore lifelike depth and contrast in rendered scenes. At the same time, increases in memory bandwidth and pixel throughput have allowed much more detailed textures to be used, while image enhancements such as anti-aliasing and anisotropic filtering can increasingly be enabled with little to no performance hit. But despite all this progress, one key aspect of generating a simulated 3D environment has fallen behind. Ironically enough, it’s the very thing that gives rise to ‘3Dness’. That’s right, it’s geometry. To be clear, the geometry throughput

DID YOU KNOW. . . ? The upcoming DX11 version of BattleForge runs 30 per cent faster thanks to superior multi-threading support and tweaks to the rendering pipeline. That’s precisely the same pixels and graphical quality as the original DX10 version, just a whole lot faster.

impossibly complex. The closer you look, the more geometrical detail you’ll see. Simulating that well enough to fool the human eye is a huge task indeed.

Map my bump

Making matters worse, geometry approximations such as bump and parallax mapping are pretty clumsy kludges. They often create as many problems as they solve, particularly when it comes to factors such as occlusion and accurate shadow rendering. This in turn leads to kludges built upon kludges and you get convoluted solutions, such as parallax occlusion mapping. In the meantime, you’re eating up processing resources that are more suited to generating other visual effects. Something better is needed. That something is tessellation. Instead of torturing pixels and textures in an effort

Tiling the plane

Next up in our triumvirate of revolutionary DX11 features is a natty little thing known as tessellation. Normally we wouldn’t get too excited about what, on the face of it, is just another isolated tweak to the Direct3D graphics pipeline. But this particular feature addresses the last great weakness of today’s game engines in terms of graphical fidelity and realism. With the advent of programmable shaders back in DX8, realism in games made a massive leap. Suddenly, surface effects such as reflectivity and opacity became possible, enabling the accurate

abilities of graphics chips hasn’t been standing still. Not only do new chips support ever more triangles per second, but the shader pipeline has also been commandeered to create simulated geometry, using methods such as bump mapping. But the rub here is twofold. Firstly, when it comes to geometry, the real world is

Above Microsoft has been working closely with both ATI and NVIDIA in the development of DirectX 11

December 2009

PCF233.feature1 55

55

7/10/09 5:08:9 pm


DirectX 11 to approximate geometry, tessellation in a graphics rendering context is the process of auto-generating geometrical features. Put very simply, instead of hard coding each and every triangle required to simulate an object, you give the GPU the gist of what you’re trying to render and let it handle the fine details and generate the required triangles. Consequently, much less data and processing is required for a given level of detail. Which leads us to the really clever bit about tessellation as implemented in DX11. Existing game engine data generated for the various mapping effects mentioned above can be used with minimal modification in the DX11 tessellation engine. Our understanding is that it’s the work of only a few weeks to convert an existing mapping-heavy game engine for full tessellation. And don’t forget, the geometry generated by the DX11 tessellation is composed of real triangles. This means they behave

DX11 tessellation breaks up triangles…

in just the same manner (in terms of occlusion, self-shadowing and filtering) as the main or hard coded geometry.

Geo-crisis

The other kicker regarding tessellation is to do with performance. Take a heavily parallax-mapped scene in a typical DX10 game. Let’s call that game Crysis – it certainly makes more

“The tessellated part of the scene runs three times faster than the old mapped version”

…to produce smooth geometry

DID YOU KNOW. . . ? You don’t need a DirectX 11 graphics card or even Windows 7 to benefit from Microsoft’s latest API. Improvements in multi-threading are supported with DX9, DX10 and DX11 hardware. What’s more, DX11 will be available as an upgrade for Windows Vista by the time you read these words.

widespread use of mapped ‘geometry’ than most. Then convert the mapping data into tessellation data. Not only will you get a much more convincing, realistic result, but you’ll also find the tessellated part of the scene runs around three times faster than the old mapped version. In turn, that allows you to ramp up the detail by a factor of three without slowing the rendering process down. In a word: win. The last-but-not-least in our list of DX11 essentials is the trickiest to define, but it’s crucial nonetheless. Broadly speaking, it involves the work Microsoft has done to ensure backwards compatibility, which is most beneficial

1 Triangles, triangles, triangles

DIRECTX REVELATIONS

In terms of 3D rendering, the big news with DX11 is the introduction of hardware tessellation. Put simply, this means auto-generating geometrical detail instead of hard coding each and every triangle required to simulate an object. It’s a much more efficient and accurate way of increasing geometrical detail than the bump and parallax mapping alternatives.

4 Threads alive

As you’ll know, games and multi-core PC processors don’t see eye to eye. But did you realise that’s partly because of the limitations of DirectX? At least it was before the arrival of DX11. Previous versions of DirectX allowed just a single thread to feed the rendering pipeline. But with DX11, true multithreaded rendering is possible.

4

1

2

2 General purpose GPU

3 Not just Windows 7

Broad compatibility and rapid uptake are key aims for DirectX 11. With that in mind, Microsoft is making it available not only on Windows 7, but also Vista. Even better, game developers will only have to create a single executable to support DX9, DX10 and DX11 hardware on both Vista and 7. In other words, it’s a no-brainer to code for DX11.

56

PCF233.feature1 56

3

We’ve been waiting so long for the concept of general purpose computing on the GPU to become reality, it’s taken on an almost mythical air. But with the arrival of Direct Compute 11, it looks like we finally have an industry wide standard that both hardware and software developers can work with. Apps running at awesome speeds on your graphics are just around the corner, scouts honour and all that.

December 2009

7/10/09 5:08:13 pm


DirectX 11 to gamers and well received by the development community of DX11. As good as previous versions of DirectX have been, they’ve often forced segregation. That could mean a gamer with a certain video card being cut off from a game or a version of Windows – or a developer from an API, and therefore a set of potentially beneficial technologies. Either way, it’s bad news. The first and most obvious step taken by Microsoft was to make DirectX 11 fully compatible with Windows Vista despite the fact that it’s a key launch feature for Windows 7. By the time you read these words, Microsoft will have already released a redistributable enabling Vista to be updated with full DX11 support. That’s great for gamers who don’t fancy forking out for a new operating system in order to make the most of the latest games. It also means developers know they’ll be able to target the massive installed base of Vista machines when developing in DX11, not just the nascent Windows 7 ecosystem. But that’s just the beginning. One of the cleverest things Microsoft has done with DirectX 11 is to reduce the workload it presents to developers. When Vista was introduced, developers had to produce an extra codepath and

enough, one of the biggest obstacles to achieving that to date has been DirectX itself. The problem is, all versions of DX up to 11 have restricted the rendering part of a game engine to a single thread. In practice, this has meant that at best, games can achieve what is known as task-level parallelism. It’s a rudimentary sort of multi-threading where each major task, for example, rendering, AI, physics and gameplay, gets its own thread. That may sound like a decent solution. But in reality you end up with unevenly matched threads. Typically the rendering thread is far more demanding than the others. So what, you wonder? Well, games are essentially rendered frame by frame. What this means is that each thread must complete its work before the next frame can be rendered. And so you end up with a situation where several threads must sit idle and twiddle their virtual thumbs as they wait for the rendering thread to come lumbering over the horizon.

SOONER THAN YOU THINK? The what, when and where of DX11 game launches

BattleForge September 2009

Giddy up

But not with DX11. Microsoft has introduced a new technology known as multi-threaded display lists. It

DiRT2 Q4 2009

“It’s nice to know you’ll get the benefit of DX11 whatever your current graphics card” executable if they wanted to support DX10, while retaining another for DX9 on Windows XP. With DX11, a single executable supports DX9, DX10 and DX11 hardware on Vista and Windows 7. Admittedly, most developers will want to support older DX9 machines powered by Windows XP and that still requires its own codepath. But they won’t need to make that tricky judgment call of whether or not it’s worth creating an extra path to support a new operating system and API in the form of Windows 7 and DX11.

Multi-fail

It’s a familiar refrain – gaming is the one major software group on the PC that has so far failed to really make the most of modern multi-core CPUs. It’s one of the reasons why we recently hailed Intel’s new quad-threaded Core i5 processor as the best gaming CPU you can buy, while demoting its superficially superior eight-threaded Core i7 sibling to second spot. There’s only so many threads that today’s games can make good use of. However, there’s little doubt that massively multi-core is the future of the PC processor. It would be good if games could play nicely with that fact. Funnily

allows for data-level multi-threading of the rendering engine, which in turn enables truly multi-threaded games to be implemented on the PC for the first time. Even better, this feature is dependent only on the API, not your graphics hardware. So long as you’re running DirectX 11 with a compatible graphics driver, you can enjoy the benefit of any game that takes advantage of this improved multi-threading support. You don’t need a DX11 graphics card. It’s certainly nice to know you’ll get a benefit from DirectX 11 whatever your current graphics card. But the real fun will come with fully compatible hardware. If nothing else, we’re bored stiff of waiting for GPGPU to make the move from concept to widespread reality. Here’s hoping, then, that DX11 turns out to be the tipping point on that subject. Still, one thing we’re extremely confident of is the impact tessellation will have on graphics quality. Pre-DX11 games will soon seem so blocky and square, they could well be known forever more as those that came BT (Before Tessellation). Thus spake PCF in the first year, Anno Tesselli. You heard it here first. ¤

S.T.A.L.K.E.R.

Call of Pripyat

Q4 2009

Aliens vs. Predator Q1 2010

Battlefield 1943 2010 Lord of the Rings Online

Siege of Mirkwood

Q1 2010

Dungeons and Dragons Online 2010

December 2009

PCF233.feature1 57

57

7/10/09 5:08:18 pm


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.