Replace DeviceHandle by references

and keep device alive until Vulkan is freed
This commit is contained in:
Lynix
2020-03-13 18:38:26 +01:00
parent 4cf24cde7d
commit 63547fcd4e
56 changed files with 303 additions and 268 deletions

View File

@@ -23,13 +23,13 @@ namespace Nz
VulkanRenderPipelineLayout() = default;
~VulkanRenderPipelineLayout() = default;
bool Create(Vk::DeviceHandle device, RenderPipelineLayoutInfo layoutInfo);
bool Create(Vk::Device& device, RenderPipelineLayoutInfo layoutInfo);
inline const Vk::DescriptorSetLayout& GetDescriptorSetLayout() const;
inline const Vk::PipelineLayout& GetPipelineLayout() const;
private:
Vk::DeviceHandle m_device;
MovablePtr<Vk::Device> m_device;
Vk::DescriptorSetLayout m_descriptorSetLayout;
Vk::PipelineLayout m_pipelineLayout;
RenderPipelineLayoutInfo m_layoutInfo;