|
LiteFX 0.5.1.2025
Computer Graphics Engine
|
Describes a the layout of a single descriptor within a DescriptorSet. More...
#include <rendering_api.hpp>
Inherits LiteFX::Rendering::IBufferLayout.
Inherited by LiteFX::Rendering::Backends::DirectX12DescriptorLayout, and LiteFX::Rendering::Backends::VulkanDescriptorLayout.
Public Member Functions | |
| ~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. | |
| virtual bool | unbounded () const noexcept=0 |
Returns true, if the descriptor defines an unbounded descriptor array. | |
| 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. | |
Public Member Functions inherited from LiteFX::Rendering::IBufferLayout | |
| 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. | |
Protected Member Functions | |
| IDescriptorLayout () noexcept=default | |
| IDescriptorLayout (IDescriptorLayout &&) noexcept=default | |
| IDescriptorLayout (const IDescriptorLayout &)=default | |
| IDescriptorLayout & | operator= (IDescriptorLayout &&) noexcept=default |
| IDescriptorLayout & | operator= (const IDescriptorLayout &)=default |
Protected Member Functions inherited from LiteFX::Rendering::IBufferLayout | |
| IBufferLayout () noexcept=default | |
| IBufferLayout (IBufferLayout &&) noexcept=default | |
| IBufferLayout (const IBufferLayout &)=default | |
| IBufferLayout & | operator= (IBufferLayout &&) noexcept=default |
| IBufferLayout & | operator= (const IBufferLayout &)=default |
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 the size of the array is not known beforehand, the descriptor can be defined as unbounded, causing the IDescriptorLayout::unbounded property to return true. In this case, the number of descriptors defines the upper limit for the actual descriptor count that can be allocated for the array when calling IDescriptorSetLayout::allocate.
|
protecteddefaultnoexcept |
|
protecteddefaultnoexcept |
|
protecteddefault |
|
overridedefaultnoexcept |
|
pure virtualnoexcept |
Returns the number of descriptors in the descriptor array.
If unbounded is set to true, the descriptor count defines the upper limit for the number of descriptors that can be allocated for in the array.
Implemented in LiteFX::Rendering::Backends::DirectX12DescriptorLayout, and LiteFX::Rendering::Backends::VulkanDescriptorLayout.
|
pure virtualnoexcept |
Returns the type of the descriptor.
Implemented in LiteFX::Rendering::Backends::DirectX12DescriptorLayout, and LiteFX::Rendering::Backends::VulkanDescriptorLayout.
|
protecteddefault |
|
protecteddefaultnoexcept |
|
pure virtualnoexcept |
If the descriptor describes a static sampler, this method returns the state of the sampler. Otherwise, it returns nullptr.
Static samplers are called immutable samplers in Vulkan and describe sampler states, that are defined along the pipeline layout. While they do occupy a descriptor, they must not be bound explicitly. Instead, static samplers are automatically bound if the pipeline gets used. If a static sampler is set, the descriptorType must be set to DescriptorType::Sampler.
nullptr, if the descriptor is not a static sampler.Implemented in LiteFX::Rendering::Backends::DirectX12DescriptorLayout, and LiteFX::Rendering::Backends::VulkanDescriptorLayout.
|
pure virtualnoexcept |
Returns true, if the descriptor defines an unbounded descriptor array.
true, if the descriptor defines an unbounded descriptor array, false otherwise.Implemented in LiteFX::Rendering::Backends::DirectX12DescriptorLayout, and LiteFX::Rendering::Backends::VulkanDescriptorLayout.