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:
@@ -2,7 +2,7 @@
|
||||
// This file is part of the "Nazara Engine - Vulkan"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Vulkan/VkSurface.hpp>
|
||||
#include <Nazara/Vulkan/VkCommandBuffer.hpp>
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
#include <Nazara/Vulkan/VkInstance.hpp>
|
||||
#include <Nazara/Vulkan/Debug.hpp>
|
||||
@@ -33,7 +33,7 @@ namespace Nz
|
||||
|
||||
inline bool CommandBuffer::Begin(const VkCommandBufferBeginInfo& info)
|
||||
{
|
||||
m_lastErrorCode = m_pool->GetDevice().vkBeginCommandBuffer(m_handle, &info);
|
||||
m_lastErrorCode = m_pool->GetDevice()->vkBeginCommandBuffer(m_handle, &info);
|
||||
if (m_lastErrorCode != VkResult::VK_SUCCESS)
|
||||
{
|
||||
NazaraError("Failed to begin command buffer");
|
||||
@@ -119,7 +119,7 @@ namespace Nz
|
||||
|
||||
inline bool CommandBuffer::End()
|
||||
{
|
||||
m_lastErrorCode = m_pool->GetDevice().vkEndCommandBuffer(m_handle);
|
||||
m_lastErrorCode = m_pool->GetDevice()->vkEndCommandBuffer(m_handle);
|
||||
if (m_lastErrorCode != VkResult::VK_SUCCESS)
|
||||
{
|
||||
NazaraError("Failed to end command buffer");
|
||||
@@ -132,7 +132,7 @@ namespace Nz
|
||||
inline void CommandBuffer::Free()
|
||||
{
|
||||
if (m_handle)
|
||||
m_pool->GetDevice().vkFreeCommandBuffers(m_pool->GetDevice(), *m_pool, 1, &m_handle);
|
||||
m_pool->GetDevice()->vkFreeCommandBuffers(*m_pool->GetDevice(), *m_pool, 1, &m_handle);
|
||||
}
|
||||
|
||||
inline VkResult CommandBuffer::GetLastErrorCode() const
|
||||
|
||||
Reference in New Issue
Block a user