diff --git a/src/dxvk/dxvk_cmdlist.cpp b/src/dxvk/dxvk_cmdlist.cpp index 91a4c72e3..0e64cb856 100644 --- a/src/dxvk/dxvk_cmdlist.cpp +++ b/src/dxvk/dxvk_cmdlist.cpp @@ -16,7 +16,7 @@ namespace dxvk { fenceInfo.flags = 0; if (m_vkd->vkCreateFence(m_vkd->device(), &fenceInfo, nullptr, &m_fence) != VK_SUCCESS) - throw DxvkError("DxvkFence::DxvkFence: Failed to create fence"); + throw DxvkError("DxvkCommandList: Failed to create fence"); VkCommandPoolCreateInfo poolInfo; poolInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO; @@ -25,7 +25,7 @@ namespace dxvk { poolInfo.queueFamilyIndex = queueFamily; if (m_vkd->vkCreateCommandPool(m_vkd->device(), &poolInfo, nullptr, &m_pool) != VK_SUCCESS) - throw DxvkError("DxvkCommandList::DxvkCommandList: Failed to create command pool"); + throw DxvkError("DxvkCommandList: Failed to create command pool"); VkCommandBufferAllocateInfo cmdInfo; cmdInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; @@ -35,7 +35,7 @@ namespace dxvk { cmdInfo.commandBufferCount = 1; if (m_vkd->vkAllocateCommandBuffers(m_vkd->device(), &cmdInfo, &m_buffer) != VK_SUCCESS) - throw DxvkError("DxvkCommandList::DxvkCommandList: Failed to allocate command buffer"); + throw DxvkError("DxvkCommandList: Failed to allocate command buffer"); } diff --git a/src/dxvk/dxvk_sync.cpp b/src/dxvk/dxvk_sync.cpp index aabf32a76..8ef0779cb 100644 --- a/src/dxvk/dxvk_sync.cpp +++ b/src/dxvk/dxvk_sync.cpp @@ -20,38 +20,4 @@ namespace dxvk { m_vkd->device(), m_semaphore, nullptr); } - - DxvkFence::DxvkFence(const Rc& vkd) - : m_vkd(vkd) { - VkFenceCreateInfo info; - info.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO; - info.pNext = nullptr; - info.flags = 0; - - if (m_vkd->vkCreateFence(m_vkd->device(), &info, nullptr, &m_fence) != VK_SUCCESS) - throw DxvkError("DxvkFence::DxvkFence: Failed to create fence"); - } - - - DxvkFence::~DxvkFence() { - m_vkd->vkDestroyFence( - m_vkd->device(), m_fence, nullptr); - } - - - bool DxvkFence::wait(uint64_t timeout) const { - VkResult status = m_vkd->vkWaitForFences( - m_vkd->device(), 1, &m_fence, VK_FALSE, timeout); - - if (status == VK_SUCCESS) return true; - if (status == VK_TIMEOUT) return false; - throw DxvkError("DxvkFence::wait: Failed to wait for fence"); - } - - - void DxvkFence::reset() { - if (m_vkd->vkResetFences(m_vkd->device(), 1, &m_fence) != VK_SUCCESS) - throw DxvkError("DxvkFence::reset: Failed to reset fence"); - } - } \ No newline at end of file diff --git a/src/dxvk/dxvk_sync.h b/src/dxvk/dxvk_sync.h index 9968f0db7..5762e303d 100644 --- a/src/dxvk/dxvk_sync.h +++ b/src/dxvk/dxvk_sync.h @@ -36,54 +36,4 @@ namespace dxvk { }; - - /** - * \brief Fence object - * - * This is merely an abstraction of Vulkan's fences. Client - * APIs that support fence operations may use them directly. - * Other than that, they are used internally to keep track - * of GPU resource usage. - */ - class DxvkFence : public RcObject { - - public: - - DxvkFence(const Rc& vkd); - ~DxvkFence(); - - /** - * \brief Fence handle - * - * Internal use only. - * \returns Fence handle - */ - VkFence handle() const { - return m_fence; - } - - /** - * \brief Waits for fence to be signaled - * - * \param [in] timeout Amount of time to wait - * \returns \c true if the fence has been signaled, - * \c false if a timeout occured. - */ - bool wait(uint64_t timeout) const; - - /** - * \brief Resets the fence - * - * Transitions the fence into the unsignaled state, - * which means that the fence may be submitted again. - */ - void reset(); - - private: - - Rc m_vkd; - VkFence m_fence; - - }; - } \ No newline at end of file