mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-22 19:45:46 +00:00
[vk] tmp: workaround for RAII crash on exit
Prevent double-free Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
parent
ce56a4b83c
commit
e8e0d7fa20
1 changed files with 9 additions and 2 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include "common/common_types.h"
|
||||
#include "common/settings.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "video_core/vulkan_common/vk_enum_string_helper.h"
|
||||
#include "video_core/vulkan_common/vma.h"
|
||||
|
@ -309,7 +310,10 @@ const char* Exception::what() const noexcept {
|
|||
}
|
||||
|
||||
void Destroy(VkInstance instance, const InstanceDispatch& dld) noexcept {
|
||||
// FIXME: A double free occurs here if RAII is enabled.
|
||||
if (!Settings::values.enable_raii.GetValue()) {
|
||||
dld.vkDestroyInstance(instance, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
void Destroy(VkDevice device, const InstanceDispatch& dld) noexcept {
|
||||
|
@ -412,7 +416,10 @@ void Destroy(VkInstance instance, VkDebugReportCallbackEXT handle,
|
|||
}
|
||||
|
||||
void Destroy(VkInstance instance, VkSurfaceKHR handle, const InstanceDispatch& dld) noexcept {
|
||||
// FIXME: A double free occurs here if RAII is enabled.
|
||||
if (!Settings::values.enable_raii.GetValue()) {
|
||||
dld.vkDestroySurfaceKHR(instance, handle, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
VkResult Free(VkDevice device, VkDescriptorPool handle, Span<VkDescriptorSet> sets,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue