Using the Validation Layer for error checking
In the spirit of a high-performant, low-overhead API, Vulkan does not perform error-checking by default. Doing so would incur a performance penalty, which may be unacceptable for some applications. On the other hand, due to Vulkan’s complexity, it is very easy for the application to make mistakes.
To help application authors detect errors, Vulkan provides layers, which can be enabled during development and later disabled for shipping. That combination isn’t mandatory, as developers don’t have to enable error-detecting layers for testing nor disable them for shipping, although that is the most common scenario.
In this recipe, we will introduce what Vulkan layers are and how their messages are presented, as well as offer tips on how to learn more about the meaning of those messages.
Getting ready
Layers are provided with the Vulkan SDK, so if you are using Vulkan, chances are you also have access to layers...