How Ubisoft Develops Games for Multicore - Before and After C++11
summary
Ubisoft Montreal documents concrete concurrency patterns—pipelining, dedicated threads, task schedulers—and the custom concurrent objects actually implemented (queues, task groups, cancellation/prioritization). A buggy bounded SPSC lock‑free queue on weakly ordered PowerPC exposes reordered stores; adding lightweight fences fixes it. The migration to C++11 atomics shows two models (sequentially consistent vs relaxed), measures a noticeable seq_cst slowdown in microbenchmarks, and demonstrates correct, portable conversions that retain performance tradeoffs.
AI-written summary · about
chapters (23)
- 0:00Intro
- 0:57MULTICORE
- 2:43GENERAL-PURPOSE HARDWARE THREADS
- 3:25SINGLE-THREADED MAIN LOOP
- 4:02THREE THREADING PATTERNS
- 4:37CONCURRENT OBJECTS
- 6:37DOUBLE-BUFFERED GRAPHICS STATE
- 6:58SEPARATE GRAPHIC OBJECTS
- 7:20CONTENT STREAMING
- 7:38DEDICATED LOADING THREAD
- 9:42WAKING UP THE LOADING THREAD
- 10:41IMPROVING ON THE QUEUE
- 11:50SIMPLE TASK QUEUE
- 13:38TASK GROUPS
- 14:29MANAGING DEPENDENCIES
- 15:30IMPROVING ON THE TASK SCHEDULER
- 17:47FENCE MACROS
- 29:17ATOMIC OPERATIONS
- 31:06C++11 FORBIDS DATA RACES
- 36:08SEQUENTIALLY CONSISTENT ATOMICS
- 46:14HOW TO CONVERT GAME ATOMICS
- 50:19EXAMPLE
- 52:01BENCHMARKS
related talks
59mThreads and Locks must Go
56mThe C++ Execution Model
52mBest Practices for Concurrency
01h 07mAn Introduction to Multithreading in C++20
01h 04mConcurrency TS2: Improved C++ Concurrency and Lock-free Programming
01h 04m[old version]The C++20 Synchrononization Library
59mC++ on its way to exascale and beyond
44mStories from a parallel universe
