Vulkan: Fix shutdown crash accidentally caused by #12324

This commit is contained in:
Henrik Rydgård 2019-09-17 14:46:58 +02:00
parent c7798715a5
commit e723594133
2 changed files with 3 additions and 1 deletions

View file

@ -72,6 +72,7 @@ void DepalShaderCacheVulkan::DeviceLost() {
if (vshader_) {
vulkan2D_->PurgeVertexShader(vshader_);
vulkan_->Delete().QueueDeleteShaderModule(vshader_);
vshader_ = VK_NULL_HANDLE;
}
draw_ = nullptr;
vulkan_ = nullptr;

View file

@ -172,9 +172,10 @@ GPU_Vulkan::~GPU_Vulkan() {
// Note: We save the cache in DeviceLost
DestroyDeviceObjects();
framebufferManagerVulkan_->DestroyAllFBOs();
vulkan2D_.Shutdown();
depalShaderCache_.Clear();
depalShaderCache_.DeviceLost();
drawEngine_.DeviceLost();
vulkan2D_.Shutdown();
delete textureCacheVulkan_;
delete pipelineManager_;
delete shaderManagerVulkan_;