/compute_shader_vulkan

Hello World-like program with Vulkan. Initialization to execute compute shaders.

Primary LanguageC

Compute shader with Vulkan

Initialization of a Vulkan program to execute compute shaders based on the Udemy course taught by Miloslav Stofa.

Vulkan is an explicit graphics API, that means it works in a lower level, with low overhead and explicit control, but with the responsibility of the developer to do everything.

Compute shaders are a special type of shader that doesn’t use the fixed graphics pipeline, and just allows to run arbitrary computations on the GPU. The only input CS get, aside from some API states, is their thread index. CS threads have their own identity and registers.

Image(1000x1000px) generation of a simple fractal and compare the processing time(miliseconds) needed by the CPU and the GPU:

          CPU time: 285 ms.                       GPU time: 4 ms.


The steps that I have followed to initialize Vulkan application are summarized here.