From 092cad0e767c367a63ac0a67b30716f30c0a470e Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 28 Nov 2018 12:32:09 +0100 Subject: [PATCH] [dxvk] Remove DxvkSemaphore --- src/dxvk/dxvk_cmdlist.h | 1 - src/dxvk/dxvk_device.cpp | 5 ----- src/dxvk/dxvk_device.h | 7 ------- src/dxvk/dxvk_queue.h | 2 +- src/dxvk/dxvk_sync.cpp | 23 ----------------------- src/dxvk/dxvk_sync.h | 39 --------------------------------------- src/dxvk/meson.build | 1 - 7 files changed, 1 insertion(+), 77 deletions(-) delete mode 100644 src/dxvk/dxvk_sync.cpp delete mode 100644 src/dxvk/dxvk_sync.h diff --git a/src/dxvk/dxvk_cmdlist.h b/src/dxvk/dxvk_cmdlist.h index cb9f7a78..039e722c 100644 --- a/src/dxvk/dxvk_cmdlist.h +++ b/src/dxvk/dxvk_cmdlist.h @@ -12,7 +12,6 @@ #include "dxvk_query_tracker.h" #include "dxvk_staging.h" #include "dxvk_stats.h" -#include "dxvk_sync.h" namespace dxvk { diff --git a/src/dxvk/dxvk_device.cpp b/src/dxvk/dxvk_device.cpp index 13d8ac03..c30136d5 100644 --- a/src/dxvk/dxvk_device.cpp +++ b/src/dxvk/dxvk_device.cpp @@ -186,11 +186,6 @@ namespace dxvk { } - Rc DxvkDevice::createSemaphore() { - return new DxvkSemaphore(m_vkd); - } - - Rc DxvkDevice::createShader( VkShaderStageFlagBits stage, uint32_t slotCount, diff --git a/src/dxvk/dxvk_device.h b/src/dxvk/dxvk_device.h index 5a0f354e..4efe03da 100644 --- a/src/dxvk/dxvk_device.h +++ b/src/dxvk/dxvk_device.h @@ -20,7 +20,6 @@ #include "dxvk_sampler.h" #include "dxvk_shader.h" #include "dxvk_stats.h" -#include "dxvk_sync.h" #include "dxvk_unbound.h" #include "../vulkan/vulkan_presenter.h" @@ -263,12 +262,6 @@ namespace dxvk { Rc createSampler( const DxvkSamplerCreateInfo& createInfo); - /** - * \brief Creates a semaphore object - * \returns Newly created semaphore - */ - Rc createSemaphore(); - /** * \brief Creates a shader module * diff --git a/src/dxvk/dxvk_queue.h b/src/dxvk/dxvk_queue.h index 01957002..94bfedbd 100644 --- a/src/dxvk/dxvk_queue.h +++ b/src/dxvk/dxvk_queue.h @@ -5,8 +5,8 @@ #include #include "../util/thread.h" + #include "dxvk_cmdlist.h" -#include "dxvk_sync.h" namespace dxvk { diff --git a/src/dxvk/dxvk_sync.cpp b/src/dxvk/dxvk_sync.cpp deleted file mode 100644 index 8ef0779c..00000000 --- a/src/dxvk/dxvk_sync.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "dxvk_sync.h" - -namespace dxvk { - - DxvkSemaphore::DxvkSemaphore( - const Rc& vkd) - : m_vkd(vkd) { - VkSemaphoreCreateInfo info; - info.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO; - info.pNext = nullptr; - info.flags = 0; - - if (m_vkd->vkCreateSemaphore(m_vkd->device(), &info, nullptr, &m_semaphore) != VK_SUCCESS) - throw DxvkError("DxvkSemaphore::DxvkSemaphore: Failed to create semaphore"); - } - - - DxvkSemaphore::~DxvkSemaphore() { - m_vkd->vkDestroySemaphore( - m_vkd->device(), m_semaphore, nullptr); - } - -} \ No newline at end of file diff --git a/src/dxvk/dxvk_sync.h b/src/dxvk/dxvk_sync.h deleted file mode 100644 index 5762e303..00000000 --- a/src/dxvk/dxvk_sync.h +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once - -#include "dxvk_resource.h" - -namespace dxvk { - - /** - * \brief Semaphore object - * - * This is merely an abstraction of Vulkan's semaphores. - * They are only used internally by \ref DxvkSwapchain - * in order to synchronize the presentation engine with - * command buffer submissions. - */ - class DxvkSemaphore : public DxvkResource { - - public: - - DxvkSemaphore(const Rc& vkd); - ~DxvkSemaphore(); - - /** - * \brief Semaphore handle - * - * Internal use only. - * \returns Semaphore handle - */ - VkSemaphore handle() const { - return m_semaphore; - } - - private: - - Rc m_vkd; - VkSemaphore m_semaphore; - - }; - -} \ No newline at end of file diff --git a/src/dxvk/meson.build b/src/dxvk/meson.build index 7d581961..ca8e4e39 100644 --- a/src/dxvk/meson.build +++ b/src/dxvk/meson.build @@ -86,7 +86,6 @@ dxvk_src = files([ 'dxvk_staging.cpp', 'dxvk_state_cache.cpp', 'dxvk_stats.cpp', - 'dxvk_sync.cpp', 'dxvk_unbound.cpp', 'dxvk_util.cpp',