renamed Semaphore instead of GPUSemaphore,

renamed Queue instead of GPUQueue
This commit is contained in:
2022-10-14 19:40:16 +08:00
parent fc2c8021ba
commit f8646ca880
12 changed files with 47 additions and 47 deletions

View File

@@ -33,7 +33,7 @@ class VulkanInstance;
class GPUPhysicalDevice;
class GPUDevice;
struct GPUDeviceAttribute;
class GPUQueue;
class Queue;
class ImageView;
class Framebuffer;
struct Swapchain;
@@ -68,7 +68,7 @@ class RenderPass;
class DeviceRenderPassManage;
class Fence;
class GPUSemaphore;
class Semaphore;
enum class DescriptorSetsType
{

View File

@@ -43,7 +43,7 @@ class GPUDevice
{
GPUDeviceAttribute *attr;
GPUQueue *texture_queue;
Queue *texture_queue;
TextureCmdBuffer *texture_cmd_buf;
private:
@@ -241,9 +241,9 @@ public:
RenderPass * AcquireRenderPass( const RenderbufferInfo *,const uint subpass_count=2);
Fence * CreateFence(bool);
GPUSemaphore * CreateGPUSemaphore();
Semaphore * CreateGPUSemaphore();
GPUQueue * CreateQueue(const uint32_t fence_count=1,const bool create_signaled=false);
Queue * CreateQueue(const uint32_t fence_count=1,const bool create_signaled=false);
public: //FrameBuffer相关

View File

@@ -4,7 +4,7 @@
#include<hgl/graph/VK.h>
#include<hgl/graph/VKFence.h>
VK_NAMESPACE_BEGIN
class GPUQueue
class Queue
{
protected:
@@ -21,11 +21,11 @@ private:
friend class GPUDevice;
GPUQueue(VkDevice dev,VkQueue q,Fence **,const uint32_t fc);
Queue(VkDevice dev,VkQueue q,Fence **,const uint32_t fc);
public:
virtual ~GPUQueue();
virtual ~Queue();
operator VkQueue(){return queue;}
@@ -33,8 +33,8 @@ public:
bool WaitQueue();
bool WaitFence(const bool wait_all=true,const uint64_t time_out=HGL_NANO_SEC_PER_SEC);
bool Submit(const VkCommandBuffer &cmd_buf,GPUSemaphore *wait_sem,GPUSemaphore *complete_sem);
bool Submit(const VkCommandBuffer *cmd_buf,const uint32_t count,GPUSemaphore *wait_sem,GPUSemaphore *complete_sem);
bool Submit(const VkCommandBuffer &cmd_buf,Semaphore *wait_sem,Semaphore *complete_sem);
bool Submit(const VkCommandBuffer *cmd_buf,const uint32_t count,Semaphore *wait_sem,Semaphore *complete_sem);
};//class SumbitQueue
VK_NAMESPACE_END
#endif//HGL_GRAPH_VULKAN_SUBMIT_QUEUE_INCLUDE

View File

@@ -15,14 +15,14 @@ class RenderTarget
{
protected:
GPUQueue *queue;
Queue *queue;
RenderPass *render_pass;
Framebuffer *fbo;
VkExtent2D extent;
GPUSemaphore *render_complete_semaphore =nullptr;
Semaphore *render_complete_semaphore =nullptr;
protected:
@@ -34,14 +34,14 @@ protected:
friend class GPUDevice;
RenderTarget(GPUQueue *,GPUSemaphore *);
RenderTarget(GPUQueue *,GPUSemaphore *,RenderPass *_rp,Framebuffer *_fb,Texture2D **color_texture_list,const uint32_t color_count,Texture2D *depth_texture);
RenderTarget(Queue *,Semaphore *);
RenderTarget(Queue *,Semaphore *,RenderPass *_rp,Framebuffer *_fb,Texture2D **color_texture_list,const uint32_t color_count,Texture2D *depth_texture);
public:
virtual ~RenderTarget();
GPUQueue * GetQueue () {return queue;}
Queue * GetQueue () {return queue;}
const VkExtent2D & GetExtent ()const {return extent;}
virtual RenderPass * GetRenderPass () {return render_pass;}
virtual const VkRenderPass GetVkRenderPass ()const {return render_pass->GetVkRenderPass();}
@@ -53,8 +53,8 @@ public:
public: // command buffer
GPUSemaphore * GetRenderCompleteSemaphore (){return render_complete_semaphore;}
virtual bool Submit (RenderCmdBuffer *,GPUSemaphore *present_complete_semaphore=nullptr);
Semaphore * GetRenderCompleteSemaphore (){return render_complete_semaphore;}
virtual bool Submit (RenderCmdBuffer *,Semaphore *present_complete_semaphore=nullptr);
bool WaitQueue(){return queue->WaitQueue();}
bool WaitFence(){return queue->WaitFence();}
@@ -69,13 +69,13 @@ class SwapchainRenderTarget:public RenderTarget
Swapchain *swapchain;
PresentInfo present_info;
GPUSemaphore *present_complete_semaphore=nullptr;
Semaphore *present_complete_semaphore=nullptr;
uint32_t current_frame;
public:
SwapchainRenderTarget(VkDevice dev,Swapchain *sc,GPUQueue *q,GPUSemaphore *rcs,GPUSemaphore *pcs,RenderPass *rp);
SwapchainRenderTarget(VkDevice dev,Swapchain *sc,Queue *q,Semaphore *rcs,Semaphore *pcs,RenderPass *rp);
~SwapchainRenderTarget();
Framebuffer * GetFramebuffer ()override {return swapchain->render_frame[current_frame];}
@@ -90,7 +90,7 @@ public:
public:
const uint32_t GetCurrentFrameIndices ()const {return current_frame;}
GPUSemaphore * GetPresentCompleteSemaphore () {return present_complete_semaphore;}
Semaphore * GetPresentCompleteSemaphore () {return present_complete_semaphore;}
public:
@@ -109,7 +109,7 @@ public:
bool PresentBackbuffer();
bool Submit(VkCommandBuffer);
bool Submit(VkCommandBuffer,GPUSemaphore *);
bool Submit(VkCommandBuffer,Semaphore *);
};//class SwapchainRenderTarget:public RenderTarget
VK_NAMESPACE_END
#endif//HGL_GRAPH_VULKAN_RENDER_TARGET_INCLUDE

View File

@@ -3,7 +3,7 @@
#include<hgl/graph/VK.h>
VK_NAMESPACE_BEGIN
class GPUSemaphore
class Semaphore
{
VkDevice device;
VkSemaphore sem;
@@ -12,7 +12,7 @@ private:
friend class GPUDevice;
GPUSemaphore(VkDevice d,VkSemaphore s)
Semaphore(VkDevice d,VkSemaphore s)
{
device=d;
sem=s;
@@ -20,11 +20,11 @@ private:
public:
~GPUSemaphore();
~Semaphore();
operator VkSemaphore(){return sem;}
operator const VkSemaphore *()const{return &sem;}
};//class GPUSemaphore
};//class Semaphore
VK_NAMESPACE_END
#endif//HGL_GRAPH_VULKAN_SEMAPHORE_INCLUDE