mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-05 08:52:36 +00:00
Add Vulkan debug options to the Debug tab
This commit is contained in:
parent
2837d848ed
commit
9fee8a666a
@ -267,18 +267,28 @@ bool vkValidationGpuEnabled() {
|
|||||||
return vkValidationGpu;
|
return vkValidationGpu;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool vkCrashDiagnosticEnabled() {
|
bool getVkCrashDiagnosticEnabled() {
|
||||||
return vkCrashDiagnostic;
|
return vkCrashDiagnostic;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool vkHostMarkersEnabled() {
|
bool getVkHostMarkersEnabled() {
|
||||||
// Forced on when crash diagnostic enabled.
|
return vkHostMarkers;
|
||||||
return vkHostMarkers || vkCrashDiagnostic;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool vkGuestMarkersEnabled() {
|
bool getVkGuestMarkersEnabled() {
|
||||||
// Forced on when crash diagnostic enabled.
|
return vkGuestMarkers;
|
||||||
return vkGuestMarkers || vkCrashDiagnostic;
|
}
|
||||||
|
|
||||||
|
void setVkCrashDiagnosticEnabled(bool enable) {
|
||||||
|
vkCrashDiagnostic = enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setVkHostMarkersEnabled(bool enable) {
|
||||||
|
vkHostMarkers = enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setVkGuestMarkersEnabled(bool enable) {
|
||||||
|
vkGuestMarkers = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool getSeparateUpdateEnabled() {
|
bool getSeparateUpdateEnabled() {
|
||||||
|
@ -106,9 +106,12 @@ void setRdocEnabled(bool enable);
|
|||||||
bool vkValidationEnabled();
|
bool vkValidationEnabled();
|
||||||
bool vkValidationSyncEnabled();
|
bool vkValidationSyncEnabled();
|
||||||
bool vkValidationGpuEnabled();
|
bool vkValidationGpuEnabled();
|
||||||
bool vkCrashDiagnosticEnabled();
|
bool getVkCrashDiagnosticEnabled();
|
||||||
bool vkHostMarkersEnabled();
|
bool getVkHostMarkersEnabled();
|
||||||
bool vkGuestMarkersEnabled();
|
bool getVkGuestMarkersEnabled();
|
||||||
|
void setVkCrashDiagnosticEnabled(bool enable);
|
||||||
|
void setVkHostMarkersEnabled(bool enable);
|
||||||
|
void setVkGuestMarkersEnabled(bool enable);
|
||||||
|
|
||||||
// Gui
|
// Gui
|
||||||
void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h);
|
void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h);
|
||||||
|
@ -66,9 +66,9 @@ Emulator::Emulator() {
|
|||||||
LOG_INFO(Config, "Vulkan vkValidation: {}", Config::vkValidationEnabled());
|
LOG_INFO(Config, "Vulkan vkValidation: {}", Config::vkValidationEnabled());
|
||||||
LOG_INFO(Config, "Vulkan vkValidationSync: {}", Config::vkValidationSyncEnabled());
|
LOG_INFO(Config, "Vulkan vkValidationSync: {}", Config::vkValidationSyncEnabled());
|
||||||
LOG_INFO(Config, "Vulkan vkValidationGpu: {}", Config::vkValidationGpuEnabled());
|
LOG_INFO(Config, "Vulkan vkValidationGpu: {}", Config::vkValidationGpuEnabled());
|
||||||
LOG_INFO(Config, "Vulkan crashDiagnostics: {}", Config::vkCrashDiagnosticEnabled());
|
LOG_INFO(Config, "Vulkan crashDiagnostics: {}", Config::getVkCrashDiagnosticEnabled());
|
||||||
LOG_INFO(Config, "Vulkan hostMarkers: {}", Config::vkHostMarkersEnabled());
|
LOG_INFO(Config, "Vulkan hostMarkers: {}", Config::getVkHostMarkersEnabled());
|
||||||
LOG_INFO(Config, "Vulkan guestMarkers: {}", Config::vkGuestMarkersEnabled());
|
LOG_INFO(Config, "Vulkan guestMarkers: {}", Config::getVkGuestMarkersEnabled());
|
||||||
LOG_INFO(Config, "Vulkan rdocEnable: {}", Config::isRdocEnabled());
|
LOG_INFO(Config, "Vulkan rdocEnable: {}", Config::isRdocEnabled());
|
||||||
|
|
||||||
// Create stdin/stdout/stderr
|
// Create stdin/stdout/stderr
|
||||||
|
@ -208,7 +208,7 @@ void Render(const vk::CommandBuffer& cmdbuf, const vk::ImageView& image_view,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config::vkHostMarkersEnabled()) {
|
if (Config::getVkHostMarkersEnabled()) {
|
||||||
cmdbuf.beginDebugUtilsLabelEXT(vk::DebugUtilsLabelEXT{
|
cmdbuf.beginDebugUtilsLabelEXT(vk::DebugUtilsLabelEXT{
|
||||||
.pLabelName = "ImGui Render",
|
.pLabelName = "ImGui Render",
|
||||||
});
|
});
|
||||||
@ -233,7 +233,7 @@ void Render(const vk::CommandBuffer& cmdbuf, const vk::ImageView& image_view,
|
|||||||
cmdbuf.beginRendering(render_info);
|
cmdbuf.beginRendering(render_info);
|
||||||
Vulkan::RenderDrawData(*draw_data, cmdbuf);
|
Vulkan::RenderDrawData(*draw_data, cmdbuf);
|
||||||
cmdbuf.endRendering();
|
cmdbuf.endRendering();
|
||||||
if (Config::vkHostMarkersEnabled()) {
|
if (Config::getVkHostMarkersEnabled()) {
|
||||||
cmdbuf.endDebugUtilsLabelEXT();
|
cmdbuf.endDebugUtilsLabelEXT();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -152,7 +152,7 @@ void WorkerLoop() {
|
|||||||
g_job_list.pop_front();
|
g_job_list.pop_front();
|
||||||
g_job_list_mtx.unlock();
|
g_job_list_mtx.unlock();
|
||||||
|
|
||||||
if (Config::vkCrashDiagnosticEnabled()) {
|
if (Config::getVkCrashDiagnosticEnabled()) {
|
||||||
// FIXME: Crash diagnostic hangs when building the command buffer here
|
// FIXME: Crash diagnostic hangs when building the command buffer here
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -285,6 +285,11 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices,
|
|||||||
ui->vkValidationCheckBox->installEventFilter(this);
|
ui->vkValidationCheckBox->installEventFilter(this);
|
||||||
ui->vkSyncValidationCheckBox->installEventFilter(this);
|
ui->vkSyncValidationCheckBox->installEventFilter(this);
|
||||||
ui->rdocCheckBox->installEventFilter(this);
|
ui->rdocCheckBox->installEventFilter(this);
|
||||||
|
ui->crashDiagnosticsCheckBox->installEventFilter(this);
|
||||||
|
ui->guestMarkersCheckBox->installEventFilter(this);
|
||||||
|
ui->hostMarkersCheckBox->installEventFilter(this);
|
||||||
|
ui->collectShaderCheckBox->installEventFilter(this);
|
||||||
|
ui->copyGPUBuffersCheckBox->installEventFilter(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -360,6 +365,15 @@ void SettingsDialog::LoadValuesFromConfig() {
|
|||||||
ui->vkSyncValidationCheckBox->setChecked(
|
ui->vkSyncValidationCheckBox->setChecked(
|
||||||
toml::find_or<bool>(data, "Vulkan", "validation_sync", false));
|
toml::find_or<bool>(data, "Vulkan", "validation_sync", false));
|
||||||
ui->rdocCheckBox->setChecked(toml::find_or<bool>(data, "Vulkan", "rdocEnable", false));
|
ui->rdocCheckBox->setChecked(toml::find_or<bool>(data, "Vulkan", "rdocEnable", false));
|
||||||
|
ui->crashDiagnosticsCheckBox->setChecked(
|
||||||
|
toml::find_or<bool>(data, "Vulkan", "crashDiagnostic", false));
|
||||||
|
ui->guestMarkersCheckBox->setChecked(
|
||||||
|
toml::find_or<bool>(data, "Vulkan", "guestMarkers", false));
|
||||||
|
ui->hostMarkersCheckBox->setChecked(toml::find_or<bool>(data, "Vulkan", "hostMarkers", false));
|
||||||
|
ui->copyGPUBuffersCheckBox->setChecked(
|
||||||
|
toml::find_or<bool>(data, "GPU", "copyGPUBuffers", false));
|
||||||
|
ui->collectShaderCheckBox->setChecked(
|
||||||
|
toml::find_or<bool>(data, "Debug", "CollectShader", false));
|
||||||
ui->enableCompatibilityCheckBox->setChecked(
|
ui->enableCompatibilityCheckBox->setChecked(
|
||||||
toml::find_or<bool>(data, "General", "compatibilityEnabled", false));
|
toml::find_or<bool>(data, "General", "compatibilityEnabled", false));
|
||||||
ui->checkCompatibilityOnStartupCheckBox->setChecked(
|
ui->checkCompatibilityOnStartupCheckBox->setChecked(
|
||||||
@ -380,7 +394,7 @@ void SettingsDialog::LoadValuesFromConfig() {
|
|||||||
|
|
||||||
std::string chooseHomeTab = toml::find_or<std::string>(data, "General", "chooseHomeTab", "");
|
std::string chooseHomeTab = toml::find_or<std::string>(data, "General", "chooseHomeTab", "");
|
||||||
ui->chooseHomeTabComboBox->setCurrentText(QString::fromStdString(chooseHomeTab));
|
ui->chooseHomeTabComboBox->setCurrentText(QString::fromStdString(chooseHomeTab));
|
||||||
QStringList tabNames = {tr("General"), tr("Gui"), tr("Graphics"), tr("User"),
|
QStringList tabNames = {tr("General"), tr("GUI"), tr("Graphics"), tr("User"),
|
||||||
tr("Input"), tr("Paths"), tr("Debug")};
|
tr("Input"), tr("Paths"), tr("Debug")};
|
||||||
QString chooseHomeTabQString = QString::fromStdString(chooseHomeTab);
|
QString chooseHomeTabQString = QString::fromStdString(chooseHomeTab);
|
||||||
int indexTab = tabNames.indexOf(chooseHomeTabQString);
|
int indexTab = tabNames.indexOf(chooseHomeTabQString);
|
||||||
@ -549,8 +563,16 @@ void SettingsDialog::updateNoteTextEdit(const QString& elementName) {
|
|||||||
text = tr("vkValidationCheckBox");
|
text = tr("vkValidationCheckBox");
|
||||||
} else if (elementName == "vkSyncValidationCheckBox") {
|
} else if (elementName == "vkSyncValidationCheckBox") {
|
||||||
text = tr("vkSyncValidationCheckBox");
|
text = tr("vkSyncValidationCheckBox");
|
||||||
} else if (elementName == "rdocCheckBox") {
|
} else if (elementName == "crashDiagnosticsCheckBox") {
|
||||||
text = tr("rdocCheckBox");
|
text = tr("crashDiagnosticsCheckBox");
|
||||||
|
} else if (elementName == "guestMarkersCheckBox") {
|
||||||
|
text = tr("guestMarkersCheckBox");
|
||||||
|
} else if (elementName == "hostMarkersCheckBox") {
|
||||||
|
text = tr("hostMarkersCheckBox");
|
||||||
|
} else if (elementName == "copyGPUBuffersCheckBox") {
|
||||||
|
text = tr("copyGPUBuffersCheckBox");
|
||||||
|
} else if (elementName == "collectShaderCheckBox") {
|
||||||
|
text = tr("collectShaderCheckBox");
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->descriptionText->setText(text.replace("\\n", "\n"));
|
ui->descriptionText->setText(text.replace("\\n", "\n"));
|
||||||
@ -604,6 +626,11 @@ void SettingsDialog::UpdateSettings() {
|
|||||||
Config::setVkValidation(ui->vkValidationCheckBox->isChecked());
|
Config::setVkValidation(ui->vkValidationCheckBox->isChecked());
|
||||||
Config::setVkSyncValidation(ui->vkSyncValidationCheckBox->isChecked());
|
Config::setVkSyncValidation(ui->vkSyncValidationCheckBox->isChecked());
|
||||||
Config::setRdocEnabled(ui->rdocCheckBox->isChecked());
|
Config::setRdocEnabled(ui->rdocCheckBox->isChecked());
|
||||||
|
Config::setVkHostMarkersEnabled(ui->hostMarkersCheckBox->isChecked());
|
||||||
|
Config::setVkGuestMarkersEnabled(ui->guestMarkersCheckBox->isChecked());
|
||||||
|
Config::setVkCrashDiagnosticEnabled(ui->crashDiagnosticsCheckBox->isChecked());
|
||||||
|
Config::setCollectShaderForDebug(ui->collectShaderCheckBox->isChecked());
|
||||||
|
Config::setCopyGPUCmdBuffers(ui->copyGPUBuffersCheckBox->isChecked());
|
||||||
Config::setAutoUpdate(ui->updateCheckBox->isChecked());
|
Config::setAutoUpdate(ui->updateCheckBox->isChecked());
|
||||||
Config::setUpdateChannel(ui->updateComboBox->currentText().toStdString());
|
Config::setUpdateChannel(ui->updateComboBox->currentText().toStdString());
|
||||||
Config::setChooseHomeTab(ui->chooseHomeTabComboBox->currentText().toStdString());
|
Config::setChooseHomeTab(ui->chooseHomeTabComboBox->currentText().toStdString());
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>970</width>
|
<width>970</width>
|
||||||
<height>600</height>
|
<height>750</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -74,7 +74,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>946</width>
|
||||||
<height>386</height>
|
<height>535</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="generalTabVLayout" stretch="0">
|
<layout class="QVBoxLayout" name="generalTabVLayout" stretch="0">
|
||||||
@ -476,15 +476,15 @@
|
|||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Gui</string>
|
<string>GUI</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<widget class="QWidget" name="guiTabContents">
|
<widget class="QWidget" name="guiTabContents">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>676</width>
|
||||||
<height>386</height>
|
<height>381</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="guiTabVLayout" stretch="0">
|
<layout class="QVBoxLayout" name="guiTabVLayout" stretch="0">
|
||||||
@ -546,7 +546,7 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Gui</string>
|
<string>GUI</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -809,8 +809,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>563</width>
|
||||||
<height>386</height>
|
<height>143</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="graphicsTabVLayout" stretch="0,0">
|
<layout class="QVBoxLayout" name="graphicsTabVLayout" stretch="0,0">
|
||||||
@ -1053,8 +1053,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>244</width>
|
||||||
<height>386</height>
|
<height>295</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="debugTabVLayout" stretch="0,0,1">
|
<layout class="QVBoxLayout" name="debugTabVLayout" stretch="0,0,1">
|
||||||
@ -1197,8 +1197,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>475</width>
|
||||||
<height>386</height>
|
<height>253</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="inputTabVLayout" stretch="0,0">
|
<layout class="QVBoxLayout" name="inputTabVLayout" stretch="0,0">
|
||||||
@ -1481,8 +1481,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>216</width>
|
||||||
<height>386</height>
|
<height>256</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="pathsTabLayout">
|
<layout class="QVBoxLayout" name="pathsTabLayout">
|
||||||
@ -1571,11 +1571,11 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>534</width>
|
||||||
<height>386</height>
|
<height>477</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="debugTabVLayout" stretch="0,1">
|
<layout class="QVBoxLayout" name="debugTabVLayout" stretch="0,0">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
@ -1585,7 +1585,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="debugTabHLayout" stretch="1">
|
<layout class="QHBoxLayout" name="debugTabHLayout" stretch="0">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="debugTabGroupBox">
|
<widget class="QGroupBox" name="debugTabGroupBox">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
@ -1728,20 +1728,57 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="debugTabSpacer">
|
<widget class="QGroupBox" name="advancedGroupBox">
|
||||||
<property name="orientation">
|
<property name="sizePolicy">
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType">
|
<property name="title">
|
||||||
<enum>QSizePolicy::Policy::MinimumExpanding</enum>
|
<string>Advanced</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="alignment">
|
||||||
<size>
|
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop</set>
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
<layout class="QVBoxLayout" name="advancedLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="crashDiagnosticsCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable Crash Diagnostics</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="collectShaderCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Collect Shaders</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="copyGPUBuffersCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Copy GPU Buffers</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="hostMarkersCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Host Debug Markers</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="guestMarkersCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Guest Debug Markers</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -928,6 +928,26 @@
|
|||||||
<source>rdocCheckBox</source>
|
<source>rdocCheckBox</source>
|
||||||
<translation>Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame.</translation>
|
<translation>Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame.</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>collectShaderCheckBox</source>
|
||||||
|
<translation>You need this enabled to edit shaders with the debug menu (Ctrl + F10).</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>crashDiagnosticsCheckBox</source>
|
||||||
|
<translation>Creates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>copyGPUBuffersCheckBox</source>
|
||||||
|
<translation>Gets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>hostMarkersCheckBox</source>
|
||||||
|
<translation>Inserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>guestMarkersCheckBox</source>
|
||||||
|
<translation>Inserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc.</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>saveDataBox</source>
|
<source>saveDataBox</source>
|
||||||
<translation>Save Data Path:\nThe folder where game save data will be saved.</translation>
|
<translation>Save Data Path:\nThe folder where game save data will be saved.</translation>
|
||||||
|
@ -33,7 +33,7 @@ concept VulkanHandleType = vk::isVulkanHandleType<T>::value;
|
|||||||
|
|
||||||
template <VulkanHandleType HandleType>
|
template <VulkanHandleType HandleType>
|
||||||
void SetObjectName(vk::Device device, const HandleType& handle, std::string_view debug_name) {
|
void SetObjectName(vk::Device device, const HandleType& handle, std::string_view debug_name) {
|
||||||
if (!Config::vkHostMarkersEnabled()) {
|
if (!Config::getVkHostMarkersEnabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const vk::DebugUtilsObjectNameInfoEXT name_info = {
|
const vk::DebugUtilsObjectNameInfoEXT name_info = {
|
||||||
@ -50,7 +50,7 @@ void SetObjectName(vk::Device device, const HandleType& handle, std::string_view
|
|||||||
template <VulkanHandleType HandleType, typename... Args>
|
template <VulkanHandleType HandleType, typename... Args>
|
||||||
void SetObjectName(vk::Device device, const HandleType& handle, const char* format,
|
void SetObjectName(vk::Device device, const HandleType& handle, const char* format,
|
||||||
const Args&... args) {
|
const Args&... args) {
|
||||||
if (!Config::vkHostMarkersEnabled()) {
|
if (!Config::getVkHostMarkersEnabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const std::string debug_name = fmt::vformat(format, fmt::make_format_args(args...));
|
const std::string debug_name = fmt::vformat(format, fmt::make_format_args(args...));
|
||||||
|
@ -294,7 +294,7 @@ void Presenter::CreatePostProcessPipeline() {
|
|||||||
Presenter::Presenter(Frontend::WindowSDL& window_, AmdGpu::Liverpool* liverpool_)
|
Presenter::Presenter(Frontend::WindowSDL& window_, AmdGpu::Liverpool* liverpool_)
|
||||||
: window{window_}, liverpool{liverpool_},
|
: window{window_}, liverpool{liverpool_},
|
||||||
instance{window, Config::getGpuId(), Config::vkValidationEnabled(),
|
instance{window, Config::getGpuId(), Config::vkValidationEnabled(),
|
||||||
Config::vkCrashDiagnosticEnabled()},
|
Config::getVkCrashDiagnosticEnabled()},
|
||||||
draw_scheduler{instance}, present_scheduler{instance}, flip_scheduler{instance},
|
draw_scheduler{instance}, present_scheduler{instance}, flip_scheduler{instance},
|
||||||
swapchain{instance, window},
|
swapchain{instance, window},
|
||||||
rasterizer{std::make_unique<Rasterizer>(instance, draw_scheduler, liverpool)},
|
rasterizer{std::make_unique<Rasterizer>(instance, draw_scheduler, liverpool)},
|
||||||
@ -467,7 +467,7 @@ bool Presenter::ShowSplash(Frame* frame /*= nullptr*/) {
|
|||||||
draw_scheduler.EndRendering();
|
draw_scheduler.EndRendering();
|
||||||
const auto cmdbuf = draw_scheduler.CommandBuffer();
|
const auto cmdbuf = draw_scheduler.CommandBuffer();
|
||||||
|
|
||||||
if (Config::vkHostMarkersEnabled()) {
|
if (Config::getVkHostMarkersEnabled()) {
|
||||||
cmdbuf.beginDebugUtilsLabelEXT(vk::DebugUtilsLabelEXT{
|
cmdbuf.beginDebugUtilsLabelEXT(vk::DebugUtilsLabelEXT{
|
||||||
.pLabelName = "ShowSplash",
|
.pLabelName = "ShowSplash",
|
||||||
});
|
});
|
||||||
@ -541,7 +541,7 @@ bool Presenter::ShowSplash(Frame* frame /*= nullptr*/) {
|
|||||||
.pImageMemoryBarriers = &post_barrier,
|
.pImageMemoryBarriers = &post_barrier,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (Config::vkHostMarkersEnabled()) {
|
if (Config::getVkHostMarkersEnabled()) {
|
||||||
cmdbuf.endDebugUtilsLabelEXT();
|
cmdbuf.endDebugUtilsLabelEXT();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -573,7 +573,7 @@ Frame* Presenter::PrepareFrameInternal(VideoCore::ImageId image_id, bool is_eop)
|
|||||||
auto& scheduler = is_eop ? draw_scheduler : flip_scheduler;
|
auto& scheduler = is_eop ? draw_scheduler : flip_scheduler;
|
||||||
scheduler.EndRendering();
|
scheduler.EndRendering();
|
||||||
const auto cmdbuf = scheduler.CommandBuffer();
|
const auto cmdbuf = scheduler.CommandBuffer();
|
||||||
if (Config::vkHostMarkersEnabled()) {
|
if (Config::getVkHostMarkersEnabled()) {
|
||||||
const auto label = fmt::format("PrepareFrameInternal:{}", image_id.index);
|
const auto label = fmt::format("PrepareFrameInternal:{}", image_id.index);
|
||||||
cmdbuf.beginDebugUtilsLabelEXT(vk::DebugUtilsLabelEXT{
|
cmdbuf.beginDebugUtilsLabelEXT(vk::DebugUtilsLabelEXT{
|
||||||
.pLabelName = label.c_str(),
|
.pLabelName = label.c_str(),
|
||||||
@ -704,7 +704,7 @@ Frame* Presenter::PrepareFrameInternal(VideoCore::ImageId image_id, bool is_eop)
|
|||||||
.pImageMemoryBarriers = &post_barrier,
|
.pImageMemoryBarriers = &post_barrier,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (Config::vkHostMarkersEnabled()) {
|
if (Config::getVkHostMarkersEnabled()) {
|
||||||
cmdbuf.endDebugUtilsLabelEXT();
|
cmdbuf.endDebugUtilsLabelEXT();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -755,7 +755,7 @@ void Presenter::Present(Frame* frame, bool is_reusing_frame) {
|
|||||||
auto& scheduler = present_scheduler;
|
auto& scheduler = present_scheduler;
|
||||||
const auto cmdbuf = scheduler.CommandBuffer();
|
const auto cmdbuf = scheduler.CommandBuffer();
|
||||||
|
|
||||||
if (Config::vkHostMarkersEnabled()) {
|
if (Config::getVkHostMarkersEnabled()) {
|
||||||
cmdbuf.beginDebugUtilsLabelEXT(vk::DebugUtilsLabelEXT{
|
cmdbuf.beginDebugUtilsLabelEXT(vk::DebugUtilsLabelEXT{
|
||||||
.pLabelName = "Present",
|
.pLabelName = "Present",
|
||||||
});
|
});
|
||||||
@ -857,7 +857,7 @@ void Presenter::Present(Frame* frame, bool is_reusing_frame) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config::vkHostMarkersEnabled()) {
|
if (Config::getVkHostMarkersEnabled()) {
|
||||||
cmdbuf.endDebugUtilsLabelEXT();
|
cmdbuf.endDebugUtilsLabelEXT();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1242,8 +1242,8 @@ void Rasterizer::UpdateViewportScissorState(const GraphicsPipeline& pipeline) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Rasterizer::ScopeMarkerBegin(const std::string_view& str, bool from_guest) {
|
void Rasterizer::ScopeMarkerBegin(const std::string_view& str, bool from_guest) {
|
||||||
if ((from_guest && !Config::vkGuestMarkersEnabled()) ||
|
if ((from_guest && !Config::getVkGuestMarkersEnabled()) ||
|
||||||
(!from_guest && !Config::vkHostMarkersEnabled())) {
|
(!from_guest && !Config::getVkHostMarkersEnabled())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto cmdbuf = scheduler.CommandBuffer();
|
const auto cmdbuf = scheduler.CommandBuffer();
|
||||||
@ -1253,8 +1253,8 @@ void Rasterizer::ScopeMarkerBegin(const std::string_view& str, bool from_guest)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Rasterizer::ScopeMarkerEnd(bool from_guest) {
|
void Rasterizer::ScopeMarkerEnd(bool from_guest) {
|
||||||
if ((from_guest && !Config::vkGuestMarkersEnabled()) ||
|
if ((from_guest && !Config::getVkGuestMarkersEnabled()) ||
|
||||||
(!from_guest && !Config::vkHostMarkersEnabled())) {
|
(!from_guest && !Config::getVkHostMarkersEnabled())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto cmdbuf = scheduler.CommandBuffer();
|
const auto cmdbuf = scheduler.CommandBuffer();
|
||||||
@ -1262,8 +1262,8 @@ void Rasterizer::ScopeMarkerEnd(bool from_guest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Rasterizer::ScopedMarkerInsert(const std::string_view& str, bool from_guest) {
|
void Rasterizer::ScopedMarkerInsert(const std::string_view& str, bool from_guest) {
|
||||||
if ((from_guest && !Config::vkGuestMarkersEnabled()) ||
|
if ((from_guest && !Config::getVkGuestMarkersEnabled()) ||
|
||||||
(!from_guest && !Config::vkHostMarkersEnabled())) {
|
(!from_guest && !Config::getVkHostMarkersEnabled())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto cmdbuf = scheduler.CommandBuffer();
|
const auto cmdbuf = scheduler.CommandBuffer();
|
||||||
@ -1274,8 +1274,8 @@ void Rasterizer::ScopedMarkerInsert(const std::string_view& str, bool from_guest
|
|||||||
|
|
||||||
void Rasterizer::ScopedMarkerInsertColor(const std::string_view& str, const u32 color,
|
void Rasterizer::ScopedMarkerInsertColor(const std::string_view& str, const u32 color,
|
||||||
bool from_guest) {
|
bool from_guest) {
|
||||||
if ((from_guest && !Config::vkGuestMarkersEnabled()) ||
|
if ((from_guest && !Config::getVkGuestMarkersEnabled()) ||
|
||||||
(!from_guest && !Config::vkHostMarkersEnabled())) {
|
(!from_guest && !Config::getVkHostMarkersEnabled())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto cmdbuf = scheduler.CommandBuffer();
|
const auto cmdbuf = scheduler.CommandBuffer();
|
||||||
|
Loading…
Reference in New Issue
Block a user