From 1638d797eb53ee1a414e04b37b5681a028955df5 Mon Sep 17 00:00:00 2001 From: Marco Weber Date: Thu, 12 Nov 2015 12:20:02 +0000 Subject: [PATCH] Added invalidation of renderpipeline state cache. In case the program object gets re-used the cache can return invalid instances of the descriptor. --- src/renderer_mtl.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/renderer_mtl.mm b/src/renderer_mtl.mm index 71a84741..60864141 100644 --- a/src/renderer_mtl.mm +++ b/src/renderer_mtl.mm @@ -1453,6 +1453,8 @@ namespace bgfx { namespace mtl m_processedUniforms = false; m_numPredefined = 0; + + m_renderPipelineStateCache.invalidate(); } UniformType::Enum convertMtlType(MTLDataType _type)