summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2016-11-13 18:41:36 +1000
committerStenzek <stenzek@gmail.com>2016-11-28 21:21:54 +1000
commit9604b336c8213c43dff90fab67df8eaa31cdbbb5 (patch)
treeee8fd374fd805ba4a853792b42aa89aab5153204 /Source/Core
parentaac66a1b61a0e4c1c2b85d89bc818a8b521bcffa (diff)
Vulkan: Don't destroy the device's pipeline cache on MSAA mode change
The user could switch back again, and this would mean this data would be lost. Disk space is cheap, and it's not going to be much.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoBackends/Vulkan/ObjectCache.cpp9
-rw-r--r--Source/Core/VideoBackends/Vulkan/ObjectCache.h4
-rw-r--r--Source/Core/VideoBackends/Vulkan/Renderer.cpp1
3 files changed, 0 insertions, 14 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp b/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp
index ecfc73c76e..d7d505b793 100644
--- a/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp
+++ b/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp
@@ -382,15 +382,6 @@ void ObjectCache::DestroyPipelineCache()
m_pipeline_cache = VK_NULL_HANDLE;
}
-void ObjectCache::ClearPipelineCache()
-{
- // Reallocate the pipeline cache object, so it starts fresh and we don't
- // save old pipelines to disk. This is for major changes, e.g. MSAA mode change.
- DestroyPipelineCache();
- if (!CreatePipelineCache(false))
- PanicAlert("Failed to re-create pipeline cache");
-}
-
void ObjectCache::SavePipelineCache()
{
size_t data_size;
diff --git a/Source/Core/VideoBackends/Vulkan/ObjectCache.h b/Source/Core/VideoBackends/Vulkan/ObjectCache.h
index e102440164..a1b9be54a4 100644
--- a/Source/Core/VideoBackends/Vulkan/ObjectCache.h
+++ b/Source/Core/VideoBackends/Vulkan/ObjectCache.h
@@ -123,10 +123,6 @@ public:
// otherwise for a cache hit it will be true.
std::pair<VkPipeline, bool> GetPipelineWithCacheResult(const PipelineInfo& info);
- // Wipes out the pipeline cache, use when MSAA modes change, for example
- // Also destroys the data that would be stored in the disk cache.
- void ClearPipelineCache();
-
// Saves the pipeline cache to disk. Call when shutting down.
void SavePipelineCache();
diff --git a/Source/Core/VideoBackends/Vulkan/Renderer.cpp b/Source/Core/VideoBackends/Vulkan/Renderer.cpp
index 05ae219ec2..1a82184fc4 100644
--- a/Source/Core/VideoBackends/Vulkan/Renderer.cpp
+++ b/Source/Core/VideoBackends/Vulkan/Renderer.cpp
@@ -1137,7 +1137,6 @@ void Renderer::CheckForConfigChanges()
g_command_buffer_mgr->WaitForGPUIdle();
RecompileShaders();
FramebufferManager::GetInstance()->RecompileShaders();
- g_object_cache->ClearPipelineCache();
g_object_cache->RecompileSharedShaders();
StateTracker::GetInstance()->LoadPipelineUIDCache();
}