Game Physics Performance on the Larrabee Architecture

Game physics is at the heart of any modern game engine which employs the laws of physics to simulate life-like movement and interaction between objects, such as rigid and deformable bodies, cloth, and water. Game physics applications are very compute and memory intensive. The ever growing quest for a high degree of realism requires more complex physics algorithms and also larger datasets. To meet the demands of game physics applications requires a computer architecture which can deliver high floating point performance and memory bandwidth. However, generalpurpose many-core architectures are quickly evolving to overcome these constraints. Larrabee is one such highly-threaded many-core architecture. It consists of an array of multiple IA Intel processor cores, each augmented with a 16-wide vector processor unit. In this paper, we analyze several key game physics applications. We show how Larrabee’s extensive thread and data parallelism are well suited for a broad set of physics algorithms. We show how these algorithms parallelize and map to Larrabee architecture and achieve good parallel speedup with the number of cores. White Paper Implementing Game Physics on the Larrabee IA Many-core Architecture Introduction The booming market for computer games continues to drive the graphics community's insatiable desire for increased realism, believability, and speed. In the past decade, physical simulation has become a key to achieving the realism expected by game players. A high degree of realism however requires life-like interaction between game objects. For example, a ball should react differently when bouncing across a concrete surface compared to grassy surface. The physical simulation of the ball must account for the different physical properties (friction, rigidity, etc.) of both surfaces and their impact on ball’s animated motion. The cannon shell which hits the brick building should cause the individual bricks to fall and potentially the entire building to collapse. A heavy object thrown into the water should produce splashes and even waves which must quiet down over a period of time. To achieve the desired degree of realism of physical simulation requires complex mathematical models which translate into compute-hungry algorithms. As the size of the scenes grows to accommodate larger number of objects, the computational complexity as well as size of data structures also increases. These two factors make real-time performance (at least 30 frames per second) hard to achieve without sufficient hardware resources. However, general-purpose many-core architectures are quickly evolving to meet and overcome these challenges. Larrabee [Seiler et al 2008] is one such highly-threaded many-core architecture. It consists of an array of multiple IA Intel processor cores, each augmented with a 16-wide vector processor unit. In this paper, we first examine several simulation models used to compute various types of physical simulation in modern games. We then briefly review the Larrabee Architecture. Finally, we describe how to parallelize these applications and map them to Larrabee to achieve good speedup with the number of cores. Specifically, we explain the implementation approaches we employed for the game physics workloads presented in Figure 17 of [Seiler et al 2008]. In summary, Larrabee’s thread and data parallelism and its general-purpose processor architecture are a good match for a broad set of physics algorithms. This paper is an illustration of how game physics could be run on LRB. The specific implementation of game physics within the PC platform is beyond the scope of this paper. Additional performance details and architectural implications of game physics processing on Larrabee are discussed in [GamePhysics08]. Game Physics Simulation Models In this section we show a high level model of the physical simulation time step, as well as several key game physics applications, which are all based on this simulation model. The description is based on [Chen07]. Figure 1 shows a typical time step in a physical simulation application. For each time step of a simulation, a physical simulation application takes as input the state of the simulated scene (e.g., positions, orientations, and velocities of all objects), as well as external control information (e.g., what the player is doing in a game). The application then computes the physical processes that lead to an updated state (e.g., force, torque, or pressure generation). Depending on the scheme used, this information will be used to advance the state Compute forces, torques, pressures, etc Time Stepping Collision & constraint processing State (time=tn) State (time=tn+1) External control Figure 1: Overview of physical simulation White Paper Implementing Game Physics on the Larrabee IA Many-core Architecture for each grid cell M for each particle A in M for each surrounding cell N for each particle B in N