15 #include <vsg/state/DescriptorSet.h>
16 #include <vsg/state/PipelineLayout.h>
17 #include <vsg/state/StateCommand.h>
18 #include <vsg/vk/DescriptorPool.h>
31 pipelineBindPoint(in_bindPoint),
33 firstSet(in_firstSet),
34 descriptorSets(in_descriptorSets)
40 pipelineBindPoint(in_bindPoint),
43 descriptorSets(in_descriptorSets)
51 DescriptorSets descriptorSets;
52 std::vector<uint32_t> dynamicOffsets;
56 template<
class N,
class V>
57 static void t_traverse(N& bds, V& visitor)
59 if (bds.layout) bds.layout->accept(visitor);
60 for (
auto& ds : bds.descriptorSets) ds->accept(visitor);
63 void traverse(
Visitor& visitor)
override { t_traverse(*
this, visitor); }
64 void traverse(ConstVisitor& visitor)
const override { t_traverse(*
this, visitor); }
66 void read(Input& input)
override;
67 void write(Output& output)
const override;
70 void compile(Context& context)
override;
72 void record(CommandBuffer& commandBuffer)
const override;
75 virtual ~BindDescriptorSets() {}
79 VkPipelineLayout _vkPipelineLayout = 0;
80 std::vector<VkDescriptorSet> _vkDescriptorSets;
96 pipelineBindPoint(in_bindPoint),
97 layout(in_pipelineLayout),
98 firstSet(in_firstSet),
99 descriptorSet(in_descriptorSet)
105 pipelineBindPoint(in_bindPoint),
106 layout(in_pipelineLayout),
108 descriptorSet(in_descriptorSet)
115 pipelineBindPoint(in_bindPoint),
116 layout(in_pipelineLayout),
117 firstSet(in_firstSet),
118 descriptorSet(vsg::
DescriptorSet::create(in_pipelineLayout->setLayouts[in_firstSet], in_descriptors))
123 VkPipelineBindPoint pipelineBindPoint;
127 std::vector<uint32_t> dynamicOffsets;
131 template<
class N,
class V>
132 static void t_traverse(N& bds, V& visitor)
134 if (bds.layout) bds.layout->accept(visitor);
135 if (bds.descriptorSet) bds.descriptorSet->accept(visitor);
138 void traverse(
Visitor& visitor)
override { t_traverse(*
this, visitor); }
139 void traverse(ConstVisitor& visitor)
const override { t_traverse(*
this, visitor); }
141 void read(Input& input)
override;
142 void write(Output& output)
const override;
145 void compile(Context& context)
override;
147 void record(CommandBuffer& commandBuffer)
const override;
150 virtual ~BindDescriptorSet() {}
154 VkPipelineLayout _vkPipelineLayout = 0;
155 VkDescriptorSet _vkDescriptorSet;
Definition: BindDescriptorSet.h:90
BindDescriptorSet(VkPipelineBindPoint in_bindPoint, PipelineLayout *in_pipelineLayout, uint32_t in_firstSet, const vsg::Descriptors &in_descriptors)
convenience BindDescriptorSet constructor which creates and assigns the DescriptorSet required for sp...
Definition: BindDescriptorSet.h:113
int compare(const Object &rhs_object) const override
compare two objects, return -1 if this object is less than rhs, return 0 if it's equal,...
BindDescriptorSets state command encapsulates vkCmdBindDescriptorSets call and associated settings fo...
Definition: BindDescriptorSet.h:25
int compare(const Object &rhs_object) const override
compare two objects, return -1 if this object is less than rhs, return 0 if it's equal,...
VkPipelineBindPoint pipelineBindPoint
vkCmdBindDescriptorSets settings
Definition: BindDescriptorSet.h:48
DescriptorSet encapsulates VkDescriptorSet and VkDescriptorSetAllocateInfo settings used to describe ...
Definition: DescriptorSet.h:26
PipelineLayout encapsulates VkPipelineLayout and the VkPipelineLayoutCreateInfo settings used to set ...
Definition: PipelineLayout.h:27
Definition: Visitor.h:147
Definition: BindDescriptorSet.h:153
Definition: BindDescriptorSet.h:78
vk_buffer that manages a single logical device supported.
Definition: vk_buffer.h:28