Most of the parallelism in game code right now is an afterthought. The game code is written for the most part oblivious to maximizing parallelism during the majority of the dev process. At some point the main engineer starts profiling the code and starts moving code around to maximize parallelism with the GPU or coprocessors. Only the most trivial form of synchronization is needed. Has the GPU finished drawing or has the VBL started.
The main code stream is executed in serial order with only things like hardware callbacks being executed outside the linear execution of the game logic.
For an architecture like Cell, I can see two different types of parallelism.
1) Game code still has a main thread that spawns sub threads on the other units whose computational results are independent of each other. An example game would be a game no more complex than what we have today except it uses the massive float point parallelism to do insane amount of patch tessellation. Synchronization would be not much more difficult that what is being done today with a standard CPU+GPU pair. Console engineers are already doing similar type of coding on the PS2.
2) Game code that is completely broken up into execution packets. An example would be a game that has order(s) of magnitude more active objects(people,cars,zombies) being updated in the world. Objects are updated in groups in parallel on multiple execution units in parallel. As far as I know no one has written game code of structure.
So far almost all parallelism still fits into the classic game structure of:
while(true)
{
world.Update
world.Render
}
As long as the structure is some form of the above, adding more execution units is just another form of optimization. If the architecture requires a break with the classic game structure, game engineers are going to have to do some major homework.
The main code stream is executed in serial order with only things like hardware callbacks being executed outside the linear execution of the game logic.
For an architecture like Cell, I can see two different types of parallelism.
1) Game code still has a main thread that spawns sub threads on the other units whose computational results are independent of each other. An example game would be a game no more complex than what we have today except it uses the massive float point parallelism to do insane amount of patch tessellation. Synchronization would be not much more difficult that what is being done today with a standard CPU+GPU pair. Console engineers are already doing similar type of coding on the PS2.
2) Game code that is completely broken up into execution packets. An example would be a game that has order(s) of magnitude more active objects(people,cars,zombies) being updated in the world. Objects are updated in groups in parallel on multiple execution units in parallel. As far as I know no one has written game code of structure.
So far almost all parallelism still fits into the classic game structure of:
while(true)
{
world.Update
world.Render
}
As long as the structure is some form of the above, adding more execution units is just another form of optimization. If the architecture requires a break with the classic game structure, game engineers are going to have to do some major homework.