From 282344f61e549d65451bfa1588974aaf703c2f72 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Sun, 18 Oct 2020 13:52:06 +0800 Subject: [PATCH] rename a class, use GPUSemaphore instead Semaphore --- inc/hgl/graph/vulkan/VK.h | 2 +- inc/hgl/graph/vulkan/VKSemaphore.h | 8 ++++---- src/RenderDevice/Vulkan/VKSemaphore.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/inc/hgl/graph/vulkan/VK.h b/inc/hgl/graph/vulkan/VK.h index f00c9cc5..524c1058 100644 --- a/inc/hgl/graph/vulkan/VK.h +++ b/inc/hgl/graph/vulkan/VK.h @@ -46,7 +46,7 @@ class IndexBuffer; class CommandBuffer; class RenderPass; class Fence; -class Semaphore; +class GPUSemaphore; class DescriptorSetLayoutCreater; diff --git a/inc/hgl/graph/vulkan/VKSemaphore.h b/inc/hgl/graph/vulkan/VKSemaphore.h index 1c969608..b82fd7a8 100644 --- a/inc/hgl/graph/vulkan/VKSemaphore.h +++ b/inc/hgl/graph/vulkan/VKSemaphore.h @@ -3,7 +3,7 @@ #include VK_NAMESPACE_BEGIN -class Semaphore +class GPUSemaphore { VkDevice device; VkSemaphore sem; @@ -12,7 +12,7 @@ private: friend class Device; - Semaphore(VkDevice d,VkSemaphore s) + GPUSemaphore(VkDevice d,VkSemaphore s) { device=d; sem=s; @@ -20,11 +20,11 @@ private: public: - ~Semaphore(); + ~GPUSemaphore(); operator VkSemaphore(){return sem;} operator const VkSemaphore *()const{return &sem;} -};//class Semaphore +};//class GPUSemaphore VK_NAMESPACE_END #endif//HGL_GRAPH_VULKAN_SEMAPHORE_INCLUDE diff --git a/src/RenderDevice/Vulkan/VKSemaphore.cpp b/src/RenderDevice/Vulkan/VKSemaphore.cpp index 6e7ef4e2..a95f0060 100644 --- a/src/RenderDevice/Vulkan/VKSemaphore.cpp +++ b/src/RenderDevice/Vulkan/VKSemaphore.cpp @@ -1,6 +1,6 @@ #include VK_NAMESPACE_BEGIN -Semaphore::~Semaphore() +GPUSemaphore::~GPUSemaphore() { vkDestroySemaphore(device,sem,nullptr); }