mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Merge pull request #15220 from unknownbrackets/vulkan-exit
Vulkan: Fix use-after-free on shutdown
This commit is contained in:
2 files changed
+5
-2
No files matched your search
@@ -449,7 +449,7 @@ void VulkanRenderManager::CompileThreadFunc() {
|
||||
if (!run_) {
|
||||
break;
|
||||
}
|
||||
for (auto entry : toCompile) {
|
||||
for (auto &entry : toCompile) {
|
||||
switch (entry.type) {
|
||||
case CompileQueueEntry::Type::GRAPHICS:
|
||||
entry.graphics->Create(vulkan_);
|
||||
|
||||
@@ -37,7 +37,10 @@ void PipelineManagerVulkan::Clear() {
|
||||
if (value->pipeline) {
|
||||
VkPipeline pipeline = value->pipeline->pipeline;
|
||||
vulkan_->Delete().QueueDeletePipeline(pipeline);
|
||||
delete value->pipeline;
|
||||
vulkan_->Delete().QueueCallback([](void *p) {
|
||||
VKRGraphicsPipeline *pipeline = (VKRGraphicsPipeline *)p;
|
||||
delete pipeline;
|
||||
}, value->pipeline);
|
||||
} else {
|
||||
// Something went wrong.
|
||||
ERROR_LOG(G3D, "Null pipeline found in PipelineManagerVulkan::Clear - didn't wait for asyncs?");
|
||||
|
||||
Reference in new issue
Block a user