Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
|
Class that holds memory ownership of a vulkan pipeline layout. More...
#include <foray_pipelinelayout.hpp>
Public Member Functions | |
PipelineLayout ()=default | |
virtual bool | Exists () const |
Return true, if the managed resource is allocated. | |
virtual void | Destroy () |
Destroy the resource. | |
~PipelineLayout () | |
void | AddDescriptorSetLayout (VkDescriptorSetLayout layout) |
Add a descriptorset layout to the pipeline layout prior to building. | |
void | AddDescriptorSetLayouts (const std::vector< VkDescriptorSetLayout > &layouts) |
Add descriptorset layouts to the pipeline layout prior to building. | |
void | AddPushConstantRange (VkPushConstantRange range) |
Add a push constant range to the pipeline layout prior to building. | |
void | AddPushConstantRanges (const std::vector< VkPushConstantRange > &ranges) |
Add push constant ranges to the pipeline layout prior to building. | |
template<typename TPushC > | |
void | AddPushConstantRange (VkShaderStageFlags stageFlags, uint32_t offset=PUSHC_OFFSET_AUTO) |
Add push constant ranges to the pipeline layout prior to building. | |
VkPipelineLayout | Build (core::Context *context, VkPipelineLayoutCreateFlags flags=0, void *pNext=nullptr) |
Builds the pipelinelayout based on previously added descriptorset layouts and push constant ranges. | |
VkPipelineLayout | Build (core::Context *context, const std::vector< VkDescriptorSetLayout > &descriptorLayouts, const std::vector< VkPushConstantRange > &pushConstantRanges, VkPipelineLayoutCreateFlags flags=0, void *pNext=nullptr) |
Builds the pipelinelayout based on previously added descriptorset layouts and push constant ranges (aswell as parameters) | |
operator VkPipelineLayout () const | |
![]() | |
VulkanResource () | |
VulkanResource (std::string_view name) | |
virtual std::string_view | GetTypeName () const |
Returns <OBJECT_TYPE> stringified. | |
![]() | |
ManagedResource () | |
Default constructor registers the resource. | |
ManagedResource (std::string_view name) | |
Registers the resource and sets its name. | |
virtual | ~ManagedResource () |
Unregisters the resource. | |
std::string_view | GetName () const |
Return a custom name for the object. | |
virtual void | SetName (std::string_view name) |
Set a custom name for the object. | |
std::string | Print () const |
Print name and type in one string. | |
![]() | |
NoMoveDefaults ()=default | |
NoMoveDefaults (const NoMoveDefaults &other)=delete | |
NoMoveDefaults (NoMoveDefaults &&other)=default | |
NoMoveDefaults & | operator= (const NoMoveDefaults &other)=delete |
Static Public Attributes | |
static const uint32_t | PUSHC_OFFSET_AUTO = ~0U |
Protected Attributes | |
core::Context * | mContext {} |
VkPipelineLayout | mPipelineLayout {} |
std::vector< VkDescriptorSetLayout > | mDescriptorSetLayouts |
std::vector< VkPushConstantRange > | mPushConstantRanges |
uint32_t | mPushConstantOffset = 0U |
![]() | |
std::string | mName |
This objects custom name. | |
Additional Inherited Members | |
![]() | |
static void | sPrintAllocatedResources (bool printAsWarning) |
Print a list of all registered existing resources. | |
static const std::unordered_set< ManagedResource * > * | GetTotalAllocatedResources () |
![]() | |
virtual void | SetObjectName (core::Context *context, const void *handle, std::string_view name, bool updateResourceName=true) |
Set the object name. Sets both ManagedResource::mName aswell as vulkan debug object name. | |
Class that holds memory ownership of a vulkan pipeline layout.
|
default |
|
inline |
void foray::util::PipelineLayout::AddDescriptorSetLayout | ( | VkDescriptorSetLayout | layout | ) |
Add a descriptorset layout to the pipeline layout prior to building.
void foray::util::PipelineLayout::AddDescriptorSetLayouts | ( | const std::vector< VkDescriptorSetLayout > & | layouts | ) |
Add descriptorset layouts to the pipeline layout prior to building.
void foray::util::PipelineLayout::AddPushConstantRange | ( | VkPushConstantRange | range | ) |
Add a push constant range to the pipeline layout prior to building.
|
inline |
Add push constant ranges to the pipeline layout prior to building.
TPushC | Push Constant type (determines size) |
stageFlags | Shader Stage Flags |
offset | Offset. If set to PUSHC_OFFSET_AUTO, it is automatically set based on previously added pushconstants |
void foray::util::PipelineLayout::AddPushConstantRanges | ( | const std::vector< VkPushConstantRange > & | ranges | ) |
Add push constant ranges to the pipeline layout prior to building.
VkPipelineLayout foray::util::PipelineLayout::Build | ( | core::Context * | context, |
const std::vector< VkDescriptorSetLayout > & | descriptorLayouts, | ||
const std::vector< VkPushConstantRange > & | pushConstantRanges, | ||
VkPipelineLayoutCreateFlags | flags = 0 , |
||
void * | pNext = nullptr |
||
) |
Builds the pipelinelayout based on previously added descriptorset layouts and push constant ranges (aswell as parameters)
context | Requires DispatchTable |
descriptorLayouts | Additional DescriptorSetLayouts |
pushConstantRanges | Additional PushConstantRanges |
flags | VkPipelineLayoutCreateInfo::flags |
pNext | VkPipelineLayoutCreateInfo::pNext |
VkPipelineLayout foray::util::PipelineLayout::Build | ( | core::Context * | context, |
VkPipelineLayoutCreateFlags | flags = 0 , |
||
void * | pNext = nullptr |
||
) |
Builds the pipelinelayout based on previously added descriptorset layouts and push constant ranges.
context | Requires DispatchTable |
flags | VkPipelineLayoutCreateInfo::flags |
pNext | VkPipelineLayoutCreateInfo::pNext |
|
virtual |
Destroy the resource.
Implements foray::core::ManagedResource.
|
inlinevirtual |
Return true, if the managed resource is allocated.
Example: Vulkan object stored could be nullptr or instantiated
Implements foray::core::ManagedResource.
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |