Lugdunum  0.1.0
PipelineLayout.cpp
Go to the documentation of this file.
2 
4 
5 namespace lug {
6 namespace Graphics {
7 namespace Vulkan {
8 namespace API {
9 
11  VkPipelineLayout pipelineLayout,
12  const Device* device,
13  std::vector<DescriptorSetLayout> descriptorSetLayouts) :
14  _pipelineLayout(pipelineLayout), _device(device), _descriptorSetLayouts(std::move(descriptorSetLayouts)) {}
15 
17  _pipelineLayout = pipelineLayout._pipelineLayout;
18  _device = pipelineLayout._device;
19  _descriptorSetLayouts = std::move(pipelineLayout._descriptorSetLayouts);
20 
21  pipelineLayout._pipelineLayout = VK_NULL_HANDLE;
22  pipelineLayout._device = nullptr;
23  pipelineLayout._descriptorSetLayouts.resize(0);
24 }
25 
27  destroy();
28 
29  _pipelineLayout = pipelineLayout._pipelineLayout;
30  _device = pipelineLayout._device;
31  _descriptorSetLayouts = std::move(pipelineLayout._descriptorSetLayouts);
32 
33  pipelineLayout._pipelineLayout = VK_NULL_HANDLE;
34  pipelineLayout._device = nullptr;
35  pipelineLayout._descriptorSetLayouts.resize(0);
36 
37  return *this;
38 }
39 
41  destroy();
42 }
43 
45  if (_pipelineLayout != VK_NULL_HANDLE) {
46  vkDestroyPipelineLayout(static_cast<VkDevice>(*_device), _pipelineLayout, nullptr);
47  _pipelineLayout = VK_NULL_HANDLE;
48  }
49 
50  _descriptorSetLayouts.clear();
51 }
52 
53 } // API
54 } // Vulkan
55 } // Graphics
56 } // lug
std::vector< DescriptorSetLayout > _descriptorSetLayouts
PipelineLayout & operator=(const PipelineLayout &)=delete