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

@@ -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);
}
}
}