Vulkan: Make device objects take a device handle at creation
Former-commit-id: 985b9f5b04aef4d6de55ee6d360a2da92bed8940 [formerly e31d84225897da96b0438d49dbdf6473a7873a17] Former-commit-id: 82ed4eeccde614312fff717ab1f469335c861292
This commit is contained in:
@@ -19,16 +19,15 @@ namespace Nz
|
||||
class DeviceObject
|
||||
{
|
||||
public:
|
||||
inline DeviceObject(Device& instance);
|
||||
inline DeviceObject();
|
||||
DeviceObject(const DeviceObject&) = delete;
|
||||
DeviceObject(DeviceObject&&);
|
||||
inline ~DeviceObject();
|
||||
|
||||
inline bool Create(const CreateInfo& createInfo, const VkAllocationCallbacks* allocator = nullptr);
|
||||
inline bool Create(const DeviceHandle& device, const CreateInfo& createInfo, const VkAllocationCallbacks* allocator = nullptr);
|
||||
inline void Destroy();
|
||||
|
||||
inline Device& GetDevice();
|
||||
inline const Device& GetDevice() const;
|
||||
inline const DeviceHandle& GetDevice() const;
|
||||
inline VkResult GetLastErrorCode() const;
|
||||
|
||||
DeviceObject& operator=(const DeviceObject&) = delete;
|
||||
@@ -37,7 +36,7 @@ namespace Nz
|
||||
inline operator VkType();
|
||||
|
||||
protected:
|
||||
Device& m_device;
|
||||
DeviceHandle m_device;
|
||||
VkAllocationCallbacks m_allocator;
|
||||
VkType m_handle;
|
||||
VkResult m_lastErrorCode;
|
||||
|
||||
Reference in New Issue
Block a user