From c2fab7f01667c4ae1c9d039a5ace87ad21c4d98d Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 14 Oct 2018 20:03:57 +1000 Subject: [PATCH 1/2] ShaderCache: Don't create or load shader cache with Null backend --- Source/Core/VideoCommon/ShaderCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/ShaderCache.cpp b/Source/Core/VideoCommon/ShaderCache.cpp index f369118962..299b0d1bca 100644 --- a/Source/Core/VideoCommon/ShaderCache.cpp +++ b/Source/Core/VideoCommon/ShaderCache.cpp @@ -35,7 +35,7 @@ bool ShaderCache::Initialize() m_async_shader_compiler->ResizeWorkerThreads(g_ActiveConfig.GetShaderPrecompilerThreads()); // Load shader and UID caches. - if (g_ActiveConfig.bShaderCache) + if (g_ActiveConfig.bShaderCache && m_api_type != APIType::Nothing) { LoadShaderCaches(); LoadPipelineUIDCache(); From e3f475b30e085c32f9dc56bf59c270dcbe80ee5e Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 14 Oct 2018 21:24:06 +1000 Subject: [PATCH 2/2] NullBackend: Initialize vtx_decl in VertexFormat This field was previously left uninitialized, which resulted in corrupted UID caches being created. --- Source/Core/VideoBackends/Null/VertexManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoBackends/Null/VertexManager.cpp b/Source/Core/VideoBackends/Null/VertexManager.cpp index 17cab39b05..0e121ffa0d 100644 --- a/Source/Core/VideoBackends/Null/VertexManager.cpp +++ b/Source/Core/VideoBackends/Null/VertexManager.cpp @@ -13,13 +13,13 @@ namespace Null class NullNativeVertexFormat : public NativeVertexFormat { public: - NullNativeVertexFormat() {} + NullNativeVertexFormat(const PortableVertexDeclaration& vtx_decl_) { vtx_decl = vtx_decl_; } }; std::unique_ptr VertexManager::CreateNativeVertexFormat(const PortableVertexDeclaration& vtx_decl) { - return std::make_unique(); + return std::make_unique(vtx_decl); } VertexManager::VertexManager() : m_local_v_buffer(MAXVBUFFERSIZE), m_local_i_buffer(MAXIBUFFERSIZE)