NOTE: This blog post assumes knowledge of GPU programming, GPU-driven rendering, D3D12 and systems programming.

This post focuses on D3D12 but it applies for most graphics APIs.

Introduction

A GPU-driven renderer requires many data structures to handle scenes GPU-side: dynamic arrays, bit arrays, I’ve seen some using hashtables, and managing memory for those can be tricky !

Our games get more and more complex, and so do their memory requirements, we need systems that can scale properly to large scenes and many devices without exploding budgets. In my renderer, I have quite a few buffers, here’s a non-exhaustive list:

  • Instance buffer
  • Mesh buffer
  • Material buffer
  • Streaming buffer
  • ToCull meshlets
  • Visible meshlets
  • Various large bookkeeping buffers