Initializing compute shaders in Vulkan
Up until now, we used only graphics-capable command queues on a Vulkan device. This time, we have to find device queues that are also capable of GPGPU computations. In Vulkan, such queues allow execution of compute shaders, which can read from and write to buffers used in the graphics rendering pipeline. For example, in Chapter 10, Advanced Rendering Techniques and Optimizations, we will show how to implement a GPU frustum culling technique by modifying the indirect rendering buffer introduced in the Indirect rendering in Vulkan recipe from Chapter 5, Working with Geometry Data.
Getting ready
The first thing we need to do to start using compute shaders is to revisit the render device initialization covered in Chapter 3, Getting Started with OpenGL and Vulkan. Check out the Initializing Vulkan instances and graphical device recipe before moving forward.
How to do it...
We add the code to search for a compute-capable device queue and...