only add pipeline to cache if compilation was attempted

This commit is contained in:
Samuliak 2024-10-19 09:39:55 +02:00
parent 15eb6bb37f
commit 295a6ed9fd
No known key found for this signature in database
3 changed files with 13 additions and 5 deletions

View file

@ -332,7 +332,7 @@ void MetalPipelineCompiler::InitFromState(const LatteFetchShader* fetchShader, c
InitFromStateRender(fetchShader, vertexShader, lastUsedAttachmentsInfo, activeAttachmentsInfo, lcr, fbosMatch);
}
MTL::RenderPipelineState* MetalPipelineCompiler::Compile(bool forceCompile, bool isRenderThread, bool showInOverlay)
MTL::RenderPipelineState* MetalPipelineCompiler::Compile(bool forceCompile, bool isRenderThread, bool showInOverlay, bool& attemptedCompilation)
{
if (forceCompile)
{
@ -408,6 +408,9 @@ MTL::RenderPipelineState* MetalPipelineCompiler::Compile(bool forceCompile, bool
g_compiling_pipelines++;
}
// Inform the pipeline cache that compilation was at least attempted
attemptedCompilation = true;
return pipeline;
}