mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-21 21:05:50 +12:00
implement pipeline cache
This commit is contained in:
parent
1ba54b44fb
commit
9241306d4d
4 changed files with 157 additions and 98 deletions
|
@ -4,6 +4,7 @@
|
|||
#include "renderer.hpp"
|
||||
#include "texture.hpp"
|
||||
#include "render_target.hpp"
|
||||
#include "mtl_pipeline_cache.hpp"
|
||||
// HACK: use the OpenGL cache
|
||||
#include "../renderer_gl/surface_cache.hpp"
|
||||
|
||||
|
@ -38,14 +39,14 @@ class RendererMTL final : public Renderer {
|
|||
SurfaceCache<Metal::ColorRenderTarget, 16, true> colorRenderTargetCache;
|
||||
SurfaceCache<Metal::DepthStencilRenderTarget, 16, true> depthStencilRenderTargetCache;
|
||||
SurfaceCache<Metal::Texture, 256, true> textureCache;
|
||||
Metal::PipelineCache blitPipelineCache;
|
||||
Metal::PipelineCache drawPipelineCache;
|
||||
|
||||
// Helpers
|
||||
MTL::SamplerState* basicSampler;
|
||||
|
||||
// Pipelines
|
||||
MTL::RenderPipelineState* displayPipeline;
|
||||
MTL::RenderPipelineState* blitPipeline;
|
||||
MTL::RenderPipelineState* drawPipeline;
|
||||
|
||||
// Active state
|
||||
MTL::CommandBuffer* commandBuffer = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue