renamed Fence instead of GPUFence
This commit is contained in:
parent
b980457ba2
commit
fc2c8021ba
@ -80,7 +80,7 @@ private:
|
|||||||
SubpassParam sp_gbuffer;
|
SubpassParam sp_gbuffer;
|
||||||
SubpassParam sp_composition;
|
SubpassParam sp_composition;
|
||||||
|
|
||||||
Primitive *ro_plane,
|
Primitive *ro_plane,
|
||||||
*ro_cube,
|
*ro_cube,
|
||||||
*ro_sphere,
|
*ro_sphere,
|
||||||
*ro_torus,
|
*ro_torus,
|
||||||
|
@ -67,7 +67,7 @@ class TextureCmdBuffer;
|
|||||||
class RenderPass;
|
class RenderPass;
|
||||||
class DeviceRenderPassManage;
|
class DeviceRenderPassManage;
|
||||||
|
|
||||||
class GPUFence;
|
class Fence;
|
||||||
class GPUSemaphore;
|
class GPUSemaphore;
|
||||||
|
|
||||||
enum class DescriptorSetsType
|
enum class DescriptorSetsType
|
||||||
|
@ -240,7 +240,7 @@ public:
|
|||||||
|
|
||||||
RenderPass * AcquireRenderPass( const RenderbufferInfo *,const uint subpass_count=2);
|
RenderPass * AcquireRenderPass( const RenderbufferInfo *,const uint subpass_count=2);
|
||||||
|
|
||||||
GPUFence * CreateFence(bool);
|
Fence * CreateFence(bool);
|
||||||
GPUSemaphore * CreateGPUSemaphore();
|
GPUSemaphore * CreateGPUSemaphore();
|
||||||
|
|
||||||
GPUQueue * CreateQueue(const uint32_t fence_count=1,const bool create_signaled=false);
|
GPUQueue * CreateQueue(const uint32_t fence_count=1,const bool create_signaled=false);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include<hgl/graph/VK.h>
|
#include<hgl/graph/VK.h>
|
||||||
VK_NAMESPACE_BEGIN
|
VK_NAMESPACE_BEGIN
|
||||||
class GPUFence
|
class Fence
|
||||||
{
|
{
|
||||||
VkDevice device;
|
VkDevice device;
|
||||||
VkFence fence;
|
VkFence fence;
|
||||||
@ -12,7 +12,7 @@ private:
|
|||||||
|
|
||||||
friend class GPUDevice;
|
friend class GPUDevice;
|
||||||
|
|
||||||
GPUFence(VkDevice d,VkFence f)
|
Fence(VkDevice d,VkFence f)
|
||||||
{
|
{
|
||||||
device=d;
|
device=d;
|
||||||
fence=f;
|
fence=f;
|
||||||
@ -20,9 +20,9 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
~GPUFence();
|
~Fence();
|
||||||
|
|
||||||
operator VkFence(){return fence;}
|
operator VkFence(){return fence;}
|
||||||
};//class GPUFence
|
};//class Fence
|
||||||
VK_NAMESPACE_END
|
VK_NAMESPACE_END
|
||||||
#endif//HGL_VULKAN_GRAPH_FENCE_INCLUDE
|
#endif//HGL_VULKAN_GRAPH_FENCE_INCLUDE
|
||||||
|
@ -12,7 +12,7 @@ protected:
|
|||||||
VkQueue queue;
|
VkQueue queue;
|
||||||
|
|
||||||
uint32_t current_fence;
|
uint32_t current_fence;
|
||||||
GPUFence **fence_list;
|
Fence **fence_list;
|
||||||
uint32_t fence_count;
|
uint32_t fence_count;
|
||||||
|
|
||||||
SubmitInfo submit_info;
|
SubmitInfo submit_info;
|
||||||
@ -21,7 +21,7 @@ private:
|
|||||||
|
|
||||||
friend class GPUDevice;
|
friend class GPUDevice;
|
||||||
|
|
||||||
GPUQueue(VkDevice dev,VkQueue q,GPUFence **,const uint32_t fc);
|
GPUQueue(VkDevice dev,VkQueue q,Fence **,const uint32_t fc);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ TextureCmdBuffer *GPUDevice::CreateTextureCommandBuffer()
|
|||||||
* 创建栅栏
|
* 创建栅栏
|
||||||
* @param create_signaled 是否创建初始信号
|
* @param create_signaled 是否创建初始信号
|
||||||
*/
|
*/
|
||||||
GPUFence *GPUDevice::CreateFence(bool create_signaled)
|
Fence *GPUDevice::CreateFence(bool create_signaled)
|
||||||
{
|
{
|
||||||
FenceCreateInfo fenceInfo(create_signaled?VK_FENCE_CREATE_SIGNALED_BIT:0);
|
FenceCreateInfo fenceInfo(create_signaled?VK_FENCE_CREATE_SIGNALED_BIT:0);
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ GPUFence *GPUDevice::CreateFence(bool create_signaled)
|
|||||||
if(vkCreateFence(attr->device, &fenceInfo, nullptr, &fence)!=VK_SUCCESS)
|
if(vkCreateFence(attr->device, &fenceInfo, nullptr, &fence)!=VK_SUCCESS)
|
||||||
return(nullptr);
|
return(nullptr);
|
||||||
|
|
||||||
return(new GPUFence(attr->device,fence));
|
return(new Fence(attr->device,fence));
|
||||||
}
|
}
|
||||||
|
|
||||||
GPUSemaphore *GPUDevice::CreateGPUSemaphore()
|
GPUSemaphore *GPUDevice::CreateGPUSemaphore()
|
||||||
@ -144,7 +144,7 @@ GPUQueue *GPUDevice::CreateQueue(const uint32_t fence_count,const bool create_si
|
|||||||
{
|
{
|
||||||
if(fence_count<=0)return(nullptr);
|
if(fence_count<=0)return(nullptr);
|
||||||
|
|
||||||
GPUFence **fence_list=new GPUFence *[fence_count];
|
Fence **fence_list=new Fence *[fence_count];
|
||||||
|
|
||||||
for(uint32_t i=0;i<fence_count;i++)
|
for(uint32_t i=0;i<fence_count;i++)
|
||||||
fence_list[i]=CreateFence(create_signaled);
|
fence_list[i]=CreateFence(create_signaled);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include<hgl/graph/VKFence.h>
|
#include<hgl/graph/VKFence.h>
|
||||||
VK_NAMESPACE_BEGIN
|
VK_NAMESPACE_BEGIN
|
||||||
GPUFence::~GPUFence()
|
Fence::~Fence()
|
||||||
{
|
{
|
||||||
vkDestroyFence(device,fence,nullptr);
|
vkDestroyFence(device,fence,nullptr);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ namespace
|
|||||||
const VkPipelineStageFlags pipe_stage_flags=VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
const VkPipelineStageFlags pipe_stage_flags=VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
||||||
}//namespace
|
}//namespace
|
||||||
|
|
||||||
GPUQueue::GPUQueue(VkDevice dev,VkQueue q,GPUFence **fl,const uint32_t fc)
|
GPUQueue::GPUQueue(VkDevice dev,VkQueue q,Fence **fl,const uint32_t fc)
|
||||||
{
|
{
|
||||||
device=dev;
|
device=dev;
|
||||||
queue=q;
|
queue=q;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user