VulkanRenderer: Replace ObjectHandle by std::shared_ptr/raw pointers

This commit is contained in:
Lynix
2020-02-23 12:02:15 +01:00
parent 0c008236ba
commit 79f732ee8a
29 changed files with 80 additions and 81 deletions

View File

@@ -9,7 +9,7 @@ namespace Nz
{
namespace Vk
{
inline bool DescriptorPool::Create(const DeviceHandle& device, UInt32 maxSets, const VkDescriptorPoolSize& poolSize, VkDescriptorPoolCreateFlags flags, const VkAllocationCallbacks* allocator)
inline bool DescriptorPool::Create(DeviceHandle device, UInt32 maxSets, const VkDescriptorPoolSize& poolSize, VkDescriptorPoolCreateFlags flags, const VkAllocationCallbacks* allocator)
{
VkDescriptorPoolCreateInfo createInfo =
{
@@ -21,10 +21,10 @@ namespace Nz
&poolSize // const VkDescriptorPoolSize* pPoolSizes;
};
return Create(device, createInfo, allocator);
return Create(std::move(device), createInfo, allocator);
}
inline bool DescriptorPool::Create(const DeviceHandle& device, UInt32 maxSets, UInt32 poolSizeCount, const VkDescriptorPoolSize* poolSize, VkDescriptorPoolCreateFlags flags, const VkAllocationCallbacks* allocator)
inline bool DescriptorPool::Create(DeviceHandle device, UInt32 maxSets, UInt32 poolSizeCount, const VkDescriptorPoolSize* poolSize, VkDescriptorPoolCreateFlags flags, const VkAllocationCallbacks* allocator)
{
VkDescriptorPoolCreateInfo createInfo =
{
@@ -36,7 +36,7 @@ namespace Nz
poolSize // const VkDescriptorPoolSize* pPoolSizes;
};
return Create(device, createInfo, allocator);
return Create(std::move(device), createInfo, allocator);
}
inline VkResult DescriptorPool::CreateHelper(const DeviceHandle& device, const VkDescriptorPoolCreateInfo* createInfo, const VkAllocationCallbacks* allocator, VkDescriptorPool* handle)