Implements a Vulkan IDescriptorLayout.
More...
#include <VulkanDescriptorLayout.h>
Implements a Vulkan IDescriptorLayout.
◆ VulkanDescriptorLayout() [1/2]
spark::render::vk::VulkanDescriptorLayout::VulkanDescriptorLayout |
( |
DescriptorType | type, |
|
|
unsigned int | binding, |
|
|
std::size_t | element_size, |
|
|
unsigned int | descriptors = 1 ) |
|
explicit |
Initializes a new Vulkan descriptor layout.
- Parameters
-
type | The type of the descriptor. |
binding | The binding point for the descriptor. |
element_size | The size of the descriptor. |
descriptors | The number of descriptors in the array. If set to -1 , the descriptor is unbounded. |
◆ VulkanDescriptorLayout() [2/2]
spark::render::vk::VulkanDescriptorLayout::VulkanDescriptorLayout |
( |
std::unique_ptr< IVulkanSampler > && | static_sampler, |
|
|
unsigned int | binding ) |
|
explicit |
Initializes a new Vulkan descriptor layout for a static sampler.
- Parameters
-
static_sampler | A std::unique_ptr to a VulkanSampler used to initialize the state with. |
binding | The binding point for the descriptor. |
◆ binding()
unsigned spark::render::vk::VulkanDescriptorLayout::binding |
( |
| ) |
const |
|
nodiscardoverridevirtualnoexcept |
Gets the binding point the buffer will be bound to.
- Returns
- The binding point the buffer will be bound to.
Implements spark::render::IBufferLayout.
◆ descriptors()
unsigned spark::render::vk::VulkanDescriptorLayout::descriptors |
( |
| ) |
const |
|
nodiscardoverridevirtualnoexcept |
Gets the number of descriptors in the descriptor array, or 0xFFFFFFFF
if the descriptor is unbounded.
- Returns
- The number of descriptors in the descriptor array, or
0xFFFFFFFF
if the descriptor is unbounded.
- Note
- If the descriptor is unbounded, the size of the array must be specified when allocating a IDescriptorSet using the
descriptors
parameter.
Implements spark::render::IDescriptorLayout.
◆ descriptorType()
DescriptorType spark::render::vk::VulkanDescriptorLayout::descriptorType |
( |
| ) |
const |
|
nodiscardoverridevirtualnoexcept |
◆ elementSize()
std::size_t spark::render::vk::VulkanDescriptorLayout::elementSize |
( |
| ) |
const |
|
nodiscardoverridevirtualnoexcept |
Gets the size of a single element in the buffer.
- Returns
- The size of a single element in the buffer.
Implements spark::render::IBufferLayout.
◆ staticSampler()
const IVulkanSampler * spark::render::vk::VulkanDescriptorLayout::staticSampler |
( |
| ) |
const |
|
nodiscardoverridevirtualnoexcept |
Gets the state of the sampler if it is a static sampler.
- Returns
- A pointer to ISampler containing the state of the sampler if the descriptor is a static sampler, or
nullptr
if the descriptor is not a static sampler.
Implements spark::render::IDescriptorLayout.
◆ type()
BufferType spark::render::vk::VulkanDescriptorLayout::type |
( |
| ) |
const |
|
nodiscardoverridevirtualnoexcept |