Fix Metal frame glitch on older devices (#2379)

This commit is contained in:
Stefan Karschti
2024-05-15 15:30:28 +03:00
committed by GitHub
parent 8e479eea96
commit aff5693fb9
6 changed files with 57 additions and 4 deletions

View File

@@ -62,7 +62,8 @@ public:
MTLRenderPipelineStatePtr getRenderPipelineState(const gfx::Renderable&,
const MTLVertexDescriptorPtr&,
const gfx::ColorMode& colorMode) const;
const gfx::ColorMode& colorMode,
const std::optional<std::size_t> reuseHash) const;
std::optional<size_t> getSamplerLocation(const size_t id) const override;
@@ -87,6 +88,8 @@ protected:
VertexAttributeArray vertexAttributes;
VertexAttributeArray instanceAttributes;
std::array<std::optional<size_t>, shaders::maxTextureCountPerShader> textureBindings;
mutable mbgl::unordered_map<std::size_t, MTLRenderPipelineStatePtr> renderPipelineStateCache;
};
} // namespace mtl