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:
Lynix
2016-06-08 12:57:06 +02:00
parent c45cb6bb12
commit f3f46b71fb
13 changed files with 65 additions and 85 deletions

View File

@@ -9,12 +9,7 @@ namespace Nz
{
namespace Vk
{
inline Semaphore::Semaphore(Device& device) :
DeviceObject(device)
{
}
inline bool Semaphore::Create(VkSemaphoreCreateFlags flags, const VkAllocationCallbacks* allocator)
inline bool Semaphore::Create(const DeviceHandle& device, VkSemaphoreCreateFlags flags, const VkAllocationCallbacks* allocator)
{
VkSemaphoreCreateInfo createInfo =
{
@@ -23,17 +18,17 @@ namespace Nz
flags
};
return Create(createInfo, allocator);
return Create(device, createInfo, allocator);
}
VkResult Semaphore::CreateHelper(Device& device, const VkSemaphoreCreateInfo* createInfo, const VkAllocationCallbacks* allocator, VkSemaphore* handle)
VkResult Semaphore::CreateHelper(const DeviceHandle& device, const VkSemaphoreCreateInfo* createInfo, const VkAllocationCallbacks* allocator, VkSemaphore* handle)
{
return device.vkCreateSemaphore(device, createInfo, allocator, handle);
return device->vkCreateSemaphore(*device, createInfo, allocator, handle);
}
void Semaphore::DestroyHelper(Device& device, VkSemaphore handle, const VkAllocationCallbacks* allocator)
void Semaphore::DestroyHelper(const DeviceHandle& device, VkSemaphore handle, const VkAllocationCallbacks* allocator)
{
return device.vkDestroySemaphore(device, handle, allocator);
return device->vkDestroySemaphore(*device, handle, allocator);
}
}
}