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.
This commit is contained in:
Stenzek 2016-11-13 18:41:36 +10:00
parent aac66a1b61
commit 9604b336c8
3 changed files with 0 additions and 14 deletions

View File

@ -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;

View File

@ -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();

View File

@ -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();
}