How much more performance do you get out of optimization?

Protokiller

Newcomer
How much extra performance do developers get by getting to optimize for the console's components E.g. CPU optimizations and GPU optimazations vs the kind of broad code PC games are expected to run?


What can you eek more extra performance out of the CPU or GPU? For this thread, lets limit it to the 360 for the most part so we don't over complicate things.

I've always been curious how these consoles can even manage to run these games, 512mb of ram is not much, hell lots of PC games today use 1GB just to itself not even counting video memory.
 
They can get a lot of optimizations into the system, for example: They can keep the shaders occupied whilst the texture units are working, like for instance post processing. So whilst a PC can do them sequentially, the Xbox 360 can do them simultainiously and keep both the texture units and the shader units working closer to 100% of the time.
 
The short version is if you know the constraints you can identify bottlenecks and design around them. And the difference in performance can be significant. But your never going to be able to put a meaningful figure on it.
 
IMO it's not a useful question that I could give a useful answer..

How much performance you can get from optimizations depends on both what systems you have already in place, what they are doing and how optimal they are doing it..
 
They can get a lot of optimizations into the system, for example: They can keep the shaders occupied whilst the texture units are working, like for instance post processing. So whilst a PC can do them sequentially, the Xbox 360 can do them simultainiously and keep both the texture units and the shader units working closer to 100% of the time.

Ah, this is the kind of answer I was looking for, a clear advantage of something you can't do on PC but you CAN do on the console.

Just curious, why couldn't the PC do both heavy shader and texture work at the same time?
 
ERP said:
And the difference in performance can be significant. But your never going to be able to put a meaningful figure on it.
Especially since within complex pieces of software like games, optimization process could arguably continue indefinitely (which indeed occasionally happens with some projects in real-world :p).

For the OP - to illustrate "indefinitely" - I've worked on porting "optimized" HD-console codebase(locked 60fps game) to PC, where we ended up improving performance of PC version by 4x+ (required to meet minimum spec).
 
Well for starters, consoles don't have an OS that eats of 600MB of RAM after boot...

Well yeah, but say you have a PC with 4 gigs of ram playing a game that runs on both PC and console, in this example Left 4 Dead 2. You turn the settings down the match the Xbox version however taskmanager still says the game itself is using 700+mb of ram, while the console version seems to get by with it's os (Xbox 360 os uses 32mb of ram, at least what I've heard) and fitting the game into a measly 480mb of ram. And this is not even counting the fact that the PC's graphics card has dedicated graphics memory while all game data must fit into the 480mb of data left for the console game.
 
On PC the games will cache more game data in RAM no mather graphic settings just becouse it can and this will improve loading times etc. No reason to have same restraints as consoles when there is plenty of RAM free and available.
 
On PC the games will cache more game data in RAM no mather graphic settings just becouse it can and this will improve loading times etc. No reason to have same restraints as consoles when there is plenty of RAM free and available.


Loading times are another thing I don't get, most console games seem to be able to load off their DVD disc as fast or even faster than the PC version of a game..... I find that odd.

Unless the PC takes longer because it's loading MORE stuff into memory reducing any HDD streaming that the console would have to do mid level off the DVD drive.
 
Loading times are another thing I don't get, most console games seem to be able to load off their DVD disc as fast or even faster than the PC version of a game..... I find that odd.

Unless the PC takes longer because it's loading MORE stuff into memory reducing any HDD streaming that the console would have to do mid level off the DVD drive.

I suspect that PC game developers see that large ram pool as a tool for easier development rather than faster loading times unfortunately.
 
I suspect that PC game developers see that large ram pool as a tool for easier development rather than faster loading times unfortunately.


Sadly, I think your right.

"Why optimize and waste time/money when we don't have to"

Then I must go order more ram lol.
 
Well yeah, but say you have a PC with 4 gigs of ram playing a game that runs on both PC and console, in this example Left 4 Dead 2. You turn the settings down the match the Xbox version however taskmanager still says the game itself is using 700+mb of ram, while the console version seems to get by with it's os (Xbox 360 os uses 32mb of ram, at least what I've heard) and fitting the game into a measly 480mb of ram. And this is not even counting the fact that the PC's graphics card has dedicated graphics memory while all game data must fit into the 480mb of data left for the console game.
Majority of PC games use DirectX managed resources. This means all texture data, graphics data (vertex buffers, index buffers) are duplicated to system RAM in addition to graphics card's own memory. Managed resources are used, because the PC game does not know how much graphics memory the graphics card has (each card brand has different memory sizes). DirectX automatically swaps textures you use to the graphics memory (overriding older textures not used for a long time) and you can play any games as long as one render call does not use more textures your graphics card can handle. Another reason why managed textures are used is that in DX9 when a task switch happens (you press alt+tab to switch to another program) the game loses ownership of the graphics card all the graphics card memory contents are overridden (by other programs and/or OS). Managed resources can automatically restore the GPU graphics memory to it's previous state when the game gets focus again. The use of managed resources ups the game memory usage by around 250-350 megabytes (for current generation console ports).

Loading times are another thing I don't get, most console games seem to be able to load off their DVD disc as fast or even faster than the PC version of a game..... I find that odd.
Unless the PC takes longer because it's loading MORE stuff into memory reducing any HDD streaming that the console would have to do mid level off the DVD drive.
The loading is often bottlenecked by the DVD drive speed and seek times. According to some Xbox has a 12x DVD drive. The fastest normal PC DVD drives are 16x. So it's likely that your DVD drive on PC is pretty much the same speedwise than the Xbox drive.

The final reason why both loading and memory usage can be increased is that PC versions use texture formats with inferior compression ratios. DX9 compressed texture format support requirements for hardware were limited to DXT1-5. Formats such as ATI1/ATI2/3dc (BC4 & BC5 in DX10&11) that compress one or two channels with higher precision were not officially supported. This is why PC developers often opt to use L8/A8 or R8B8 instead of these formats, to guarantee that all older graphics hardware also supports the texture format (it would be a huge waste of disc space to include two versions of each texture). This doubles the memory usage (and loading time) of these textures.
 
Majority of PC games use DirectX managed resources. This means all texture data, graphics data (vertex buffers, index buffers) are duplicated to system RAM in addition to graphics card's own memory. Managed resources are used, because the PC game does not know how much graphics memory the graphics card has (each card brand has different memory sizes). DirectX automatically swaps textures you use to the graphics memory (overriding older textures not used for a long time) and you can play any games as long as one render call does not use more textures your graphics card can handle. Another reason why managed textures are used is that in DX9 when a task switch happens (you press alt+tab to switch to another program) the game loses ownership of the graphics card all the graphics card memory contents are overridden (by other programs and/or OS). Managed resources can automatically restore the GPU graphics memory to it's previous state when the game gets focus again. The use of managed resources ups the game memory usage by around 250-350 megabytes (for current generation console ports).


The loading is often bottlenecked by the DVD drive speed and seek times. According to some Xbox has a 12x DVD drive. The fastest normal PC DVD drives are 16x. So it's likely that your DVD drive on PC is pretty much the same speedwise than the Xbox drive.

The final reason why both loading and memory usage can be increased is that PC versions use texture formats with inferior compression ratios. DX9 compressed texture format support requirements for hardware were limited to DXT1-5. Formats such as ATI1/ATI2/3dc (BC4 & BC5 in DX10&11) that compress one or two channels with higher precision were not officially supported. This is why PC developers often opt to use L8/A8 or R8B8 instead of these formats, to guarantee that all older graphics hardware also supports the texture format (it would be a huge waste of disc space to include two versions of each texture). This doubles the memory usage (and loading time) of these textures.


Ah, ok the managed resources explains the memory usage perfectly. That was what had me the most puzzled too.

Does anyone know why so many 360 games don't have AA even though the 10mb daughter die was supposed to give it "free"? Most don't have AF either despite it usually not costing much in performance (at least on PC).
 
Just curious, why couldn't the PC do both heavy shader and texture work at the same time?

They've been able to do it for awhile (since G80, R600 series). It had to do with separating the texture addressing units from the ALUs in hardware. But I gather Squilliam is referring towards knowing the target spec (360) and giving the hardware more things to do in parallel* compared to a PC situation where the bottlenecks can vary across hardware.

*For example, fog calculations were done alongside some texture fetch operations in Gears of War 2.

Though, of course, there is the comparison to RSX, based on G71. This pic might help explain:

http://images.bit-tech.net/content_images/2006/11/nvidia_geforce_8800_gtx_g80/shadertexture2.jpg

Between the two architectures there, you can see that the G7x math units will idle whilst performing some texture addressing. If you look at the G8x portion, they can be done in parallel, but there's also the varying hardware to take into account.


Does anyone know why so many 360 games don't have AA even though the 10mb daughter die was supposed to give it "free"?

The short version:

The render targets (framebuffer) can easily exceed 10MB, so the frame is rendered in tiles (e.g. render lines 0-512, resolve to main memory, render the remaining lines, resolve to main memory, stitch together the tiles). The main issue is overlapping geometry between tiles, which require re-processing. Things get messy with multiple render targets as the number of tiles increases (beyond 3 ;)).

The longer version (under Tiled Rendering):
http://www.beyond3d.com/content/articles/4/5
 
Loading times are another thing I don't get, most console games seem to be able to load off their DVD disc as fast or even faster than the PC version of a game..... I find that odd.

Unless the PC takes longer because it's loading MORE stuff into memory reducing any HDD streaming that the console would have to do mid level off the DVD drive.

That would be becouse of more data and such things as higer res textures etc. A general HDD can read with around 60-80MB/sec. So it might vary between systems as it mostly depends on HDD but going from experience it almost always been faster or alot faster to load games on PC, even with HDDs half that speed.
 
Does anyone know why so many 360 games don't have AA even though the 10mb daughter die was supposed to give it "free"? Most don't have AF either despite it usually not costing much in performance (at least on PC).
You get AA for free, if your backbuffer (+depthbuffer) fits to that 10mb. 720p (color+depth) with AA does not, so you either have to render the scene in multiple parts (tiling), or lower your render resolution. Rendering scene in multiple parts adds some vertex processing (some objects are visible in both tiles), but pixel shader usage is (almost) identical. Basically it's only a very slight performance hit, but it requires some extra work from the game developer.

AF costs a lot bandwidth. It's the same on PC and on consoles. Radeon HD 2600/2800 and Geforce 7600/7800 performance also dropped a lot when high quality AF was enabled. New cards naturally have more bandwidth and more texture units, making AF cheaper.
 
You get AA for free, if your backbuffer (+depthbuffer) fits to that 10mb. 720p (color+depth) with AA does not, so you either have to render the scene in multiple parts (tiling), or lower your render resolution. Rendering scene in multiple parts adds some vertex processing (some objects are visible in both tiles), but pixel shader usage is (almost) identical. Basically it's only a very slight performance hit, but it requires some extra work from the game developer.

AF costs a lot bandwidth. It's the same on PC and on consoles. Radeon HD 2600/2800 and Geforce 7600/7800 performance also dropped a lot when high quality AF was enabled. New cards naturally have more bandwidth and more texture units, making AF cheaper.

Seems very stupid of Microsoft NOT to make the daughter slightly bigger. That would have been a HUGE edge vs the PS3.

It also explains why there are so many games below 720P. The newer cod games come to mind. 600P and AA of course, but the picture looks so "soft" it's kind of a moot point.

Of course Halo 3 runs bellow HD as well but we're not even given any AA or AF and we're still at 30fps all so they could have some damn HDR lighting, because their engine was too much of a dinosaur to have it without having two frame buffers.
 
What about the cost to implement it?

You already have the daughter die, and since it's on a separate die transistor budgets aren't as big of an issue, if the die was slightly bigger they could have pulled it off.

At what cost? I'm not an NEC engineer but apparently it's almost big enough.

If your going to do something don't do it half assed, that's just my opinion on it.
 
Back
Top