refactor cache/split responsibilities

This commit is contained in:
nmzik
2026-07-18 06:16:14 +02:00
parent 78431dba4a
commit 62a92abc66
19 changed files with 1517 additions and 1355 deletions
+7 -1
View File
@@ -40,10 +40,10 @@ public:
}
return m_pool[id];
}
void DeleteAll();
private:
void Create(int id);
void DeleteAll();
VulkanCommandPool* m_pool[GraphicContext::QUEUES_NUM] = {};
};
@@ -78,6 +78,12 @@ void GraphicsRenderInit() {
g_render_ctx = new RenderContext;
}
void GraphicsRenderReleaseThreadCommandPools() {
if (g_render_ctx != nullptr) {
g_command_pool.DeleteAll();
}
}
void GraphicsRenderCreateContext() {
EXIT_IF(g_render_ctx == nullptr);