InitGraphModuleManager/ClearGraphModuleManager in GPUDevice.
This commit is contained in:
parent
62f2e4f819
commit
7a373d6bc0
2
CMCore
2
CMCore
@ -1 +1 @@
|
||||
Subproject commit ca8517f146b08bb4df1669218579223ac7bfbcae
|
||||
Subproject commit 5443a58987ec4fd3fdfb1df72f602c728940321a
|
@ -30,6 +30,7 @@ struct CopyBufferToImageInfo;
|
||||
|
||||
class GPUDevice
|
||||
{
|
||||
GraphModuleManager *graph_module_manager;
|
||||
GPUDeviceAttribute *attr;
|
||||
|
||||
DeviceQueue *texture_queue;
|
||||
|
@ -9,8 +9,13 @@
|
||||
#include<hgl/graph/VKFramebuffer.h>
|
||||
#include<hgl/graph/VKDescriptorSet.h>
|
||||
#include<hgl/graph/VKDeviceRenderPassManage.h>
|
||||
#include<hgl/graph/module/GraphModule.h>
|
||||
|
||||
VK_NAMESPACE_BEGIN
|
||||
|
||||
GraphModuleManager *InitGraphModuleManager(GPUDevice *dev);
|
||||
bool ClearGraphModuleManager(GPUDevice *dev);
|
||||
|
||||
GPUDevice::GPUDevice(GPUDeviceAttribute *da)
|
||||
{
|
||||
attr=da;
|
||||
@ -18,6 +23,8 @@ GPUDevice::GPUDevice(GPUDeviceAttribute *da)
|
||||
texture_queue=nullptr;
|
||||
texture_cmd_buf=nullptr;
|
||||
|
||||
graph_module_manager=InitGraphModuleManager(this);
|
||||
|
||||
InitRenderPassManage();
|
||||
|
||||
sc_rt=nullptr;
|
||||
@ -37,10 +44,15 @@ GPUDevice::~GPUDevice()
|
||||
SAFE_CLEAR(texture_cmd_buf);
|
||||
|
||||
delete attr;
|
||||
|
||||
//按设计,上面那些rt/queue/cmdbuf都需要走graph_module_manager释放和申请
|
||||
ClearGraphModuleManager(this);
|
||||
}
|
||||
|
||||
bool GPUDevice::Resize(const VkExtent2D &extent)
|
||||
{
|
||||
graph_module_manager->OnResize(extent);
|
||||
|
||||
SAFE_CLEAR(sc_rt);
|
||||
|
||||
attr->RefreshSurfaceCaps();
|
||||
|
Loading…
x
Reference in New Issue
Block a user