The interface for a descriptor set.
More...
#include <rendering_api.hpp>
Inherited by LiteFX::Rendering::DescriptorSet< IDirectX12Buffer, IDirectX12Image, IDirectX12Sampler >, LiteFX::Rendering::DescriptorSet< IVulkanBuffer, IVulkanImage, IVulkanSampler >, and LiteFX::Rendering::DescriptorSet< TBuffer, TImage, TSampler >.
|
virtual | ~IDescriptorSet () noexcept=default |
|
void | update (const UInt32 &binding, const IBuffer &buffer, const UInt32 &bufferElement=0, const UInt32 &elements=1, const UInt32 &firstDescriptor=0) const |
| Updates a constant buffer within the current descriptor set. More...
|
|
void | update (const UInt32 &binding, const IImage &texture, const UInt32 &descriptor=0, const UInt32 &firstLevel=0, const UInt32 &levels=0, const UInt32 &firstLayer=0, const UInt32 &layers=0) const |
| Updates a texture within the current descriptor set. More...
|
|
void | update (const UInt32 &binding, const ISampler &sampler, const UInt32 &descriptor=0) const |
| Updates a sampler within the current descriptor set. More...
|
|
void | attach (const UInt32 &binding, const IImage &image) const |
| Attaches an image as an input attachment to a descriptor bound at . More...
|
|
The interface for a descriptor set.
◆ ~IDescriptorSet()
virtual LiteFX::Rendering::IDescriptorSet::~IDescriptorSet |
( |
| ) |
|
|
virtualdefaultnoexcept |
◆ attach()
void LiteFX::Rendering::IDescriptorSet::attach |
( |
const UInt32 & |
binding, |
|
|
const IImage & |
image |
|
) |
| const |
|
inline |
Attaches an image as an input attachment to a descriptor bound at .
- Parameters
-
binding | The input attachment binding point. |
image | The image to bind to the input attachment descriptor. |
◆ update() [1/3]
void LiteFX::Rendering::IDescriptorSet::update |
( |
const UInt32 & |
binding, |
|
|
const IBuffer & |
buffer, |
|
|
const UInt32 & |
bufferElement = 0 , |
|
|
const UInt32 & |
elements = 1 , |
|
|
const UInt32 & |
firstDescriptor = 0 |
|
) |
| const |
|
inline |
Updates a constant buffer within the current descriptor set.
- Parameters
-
binding | The buffer binding point. |
buffer | The constant buffer to write to the descriptor set. |
bufferElement | The index of the first element in the buffer to bind to the descriptor set. |
elements | The number of elements from the buffer to bind to the descriptor set. |
firstDescriptor | The index of the first descriptor in the descriptor array to update. |
◆ update() [2/3]
void LiteFX::Rendering::IDescriptorSet::update |
( |
const UInt32 & |
binding, |
|
|
const IImage & |
texture, |
|
|
const UInt32 & |
descriptor = 0 , |
|
|
const UInt32 & |
firstLevel = 0 , |
|
|
const UInt32 & |
levels = 0 , |
|
|
const UInt32 & |
firstLayer = 0 , |
|
|
const UInt32 & |
layers = 0 |
|
) |
| const |
|
inline |
Updates a texture within the current descriptor set.
The exact representation of the level and layer parameters depends on the dimension of the provided texture, as well as the type of the descriptor identified by the binding parameter.
If the texture itself is not an array (i.e. the number of layers equals 1
), the parameters firstLayer and layers are ignored.
The descriptor type dictates, how mip-maps can be provided. If the descriptor type identifies a writable texture, the firstLevel parameter specifies the mip-map level to write to (or read from). Multiple levels are not allowed in this case, so the levels parameter is ignored. Instead, you have to bind them to separate descriptors. Furthermore, the firstLayer and layers parameter can be used to specify the number of depth or W-slices of a writable 3D texture or the side(s) of a cube map.
- Parameters
-
binding | The texture binding point. |
texture | The texture to write to the descriptor set. |
descriptor | The index of the descriptor in the descriptor array to bind the texture to. |
firstLevel | The index of the first mip-map level to bind. |
levels | The number of mip-map levels to bind. A value of 0 binds all available levels, starting at firstLevel . |
firstLayer | The index of the first layer to bind. |
layers | The number of layers to bind. A value of 0 binds all available layers, starting at firstLayer . |
◆ update() [3/3]
void LiteFX::Rendering::IDescriptorSet::update |
( |
const UInt32 & |
binding, |
|
|
const ISampler & |
sampler, |
|
|
const UInt32 & |
descriptor = 0 |
|
) |
| const |
|
inline |
Updates a sampler within the current descriptor set.
- Parameters
-
binding | The sampler binding point. |
sampler | The sampler to write to the descriptor set. |
descriptor | The index of the descriptor in the descriptor array to bind the sampler to. |