Multicore and GPU Programming for Video Games
Many thanks to our sponsors!
This is the archival webpage for the Fall 2007 version of the class.
Look
here for the Fall 2008 webpage.
When and where: Fall 2007, MWF 1:05-1:55, Van Leer C241
Instructors:
Aaron Lanterman (ECE) and
Hsien-Hsin “Sean” Lee (ECE)
(with guest lectures on the Cell processor by Seunghwa Kang and Kamesh
Madduri).
TA:
Yimin
Zhang (ymzhangcn__at__gmail__com) (Klaus 2341).
Prereqs:
ECE3035: Mechanisms for Computation or CS2110: Computer Organization
and Programming. Students must be comfortable with C programming.
To be widely accessible to ECE students, no background in computer
graphics will be required.
Goals: This class covers the the
architecture and programming of multicore
processors and graphical processing units (GPUs), using examples
from the algorithmic needs of modern 3-D games (rendering,
collision detection, physics engines, and artifical intelligence),
as well as techniques for adapting
such architectures
for use in scientific applications, as in the GPGPU (General-Purpose GPU)
movement.
The class will focus on inexpensive consumer hardware,
particularly the Playstation 3,
the Xbox 360, and NVIDIA and ATI graphics cards. The
trade-offs between asymmetric
multicore architures (such as the STI Cell BE
used in the Playstation 3) and symmetric
multicore architectures
(such as the triple-Power PC used in the Xbox 360) will be discussed.
Grading will be primarily
based on a series of five programming assignments. There will
also be a final quiz, which will be weighted the same as one of the
assignments.
Further information
- Related classes
(both at GaTech and other schools)
- Video interview
with Aaron Lanterman about the class,
conducted by gamezombie.tv at the 2007 Game Developers Conference
- Original
course proposal webpage – explains some of
our original motivations for
putting the class together (although some of what’s described will be
out of date) - Research by people in the game industry:
- Valve
Publications (including papers on shading in
Half-Life 2 and Team Fortress 2) - Insomniac
R&D – notice how deep they are into
Cell SPU assembly programming!
Assignments
- HW #1:
“Roll Your Own” 3-D Rendering (due Mon, Sept. 24 at midnight) - HW #2: Direct3D First Person Shooter
(due Thursday, Oct. 11 at midnight) - HW #3: Now you are thinking with
Shaders (due Tuesday, Oct. 30 at midnight) - HW #4: Aperture Science Xbox
Multicorification Center (“4A checkpoint” due Wed, Nov. 14 at midnight;
“4B boss battle” due Wednesday, Nov. 21 at 5:00 PM) - HW #5: The Cell
(“5A checkpoint” due Friday, Dec. 7 at 5:00 PM; “5B boss battle” due
Thursday, Dec. 13 at midnight)
Schedule
- 8/20: Session 1 – Introduction
(PDF slides, PDF slides 4-up, video)- Videos: Halo 3 Documentary HD,
Ratchet and Clank (PS3) Insomniac Net-Gen Game Design Interview HD - Not shown during lecture, so be sure to check it out:
Ian Bogost
on The Colbert Report
- Videos: Halo 3 Documentary HD,
- 8/22: Session 2 – History of gaming hardware: the 2-D era
(PDF slides, PDF slides 4-up, video) - 8/24: Session 3 – History of gaming hardware: the 3-D era
(PDF slides, PDF slides 4-up, video)- Videos:
- ,
- ,
- ,
- 8/27: Session 4 – 3D Rendering Pipeline (I), Day 1
(PPT slides,
video) - 8/29: Session 5 – 3D Rendering Pipeline (I), Day 2
(video)- Supplemental material: PPT on rotations around
an arbitrary axis – not covered in lecture
- Supplemental material: PPT on rotations around
- 8/31: Session 6 – 3D Rendering Pipeline (II)
(PPT slides updated on 9/10,
video), Day 1 - 9/3: Labor Day
- 9/5: Session 7 – 3D Rendering Pipeline (II), Day 2
(video) - 9/7: Session 8 – 3D Rendering Pipeline (III), Day 1
(PPT slides,
video) - 9/10: Session 9 – 3D Rendering Pipeline (III), Day 2
(video) - 9/12: Session 10 – Direct3D Basics (I), Day 1
(PPT slides
updated on 9/15;
<!–
video of guest speaker, Jason Tanner
(Intel) –> because of technical difficulties,
no video for the main lecture is available)- Example
code for lectures on “Direct3D Basics (I)” (adapts Win32 template code
by Frank Luna; D3D internals code mostly written by Prof. Lee) - F. Luna, Introduction to 3D Game Programming
with Direct X 9.0c: A Shader Approach – The class has no required
texts, but if you wanted to get more into Direct3D game programming and
wanted to pick up a book on the topic, this is probably one of the better
ones. - Moon Labs website
for Frank Luna’s books (including a lot of example code) - Prof. Lee also recommends
www.directxtutorial.com
- Example
- 9/14: Session 11 – Direct3D Basics (I), Day 2
(video) - 9/17: Session 12 – Direct3D Basics (II), Day 1
(PPT slides,
video)- Some example
code for lectures on “Direct3D Basics (II)” (adapts Win32 template code
by Frank Luna; D3D internals code mostly written by Prof. Lee)
- Some example
- 9/19: Session 13 – GPU Architecture
(PDF slides,
PDF slides 4-up,
video) - 9/21: Session 14 – Guest speaker: Jose Caban, Software Engineer
(Tiger Woods PGA Golf), Electronic Arts Tiburon- No time off from EA’s cool capers, Orlando Sentinel, Oct. 15,
2007.
- No time off from EA’s cool capers, Orlando Sentinel, Oct. 15,
- 9/24: Session 15 – Direct3D Basics (II), Day 2
- Even more example code for lectures on
“Direct3D Basics (II)”
(adapts Win32 template code
by Frank Luna; D3D internals code mostly written by Prof. Lee)
- Even more example code for lectures on
- 9/26: Session 16 – Architectural Overview: Xbox 360 vs. Playstation 3
(PDF slides,
PDF slides 4-up,
video)- Xbox
360 System Architecture,
IEEE Micro, Vol. 26, No. 2,
March-April 2006, pp. 25-37.
- Xbox
- 9/28: Session 17 – Programmable Shaders, Day 1
(PPT slides,
video)- Example
code for lectures on “Programmable Shaders”
by Prof. Lee
- Example
- 10/1: Session 18 – Programmable Shaders, Day 2
(video) - 10/3: Session 19 – Environment and Bump Mapping
(PDF slides,
PDF slides 4-up,
video)- The Cg Tutorial – This
class has no required texts,
but this is a good introduction to shader coding and typical tricks, and
formed the basis of a lot of the lecture slides. (It is a bit short
on info on hooking your Cg code into the main 3D API; you’ll need to
look elsewhere for that.) - The
Cg Tutorial resources from the NVIDIA website –
you can download the Cg Toolkit and the example code from the text here. It’s
fairly easy to install and run the examples.
All of the code shown in lecture was from The Cg Tutorial.
- The Cg Tutorial – This
- 10/5: Session 20 – Projective Textures and Shadow Maps
(PDF slides,
PDF slides 4-up,
video)- C. Everitt,
Projective Texture Mapping - C. Everitt, A. Rege, C. Cebenoyan,
Hardware
Shadow Mapping
- C. Everitt,
- 10/8: Fall break
- 10/10: Session 21 – Phong vs. Gouraud Shading; C# Gotchas
(PDF slides,
PDF slides 4-up,
video) - 10/12: Session 22 – Introduction to Multithreading
(PDF slides,
PDF slides 4-up,
video) - 10/15: Session 23 – Multicore Strategies for Games
(PDF slides,
PDF slides 4-up,
video)- Bruce Dawson,
Coding
for Multiple Cores on Xbox 360 and Microsoft Windows (the
code examples are C++, not C#, but many of the ideas still apply) - Bruce Dawson,
Lockless
Programming Considerations for Xbox 360 and Microsoft Windows
- Bruce Dawson,
- 10/17: Session 24 – More on Multithreading
(PDF slides,
PDF slides 4-up,
video) - 10/19: Session 25 – Introduction to XNA
(PDF slides,
PDF slides 4-up,
video) - 10/22: Session 26 – Xbox 360 Deployment, Debugging, and Profiling
(video) - 10/24: Session 27 – Collision detection: convex objects
(video)- Jeff Lander,
When Two Hearts Collide: Axis-Aligned Bounding Boxes (requires
you to sign up for Gamasutra, which is free)
Unreal Engine 2 Collision Tutorial
- Jeff Lander,
- 10/26: Session 28 – Collision detection: line with triangle
(video) - 10/29: Session 29 – Rigid Body Physics, Part 1
(video;
supplemental material on quaterions:
PDF slides,
PDF slides 4-up) - 10/31: Session 30 – Rigid Body Physics, Part 2
(video) - 11/2: Session 31 – Animation
(PDF slides,
PDF slides 4-up,
video) - Note: The Cell/B.E. lectures below are based on slides presented
by Hema Reddy of IBM at the
One-Day IBM Cell Programming Workshop at Georgia Tech held
2/6/2007. - 11/5: Session 32 – Cell/B.E. Introduction: Architecture
(PDF slides,
video)
Introduction
to the Cell multiprocessor,
IBM Journal of Research and Development, Vo. 49,
2005, pp. 589-604.
Synergistic
Processing in
Cell’s Multicore Architecture, IEEE Micro, Vol. 26, No. 2, March-April
2006, pp.10-24.
- 11/7: Session 33 – Cell/B.E. Introduction: Software Development
(PDF slides,
video)- The
Cell project at IBM Research
Programming
high-performance applications on the Cell BE
processor, Part 1: An introduction to Linux on the PLAYSTATION 3- The
Insomniacs: Can a team of scrappy game programmers
save Sony’s monster chip?, IEEE Spectrum, Dec. 2006, pp. 24-29. - The Potential of the Cell Processor for Scientific
Computing
- The
- 11/9: Session 34 – Cell/B.E. Hands-On – The Hello World Program
(PDF slides,
video) - 11/12: Session 35 – Postprocessing in XNA
(PDF slides,
PDF slides 4-up,
video) - 11/14: Session 36 – “Classic” GPGPU
(PDF slides,
PDF slides 4-up,
video) - 11/16: Session 37 – Introduction to CUDA
(video) - 11/19: Session 38 – Cell/B.E. Programming: DMA
(PDF slides,
video) - 11/26: Session 39 – Cell/B.E. Programming: SIMD
(PDF slides,
video) - 11/28: Session 40 – Cell/B.E. Programming Tips & Techniques
(PPT slides,
video) - 11/30: Session 41 – Cell/B.E. Programming Models
(PPT slides,
video) - 12/3: Session 42 – Playstation 2 Architecture
(PDF slides,
PDF slides 4-up,
video) - 12/5: Session 43 – Guest Speaker: Stephen Chenney, Emergent
Game Technologies - 12/7: In-class closed-book closed-notes written job interview
simulation
- Valve