From 7eb06430ed35f73a073ca9851e199777a6695114 Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Thu, 29 Sep 2011 23:16:42 +0200 Subject: [PATCH] Only sync shader caches to disk on stop. --- Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp | 1 - Source/Plugins/Plugin_VideoDX11/Src/VertexShaderCache.cpp | 1 - Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp | 1 - Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.cpp | 1 - 4 files changed, 4 deletions(-) diff --git a/Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp b/Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp index 7e4af031bd..56f3719057 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp @@ -502,7 +502,6 @@ bool PixelShaderCache::SetShader(DSTALPHA_MODE dstAlphaMode, u32 components) // Insert the bytecode into the caches g_ps_disk_cache.Append(uid, pbytecode->Data(), pbytecode->Size()); - g_ps_disk_cache.Sync(); bool success = InsertByteCode(uid, pbytecode->Data(), pbytecode->Size()); pbytecode->Release(); diff --git a/Source/Plugins/Plugin_VideoDX11/Src/VertexShaderCache.cpp b/Source/Plugins/Plugin_VideoDX11/Src/VertexShaderCache.cpp index d9dae4cf91..d727ce1ebf 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/VertexShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/VertexShaderCache.cpp @@ -244,7 +244,6 @@ bool VertexShaderCache::SetShader(u32 components) return false; } g_vs_disk_cache.Append(uid, pbytecode->Data(), pbytecode->Size()); - g_vs_disk_cache.Sync(); bool success = InsertByteCode(uid, pbytecode); pbytecode->Release(); diff --git a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp index 14943e8f8f..f66d096ab6 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp @@ -393,7 +393,6 @@ bool PixelShaderCache::SetShader(DSTALPHA_MODE dstAlphaMode, u32 components) // Insert the bytecode into the caches g_ps_disk_cache.Append(uid, bytecode, bytecodelen); - g_ps_disk_cache.Sync(); // And insert it into the shader cache. bool success = InsertByteCode(uid, bytecode, bytecodelen, true); diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.cpp b/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.cpp index 9448c07371..e392cf3de0 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.cpp @@ -223,7 +223,6 @@ bool VertexShaderCache::SetShader(u32 components) return false; } g_vs_disk_cache.Append(uid, bytecode, bytecodelen); - g_vs_disk_cache.Sync(); bool success = InsertByteCode(uid, bytecode, bytecodelen, true); if (g_ActiveConfig.bEnableShaderDebugging && success)