1#ifndef VULKAN_PIPELINELAYOUT
2#define VULKAN_PIPELINELAYOUT
4#include <vulkan/vulkan.h>
22 template<
typename... S>
requires (std::derived_from<S, Set> && ...)
25 std::vector<VkDescriptorSetLayout> rawLayouts;
26 (rawLayouts.emplace_back(+sets), ...);
28 VkPipelineLayoutCreateInfo pipelineLayoutInfo{};
29 pipelineLayoutInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
30 pipelineLayoutInfo.setLayoutCount = rawLayouts.size();
31 pipelineLayoutInfo.pSetLayouts = rawLayouts.data();
32 pipelineLayoutInfo.pushConstantRangeCount = 0;
33 pipelineLayoutInfo.pPushConstantRanges =
nullptr;
35 if (VkResult result = vkCreatePipelineLayout(+virtualGpu, &pipelineLayoutInfo,
nullptr, &pipelineLayout); result != VK_SUCCESS) {
46 vkDestroyPipelineLayout(+virtualGpu, pipelineLayout,
nullptr);
51 return pipelineLayout;
56 VkPipelineLayout pipelineLayout;
A logical device is an abstraction of the physical GPU which we can mainly use to send commands.
Definition: LogicalDevice.h:15
This objects is a reference to all of the resources (e.g. uniforms) that the pipeline can access.
Definition: PipelineLayout.h:19
~PipelineLayout()
Definition: PipelineLayout.h:45
PipelineLayout & operator=(PipelineLayout &&)=delete
PipelineLayout(const LogicalDevice &virtualGpu, const S &... sets)
Definition: PipelineLayout.h:23
PipelineLayout & operator=(const PipelineLayout &)=delete
PipelineLayout(const PipelineLayout &)=delete
const VkPipelineLayout operator+() const
Definition: PipelineLayout.h:50
PipelineLayout(PipelineLayout &&)=delete
Generic runtime exception thrown by Vulkan-related functions.
Definition: VulkanException.h:13
Definition: Attachment.h:11