Farewell to DirectX

Necuno

The Piper
...and previous we had Carmack singing dx's praises over GL. it's definitely time to put to bed direct x. i think we've seen enough dx 8 iterations under the guise of dx9/dx10/dx11


Farewell to DirectX

So what sort of performance-overhead are we talking about here? Is DirectX really that big a barrier to high-speed PC gaming? This, of course, depends on the nature of the game you're developing.

'It can vary from almost nothing at all to a huge overhead,' says Huddy. 'If you're just rendering a screen full of pixels which are not terribly complicated, then typically a PC will do just as good a job as a console. These days we have so much horsepower on PCs that on high-resolutions you see some pretty extraordinary-looking PC games, but one of the things that you don't see in PC gaming inside the software architecture is the kind of stuff that we see on consoles all the time.

On consoles, you can draw maybe 10,000 or 20,000 chunks of geometry in a frame, and you can do that at 30-60fps. On a PC, you can't typically draw more than 2-3,000 without getting into trouble with performance, and that's quite surprising - the PC can actually show you only a tenth of the performance if you need a separate batch for each draw call.

Now the PC software architecture – DirectX – has been kind of bent into shape to try to accommodate more and more of the batch calls in a sneaky kind of way. There are the multi-threaded display lists, which come up in DirectX 11 – that helps, but unsurprisingly it only gives you a factor of two at the very best, from what we've seen. And we also support instancing, which means that if you're going to draw a crate, you can actually draw ten crates just as fast as far as DirectX is concerned.

But it's still very hard to throw tremendous variety into a PC game. If you want each of your draw calls to be a bit different, then you can't get over about 2-3,000 draw calls typically - and certainly a maximum amount of 5,000. Games developers definitely have a need for that. Console games often use 10-20,000 draw calls per frame, and that's an easier way to let the artist's vision shine through.'

[more]
 
My goodness. Nominated for worst article ever. I can say with reasonable confidence that the author of that article has never written a single line of GFX code. Ever. He misunderstood basically everything the interviewees said.

Article author said:
Could Crysis have run more efficiently if Crytek had bypassed Direct3D and programmed direct-to-metal instead?
LMAO. Its called bare-metal programming, not "direct-to-metal". Yes it would be faster...and yet nobody does it (not even consoles) because its a stupid idea. APIs like DX are desirable:
Huddy said:
It definitely makes sense to have a standardised, vendor-independent API as an abstraction layer over the hardware
vs
Article author said:
Huddy certainly seems convinced that the idea of having no API at all is going to put pressure on Microsoft in the future.

The developers want the APIs to be thinner and allow occasional & optional hardware access *via* the API not lose the API entirely. Sorta like some programming languages allow you to add ASM into the code.

The author's basic assumption of DX vs consoles is also entirely wrong. Consoles have an API just like DX:
Wikipedia said:
The name for the Xbox was originally the DirectX box as it came from a group of Microsoft DirectX developers
Wikipedia said:
The Xbox runs a custom operating system which was once believed to be a modified version of the Windows 2000 kernel. It exposes APIs similar to APIs found in Microsoft Windows, such as DirectX 8.1.

He also misunderstood the draw calls issue 100%. PC gaming rigs have mad GPU power and comparatively little CPU power. This means the GPU can draw polygons *really* fast, and if you submit each polygon via a separate draw call you quickly become CPU bound and the GPU sits idle. That sucks. The solution is group the polygons together & send many in one GPU call. That way you make full use of both CPU and GPU.

On the consoles side, the CPU and GPU are pretty much on par to each other (but weaker than PC CPU & GPU). Meaning you saturate both +- at the same time. You could bunch them together...but its pointless as the is no idle GPU capacity available.

In short, if the PC GPUs would suck as much as the console GPUs (xbox360 uses R520 tech, which is mainly found as GFX in underpowered laptops atm) then they wouldn't bother with batched calls either. So how come can the consoles draw so many more individual draw calls? Reason:

Consoles generally render at super low resolutions and then simply upscale it. Don't believe me? Halo 3 renders at 640p and then tell you its running at 720/1080. Same for CoD4...thats rendering at 600p. PC games actually render at 1080 if you tell them to. If you do the calc, you'll see the PC is rendering almost 3x as many pixels. If you drop the pixel count by a factor of 3 then each draw call needs a lot less time & power and you can call more of them. Duh.:rolleyes:

In short modern PC rigs are more powerful across the board by a huge factor and would easily match console gear on draw calls if they were rendering at 600p too. That should be trivially obvious to all seeing as the current consoles were state-of-the-art...in 2005. PCs are now, to quote crytek, "easily a generation ahead right now".

Either way, it looks as though DirectX's future as the primary gateway to PC graphics hardware is no longer 100 per cent assured
LMAO. DX has never been this strong...ever. Even Carmack agrees.

Consoles are popular because they are simple & convenient and most consumers simply don't understand that technically they suck (600p rendering etc) compared to current tech. Hell a decent portion of consumers is still connecting their shiny new 40" TVs to SD outputs without realizing it.

i think we've seen enough dx 8 iterations under the guise of dx9/dx10/dx11
Not quite. Dx10 was essentially the same as DX9 yes. DX11 on the other hand is fundamentally different.
 
havoc, you have too much time it seems :D. still i think we do in fact need a proper rewrite or new from the ground up a decent graphics api.
 
Well, now I know a little bit more about consoles vs PC rendering! Thanks! My high horse just got higher :P

And an API that allows for a bit more hardware control would be better IMHO.
 
havoc, you have too much time it seems :D.
If only. I get carried away FTL. :(

I liked the comments the interviewee made though...some insights there. :)

still i think we do in fact need a proper rewrite or new from the ground up a decent graphics api.
Yeah. I think they are working on it though. You know that Carmack article recently...one of the things he said that put DX ahead of opengl for him is that they were willing to break backward compatibility while OGL was not.

And an API that allows for a bit more hardware control would be better IMHO.
The key issue right now is how the whole programmable GPU thing...there are a couple of competing approaches right now & its all a little fuzzy. Thats also where DX will increasingly allow more direct control control. It'll never be bare-metal control, but certainly more direct control than what we currently have. "Programmable" isn't really programmable if you can't control it after all. ;)
 
A couple of personal experiences with API rendering:

When I create a particular 3D scene at 3k x 2k pixel resolution, it'll take about a minute to render. Cut that resolution in half and it'll render in 10 seconds flat. Resolution makes a MASSIVE difference.

I recently discovered the benefits of using OpenGL in photoshop. The whole program now runs so much smoother with high res images (around 10k pixels) simply because the load is taken off my RAM and CPU.

And thats still tiny in scale compared to games.
 
At the end of the day, if you abandon DirectX and OpenGL you will end up writing your own API which would do more a less what DirectX and OpenGL do already. Not necessarily a bad thing since I'm sure they both have their fair share of inefficiencies and bloat. More competition (especially if its not locked into Windows) is also a good thing. However, its a GIGANTIC investment in R&D.
 
At the end of the day, if you abandon DirectX and OpenGL you will end up writing your own API which would do more a less what DirectX and OpenGL do already. Not necessarily a bad thing since I'm sure they both have their fair share of inefficiencies and bloat. More competition (especially if its not locked into Windows) is also a good thing. However, its a GIGANTIC investment in R&D.

We used to have something like that back when 3dfx ruled the roost...
 
Back
Top