Compare commits

...

2 Commits

Author SHA1 Message Date
Stenzek 5337e46f43 Qt: Fix log window disabling itself on close 2024-03-08 23:43:13 +10:00
Stenzek 7ed6801101 VulkanDevice: Add additional semaphore on swap chain
We don't actually need +1 semaphores, or, more than one really.
But, the validation layer gets cranky if we don't fence wait before the next image acquire.
So, add an additional semaphore to ensure that we're never acquiring before fence waiting.
2024-03-08 23:42:58 +10:00
3 changed files with 9 additions and 18 deletions

View File

@ -76,7 +76,6 @@ void LogWindow::updateSettings()
}
else if (g_log_window)
{
g_log_window->m_destroying = true;
g_log_window->close();
g_log_window->deleteLater();
g_log_window = nullptr;
@ -89,7 +88,6 @@ void LogWindow::destroy()
if (!g_log_window)
return;
g_log_window->m_destroying = true;
g_log_window->close();
g_log_window->deleteLater();
g_log_window = nullptr;
@ -101,8 +99,6 @@ void LogWindow::reattachToMainWindow()
if (g_main_window->windowState() & (Qt::WindowMaximized | Qt::WindowFullScreen))
return;
resize(width(), g_main_window->height());
const QPoint new_pos = g_main_window->pos() + QPoint(g_main_window->width() + 10, 0);
if (pos() != new_pos)
move(new_pos);
@ -130,6 +126,7 @@ void LogWindow::updateWindowTitle()
void LogWindow::createUi()
{
setWindowIcon(QtHost::GetAppIcon());
setWindowFlag(Qt::WindowCloseButtonHint, false);
updateWindowTitle();
QAction* action;
@ -253,16 +250,7 @@ void LogWindow::closeEvent(QCloseEvent* event)
{
Log::SetHostOutputLevel(LOGLEVEL_NONE, nullptr);
// Save size when actually closing, disable ourselves if the user closed us.
if (m_destroying)
{
saveSize();
}
else
{
Host::SetBaseBoolSettingValue("Logging", "EnableLogWindow", false);
Host::CommitBaseSettingChanges();
}
saveSize();
QMainWindow::closeEvent(event);
}

View File

@ -48,7 +48,6 @@ private:
QMenu* m_level_menu;
bool m_attached_to_main_window = true;
bool m_destroying = false;
};
extern LogWindow* g_log_window;

View File

@ -442,9 +442,13 @@ bool VKSwapChain::CreateSwapChain()
m_images.push_back(std::move(texture));
}
m_semaphores.reserve(image_count);
m_current_semaphore = (image_count - 1);
for (u32 i = 0; i < image_count; i++)
// We don't actually need +1 semaphores, or, more than one really.
// But, the validation layer gets cranky if we don't fence wait before the next image acquire.
// So, add an additional semaphore to ensure that we're never acquiring before fence waiting.
const u32 semaphore_count = (image_count + 1);
m_semaphores.reserve(semaphore_count);
m_current_semaphore = 0;
for (u32 i = 0; i < semaphore_count; i++)
{
ImageSemaphores sema;