Chapter 12. Compute Shaders

Chapter Objectives

After reading this chapter, you’ll be able to do the following:

• Create, compile, and link compute shaders.

• Launch compute shaders, which operate on buffers, images, and counters.

• Allow compute shader invocations to communicate with each other and to synchronize their execution.

Compute shaders run in a completely separate stage of the GPU from the rest of the graphics pipeline. They allow an application to make use of the power of the GPU for general-purpose work that may or may not be related to graphics. Compute shaders have access to many of the same resources as graphics shaders but have more control over their application flow and how they execute. This chapter introduces the compute shader ...

Get OpenGL® Programming Guide: The Official Guide to Learning OpenGL®, Version 4.5 with SPIR-V, Ninth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.