3#include "../core/foray_managedresource.hpp"
4#include "../foray_basics.hpp"
5#include "../foray_vulkan.hpp"
42 template <
typename TPushC>
49 VkPipelineLayout
Build(
core::Context* context, VkPipelineLayoutCreateFlags flags = 0,
void* pNext =
nullptr);
58 const std::vector<VkDescriptorSetLayout>& descriptorLayouts,
59 const std::vector<VkPushConstantRange>& pushConstantRanges,
60 VkPipelineLayoutCreateFlags flags = 0,
61 void* pNext =
nullptr);
76 template <
typename TPushC>
84 VkPushConstantRange range{
85 .stageFlags = stageFlags,
87 .size =
sizeof(TPushC),
ManagedResource variant which automates GetTypeName() overloading by returning a stringified version ...
Definition foray_managedresource.hpp:59
Class that holds memory ownership of a vulkan pipeline layout.
Definition foray_pipelinelayout.hpp:12
void AddPushConstantRange(VkPushConstantRange range)
Add a push constant range to the pipeline layout prior to building.
void AddDescriptorSetLayouts(const std::vector< VkDescriptorSetLayout > &layouts)
Add descriptorset layouts to the pipeline layout prior to building.
std::vector< VkDescriptorSetLayout > mDescriptorSetLayouts
Definition foray_pipelinelayout.hpp:71
virtual bool Exists() const
Return true, if the managed resource is allocated.
Definition foray_pipelinelayout.hpp:16
static const uint32_t PUSHC_OFFSET_AUTO
Definition foray_pipelinelayout.hpp:25
~PipelineLayout()
Definition foray_pipelinelayout.hpp:20
void AddPushConstantRanges(const std::vector< VkPushConstantRange > &ranges)
Add push constant ranges to the pipeline layout prior to building.
VkPipelineLayout mPipelineLayout
Definition foray_pipelinelayout.hpp:69
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 (a...
VkPipelineLayout Build(core::Context *context, VkPipelineLayoutCreateFlags flags=0, void *pNext=nullptr)
Builds the pipelinelayout based on previously added descriptorset layouts and push constant ranges.
core::Context * mContext
Definition foray_pipelinelayout.hpp:68
std::vector< VkPushConstantRange > mPushConstantRanges
Definition foray_pipelinelayout.hpp:72
uint32_t mPushConstantOffset
Definition foray_pipelinelayout.hpp:73
void AddDescriptorSetLayout(VkDescriptorSetLayout layout)
Add a descriptorset layout to the pipeline layout prior to building.
virtual void Destroy()
Destroy the resource.
#define FORAY_GETTER_V(member)
Return value.
Definition foray_basics.hpp:39
Definition foray_dualbuffer.hpp:5
Non owning context object.
Definition foray_context.hpp:16