Skip to content

Commit

Permalink
Vulkan: Fix shutdown crash accidentally caused by #12324
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Sep 17, 2019
1 parent c779871 commit e723594
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions GPU/Vulkan/DepalettizeShaderVulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ void DepalShaderCacheVulkan::DeviceLost() {
if (vshader_) {
vulkan2D_->PurgeVertexShader(vshader_);
vulkan_->Delete().QueueDeleteShaderModule(vshader_);
vshader_ = VK_NULL_HANDLE;
}
draw_ = nullptr;
vulkan_ = nullptr;
Expand Down
3 changes: 2 additions & 1 deletion GPU/Vulkan/GPU_Vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down

0 comments on commit e723594

Please sign in to comment.