diff --git a/include/Nazara/Vulkan/VkDeviceObject.hpp b/include/Nazara/Vulkan/VkDeviceObject.hpp index 210980a17..afa6a4c55 100644 --- a/include/Nazara/Vulkan/VkDeviceObject.hpp +++ b/include/Nazara/Vulkan/VkDeviceObject.hpp @@ -39,7 +39,7 @@ namespace Nz DeviceHandle m_device; VkAllocationCallbacks m_allocator; VkType m_handle; - VkResult m_lastErrorCode; + mutable VkResult m_lastErrorCode; }; } } diff --git a/include/Nazara/Vulkan/VkSwapchain.hpp b/include/Nazara/Vulkan/VkSwapchain.hpp index fbe8d2118..b55fad75e 100644 --- a/include/Nazara/Vulkan/VkSwapchain.hpp +++ b/include/Nazara/Vulkan/VkSwapchain.hpp @@ -24,7 +24,7 @@ namespace Nz Swapchain(Swapchain&&) = default; ~Swapchain() = default; - inline bool AcquireNextImage(Nz::UInt64 timeout, VkSemaphore semaphore, VkFence fence, UInt32* imageIndex); + inline bool AcquireNextImage(Nz::UInt64 timeout, VkSemaphore semaphore, VkFence fence, UInt32* imageIndex) const; inline bool Create(const DeviceHandle& device, const VkSwapchainCreateInfoKHR& createInfo, const VkAllocationCallbacks* allocator = nullptr); diff --git a/include/Nazara/Vulkan/VkSwapchain.inl b/include/Nazara/Vulkan/VkSwapchain.inl index e1f885045..32842d700 100644 --- a/include/Nazara/Vulkan/VkSwapchain.inl +++ b/include/Nazara/Vulkan/VkSwapchain.inl @@ -11,7 +11,7 @@ namespace Nz { namespace Vk { - inline bool Swapchain::AcquireNextImage(Nz::UInt64 timeout, VkSemaphore semaphore, VkFence fence, UInt32* imageIndex) + inline bool Swapchain::AcquireNextImage(Nz::UInt64 timeout, VkSemaphore semaphore, VkFence fence, UInt32* imageIndex) const { m_lastErrorCode = m_device->vkAcquireNextImageKHR(*m_device, m_handle, timeout, semaphore, fence, imageIndex); switch (m_lastErrorCode)