From a81ee7934ecf3a81c8d2deef8540eea3e67b25e4 Mon Sep 17 00:00:00 2001 From: Samuliak Date: Fri, 15 Nov 2024 19:52:22 +0100 Subject: [PATCH] maximize concurrent shader compilation when loading shader cache --- src/Cafe/HW/Latte/Renderer/Metal/RendererShaderMtl.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Cafe/HW/Latte/Renderer/Metal/RendererShaderMtl.cpp b/src/Cafe/HW/Latte/Renderer/Metal/RendererShaderMtl.cpp index f8b5efe9..e81ee59d 100644 --- a/src/Cafe/HW/Latte/Renderer/Metal/RendererShaderMtl.cpp +++ b/src/Cafe/HW/Latte/Renderer/Metal/RendererShaderMtl.cpp @@ -88,16 +88,18 @@ private: // TODO: find out if it would be possible to cache compiled Metal shaders void RendererShaderMtl::ShaderCacheLoading_begin(uint64 cacheTitleId) { - s_isLoadingShadersMtl = true; + // Maximize shader compilation speed + static_cast(g_renderer.get())->GetDevice()->setShouldMaximizeConcurrentCompilation(true); } void RendererShaderMtl::ShaderCacheLoading_end() { - s_isLoadingShadersMtl = false; + static_cast(g_renderer.get())->GetDevice()->setShouldMaximizeConcurrentCompilation(false); } void RendererShaderMtl::ShaderCacheLoading_Close() { + // Do nothing } void RendererShaderMtl::Initialize()