mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-06-28 05:26:31 +02:00
xbzk/gpu-logging_qt-controls_android-fix (#4018)
5af7771f83-Bugfix: Made gpu_log_level global-only (was per-game switchable). Fixed Android non-determinism where a per-game profile silently overrode the global to Off and trapped GPULogger::Initialize() in a dead state, making shader dumps fail invisibly. Android per-game UI now hides the whole GPU logging block; Qt UI is untouched (global-only anyway). bf4aabe8ab-Refactor/Cleanup: Removed gpu_logging_enabled master toggle as redundant with gpu_log_level == Off. Introduced GPU::Logging::IsActive() helper, replaced 14 call sites across vk_*.cpp. Refactored LogShaderCompilation() to be text-only and extracted SPIR-V dumping into a standalone GPU::Logging::DumpSpirvShader() free function. No singleton dependency, gated only by gpu_log_shader_dumps. Now gpu_log_level and gpu_log_shader_dumps are fully orthogonal. Cleaned up Android (BooleanSetting, SettingsItem, presenter, 7 locale string files). 865a1c5027-Refactor: Renamed dump_shaders → dump_guest_shaders to disambiguate from gpu_log_shader_dumps. Updated Qt label to "Dump Guest (Maxwell) Shaders" and rewrote the tooltip to mention .ash, the DumpDir/shaders/ location, and nvdisasm. 7cab456fdf-Feature: Added Qt UI control for GPU log level in the Logging session. Added gpu_log_shader_dumps checkbox to the Graphics column right below dump_guest_shaders. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4018 Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
parent
629ebf1bde
commit
09b6b3b71e
29 changed files with 335 additions and 194 deletions
|
|
@ -81,8 +81,8 @@ void ConfigureDebug::SetConfiguration() {
|
|||
ui->enable_shader_feedback->setChecked(Settings::values.renderer_shader_feedback.GetValue());
|
||||
ui->enable_nsight_aftermath->setEnabled(runtime_lock);
|
||||
ui->enable_nsight_aftermath->setChecked(Settings::values.enable_nsight_aftermath.GetValue());
|
||||
ui->dump_shaders->setEnabled(runtime_lock);
|
||||
ui->dump_shaders->setChecked(Settings::values.dump_shaders.GetValue());
|
||||
ui->dump_guest_shaders->setEnabled(runtime_lock);
|
||||
ui->dump_guest_shaders->setChecked(Settings::values.dump_guest_shaders.GetValue());
|
||||
ui->dump_macros->setEnabled(runtime_lock);
|
||||
ui->dump_macros->setChecked(Settings::values.dump_macros.GetValue());
|
||||
ui->disable_macro_jit->setEnabled(runtime_lock);
|
||||
|
|
@ -94,6 +94,12 @@ void ConfigureDebug::SetConfiguration() {
|
|||
Settings::values.disable_shader_loop_safety_checks.GetValue());
|
||||
ui->perform_vulkan_check->setChecked(Settings::values.perform_vulkan_check.GetValue());
|
||||
ui->debug_knobs_spinbox->setValue(Settings::values.debug_knobs.GetValue());
|
||||
|
||||
ui->gpu_log_level->setEnabled(runtime_lock);
|
||||
ui->gpu_log_level->setCurrentIndex(
|
||||
static_cast<int>(Settings::values.gpu_log_level.GetValue()));
|
||||
ui->gpu_log_shader_dumps->setEnabled(runtime_lock);
|
||||
ui->gpu_log_shader_dumps->setChecked(Settings::values.gpu_log_shader_dumps.GetValue());
|
||||
#ifdef YUZU_USE_QT_WEB_ENGINE
|
||||
ui->disable_web_applet->setChecked(Settings::values.disable_web_applet.GetValue());
|
||||
#else
|
||||
|
|
@ -123,7 +129,7 @@ void ConfigureDebug::ApplyConfiguration() {
|
|||
Settings::values.disable_buffer_reorder = ui->disable_buffer_reorder->isChecked();
|
||||
Settings::values.renderer_shader_feedback = ui->enable_shader_feedback->isChecked();
|
||||
Settings::values.enable_nsight_aftermath = ui->enable_nsight_aftermath->isChecked();
|
||||
Settings::values.dump_shaders = ui->dump_shaders->isChecked();
|
||||
Settings::values.dump_guest_shaders = ui->dump_guest_shaders->isChecked();
|
||||
Settings::values.dump_macros = ui->dump_macros->isChecked();
|
||||
Settings::values.disable_shader_loop_safety_checks =
|
||||
ui->disable_loop_safety_checks->isChecked();
|
||||
|
|
@ -135,6 +141,9 @@ void ConfigureDebug::ApplyConfiguration() {
|
|||
Settings::values.serial_battery = ui->serial_battery_edit->text().toUInt();
|
||||
Settings::values.serial_unit = ui->serial_board_edit->text().toUInt();
|
||||
Settings::values.debug_knobs = ui->debug_knobs_spinbox->value();
|
||||
Settings::values.gpu_log_level =
|
||||
static_cast<Settings::GpuLogLevel>(ui->gpu_log_level->currentIndex());
|
||||
Settings::values.gpu_log_shader_dumps = ui->gpu_log_shader_dumps->isChecked();
|
||||
Debugger::ToggleConsole();
|
||||
Common::Log::Filter filter;
|
||||
filter.ParseFilterString(Settings::values.log_filter.GetValue());
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@
|
|||
<string>Logging</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_1">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<item row="0" column="0" colspan="4">
|
||||
<widget class="QWidget" name="logging_widget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
|
|
@ -197,7 +197,77 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QWidget" name="gpu_log_level_widget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="gpu_log_level_layout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="gpu_log_level_label">
|
||||
<property name="text">
|
||||
<string>GPU Logging/Level</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="gpu_log_level">
|
||||
<property name="toolTip">
|
||||
<string>Detail level for GPU logs. Off disables logging entirely.</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Off</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Errors</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Standard</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Verbose</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>All</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="toggle_console">
|
||||
<property name="text">
|
||||
<string>Show Log in Console</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QCheckBox" name="extended_logging">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
|
|
@ -210,15 +280,20 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="toggle_console">
|
||||
<property name="text">
|
||||
<string>Show Log in Console</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="open_log_button">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>250</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Open Log Location</string>
|
||||
</property>
|
||||
|
|
@ -270,7 +345,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<item row="9" column="0">
|
||||
<widget class="QCheckBox" name="dump_macros">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
|
|
@ -294,15 +369,15 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QCheckBox" name="dump_shaders">
|
||||
<widget class="QCheckBox" name="dump_guest_shaders">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>When checked, it will dump all the original assembler shaders from the disk shader cache or game as found</string>
|
||||
<string>When checked, it will dump original Maxwell guest shader bytecode (the input to the recompiler) as .ash files under DumpDir/shaders/. Useful for inspection with nvdisasm.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Dump Game Shaders</string>
|
||||
<string>Dump Guest (Maxwell) Shaders</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
@ -313,7 +388,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item row="8" column="0">
|
||||
<widget class="QCheckBox" name="disable_macro_jit">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
|
|
@ -326,7 +401,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<item row="10" column="0">
|
||||
<widget class="QCheckBox" name="disable_macro_hle">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
|
|
@ -352,7 +427,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<item row="11" column="0">
|
||||
<spacer name="verticalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
|
|
@ -388,6 +463,16 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QCheckBox" name="gpu_log_shader_dumps">
|
||||
<property name="toolTip">
|
||||
<string>When checked, it will dump the recompiler's output SPIR-V binaries (.spv) under LogDir/shaders/. Inspect via SPIRV-Tools (spirv-dis / spirv-cross / spirv-val) or RenderDoc.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Dump SPIR-V Shaders</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
@ -514,31 +599,65 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QSpinBox" name="debug_knobs_spinbox">
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>65535</number>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Bitmask for quick development toggles</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Set debug knobs (bitmask)</string>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string>16-bit debug knob set for quick development toggles</string>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> (bitmask)</string>
|
||||
</property>
|
||||
<property name="prefix">
|
||||
<string>Debug Knobs: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QWidget" name="debug_knobs_widget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_debug_knobs">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_debug_knobs">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Debug Knobs:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="debug_knobs_spinbox">
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>65535</number>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Bitmask for quick development toggles</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Set debug knobs (bitmask)</string>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string>16-bit debug knob set for quick development toggles</string>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> (bitmask)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QWidget" name="serial_board_widget" native="true">
|
||||
<property name="sizePolicy">
|
||||
|
|
@ -579,7 +698,7 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<item row="20" column="0">
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue