Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
EngineCore::DescriptorSetUpdater Class Reference

The Descriptor set updater is used to create a list of descriptor set writes which are executed with update() More...

#include <DescriptorSetUpdater.h>

Collaboration diagram for EngineCore::DescriptorSetUpdater:

Public Member Functions

 DescriptorSetUpdater (VkDescriptorSet dstSet)
DescriptorSetUpdateraddStorageBuffer (uint32_t binding, const VkDescriptorBufferInfo *pBufferInfo)
 Adds a storage buffer (glsl std430 buffer) to the chain of updates to execute.
DescriptorSetUpdateraddStorageBuffer (uint32_t binding, const VkDescriptorBufferInfo &bufferInfo)
 Add a storage buffer (glsl std430 buffer) to the chain of updates to execute.
DescriptorSetUpdateraddUniformBuffer (uint32_t binding, const VkDescriptorBufferInfo *pBufferInfo)
 Adds a uniform buffer (glsl std140 buffer) to the chain of updates to execute.
DescriptorSetUpdateraddUniformBuffer (uint32_t binding, const VkDescriptorBufferInfo &bufferInfo)
 Add a uniform buffer (glsl std140 buffer) to the chain of updates to execute.
DescriptorSetUpdateraddTextureArrayIf (const bool condition, uint32_t binding, std::vector< VkDescriptorImageInfo > *imageInfos)
 Adds updates to texture array.
DescriptorSetUpdateraddCombinedImageSampler (uint32_t binding, const VkDescriptorImageInfo *pImageInfo)
 Adds a combined image sampler to the chain of updates.
DescriptorSetUpdateraddStorageImage (uint32_t binding, const VkDescriptorImageInfo *pImageInfo)
 Adds a storage image to the chain of updates.
void update (VkDevice device) const
 Updates the bindings on a descriptor sets.

Private Attributes

VkDescriptorSet dstSet = VK_NULL_HANDLE
std::vector< VkWriteDescriptorSet > writeDescriptorSets
std::deque< VkDescriptorBufferInfo > bufferInfoStorage
std::deque< VkDescriptorImageInfo > imageInfoStorage

Detailed Description

The Descriptor set updater is used to create a list of descriptor set writes which are executed with update()

Author
Konstantin Passig
Date
26.12.2025

Definition at line 14 of file DescriptorSetUpdater.h.

Constructor & Destructor Documentation

◆ DescriptorSetUpdater()

EngineCore::DescriptorSetUpdater::DescriptorSetUpdater ( VkDescriptorSet dstSet)

Definition at line 6 of file DescriptorSetBuilder.cpp.

References dstSet.

Referenced by addCombinedImageSampler(), addStorageBuffer(), addStorageBuffer(), addStorageImage(), addTextureArrayIf(), addUniformBuffer(), and addUniformBuffer().

Here is the caller graph for this function:

Member Function Documentation

◆ addCombinedImageSampler()

DescriptorSetUpdater & EngineCore::DescriptorSetUpdater::addCombinedImageSampler ( uint32_t binding,
const VkDescriptorImageInfo * pImageInfo )
nodiscard

Adds a combined image sampler to the chain of updates.

Parameters
bindingwhich binding to write the update to
pImageInfovulkan image info pointer which describes the image and sampler
Returns
The builder for further addition to the chain

Definition at line 91 of file DescriptorSetBuilder.cpp.

References DescriptorSetUpdater(), dstSet, imageInfoStorage, and writeDescriptorSets.

Referenced by EngineCore::Renderer::updateHiZMipDescriptorSets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addStorageBuffer() [1/2]

DescriptorSetUpdater & EngineCore::DescriptorSetUpdater::addStorageBuffer ( uint32_t binding,
const VkDescriptorBufferInfo & bufferInfo )
nodiscard

Add a storage buffer (glsl std430 buffer) to the chain of updates to execute.

Parameters
bindingwhich binding to write the update to
bufferInfovulkan buffer info reference which describes how to update the buffer data
Returns
The builder for further addition to the chain

Definition at line 42 of file DescriptorSetBuilder.cpp.

References bufferInfoStorage, DescriptorSetUpdater(), dstSet, and writeDescriptorSets.

Here is the call graph for this function:

◆ addStorageBuffer() [2/2]

DescriptorSetUpdater & EngineCore::DescriptorSetUpdater::addStorageBuffer ( uint32_t binding,
const VkDescriptorBufferInfo * pBufferInfo )
nodiscard

Adds a storage buffer (glsl std430 buffer) to the chain of updates to execute.

Parameters
bindingwhich binding to write the update to
pBufferInfovulkan buffer info pointer which describes how to update the buffer data
Returns
The builder for further addition to the chain

Definition at line 10 of file DescriptorSetBuilder.cpp.

References bufferInfoStorage, DescriptorSetUpdater(), dstSet, and writeDescriptorSets.

Referenced by EngineCore::RenderProcess::updateRendererDescriptorSets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addStorageImage()

DescriptorSetUpdater & EngineCore::DescriptorSetUpdater::addStorageImage ( uint32_t binding,
const VkDescriptorImageInfo * pImageInfo )
nodiscard

Adds a storage image to the chain of updates.

Parameters
bindingwhich binding to write the update to
pImageInfovulkan image info pointer which describes the storage image
Returns
The builder for further addition to the chain

Definition at line 106 of file DescriptorSetBuilder.cpp.

References DescriptorSetUpdater(), dstSet, imageInfoStorage, and writeDescriptorSets.

Referenced by EngineCore::Renderer::updateHiZMipDescriptorSets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addTextureArrayIf()

DescriptorSetUpdater & EngineCore::DescriptorSetUpdater::addTextureArrayIf ( const bool condition,
uint32_t binding,
std::vector< VkDescriptorImageInfo > * imageInfos )
nodiscard

Adds updates to texture array.

Parameters
conditionif the condition is satisfied the update proceeds
bindingwhich binding the texture array is at
imageInfoswhich textures to update
Returns
The builder for further addition to the chain

Definition at line 74 of file DescriptorSetBuilder.cpp.

References DescriptorSetUpdater(), dstSet, and writeDescriptorSets.

Referenced by EngineCore::RenderProcess::updateRendererDescriptorSets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addUniformBuffer() [1/2]

DescriptorSetUpdater & EngineCore::DescriptorSetUpdater::addUniformBuffer ( uint32_t binding,
const VkDescriptorBufferInfo & bufferInfo )
nodiscard

Add a uniform buffer (glsl std140 buffer) to the chain of updates to execute.

Parameters
bindingwhich binding to write the update to
bufferInfovulkan buffer info reference which describes how to update the buffer data
Returns
The builder for further addition to the chain

Definition at line 58 of file DescriptorSetBuilder.cpp.

References bufferInfoStorage, DescriptorSetUpdater(), dstSet, and writeDescriptorSets.

Here is the call graph for this function:

◆ addUniformBuffer() [2/2]

DescriptorSetUpdater & EngineCore::DescriptorSetUpdater::addUniformBuffer ( uint32_t binding,
const VkDescriptorBufferInfo * pBufferInfo )
nodiscard

Adds a uniform buffer (glsl std140 buffer) to the chain of updates to execute.

Parameters
bindingwhich binding to write the update to
pBufferInfovulkan buffer info pointer which describes how t oupdate the buffer data
Returns
The builder for further addition to the chain

Definition at line 26 of file DescriptorSetBuilder.cpp.

References bufferInfoStorage, DescriptorSetUpdater(), dstSet, and writeDescriptorSets.

Referenced by EngineCore::RenderProcess::updateRendererDescriptorSets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void EngineCore::DescriptorSetUpdater::update ( VkDevice device) const

Updates the bindings on a descriptor sets.

Parameters
devicewhich device holds the data

Definition at line 121 of file DescriptorSetBuilder.cpp.

References writeDescriptorSets.

Referenced by EngineCore::Renderer::updateHiZMipDescriptorSets(), and EngineCore::RenderProcess::updateRendererDescriptorSets().

Here is the caller graph for this function:

Member Data Documentation

◆ bufferInfoStorage

std::deque<VkDescriptorBufferInfo> EngineCore::DescriptorSetUpdater::bufferInfoStorage
private

◆ dstSet

VkDescriptorSet EngineCore::DescriptorSetUpdater::dstSet = VK_NULL_HANDLE
private

◆ imageInfoStorage

std::deque<VkDescriptorImageInfo> EngineCore::DescriptorSetUpdater::imageInfoStorage
private

Definition at line 82 of file DescriptorSetUpdater.h.

Referenced by addCombinedImageSampler(), and addStorageImage().

◆ writeDescriptorSets

std::vector<VkWriteDescriptorSet> EngineCore::DescriptorSetUpdater::writeDescriptorSets
private

The documentation for this class was generated from the following files: