tp::DescriptorBinding struct

Describes the type of tp::Descriptor or descriptor array to be bound to a particular binding number.

Public static functions

static auto Empty(uint32_t arraySize = 1) -> DescriptorBinding
Returns an empty descriptor binding of the given array size. The corresponding descriptors in tp::DescriptorSetSetup will be ignored.

Constructors, destructors, conversion operators

DescriptorBinding()
Default constructor creating an empty binding with an arraySize of 0 that will be ignored.
DescriptorBinding(uint32_t bindingNumber, DescriptorType descriptorType, ShaderStageMask stageMask, ArrayView<const Sampler*const> immutableSamplers, DescriptorBindingFlagMask flags = DescriptorBindingFlagMask::None())
Constructs a descriptor binding with immutable samplers.
DescriptorBinding(uint32_t bindingNumber, DescriptorType descriptorType, ShaderStageMask stageMask, uint32_t arraySize = 1, DescriptorBindingFlagMask flags = DescriptorBindingFlagMask::None())

Public functions

auto getReadAccessMask() const -> ReadAccessMask
Returns a read access mask that covers all the possible ways a resource can be accessed through this binding.

Function documentation

tp::DescriptorBinding::DescriptorBinding(uint32_t bindingNumber, DescriptorType descriptorType, ShaderStageMask stageMask, ArrayView<const Sampler*const> immutableSamplers, DescriptorBindingFlagMask flags = DescriptorBindingFlagMask::None())

Constructs a descriptor binding with immutable samplers.

Parameters
bindingNumber The binding number within the descriptor set used to access this descriptor from within shaders.
descriptorType The type of the descriptor.
stageMask The mask of shader stages to which the bound resource will be accessible.
immutableSamplers An array of samplers to be statically bound to the binding's descriptors. The size of this array also specifies the binding's arraySize.
flags Additional flags for the descriptor binding.

tp::DescriptorBinding::DescriptorBinding(uint32_t bindingNumber, DescriptorType descriptorType, ShaderStageMask stageMask, uint32_t arraySize = 1, DescriptorBindingFlagMask flags = DescriptorBindingFlagMask::None())

Parameters
bindingNumber The binding number within the descriptor set used to access this descriptor from within shaders.
descriptorType The type of the descriptor.
stageMask The mask of shader stages to which the bound resource will be accessible.
arraySize The optional size of the array for descriptor arrays.
flags Additional flags for the descriptor binding.

ReadAccessMask tp::DescriptorBinding::getReadAccessMask() const

Returns a read access mask that covers all the possible ways a resource can be accessed through this binding.