add: render target caches

This commit is contained in:
Samuliak 2024-07-02 16:06:20 +02:00
parent 67e3a1d8eb
commit 53c9611ac2
4 changed files with 85 additions and 1 deletions

View file

@ -3,6 +3,7 @@
#include "renderer.hpp"
#include "texture.hpp"
#include "render_target.hpp"
// HACK: use the OpenGL cache
#include "../renderer_gl/surface_cache.hpp"
@ -34,6 +35,8 @@ class RendererMTL final : public Renderer {
MTL::CommandQueue* commandQueue;
// Caches
SurfaceCache<Metal::Texture, 16, true> colorRenderTargetCache;
SurfaceCache<Metal::Texture, 16, true> depthStencilRenderTargetCache;
SurfaceCache<Metal::Texture, 256, true> textureCache;
// HACK