With the knowledge we gained from the last two chapters, we have now reached a level where we can start Vulkan programming from scratch. These two chapters laid the foundation and helped us understand the basic fundamentals of this revolutionary API. Now, at a higher level, we understand the motivation behind this technology, its core blocks, and the associated functionalities and terminologies. In addition, we walked through Vulkan pseudocoding and built a very simple application to understand and visualize the Vulkan programming model.
From this chapter onward, we will dive into the core of Vulkan programming and start transforming our Hello World!!! pseudocode into a real-world executable sample.
In this chapter, we will cover the following topics:
All the chapters in this book use the LunarG SDK for Vulkan programming. This SDK can be downloaded from https://vulkan.lunarg.com; you'll need a LunarG account to do this.
The SDK's default installation path always locates to C:VulkanSDK
[version]. Upon successful installation, the SDK's Bin
directory location is added to the $PATH
environment variable (C:VulkanSDK1.0.26.0Bin
). In addition, the VK_SDK_PATH
environment variable is added, pointing to the SDK's path (C:VulkanSDK1.0.26.0
).
The installation will also add the Vulkan loader (vulkan-1.dll
) to C:WindowsSystem32
. Based on the window target, the loader will be either a 32-bit or 64-bit DLL.
The following are some general terms that will be commonly used throughout the chapter:
Term |
Description |
ICD |
This is the abbreviation for Installable Client Driver. It is a Vulkan-compatible display driver. Multiple ICDs--for example, NVIDIA and Intel drivers--can coexist without interfering with each other. |
Layers |
These are pluggable components that either hook or intercept Vulkan commands. They provide services such as debugging, validation, tracing, and so on. |
Loader |
A loader's job is to locate the display driver and expose the layer's libraries in a platform-independent way. On Windows, the load library ( |
The following are the folder contencified in the highlighted part of the following code.ts of the LunarG SDK along with the respective descriptions:
Directory |
Description |
Bin and Bin32 |
These contain the 32-bit (the |
Config |
This is meant to store different Vulkan configurations. For example, it contains the |
Demo |
This is the Vulkan demo source for the |
Doc |
This refers to specifications, manuals, release notes, and other important pieces of documentation. |
glslang |
This contains the source and headers for glslang. It provides a frontend parser for GLSL and a standalone wrapper tool called |
Include |
This contains the necessary header files that help the Vulkan application to be built and compiled. |
Runtime
installer
|
The Vulkan runtime installer offers Vulkan runtime libraries that can be included by a Vulkan application or driver. Refer to the |
Source |
This contains the source implementation for loader ( |
spir-v tools |
This refers to the source code and header files for SPIR-V tools. |
3.138.37.191