few update
This commit is contained in:
parent
2516e9cfc1
commit
07b71ec0fe
2
CMCore
2
CMCore
@ -1 +1 @@
|
|||||||
Subproject commit ea101386d3705ee56b7a457b5b828c9f7894487d
|
Subproject commit dbbd145f03cd3d56c8535b9291b710e595d3b625
|
@ -1 +1 @@
|
|||||||
Subproject commit 441ca9ce5558d6825c92c7dd1b9f93b80404fb41
|
Subproject commit b2f29ef0cfaed232226f5c8460b1694b98fc25bd
|
2
CMUtil
2
CMUtil
@ -1 +1 @@
|
|||||||
Subproject commit 6582b635c9b93284c29dd7e1bc6dc5ecf59a8705
|
Subproject commit 5a05612f537391db5cbf4001b93ecbef591e4c2e
|
@ -26,7 +26,7 @@ private:
|
|||||||
GRAPH_MODULE_CONSTRUCT(RenderPassManager)
|
GRAPH_MODULE_CONSTRUCT(RenderPassManager)
|
||||||
~RenderPassManager();
|
~RenderPassManager();
|
||||||
|
|
||||||
bool Init(GraphModulesMap *) override;
|
bool Init() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include<hgl/graph/VK.h>
|
#include<hgl/graph/VK.h>
|
||||||
#include<hgl/graph/VKDevice.h>
|
#include<hgl/graph/VKDevice.h>
|
||||||
#include<hgl/type/IDName.h>
|
#include<hgl/type/IDName.h>
|
||||||
|
#include<hgl/type/StrChar.h>
|
||||||
|
|
||||||
VK_NAMESPACE_BEGIN
|
VK_NAMESPACE_BEGIN
|
||||||
|
|
||||||
@ -149,18 +150,21 @@ public:
|
|||||||
|
|
||||||
virtual bool Init()=0; ///<初始化当前模块
|
virtual bool Init()=0; ///<初始化当前模块
|
||||||
|
|
||||||
static const AnsiIDNameSet &GetDependentModules() ///<取得依赖的模块列表
|
static const char **GetDependentModules(){return nullptr;} ///<取得依赖的模块列表
|
||||||
{
|
|
||||||
static const AnsiIDNameSet empty;
|
|
||||||
|
|
||||||
return empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
const int compare(const GraphModule &gm)const override
|
const int compare(const GraphModule &gm)const override
|
||||||
{
|
{
|
||||||
auto &dependent_modules_name=GetDependentModules();
|
const char **dependent_modules_list=GetDependentModules();
|
||||||
|
|
||||||
return(dependent_modules_name.Contains(gm.module_name)?1:-1); //如果我依赖于他,那么我比他大
|
if(!dependent_modules_list)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
const char *self_module_name=gm.GetName().ToString();
|
||||||
|
|
||||||
|
if(string_in_list(dependent_modules_list,self_module_name))
|
||||||
|
return 1;//如果我依赖于他,那么我比他大
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -32,7 +32,7 @@ public:
|
|||||||
GRAPH_MODULE_CONSTRUCT(SwapchainModule)
|
GRAPH_MODULE_CONSTRUCT(SwapchainModule)
|
||||||
virtual ~SwapchainModule();
|
virtual ~SwapchainModule();
|
||||||
|
|
||||||
bool Init(GraphModulesMap *) override;
|
bool Init() override;
|
||||||
|
|
||||||
bool BeginFrame();
|
bool BeginFrame();
|
||||||
void EndFrame();
|
void EndFrame();
|
||||||
|
@ -53,10 +53,9 @@ RenderTarget *TextureManager::CreateRT(const FramebufferInfo *fbi,RenderPass *rp
|
|||||||
RenderTarget *TextureManager::CreateRT(const FramebufferInfo *fbi,const uint32_t fence_count)
|
RenderTarget *TextureManager::CreateRT(const FramebufferInfo *fbi,const uint32_t fence_count)
|
||||||
{
|
{
|
||||||
if(!fbi)return(nullptr);
|
if(!fbi)return(nullptr);
|
||||||
|
if(!rp_manager)return(nullptr); //这个判断理论上不可能成立
|
||||||
|
|
||||||
RenderPassManager *rpm=GetModule<RenderPassManager>();
|
RenderPass *rp=rp_manager->AcquireRenderPass(fbi);
|
||||||
|
|
||||||
RenderPass *rp=rpm->AcquireRenderPass(fbi);
|
|
||||||
|
|
||||||
if(!rp)return(nullptr);
|
if(!rp)return(nullptr);
|
||||||
|
|
||||||
|
@ -184,13 +184,8 @@ bool CreateDepthAttachment( List<VkAttachmentReference> &ref_list,List<VkAttachm
|
|||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RenderPassManager::Init(GraphModulesMap *gmm)
|
bool RenderPassManager::Init()
|
||||||
{
|
{
|
||||||
if(!GraphModule::Init(gmm))
|
|
||||||
return(false);
|
|
||||||
|
|
||||||
gmm->Get(rp_manager);
|
|
||||||
|
|
||||||
pipeline_cache=GetDeviceAttribute()->pipeline_cache;
|
pipeline_cache=GetDeviceAttribute()->pipeline_cache;
|
||||||
|
|
||||||
hash=CreateRenderPassHash();
|
hash=CreateRenderPassHash();
|
||||||
|
@ -13,7 +13,8 @@ namespace
|
|||||||
{
|
{
|
||||||
const char *tex_manager_dep[]
|
const char *tex_manager_dep[]
|
||||||
{
|
{
|
||||||
"RenderPassManager"
|
"RenderPassManager",
|
||||||
|
nullptr //一定要0结尾
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,10 +23,8 @@ const char **TextureManager::GetDependentModules()
|
|||||||
return tex_manager_dep;
|
return tex_manager_dep;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TextureManager::Init(GraphModulesMap *gmm)
|
bool TextureManager::Init()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
GPUDevice *dev=GetDevice();
|
GPUDevice *dev=GetDevice();
|
||||||
|
|
||||||
if(!dev)
|
if(!dev)
|
||||||
|
@ -31,11 +31,12 @@ GraphModule::~GraphModule()
|
|||||||
LOG_INFO("GraphModule::~GraphModule: "+AnsiString(module_name.GetName()))
|
LOG_INFO("GraphModule::~GraphModule: "+AnsiString(module_name.GetName()))
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GraphModule::InitDependentModules(GraphModulesMap *)
|
bool GraphModule::InitDependentModules(GraphModulesMap *gmm)
|
||||||
{
|
{
|
||||||
auto dm_list=GetDependentModules();
|
auto dm_list=GetDependentModules();
|
||||||
|
|
||||||
if(!dm_list.IsEmpty())
|
if(!dm_list.
|
||||||
|
IsEmpty())
|
||||||
{
|
{
|
||||||
if(!gmm)
|
if(!gmm)
|
||||||
return(false);
|
return(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user