2024-04-10 12:53:55 +02:00
|
|
|
#pragma once
|
2024-04-13 23:51:38 +02:00
|
|
|
#include "Graphics/Initializer.h"
|
|
|
|
|
#include "Pipeline.h"
|
2024-04-10 12:53:55 +02:00
|
|
|
|
|
|
|
|
namespace Seele {
|
|
|
|
|
namespace Metal {
|
|
|
|
|
class PipelineCache
|
|
|
|
|
{
|
2024-04-13 23:51:38 +02:00
|
|
|
public:
|
|
|
|
|
PipelineCache(PGraphics graphics, const std::string& cacheFilePath);
|
|
|
|
|
~PipelineCache();
|
|
|
|
|
PGraphicsPipeline createPipeline(Gfx::LegacyPipelineCreateInfo createInfo);
|
|
|
|
|
PGraphicsPipeline createPipeline(Gfx::MeshPipelineCreateInfo createInfo);
|
|
|
|
|
PComputePipeline createPipeline(Gfx::ComputePipelineCreateInfo createInfo);
|
|
|
|
|
private:
|
|
|
|
|
PGraphics graphics;
|
|
|
|
|
Map<uint32, OGraphicsPipeline> graphicsPipelines;
|
2024-04-14 11:35:37 +02:00
|
|
|
Map<uint32, OComputePipeline> computePipelines;
|
2024-04-13 23:51:38 +02:00
|
|
|
std::string cacheFile;
|
2024-04-10 12:53:55 +02:00
|
|
|
};
|
2024-04-13 23:51:38 +02:00
|
|
|
DEFINE_REF(PipelineCache)
|
2024-04-10 12:53:55 +02:00
|
|
|
}
|
|
|
|
|
}
|