15#include <vsg/state/DescriptorSetLayout.h>
16#include <vsg/vk/vk_buffer.h>
23 using PushConstantRanges = std::vector<VkPushConstantRange>;
26 class VSG_DECLSPEC PipelineLayout :
public Inherit<Object, PipelineLayout>
30 PipelineLayout(
const PipelineLayout& rhs,
const CopyOp& copyop = {});
31 PipelineLayout(
const DescriptorSetLayouts& in_setLayouts,
const PushConstantRanges& in_pushConstantRanges, VkPipelineLayoutCreateFlags in_flags = 0);
34 VkPipelineLayoutCreateFlags
flags = 0;
35 DescriptorSetLayouts setLayouts;
36 PushConstantRanges pushConstantRanges;
39 VkPipelineLayout
vk(uint32_t deviceID)
const {
return _implementation[deviceID]->_pipelineLayout; }
43 void release(uint32_t deviceID) { _implementation[deviceID] = {}; }
44 void release() { _implementation.clear(); }
47 std::pair<bool, uint32_t> computeCompatibility(
const PipelineLayout& other);
53 void read(
Input& input)
override;
54 void write(
Output& output)
const override;
57 virtual ~PipelineLayout();
59 struct Implementation :
public Inherit<Object, Implementation>
61 Implementation(
Device* device,
const DescriptorSetLayouts& descriptorSetLayouts,
const PushConstantRanges& pushConstantRanges, VkPipelineLayoutCreateFlags
flags = 0);
63 virtual ~Implementation();
65 VkPipelineLayout _pipelineLayout;
Device encapsulates VkDevice, a logical handle to the PhysicalDevice with capabilities specified duri...
Definition Device.h:39
PipelineLayout encapsulates VkPipelineLayout and the VkPipelineLayoutCreateInfo settings used to set ...
Definition PipelineLayout.h:27
VkPipelineLayout vk(uint32_t deviceID) const
Vulkan VkPipelineLayout handle.
Definition PipelineLayout.h:39
int compare(const Object &rhs) const override
compare two objects, return -1 if this object is less than rhs, return 0 if it's equal,...
ref_ptr< Object > clone(const CopyOp ©op={}) const override
Definition PipelineLayout.h:50
VkPipelineLayoutCreateFlags flags
VkPipelineLayoutCreateInfo settings.
Definition PipelineLayout.h:34
vk_buffer that manages a single logical device supported.
Definition vk_buffer.h:29