implement pipeline cache serializing

This commit is contained in:
Samuliak 2024-10-15 07:48:59 +02:00
parent e9e510d2cd
commit 6b47d4f61e
No known key found for this signature in database
3 changed files with 66 additions and 35 deletions

View file

@ -7,7 +7,7 @@
// TODO: binary archives
class MetalPipelineCache
{
public:
private:
struct PipelineHash
{
PipelineHash(uint64 h0, uint64 h1) : h0(h0), h1(h1) {};
@ -30,7 +30,10 @@ public:
};
};
MetalPipelineCache(class MetalRenderer* metalRenderer) : m_mtlr{metalRenderer} {}
public:
static MetalPipelineCache& GetInstance();
MetalPipelineCache(class MetalRenderer* metalRenderer);
~MetalPipelineCache();
MTL::RenderPipelineState* GetRenderPipelineState(const LatteFetchShader* fetchShader, const LatteDecompilerShader* vertexShader, const LatteDecompilerShader* geometryShader, const LatteDecompilerShader* pixelShader, class CachedFBOMtl* lastUsedFBO, class CachedFBOMtl* activeFBO, const LatteContextRegister& lcr);