Jump to content
  • Advertisement
Sign in to follow this  

Making engine to work into jobs

This topic is 2559 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Recently i read a paper of id software about new id tech 5 engine in which they told that the PS3 Cell processor forced them to "re-factor the engine into jobs", I suppose that for make the most of parallelism. I wonder about how that design of an engine into jobs would be, in a general way so it would make the most also of current multicore PC processsors and make easier a possible portability to PS3. Anyone have links about this topic or some pseudocode ?


Share this post

Link to post
Share on other sites
Dice has some good presentations on the topic, specifically: Parallel Futures of a Game Engine.
Maybe also: Task Management -- A Practical Example

Every engine I know of uses jobs to some degree these days -- the PS3's got the Cell, the Xbox360 has 3 cores (each with 2 hardware threads), and quad-core PC's are becoming standard. Job-graphs are a great way to support all of these architectures.

You can also download all the documentation on the Cell CPU from IBM if you're interested. A short overview is -- the Cell has a whole bunch of extra cores, called SPUs, which are extremely fast... the catch is that they can't directly access RAM like you're used to. Instead, each SPU has it's own little 256kb of local RAM, which is it's own private operating area. You can issue DMA commands to move data from main RAM into the SPU's "local store", do some processing on that data, and then DMA the results back into main RAM.

This means that "good code":
* knows exactly which areas of RAM it needs to read from and write to.
* operates on contiguous areas of RAM where possible.
* can be broken up into a small enough chunk to only require less than a few hundred KB of data at once.
* can break it's workload up into several invocations of a function (so multiple cores can share the workload).

And "good" data structures:
* are compatible with [font="Courier New"]memcpy[/font] (POD types rule, modern C++ not so much).
* do not require global access.
* are contiguous and linear.
* make use of SIMD where possible.
* support the use of offsets instead of pointers.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!