An interesting insight into the issue of draw calls on the PC

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

M55ikael

FNG / Fresh Meat
Aug 11, 2011
349
80
0
While it's not directly related to RO2 it is related in the sense that draw calls have been identified as one of the CPU bottlenecks, which in turn resulted in "the whole Bay of Bricks thing".

Here's an interesting, and long, insight into the issue made by an ex employee of Codemasters who worked on Operation Flashpoint, a series that's now been put on ice with the studio closed down after poor sales.

It's slightly outdated, but the issues discussed are mostly as relevant today as they were when this was written:

In the office (my day job is a graphics programmer) we've been kicking around some thoughts and we've come to the conclusion that unless MS do something the next generation of consoles will, if not kill out right, leave PC gaming for anything outside of MMO, RTS, TBS and 'facebook games' on life support.

Right now the PC has a Mhz and GPU advantage however is suffers from moving hardware targets and a high draw call overhead. The former makes it a pain to dev for (I've spent the last couple of weeks now working around hardware/driver bugs for our game) and the latter we have to soak up and just deal with due to the single thread Mhz advantage PCs still have.

Jump forward 3 years which is when most people seem to think the next consoles will hit/have it; consoles will have more and FASTER cores (and with the Mhz race over PCs wont be out pacing them), DX11+ GPUs as standard and the ability to construct draw lists over multiple threads thus making submission/draw faster meaning more draw calls and more stuff on screen and looking better.

Now, unless MS and the IHVs do something the PC is likely to still be restricted to single threaded draw calls (right now DX11's multi-threaded command list construction either slows things down on AMD hardware or effectively loses you a CPU core on NV hardware) and suddenly regardless of how fast your GPU is the consoles are blowing you out of the water draw call wise meaning the PC can't match a console in 'stuff on screen'.

We are already kinda at this point, the PC is only 'saved' by having the Mhz advantage but unless something changes that advantage will go away pretty quickly.

(Right now MS are blaming the IHVs and the IHVs are blaming MS and there is crazy talk about ditching DX and going 'to the metal' which I don't think anyone has really thought about as hard as they should have done. In short, it's a bit of a mess...)


Quote:
Ah, but the windows user potentially has a LOT better hardware, both in CPU and GPU. If someone has a 5 year old laptop you'd be best off just to shrug and say it's below minimum specs.

What shouldn't be done is deciding that all of the hardware goodness that the PC buyer has available shouldn't be used.

"Potentially" is a key word here; most people still have less cores in their system than a X360 and the PS3's SPUs are another matter completely.

The thing is while CPU tech has advanced it hasn't advanced as much as you might think. In real world terms there is very little difference between the CPU in say the 360 and the one in an i7 and what difference there is get offset by the amount of extra work the PC version has to do in order to do something as simple as a draw call. DX9 on the PC has a much higher overhead than the APIs in use on the 360 (DX9-ish but without the overheads) and PS3 (pretty much direct command line level).

A few months back I was running a test for pure CPU power required for drawing things; a 6 core 3.2Ghz X360 using multi-threaded rendering could throw out 50,000 flat coloured cubes at 60fps. The same test run on an i7 @ 2.6Ghz with a GeForce GTX 275 was struggling to hit 30fps using 7 cores (one had to be reserved for NV's driver to process the concurrent command list generation). Once NV released a driver which had proper support for command list generation is made it back up to 60fps if memory serves.

However this required DX11; most games remain DX9 for compatibility reasons so do not have this ability (and AMD still don't properly support this in drivers so they will be ham strung as well, I'm hoping BF3's release will fix this) and are limited to single threaded draw submission. You can do things to help but it's still no where near as easy to do as with the 360 and PS3 where you are that much closer to the hardware.

GPU wise; again most engines/games are DX9 focused because that was the market. This is shifting and changing now in part because of the power difference and in part because of the need for clever dev houses to learn DX11 based processes in order to apply them to the next console generation.



Quote:
I found this bit fascinating, seriously. What benefits consoles in draw-call capacity?

Fixed hardware is the main thing; this means less layers between the game and the hardware.

On the PC you have to go App -> DX -> driver -> ???? -> hardware.
Talking to some people it would seem that the driver has todo alot of work due to the interface it has with windows; they have todo alot of book keeping etc when doing even simple operations.

All these layers and extra work leads to more CPU cycles being sucked away.

By contrast the XBox has a much thinner layer and can queue up draw calls from multiple threads to be played back on the main device in an optimal way. The PS3 is even thinner, a popular technique to appear in the last couple of years is to use the SPUs to build command buffers (draw call information) in parrallel and feed it directly to the GPU; granted the PS3 is ham strung slightly by poor vertex processing ability but draw calls still cost less.

In construct PCs are limited to effectively one core and a thick layer complicated layer between the game and the hardware.

As stated this gap is only likely to get worse next gen. at which point regardless of how powerful your card is you simply won't get as much stuff drawn.



Quote:
You would be incredibly wrong. There is more than enough proof out there, plus if you paid attention (which you dont) you would know that most publishers and developers are planning on concentrating on PC gaming much more. And many have admitted they do not like developing for the console for lots of reasons.

And have you considered WHY there is going to be more investment in the PC for a while?
It's really very simple; the next generation of hardware will have DX11+ features on the GPU and multi-core CPUs (my own estimate is at least 12 conventional hardware threads) so right now development for PCs is nothing more than practice and experimentation for the next generation so that when the next gen hits we'll hit the ground running.
(This is the arguement I've been making for us supporting DX11 in our next game; practise.)


Quote:
There was a phase there for a while where console gaming took precedence for a lot of developers - not because they liked doing it, but because it's just where things were at the time. Not the case anymore. It's going to slowly move away from that and more towards the PC arena and a lot of developers are publicly voicing this desire and opinion. Along with statements that PC gaming is not dying, nor has it ever been in the state of "dying".

It's funny you should say that because speaking as a developer and based on the developers I've talked to the opinion is that consoles are the prefered platform to develop on.
In fact in my experiance the prefered order would be;
- 360 - best console GPU, most conventional CPU setup, great toolset
- PS3 - weak GPU, SPUs a pain to work with but awesome when they are used right, decent toolset, in some aspects a bit better than the 360's
- PC - urg. Outside of Visual Studio the toolset is a pain to work with, drivers cause problems, requirements to scale - pros being more memory and an out-of-order CPU which covers a multitude of sins.

Personally, at the end of our current project, I had about 4 GPUs pass through my PC so that various PC bugs could be fixed. Most of them however got closed as 'driver issue; can not fix.' and this is from both AMD and NV.

Quote:
Many are also voicing that they dislike DirectX because it has held developers back from fully utilizing the potential of the hardware. Therefore, games on the PC could have been even more impressive than their console counterparts, but DX held them back. At the same time, they like DirectX for other reasons. Even id software's Carmack I believe it was said that he wants to move to DirectX and away from OpenGL now for some reasons, but it's difficult to do some considering his business is setup for OpenGL. It's a win lose sort of thing I guess, but the point is that games could have been even more impressive.

The DX discussion is an intresting one and if anything gives developers MORE recent to move away from the PC rather than towards it.
DX hasn't so much held back GPU ability as it has cost us more CPU side and more time spent CPU side doing draw calls means less time CPU side to do other things.

To give you an idea of the problem right now we have a testbed for our next generation backend which does concurrent display list generation. The test draws 50,000 cubes to the screen with one draw call per cube.
The 360 and the PS3 can run this test, in concurrent mode, at 60fps or 16.6ms per frame.

The PC we are testing on is an 4 core/8 thread, 3.2Ghz Xenon with 6gig ram and a NV 470GTX GPU (aka my development machine); the same test runs at ~30fps, or ~30ms per frame FOR THE SAME WORK LOAD.
In fact, originally the concurrent version was running 5ms/frame SLOWER than the single threaded version until I spotted what was going on and reduced our thread count by one to let NV have a whole core to do the work at which point it was beating the single threaded performance by 1ms.
(I tested it later on my HD5870, i7 rig at home and once again the multi-threaded performance was 5ms slower due to AMD's drivers).

So, today, a console can push more draw calls than a PC.
This is a combination of DX, drivers and windows internals and if it isn't fixed then in X years when the next generation of consoles is released they will simply leave the PC in the dust because it won't be able to match them in draw calls which means less things on the screen, less subtle details and less quality in the game.
Combine that with better tools on the consoles and,well, you can see why people are concerned about the future of PC games.

What happens now is pretty much in the hands of MS, AMD, NV and Intel but I can tell you right now; this is a concern.




Quote:
We all know you're leaving the important details out of this "test" or you didn't realize their were important details that made a difference. Like, I don't know resolution or something. There's no telling. You're going to sit there and tell us that a slower CPU can render faster than a much faster CPU. There are details that you either don't know about or aren't telling.

I explained some time back, but apprently your reading ability has failed.

There are more layers, book keeping and indirection on the PC than the console. So it takes more cycles to do the same amount of rendering work. Combine that with an ability to submit draw calls/build command lists from multiple threads on the consoles and the problem becomes apprent if you have even an small amount of technical skills and understanding of modern OSes and consoles.


Also, I don't appricate being called a lier when it comes to the details. I'm trying to have an honest discussion here to inform people without the technical background about the problems faced in modern game development; trust me when I say that I know full well what details are important and what are no and that nothing 'important' was left out.

But, if you really want to know;
- the same workload was carried out on all platforms
- all platforms split the work load over 5 threads
- all platforms were at 720p
- all platforms executed the same C++ code compiled for release mode
- all platforms did not perform the same

The main problem is that the final submission of the draw calls on is taking ~13ms, with the inital setup of the command lists taking ~7ms, which puts us above the 16.6ms requirement for 60fps, which the consoles can manage with this test setup.


Quote:
470 slower than PS3 and XBOX please... try to throw Crysis DX10 Very High x4aa x4 trssaa x16AF @720p at consoles and see what happens... 470 will cope with it at decent fps, boxes will just die a pathetic death. That consoles "advantage" has to be taken so much out of context that it would win a "greatest spin" award instantly.

It isn't about the graphics card; it is about the CPU cost of performing draw calls.
Right now a console can handle more draw calls than a PC, of course due to them having weaker GPUs we can't do a great deal of shading as the problem switches back to being GPU bound pretty quickly.

What we are talking about however is the future, when the consoles have GPUs on par, or better, than current PC GPUs; at which point they can handle doing all that extra pixel work associated with the extra draw calls they can push.
The PCs of the future might well have GPUs which can handle more pixel processing and push higher resolutions but they WONT be able to handle increased draw call costs without significant changes to the underlaying driver system to remove the CPU overhead.

THAT is where the problem is; the CPU NOT the GPU.

Quote:
I have a belief that the draw call limit if it becomes an issue it will be solved and the fact that it has not been addressed is because it has not been an issue yet. The market will sort it out. I really doubt any of the players involved are just going to flip over their desks on go home calling it the end of the PC performance increases.

Well, yes, hopefully it will be addressed BUT these things take time to sort out both on the windows side and the driver side of things.

If we wait for the next gen of consoles to hit and then say 'oh, by the way PC games are going to have less in the world because we don't have the CPU time to draw stuff, please fix, kthxbye' you are looking at an (optimistic) 18 month lead time at least before things begin to be put into place, at which point if it's not a simple DirectX change you are also waiting on devs to move their rendering interface across to the new API which will probably miss that cycle of games and maybe the next.

All in all if you wait until the day it becomes a problem you are probably looking at around a 3 to 4 year lead time before usage becomes common. Chances are any games in production will stick with DirectX, newer games might not even move across right away until the API has some market share along side DirectX to make the effort of conversion worth it.

So, if you are ok with PC games having less stuff in the world for a few years while consoles steal the march on them... then fine, it isn't an issue and we can wait until it is one.
(It is worth pointing out however that the reason DX11 gained multi-threaded submission ability is because of this very reason. It's just two years on we are still hamstrung by drivers from NV and AMD not doing the business for various reasons.)

Personally I am first and foremost a PC gamer, most of my game time is spent on PC games and when the next project plans at work were first mentioned I very early on made a push for DX11 support. I have no intrest in seeing the PC "die" as a games machine, at the same time on these boards I'm in a reasonably unique position of being able to understand first hand both sides of the problem and the technical issues we have to over come in order to not let PCs slip behind.

It IS a problem now and something needs to be done because otherwise the PC WILL slip behind come the next cycle and will stay there for some time.

Right now I would say we are in a transistion period; AAA PC games will get a bit more love but that's because we are an estimated 12 months away from beta console devkits from MS and Sony which are going to hold DX11+ parts thus the extra PC love is, in part, "practise" for this next generation of hardware. To make a high end PC game these days you need to get your tools, pipelines and renderer into shape, something which will be good for the next generation and, from a company point of view, cut down 'ramp up' time for games in that generation.

Current smart money is on AMD having tied up all the consoles for the coming generation.

In fact, as a graphics coder, I HOPE that's the case because making things work correctly on two different GPUs is a right pain in the arse. If both consoles could come out with simular GPU tech this would make life much easier, rather than the last gen where is seems Sony decided to not spend any real money on the GPU at all... *grumble grumble*

It makes good economic sense at this point in the life cycle to sink engineering effort into doing things The DX11 Way so that, a year from now, when the consoles hit with DX11 hardware they have a working knowledge base to jump off from.

And it's not just the graphics coders; artists have to get use to new techniques as well, both on the hardware side and how they work with it down to working at higher resolutions and what they can do which looks correct in them. For a full on DX11 game the whole art pipeline probably needs looking at, better to take a game to try it out, work out the kinks and learn lessons for the future instead of wait around until the consoles drop and suddenly go '****.. how do we work with this stuff?!?'

Even if the PC version sold 1/8th the copies of the consoles this would still be a good investment from a 'lessons learnt' point of view and is very forward looking from the company.

I argued the same thing when we were planning our next project at work; that we should sack off DX9 and focus on DX11 on the PC so that the rendering team were all up to speed for the next console generation. As it turns out the project never got off the ground but I maintain it is the clever thing to do at this point (edit G.I.-this is referring to the 'plans' for the next OFP after RR I am guessing).

So, yes, 'practise' is the right term because they are laying the ground work for future titles and hardware.

We are probably less than 24 months away from the next generation hitting, we are expecting (although I have no confirmation of this!) beta devkits to be in our hands by this time next year.
 
  • Like
Reactions: Nilsson and Makino

Sufyan

FNG / Fresh Meat
Sep 15, 2011
301
270
0
Sweden
Who is the troll, or trolls, quoted in bold?

Thanks for the read, I'm not a programmer but I understand what this is all about. When Gabe Newell and John Carmack make 180 degree turns in their stance towards consoles and start embracing them you know it is not just about the money.
 

Richey79

FNG / Fresh Meat
Dec 13, 2009
512
202
0
He makes a pretty good point.

I'm getting thoroughly brassed off with the majority of PC games only offering DX9, even though a graphics card that doesn't support DX11 would be seen as horribly outdated already.

Only two things might hurt the validity of what he says: if a new PC architecture links graphics and general processing power more effectively (which was at least part of the goal of Sandybridge). Also, I can't imagine a new gen of consoles coming before the economy has picked up a bit.
 

M55ikael

FNG / Fresh Meat
Aug 11, 2011
349
80
0
Got a link to the source for the article quoted in OP?

Sorry, I'm working on that. Can't get in contact with my second hand source on the Codemasters forum. So I don't know who the people asking are either. But it definitely seems legit. Can't find any other trace of it on Google either.
 

vyyye

FNG / Fresh Meat
Aug 13, 2011
333
149
0
Who is the troll, or trolls, quoted in bold?

Thanks for the read, I'm not a programmer but I understand what this is all about. When Gabe Newell and John Carmack make 180 degree turns in their stance towards consoles and start embracing them you know it is not just about the money.
You might want to look up those facts. Carmack said some day ago that developing primarily on a console was a huge mistake for Rage.
 

Nenjin

Grizzled Veteran
Apr 30, 2009
3,879
480
83
Sub-Level 12
It's as much a matter of business priorities for Carmack and Newell as it is where the tech leaves them. They're too big to ignore the console markets, and even if they wanted to develop solely for the PC, their share holders probably wouldn't let them.

But Carmack did say some months ago (at Gamescom maybe?) that PC tech and its relationship to hardware is starting to peak. Instead of trying to cram more stuff in on the newest hardware...companies should be investing more deeply in tools and the actual content of their games.
 

M55ikael

FNG / Fresh Meat
Aug 11, 2011
349
80
0
You might want to look up those facts. Carmack said some day ago that developing primarily on a console was a huge mistake for Rage.

How about backing your statements up with your own sources?

Here's the article you're qouting and it isn't as black and white as you portray it to be. Like suggested in the article I posted above it is a good time to start developing for PCs in part to prepare for the next generation of consoles. He also goes on to say the exact thing that the article above suggests:

It is a little bit of a shame that, despite the raw horsepower, we are hampered by kind of the arms-length API interface. Because it is... unhappily true that we have the consoles here running at sixty frames per second, and we could have these massively more powerful PC systems that struggle sometimes to hold the framerate because of unnecessary overheads. Where, if we were programming that hardware directly on the metal the same way we do the consoles, it would be significantly more powerful. But there are a lot of moves afoot to be improving that, and we are working closely with all of the vendors to kind of address that.

[URL]http://www.firingsquad.com/news/newsarticle.asp?searchid=23760

I watched his entire keynote and I suggest you do the same before you take his statements out of context.[/URL]
 
Last edited:

Cyper

Grizzled Veteran
Sep 25, 2011
1,290
1,005
113
Sweden
Operation Flashpoint... a series that Codemaster's ruined completely and that now lives on as arma.

I just had to say that..
 
  • Like
Reactions: iTzDusty

Colt .45 killer

Grizzled Veteran
May 19, 2006
3,996
775
113
Im pretty sure MS must be having some issues here. Do they fix this and continue with PC gaming ( probably one of the biggest reasons for purchase of Windows ), or shoot it in the foot and work more on the Xbox.

Alas the pains of switching over from single core / thread to multi core multi thread.

Out of curiosity. How much does Dx11 change this, he mentioned it is multi threaded on the draws. But how much does that change considering there are still large communication channels to go through.

caution now Cyber, just becaues the company ruined a game does not mean one of the developers is an idiot. A dev often does as told, its not like they have office insurrections to make games better.
 

Sufyan

FNG / Fresh Meat
Sep 15, 2011
301
270
0
Sweden
Just a brief note on OpFla/ArmA. Codemasters own the Operation Flashpoint trademark, but obviously ArmA is the true sequel. Fact is, Bohemia Interactive has somehow managed to re-release Operation Flashpoint Gold Edition as "ArmA: Cold War Assault" on Good Old Games (gog.com). I guess maybe Codemasters own the Operation Flashpoint name, but not the actual game and it's expansions!
 

Squad Leader

FNG / Fresh Meat
Sep 26, 2011
167
56
0
DX 12 will probably address the multithread issue, I would think. And intern, the GPU companies will have to code for DX 12. No big deal. Multi core generation for PCs, also.
 

Ogil

FNG / Fresh Meat
Sep 1, 2011
16
1
0
UK
Interesting. Some Tripwire-statements regarding those draw calls now make more sense to me.

Also: I find it funny how PC-gamers believe those big companies making loads more money on console-games that they will focus more on PC-gaming. Them practising DX11 for future console-projects sounds much closer to the truth.
 

Dionysos

FNG / Fresh Meat
Mar 6, 2006
289
49
0
I love how apparently game/gfx devs have to work around bugs in graphics drivers and hardware. A lot of people potentially having to work around/do the same thing = not very efficient. I wonder if open source would be beneficial, or if working around bugs could be replaced by submitting patches "up-stream".

I'm also wondering how DX11 and the apparent one-thread draw calls compare to the latest OpenGL, I remember something about OpenGL having faster draw calls in general. I guess that's still not a solution to the principle problem.
 
Last edited:

MikkOwl

FNG / Fresh Meat
May 15, 2009
233
57
0
Sweden
Hopefully AMD will significantly increase its budget for advancing their drivers > DX11, and try to talk to Microsoft on how to sort out DX11 on the Windows 7 platform. I am sure it would be of interest for them all if DX11 and the AMD graphics hardware worked optimally, and would somewhat help out the Xbox 3 performance in the long run too.
 

Gaizokubanou

FNG / Fresh Meat
Sep 5, 2011
525
76
0
Nice read, I agree with general sentiment of the reading, but I am not too attached to neither PC or consoles.

After all, consoles are Personal Computer that's very specialized into running video games... Only logical that every time consoles get hardware update, it's going to have a huge advantage over multi-purpose PCs of equal or similar hardware capabilities.
 

Tet5uo

FNG / Fresh Meat
Sep 13, 2011
115
51
0
I have a feeling that using UE3 engine isn't helping things much at all either. It was free, so I can understand the choice, though.
 

TheRealGunther

FNG / Fresh Meat
Sep 3, 2011
1,177
282
0
Blue Ridge GA
Kinda makes upgrading to a new uber comp almost pointless now.The last time a console held a power advantage over the PC was the N64 and it lasted about a month.You know its a serious problem when ID software is thinking of jumping ship to consoles.

Maybe the PC's biggest advantage "options" will no be its Greatest weakness the problem is with operating system.Also the fact that Intel vs AMD and Nvidia vs ATI all with different architectural make ups is not helping.The more complex a game the harder it is to make it compatible with all configurations.

I think TWI is seeing this problem first hand trying to making the game perform well on all systems.And at the same time dealing with draw calls and not being able to use the full power of the PC.

The day that the better games can't be found on PC is the day I hang up gaming.I have a whole closet full of outdated consoles that get replaced every 4-5 years.Makes investments in these type of devices a waist of money knowing they will be abandoned a few years later.Heck I can still play all my old PC games on my new comp even the DOS games.

Hopefully this will be fixed with drx12-16 :rolleyes: and PC companies start working more together instead of competing to help keep the PC gaming on top as it should be.
 

Colt .45 killer

Grizzled Veteran
May 19, 2006
3,996
775
113
Reise, please read mate. its not magic.


The jump to console has been very tied to piracy. But dont let them lie to you, piracy on consoles is rampant and spreading in all the reading ive been able to find on the subject.

Another problem I see is that it is US PC gamers who fund the advances in the technology. do you think that tech would have moved so far in the last 5 years if there was NO demand for more powerfull video cards other then special purpose work stations?!

If PC gaming dies, it is fundamentally tied to Consoles. The graphics field, will slow down if not stagnate, and the CPU field will also slow down. Heck a Pentium 1 MMX w 100MB ram will be good enough to run windows 8 and browse teh internets and check your email.

In my opinion all that is needed here is a special connection / Proxy that a program can open directly to hardware with exterior managment by the OS but not direct message pass through. Then the program establishes these connections and is direct to the hardware just like a console, and at that point problems with OS's and other programs running and such will go away ( for the most part ). As to multi threading the draw calls, that already exists, however it seems that people just cant be bothered to upgrade to something better then a dual core.

( I have a hard time believing how many people are still running less then 4 cores! )