|
| ~IDescriptorLayout () noexcept override=default |
|
virtual DescriptorType | descriptorType () const noexcept=0 |
| Returns the type of the descriptor.
|
|
virtual UInt32 | descriptors () const noexcept=0 |
| Returns the number of descriptors in the descriptor array, or -1 if the array is unbounded.
|
|
virtual const ISampler * | staticSampler () const noexcept=0 |
| If the descriptor describes a static sampler, this method returns the state of the sampler. Otherwise, it returns nullptr .
|
|
virtual | ~IBufferLayout () noexcept=default |
|
virtual size_t | elementSize () const noexcept=0 |
| Returns the size of a single element within the buffer.
|
|
virtual UInt32 | binding () const noexcept=0 |
| Returns the binding point, the buffer will be bound to.
|
|
virtual BufferType | type () const noexcept=0 |
| Returns the buffer type of the buffer.
|
|
Describes a the layout of a single descriptor within a DescriptorSet.
A common metaphor for a descriptor to think of it as a "pointer for the GPU". Basically, a descriptor points to a buffer in a shader. A descriptor can have different types and sizes. The types a descriptor can have are described by the DescriptorType.
If the descriptor is a sampler, it can either be a dynamic or static sampler. A dynamic sampler needs to be bound during runtime just like any other descriptor by calling IDescriptorSet::update. A static sampler is defined alongside the descriptor layout and is automatically set when the pipeline that uses the descriptor layout gets bound. In this case, the descriptor must not be updated with another sampler. If a descriptor layout describes a static sampler, the IDescriptorLayout::staticSampler returns a pointer to the static sampler state.
Typically, a descriptor "points" to a singular buffer, i.e. a scalar. However, a descriptor can also resemble an array. In this case, IDescriptorLayout::descriptors returns the number of elements in the array. If it returns -1
(or 0xFFFFFFFF
), the descriptor array is called unbounded
. In this case, the number of descriptors in the array can be specified when allocating the descriptor set. Unbounded descriptor arrays behave different to normal descriptor arrays in different ways. They are typically used for bindless descriptors. If a descriptor represents an unbounded array, it must be the only descriptor in this descriptor set. Furthermore, unbounded arrays are not cached by the descriptor set layout. Descriptors within unbounded arrays may be updated after binding them to a command buffer. However, this must be done with special care, to prevent descriptors that are in use to be overwritten. For more information on how to manage unbounded arrays, refer to IDescriptorSetLayout::allocate.
- See also
- DescriptorSetLayout
virtual const ISampler * LiteFX::Rendering::IDescriptorLayout::staticSampler |
( |
| ) |
const |
|
pure virtualnoexcept |