Vulkan: Make device objects take a DeviceHandle at creation

Former-commit-id: 0c9724fac593d562dd0ef6fbdf10b2cad9494ac7 [formerly 05c1e582989afde033ac6cee4def19859246167b]
Former-commit-id: 4730597d196d8841c395a1cfe101bca70caa4a5e
This commit is contained in:
Lynix
2016-06-13 19:53:46 +02:00
parent 8e9deee43e
commit 405e873294
12 changed files with 61 additions and 83 deletions

View File

@@ -25,7 +25,7 @@ namespace Nz
friend DeviceObject;
public:
inline CommandPool(Device& instance);
CommandPool() = default;
CommandPool(const CommandPool&) = delete;
CommandPool(CommandPool&&) = default;
~CommandPool() = default;
@@ -34,7 +34,7 @@ namespace Nz
std::vector<CommandBuffer> AllocateCommandBuffers(UInt32 commandBufferCount, VkCommandBufferLevel level);
using DeviceObject::Create;
inline bool Create(UInt32 queueFamilyIndex, VkCommandPoolCreateFlags flags = 0, const VkAllocationCallbacks* allocator = nullptr);
inline bool Create(const DeviceHandle& device, UInt32 queueFamilyIndex, VkCommandPoolCreateFlags flags = 0, const VkAllocationCallbacks* allocator = nullptr);
inline bool Reset(VkCommandPoolResetFlags flags);
@@ -42,8 +42,8 @@ namespace Nz
CommandPool& operator=(CommandPool&&) = delete;
private:
static inline VkResult CreateHelper(Device& device, const VkCommandPoolCreateInfo* createInfo, const VkAllocationCallbacks* allocator, VkCommandPool* handle);
static inline void DestroyHelper(Device& device, VkCommandPool handle, const VkAllocationCallbacks* allocator);
static inline VkResult CreateHelper(const DeviceHandle& device, const VkCommandPoolCreateInfo* createInfo, const VkAllocationCallbacks* allocator, VkCommandPool* handle);
static inline void DestroyHelper(const DeviceHandle& device, VkCommandPool handle, const VkAllocationCallbacks* allocator);
};
}
}