Approvals 12/10 ▼
OC_MurphysLaw (2) - 4211d ago Cancel
decapitator (2) - 4211d ago Cancel
paul_war (2) - 4211d ago Cancel
Cyrus365 (4) - 4211d ago Cancel
mighty_douche (1) - 4211d ago Cancel
Blademask (1) - 4211d ago Cancel

GDC 2008 - Insomniac SPU Programming

A truly excellent PowerPoint article on SPU usage, programming and techniques by Mike Acton and Eric Christensen from GDC 08.

"Insomniac's SPU Best Practices - Hard-won lessons we're applying to a 3rd generation PS3 title."

The article includes technical drawings, code, and best practices. Showing the evolution from Resistance Fall of Man to Resistance 2.

Read Full Story >>
Create Report !X

Add Report


fiar enough.
decapitator4211d ago WhoDisagree(0)Agree(0)
Old? the article came up on 2/26/08 and today is 03/05/ you are saying if its more than 8 days old it shouldnt go up on the site? ...personally i say its fine.
OC_MurphysLaw4211d ago WhoDisagree(0)Agree(0)
02/26/08 ?
decapitator4211d ago WhoDisagree(0)Agree(0)
The story is too old to be commented.
Joey Gladstone4211d ago (Edited 4211d ago )

"I am a huge proponent of not automatically managing too many things (e.g. memory via malloc or time via a scheduler) for a console game. I believe very strongly that it forces the team to keep things simple.".....I cant think of a company more willing to take risks, and do whats right for the game than Insomniac......keep up the Top Notch Games....and I'll keep buying them lol
....."The JOEY has Spoken"

mighty_douche4211d ago

WOW, read and keep up with what i could ,but alot went start over my head. Wish i understood more : )

decapitator4211d ago

Am waiting for someone to translate this in Layman's terms for me.

mighty_douche4211d ago (Edited 4211d ago )

That's a lot of translating to do! : )

Bombomb4211d ago

it amazes me what people say on here and probably how much of it is rather rubbish, as opposed to a developer that knows what they are talking about.

ruibing4211d ago (Edited 4211d ago )

He's talking automanagement of a programmer's resources.

If you think about Java, most resources are automatically managed by the Java Virtual Machine, such as garbage collection and etc. It makes life a lot easier since you don't have to worry so much about memory leakage.

When it comes to C/C++, you have much more control over this matter. The malloc() function is used for dynamic memory allocation in which you can create an array of a fixed type and size. It basically makes sure a fixed array of a specific size is readily available so it does not been to be created on-the-fly, so it minimizes memory usage and speeds up processing. But of course you must free up the memory afterwards, since a function thats repeatedly called and keeps on allocating new memory without freeing any will cause problems. A scheduler is kind of vague, but it often has to do with some interrupt service routine that manages certain background and foreground activities.

His point is that his team seems to prefer doing a lot of the low level programming details manually. It tends to optimize the code at the cost of more developer's time due to the need to manually write it out and check it (since its more error prone and might even cause a run-time error versus a compile-time error).

I just wish he went into more detail, it was a bit too vague for my taste. But I'm still amazed they are on the 3rd generation game for the PS3 during the Q1 of the second year. Automating resources may actually be a flaw in other developers if the top notch first party developers are all doing it manually, this may actually be one of the reasons cross platformers that are lead by the 360 don't perform so well when they maintain automated resources on the PS3. But this problem will become minimized as the compilers for the PS3 source codes improve in automatically taking advantage of the SPUs.

Jeanne4211d ago

There are two main issues that addressed by Cell:

1) Clock speed in chips pretty much hit a wall

2) Memory speed is much slower than chip speeds

To solve 1) you need to increase parallelism. Hence multiple SPUs running in parallel with the PPU.

To solve 2) you need to hide as much latency(ie waiting for data to arrive to be worked on) as possible. The SPUs are designed to independently load in data the need while they are working on other data.

Jeanne4211d ago

Pretty much all game code is some form of:

1) Load the data you need into the cache so your code can operate on it

2) Operate on that data that is in the cache

3) Store that data back to main memory(or another chip's cache in parallel systems)

With a desktop x86 CPU in most people's computers there is a small but fast cache that the chip fetches data into in blocks. So as you work on a piece of memory the next X bytes are read in at the same time.

With Cell's SPUs you now have 7 caches but instead of the chips being in control of what you load into the small but fast local memory, you the programmer are. With the SPUs you have full control over asynchronously loading in data to be worked on.

Insomniac is stating in the slides that working with Cell is in essence exactly like working with any other chip. You are still performing those three steps listed above, but now you have more parallelism and much more control over where and when data gets loaded in and stored back when you are done.

They are stating that there is nothing 'new' about anything in Cell. Just the details of how you solve the same problems you do with any other chip.

When you read about these X percent of SPU usage and see some of these graphs that are in the presentation they are really just describing how effectively they are doing steps 1-3 above.

In fully optimized Cell code every SPUs is running constantly with work to do. And each SPU is doing the following constantly:

1) Start a DMA(asynchronous memory load) of the next set of data to work on

2) Work on the current set of data in local memory

3) When both 1&2 are done DMA the results of 2 back to main memory or another SPU

4) Goto 1)

So as you optimize your PS3 engines you are squeezing more and more parallelism and finding more and more ways to hide latency of loading and storing of data.

tfur4211d ago

Here is a nice thread with some details you might enjoy...

+ Show (5) more repliesLast reply 4211d ago
tfur4211d ago (Edited 4211d ago )


Get used to multi-core programming, it is here to stay and that coding for the SPU's is not as hard as the FUD will have you believe.

Data design is the most important aspect of coding, especially for consoles and efficiency.

As far as in relation to Resistance 1 and 2... It shows extreme optimization of both what the PPU does and what the SPU's do. SPU usage has gone up considerably, and PPU efficiency has as well. Notice the shrinking of the orange PPU time that cannot be overlapped.

tfur4211d ago

New Full Moon podcast out tomorrow... with more Resistance 2 updates...

"There's some Resistance 2 updates - including our favorite Brit (not Rolf) stopping by to talk about mo-cap - and make my life editing hell as I have to constantly edit out his references to a creature we haven't announced yet."


PSWe604211d ago

hope they stop by EA and show em' a thing or two

fenderputty4211d ago

for free. I don't know if it's all their coding but, the announced at GDC that anyone, including you and I, could check it out. These guys are a class act.

mighty_douche4211d ago

Imagine if ALL development house's were as generous! We'd have games now that wont be possible for years.

fenderputty4211d ago (Edited 4211d ago )

I know. Creativity and origionality would still be left up to the dev to create something people want but, all games would benifit from this on a graphical and technical stanpoint. I really think this is puts Insomniac in a class of their own. Not only are they good at what they do but, they learned lessons about sharing from their mothers when they were younger too.

Show all comments (27)
The story is too old to be commented.