fix(renderer): calling vkDestroyInstance causes XCloseWindow to segfault
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
ref: 0017308648
ref: https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/1894
ref: https://www.xfree86.org/4.7.0/DRI11.html
This commit is contained in:
parent
030556c733
commit
f268724034
2 changed files with 3 additions and 12 deletions
|
@ -131,9 +131,6 @@ Context::~Context()
|
|||
{
|
||||
try
|
||||
{
|
||||
log_trc("Fucking destructing shit at address: {}", (size_t)this);
|
||||
|
||||
|
||||
if (m_device)
|
||||
{
|
||||
vkc(vk_device_wait_idle(m_device));
|
||||
|
@ -146,13 +143,7 @@ Context::~Context()
|
|||
{
|
||||
vk_destroy_surface_khr(m_instance, m_surface, nullptr);
|
||||
vk_destroy_debug_messenger(m_instance, m_debug_messenger, nullptr);
|
||||
vk_destroy_instance(m_instance, nullptr);
|
||||
}
|
||||
|
||||
if (library)
|
||||
{
|
||||
dlclose(library);
|
||||
library = nullptr;
|
||||
// vk_destroy_instance(m_instance, nullptr);
|
||||
}
|
||||
}
|
||||
catch (const std::exception &exp)
|
||||
|
@ -307,7 +298,6 @@ void Context::initialize_surface(const ecs::Entity &surface_entity)
|
|||
vkc(vk_create_xlib_surface_khr(m_instance, &create_info, nullptr, &m_surface));
|
||||
|
||||
const auto &[width, height] = component.get_resolution();
|
||||
log_dbg("{} x {}", width, height);
|
||||
m_framebuffer_size = {
|
||||
.width = width,
|
||||
.height = height,
|
||||
|
@ -636,7 +626,7 @@ auto validation_layers_callback(
|
|||
) -> VkBool32
|
||||
{
|
||||
log_dbg("VALIDATION: {}", callback_data->pMessage);
|
||||
return VK_FALSE;
|
||||
return VK_FALSE; // TODO(Light): fix this mess!
|
||||
|
||||
auto stats = *(Ref<app::SystemStats> *)vulkan_user_data; // NOLINT
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ target_link_libraries(surface PUBLIC
|
|||
ecs
|
||||
app
|
||||
math
|
||||
memory
|
||||
PRIVATE
|
||||
logger
|
||||
lt_debug
|
||||
|
|
Loading…
Add table
Reference in a new issue