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
|
try
|
||||||
{
|
{
|
||||||
log_trc("Fucking destructing shit at address: {}", (size_t)this);
|
|
||||||
|
|
||||||
|
|
||||||
if (m_device)
|
if (m_device)
|
||||||
{
|
{
|
||||||
vkc(vk_device_wait_idle(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_surface_khr(m_instance, m_surface, nullptr);
|
||||||
vk_destroy_debug_messenger(m_instance, m_debug_messenger, nullptr);
|
vk_destroy_debug_messenger(m_instance, m_debug_messenger, nullptr);
|
||||||
vk_destroy_instance(m_instance, nullptr);
|
// vk_destroy_instance(m_instance, nullptr);
|
||||||
}
|
|
||||||
|
|
||||||
if (library)
|
|
||||||
{
|
|
||||||
dlclose(library);
|
|
||||||
library = nullptr;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (const std::exception &exp)
|
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));
|
vkc(vk_create_xlib_surface_khr(m_instance, &create_info, nullptr, &m_surface));
|
||||||
|
|
||||||
const auto &[width, height] = component.get_resolution();
|
const auto &[width, height] = component.get_resolution();
|
||||||
log_dbg("{} x {}", width, height);
|
|
||||||
m_framebuffer_size = {
|
m_framebuffer_size = {
|
||||||
.width = width,
|
.width = width,
|
||||||
.height = height,
|
.height = height,
|
||||||
|
@ -636,7 +626,7 @@ auto validation_layers_callback(
|
||||||
) -> VkBool32
|
) -> VkBool32
|
||||||
{
|
{
|
||||||
log_dbg("VALIDATION: {}", callback_data->pMessage);
|
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
|
auto stats = *(Ref<app::SystemStats> *)vulkan_user_data; // NOLINT
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ target_link_libraries(surface PUBLIC
|
||||||
ecs
|
ecs
|
||||||
app
|
app
|
||||||
math
|
math
|
||||||
|
memory
|
||||||
PRIVATE
|
PRIVATE
|
||||||
logger
|
logger
|
||||||
lt_debug
|
lt_debug
|
||||||
|
|
Loading…
Add table
Reference in a new issue