Add RenderPipelineLayout
This commit is contained in:
@@ -24,6 +24,10 @@ namespace Nz
|
||||
PipelineLayout(PipelineLayout&&) = default;
|
||||
~PipelineLayout() = default;
|
||||
|
||||
using DeviceObject::Create;
|
||||
bool Create(DeviceHandle device, VkDescriptorSetLayout layout, VkPipelineLayoutCreateFlags flags = 0);
|
||||
bool Create(DeviceHandle device, UInt32 layoutCount, const VkDescriptorSetLayout* layouts, VkPipelineLayoutCreateFlags flags = 0);
|
||||
|
||||
PipelineLayout& operator=(const PipelineLayout&) = delete;
|
||||
PipelineLayout& operator=(PipelineLayout&&) = delete;
|
||||
|
||||
|
||||
@@ -9,6 +9,26 @@ namespace Nz
|
||||
{
|
||||
namespace Vk
|
||||
{
|
||||
inline bool PipelineLayout::Create(DeviceHandle device, VkDescriptorSetLayout layout, VkPipelineLayoutCreateFlags flags)
|
||||
{
|
||||
return Create(std::move(device), 1U, &layout, flags);
|
||||
}
|
||||
|
||||
inline bool PipelineLayout::Create(DeviceHandle device, UInt32 layoutCount, const VkDescriptorSetLayout* layouts, VkPipelineLayoutCreateFlags flags)
|
||||
{
|
||||
VkPipelineLayoutCreateInfo createInfo = {
|
||||
VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,
|
||||
nullptr,
|
||||
flags,
|
||||
layoutCount,
|
||||
layouts,
|
||||
0U,
|
||||
nullptr
|
||||
};
|
||||
|
||||
return Create(std::move(device), createInfo);
|
||||
}
|
||||
|
||||
inline VkResult PipelineLayout::CreateHelper(const DeviceHandle& device, const VkPipelineLayoutCreateInfo* createInfo, const VkAllocationCallbacks* allocator, VkPipelineLayout* handle)
|
||||
{
|
||||
return device->vkCreatePipelineLayout(*device, createInfo, allocator, handle);
|
||||
|
||||
Reference in New Issue
Block a user