Creating and Accessing Memory Objects

These objects will store vital information for rendering.

A graphical application needs some way of storing the data that will be used by the pipeline during rendering. This is usually achieved by allocating areas of the GPU memory called buffers and then loading the data into these buffers.

In this example there are three different types of buffer that are created:
  1. Vertex buffer
  2. Uniform buffer
  3. Texture Image

Alongside these objects, the application, and more specifically the shaders, also need some way of accessing the data stored within them. In Vulkan, this is handled by descriptors and descriptor sets.

This section will go into greater detail about the specific uses of each of these memory objects including how they are created and what information they store for the application. In addition to this, it will provide more information on descriptor sets. The code examples will demonstrate how to create descriptor sets that provide access to both the uniform buffer and texture image object mentioned above. A descriptor set is not required for the vertex buffer because there is a specific stage of the pipeline which deals with vertex input. Setting up this pipeline stage will be covered later during pipeline initialisation.