From 5f372d6b1df2a6c87cf54e4f6eeb5c0e12383739 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 19 Jun 2026 11:37:04 +0200 Subject: VideoCommon: Reduce padding in PresentInfo This makes the struct 8 bytes smaller. --- Source/Core/VideoCommon/Present.cpp | 2 +- Source/Core/VideoCommon/VideoEvents.h | 40 +++++++++++++++++------------------ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Source/Core/VideoCommon/Present.cpp b/Source/Core/VideoCommon/Present.cpp index 7c62730667..f74b9a8fa4 100644 --- a/Source/Core/VideoCommon/Present.cpp +++ b/Source/Core/VideoCommon/Present.cpp @@ -234,9 +234,9 @@ void Presenter::ImmediateSwap(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_ PresentInfo present_info{ .frame_count = m_frame_count++, .present_count = m_present_count++, - .reason = PresentInfo::PresentReason::Immediate, .emulated_timestamp = ticks, .intended_present_time = m_next_swap_estimated_time, + .reason = PresentInfo::PresentReason::Immediate, }; auto& video_events = GetVideoEvents(); diff --git a/Source/Core/VideoCommon/VideoEvents.h b/Source/Core/VideoCommon/VideoEvents.h index fe30aa251b..f07ac631e4 100644 --- a/Source/Core/VideoCommon/VideoEvents.h +++ b/Source/Core/VideoCommon/VideoEvents.h @@ -16,6 +16,23 @@ class System; struct PresentInfo { + enum class PresentTimeAccuracy + { + // The Driver/OS has given us an exact timestamp of when the first line of the frame started + // scanning out to the monitor + PresentOnScreenExact, + + // An approximate timestamp of scanout. + PresentOnScreen, + + // Dolphin doesn't have visibility of the present time. But the present operation has + // been queued with the GPU driver and will happen in the near future. + PresentInProgress, + + // Not implemented + Unimplemented, + }; + enum class PresentReason { Immediate, // FIFO is Presenting the XFB immediately, straight after the XFB copy @@ -30,9 +47,6 @@ struct PresentInfo // never goes backwards. u64 present_count = 0; - // The frame is identical to the previous frame - PresentReason reason = PresentReason::Immediate; - // The exact emulated time of the when real hardware would have presented this frame u64 emulated_timestamp = 0; @@ -41,26 +55,12 @@ struct PresentInfo // AfterPresent only: The actual time the frame was presented TimePoint actual_present_time{}; - enum class PresentTimeAccuracy - { - // The Driver/OS has given us an exact timestamp of when the first line of the frame started - // scanning out to the monitor - PresentOnScreenExact, - - // An approximate timestamp of scanout. - PresentOnScreen, - - // Dolphin doesn't have visibility of the present time. But the present operation has - // been queued with the GPU driver and will happen in the near future. - PresentInProgress, - - // Not implemented - Unimplemented, - }; - // Accuracy of actual_present_time PresentTimeAccuracy present_time_accuracy = PresentTimeAccuracy::Unimplemented; + // Where the presentation of the frame was triggered from + PresentReason reason = PresentReason::Immediate; + std::vector xfb_copy_hashes; }; -- cgit v1.2.3 From c958dbc46cd93b24aa9c63332739b4040880c711 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 19 Jun 2026 12:27:38 +0200 Subject: VideoCommon: Use XFB for internal resolution stats fb4ff3e added a statistics option to show the internal resolution, but it just showed the total size of the EFB (which is always 640x528) times the IR scale, so it didn't convey any useful information. This commit instead makes the option use the size of the last XFB copy (not multiplied by the IR scale), which changes based on the game's rendering resolution. --- Source/Core/Core/Core.cpp | 3 +++ Source/Core/VideoCommon/PerformanceMetrics.cpp | 25 +++++++------------------ Source/Core/VideoCommon/PerformanceMetrics.h | 10 ++++++++-- Source/Core/VideoCommon/Present.cpp | 4 ++++ Source/Core/VideoCommon/VideoEvents.h | 3 +++ 5 files changed, 25 insertions(+), 20 deletions(-) diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index cebcc748ec..1b50796e34 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -863,6 +863,9 @@ void Callback_FramePresented(const PresentInfo& present_info) present_info.actual_present_time - present_info.intended_present_time; perf_metrics.SetLatestFramePresentationOffset(presentation_offset); + perf_metrics.SetLatestFrameBufferSize(present_info.frame_buffer_width, + present_info.frame_buffer_height); + if (present_info.reason == PresentInfo::PresentReason::VideoInterfaceDuplicate) return; diff --git a/Source/Core/VideoCommon/PerformanceMetrics.cpp b/Source/Core/VideoCommon/PerformanceMetrics.cpp index fccc8ae38e..b94fc6fade 100644 --- a/Source/Core/VideoCommon/PerformanceMetrics.cpp +++ b/Source/Core/VideoCommon/PerformanceMetrics.cpp @@ -11,7 +11,6 @@ #include "Common/HookableEvent.h" #include "Core/Config/GraphicsSettings.h" #include "Core/Core.h" -#include "VideoCommon/FramebufferManager.h" #include "VideoCommon/VideoConfig.h" PerformanceMetrics::PerformanceMetrics() @@ -89,20 +88,6 @@ double PerformanceMetrics::GetFPS() const return m_fps_counter.GetHzAvg(); } -u32 PerformanceMetrics::GetEFBWidth() const -{ - if (g_framebuffer_manager) - return g_framebuffer_manager->GetEFBWidth(); - return 0; -} - -u32 PerformanceMetrics::GetEFBHeight() const -{ - if (g_framebuffer_manager) - return g_framebuffer_manager->GetEFBHeight(); - return 0; -} - double PerformanceMetrics::GetVPS() const { return m_vps_counter.GetHzAvg(); @@ -123,6 +108,11 @@ void PerformanceMetrics::SetLatestFramePresentationOffset(DT offset) m_frame_presentation_offset.store(offset, std::memory_order_relaxed); } +void PerformanceMetrics::SetLatestFrameBufferSize(u32 width, u32 height) +{ + m_frame_buffer_size.store(FrameBufferSize{width, height}, std::memory_order_relaxed); +} + void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale) { m_vps_counter.UpdateStats(); @@ -139,8 +129,6 @@ void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale) const double fps = GetFPS(); const double vps = GetVPS(); const double speed = GetSpeed(); - const u32 width = GetEFBWidth(); - const u32 height = GetEFBHeight(); static ImVec2 last_display_size(-1.0f, -1.0f); @@ -350,7 +338,8 @@ void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale) clamp_window_position(); - ImGui::TextColored(ImVec4(r, g, b, 1.0f), "Res: %ux%u", width, height); + const FrameBufferSize size = m_frame_buffer_size.load(std::memory_order_relaxed); + ImGui::TextColored(ImVec4(r, g, b, 1.0f), "XFB res: %ux%u", size.width, size.height); } ImGui::End(); } diff --git a/Source/Core/VideoCommon/PerformanceMetrics.h b/Source/Core/VideoCommon/PerformanceMetrics.h index 538360a05b..b24c6f6659 100644 --- a/Source/Core/VideoCommon/PerformanceMetrics.h +++ b/Source/Core/VideoCommon/PerformanceMetrics.h @@ -41,15 +41,20 @@ public: double GetVPS() const; double GetSpeed() const; double GetMaxSpeed() const; - u32 GetEFBWidth() const; - u32 GetEFBHeight() const; // Call from any thread. void SetLatestFramePresentationOffset(DT offset); + void SetLatestFrameBufferSize(u32 width, u32 height); // ImGui Functions void DrawImGuiStats(const float backbuffer_scale); private: + struct FrameBufferSize + { + u32 width = 0; + u32 height = 0; + }; + PerformanceTracker m_fps_counter{"render_times.txt"}; PerformanceTracker m_vps_counter{"vblank_times.txt"}; @@ -59,6 +64,7 @@ private: std::atomic m_max_speed{}; std::atomic
m_frame_presentation_offset{}; + std::atomic m_frame_buffer_size{}; struct PerfSample { diff --git a/Source/Core/VideoCommon/Present.cpp b/Source/Core/VideoCommon/Present.cpp index f74b9a8fa4..41d05f3652 100644 --- a/Source/Core/VideoCommon/Present.cpp +++ b/Source/Core/VideoCommon/Present.cpp @@ -174,6 +174,8 @@ void Presenter::ViSwap(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_height, .present_count = m_present_count++, .emulated_timestamp = ticks, .intended_present_time = presentation_time, + .frame_buffer_width = fb_width, + .frame_buffer_height = fb_height, }; if (is_duplicate) @@ -237,6 +239,8 @@ void Presenter::ImmediateSwap(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_ .emulated_timestamp = ticks, .intended_present_time = m_next_swap_estimated_time, .reason = PresentInfo::PresentReason::Immediate, + .frame_buffer_width = fb_width, + .frame_buffer_height = fb_height, }; auto& video_events = GetVideoEvents(); diff --git a/Source/Core/VideoCommon/VideoEvents.h b/Source/Core/VideoCommon/VideoEvents.h index f07ac631e4..f037dc266d 100644 --- a/Source/Core/VideoCommon/VideoEvents.h +++ b/Source/Core/VideoCommon/VideoEvents.h @@ -61,6 +61,9 @@ struct PresentInfo // Where the presentation of the frame was triggered from PresentReason reason = PresentReason::Immediate; + u32 frame_buffer_width; + u32 frame_buffer_height; + std::vector xfb_copy_hashes; }; -- cgit v1.2.3 From 6f72de3579c9420e8255649c76ad234555cd50c9 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 19 Jun 2026 12:31:46 +0200 Subject: VideoCommon: Show internal resolution stats below VPS It looked a bit out of place wedged in between the FPS and VPS. --- Source/Core/VideoCommon/PerformanceMetrics.cpp | 36 +++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Source/Core/VideoCommon/PerformanceMetrics.cpp b/Source/Core/VideoCommon/PerformanceMetrics.cpp index b94fc6fade..98efa64108 100644 --- a/Source/Core/VideoCommon/PerformanceMetrics.cpp +++ b/Source/Core/VideoCommon/PerformanceMetrics.cpp @@ -323,50 +323,50 @@ void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale) ImGui::End(); } - if (g_ActiveConfig.bShowInternalResolution) + if (g_ActiveConfig.bShowVPS || g_ActiveConfig.bShowVTimes) { + // Position in the top-right corner of the screen. ImGui::SetNextWindowPos(ImVec2(window_x, window_y), set_next_position_condition, ImVec2(1.0f, 0.0f)); ImGui::SetNextWindowBgAlpha(bg_alpha); - if (ImGui::Begin("ResolutionStats", nullptr, imgui_flags)) + if (ImGui::Begin("VPSStats", nullptr, imgui_flags)) { if (stack_vertically) window_y += ImGui::GetWindowHeight() + window_padding; else window_x -= ImGui::GetWindowWidth() + window_padding; - clamp_window_position(); - - const FrameBufferSize size = m_frame_buffer_size.load(std::memory_order_relaxed); - ImGui::TextColored(ImVec4(r, g, b, 1.0f), "XFB res: %ux%u", size.width, size.height); + if (g_ActiveConfig.bShowVPS) + ImGui::TextColored(ImVec4(r, g, b, 1.0f), "VPS:%7.2lf", vps); + if (g_ActiveConfig.bShowVTimes) + { + ImGui::TextColored(ImVec4(r, g, b, 1.0f), "dt:%6.2lfms", + DT_ms(m_vps_counter.GetDtAvg()).count()); + ImGui::TextColored(ImVec4(r, g, b, 1.0f), " ±:%6.2lfms", + DT_ms(m_vps_counter.GetDtStd()).count()); + } } ImGui::End(); } - if (g_ActiveConfig.bShowVPS || g_ActiveConfig.bShowVTimes) + if (g_ActiveConfig.bShowInternalResolution) { - // Position in the top-right corner of the screen. ImGui::SetNextWindowPos(ImVec2(window_x, window_y), set_next_position_condition, ImVec2(1.0f, 0.0f)); ImGui::SetNextWindowBgAlpha(bg_alpha); - if (ImGui::Begin("VPSStats", nullptr, imgui_flags)) + if (ImGui::Begin("ResolutionStats", nullptr, imgui_flags)) { if (stack_vertically) window_y += ImGui::GetWindowHeight() + window_padding; else window_x -= ImGui::GetWindowWidth() + window_padding; + clamp_window_position(); - if (g_ActiveConfig.bShowVPS) - ImGui::TextColored(ImVec4(r, g, b, 1.0f), "VPS:%7.2lf", vps); - if (g_ActiveConfig.bShowVTimes) - { - ImGui::TextColored(ImVec4(r, g, b, 1.0f), "dt:%6.2lfms", - DT_ms(m_vps_counter.GetDtAvg()).count()); - ImGui::TextColored(ImVec4(r, g, b, 1.0f), " ±:%6.2lfms", - DT_ms(m_vps_counter.GetDtStd()).count()); - } + + const FrameBufferSize size = m_frame_buffer_size.load(std::memory_order_relaxed); + ImGui::TextColored(ImVec4(r, g, b, 1.0f), "XFB res: %ux%u", size.width, size.height); } ImGui::End(); } -- cgit v1.2.3 From aff4d18d5932e9cf65d0fe8b5752fd709c302a01 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 19 Jun 2026 12:35:56 +0200 Subject: Move the code for the show internal resolution setting fb4ff3e put all the code for the show internal resolution setting right next to the code for the show FPS setting, presumably because an earlier version of that commit had them next to each other in the GUI. It makes more conceptual sense to put the code next to the code for the show statistics settings, matching what the GUI looks like now. --- Source/Core/Core/Config/GraphicsSettings.cpp | 4 ++-- Source/Core/Core/Config/GraphicsSettings.h | 2 +- Source/Core/DolphinQt/Settings/OnScreenDisplayPane.cpp | 15 +++++++-------- Source/Core/DolphinQt/Settings/OnScreenDisplayPane.h | 2 +- Source/Core/VideoCommon/VideoConfig.cpp | 2 +- Source/Core/VideoCommon/VideoConfig.h | 2 +- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Source/Core/Core/Config/GraphicsSettings.cpp b/Source/Core/Core/Config/GraphicsSettings.cpp index fb7f6a872b..f91b87e490 100644 --- a/Source/Core/Core/Config/GraphicsSettings.cpp +++ b/Source/Core/Core/Config/GraphicsSettings.cpp @@ -43,8 +43,6 @@ const Info GFX_CROP_CUSTOM_BOTTOM{{System::GFX, "Settings", "CropCustomBott const Info GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES{ {System::GFX, "Settings", "SafeTextureCacheColorSamples"}, 128}; const Info GFX_SHOW_FPS{{System::GFX, "Settings", "ShowFPS"}, false}; -const Info GFX_SHOW_INTERNAL_RESOLUTION{{System::GFX, "Settings", "ShowInternalResolution"}, - false}; const Info GFX_SHOW_FTIMES{{System::GFX, "Settings", "ShowFTimes"}, false}; const Info GFX_SHOW_VPS{{System::GFX, "Settings", "ShowVPS"}, false}; const Info GFX_SHOW_VTIMES{{System::GFX, "Settings", "ShowVTimes"}, false}; @@ -61,6 +59,8 @@ const Info GFX_LOG_RENDER_TIME_TO_FILE{{System::GFX, "Settings", "LogRende const Info GFX_OVERLAY_STATS{{System::GFX, "Settings", "OverlayStats"}, false}; const Info GFX_OVERLAY_PROJ_STATS{{System::GFX, "Settings", "OverlayProjStats"}, false}; const Info GFX_OVERLAY_SCISSOR_STATS{{System::GFX, "Settings", "OverlayScissorStats"}, false}; +const Info GFX_SHOW_INTERNAL_RESOLUTION{{System::GFX, "Settings", "ShowInternalResolution"}, + false}; const Info GFX_DUMP_TEXTURES{{System::GFX, "Settings", "DumpTextures"}, false}; const Info GFX_DUMP_MIP_TEXTURES{{System::GFX, "Settings", "DumpMipTextures"}, true}; const Info GFX_DUMP_BASE_TEXTURES{{System::GFX, "Settings", "DumpBaseTextures"}, true}; diff --git a/Source/Core/Core/Config/GraphicsSettings.h b/Source/Core/Core/Config/GraphicsSettings.h index 831e04422b..502d2f0764 100644 --- a/Source/Core/Core/Config/GraphicsSettings.h +++ b/Source/Core/Core/Config/GraphicsSettings.h @@ -47,7 +47,6 @@ extern const Info GFX_CROP_CUSTOM_RIGHT; extern const Info GFX_CROP_CUSTOM_BOTTOM; extern const Info GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES; extern const Info GFX_SHOW_FPS; -extern const Info GFX_SHOW_INTERNAL_RESOLUTION; extern const Info GFX_SHOW_FTIMES; extern const Info GFX_SHOW_VPS; extern const Info GFX_SHOW_VTIMES; @@ -62,6 +61,7 @@ extern const Info GFX_LOG_RENDER_TIME_TO_FILE; extern const Info GFX_OVERLAY_STATS; extern const Info GFX_OVERLAY_PROJ_STATS; extern const Info GFX_OVERLAY_SCISSOR_STATS; +extern const Info GFX_SHOW_INTERNAL_RESOLUTION; extern const Info GFX_DUMP_TEXTURES; extern const Info GFX_DUMP_MIP_TEXTURES; extern const Info GFX_DUMP_BASE_TEXTURES; diff --git a/Source/Core/DolphinQt/Settings/OnScreenDisplayPane.cpp b/Source/Core/DolphinQt/Settings/OnScreenDisplayPane.cpp index 37239b9c74..cc8248f15b 100644 --- a/Source/Core/DolphinQt/Settings/OnScreenDisplayPane.cpp +++ b/Source/Core/DolphinQt/Settings/OnScreenDisplayPane.cpp @@ -43,8 +43,6 @@ void OnScreenDisplayPane::CreateLayout() performance_box->setLayout(performance_layout); m_show_fps = new ConfigBool(tr("Show FPS"), Config::GFX_SHOW_FPS); - m_show_internal_resolution = - new ConfigBool(tr("Show Internal Resolution"), Config::GFX_SHOW_INTERNAL_RESOLUTION); m_show_ftimes = new ConfigBool(tr("Show Frame Times"), Config::GFX_SHOW_FTIMES); m_show_vps = new ConfigBool(tr("Show VPS"), Config::GFX_SHOW_VPS); m_show_vtimes = new ConfigBool(tr("Show VBlank Times"), Config::GFX_SHOW_VTIMES); @@ -103,6 +101,8 @@ void OnScreenDisplayPane::CreateLayout() m_show_statistics = new ConfigBool(tr("Show Statistics"), Config::GFX_OVERLAY_STATS); m_show_proj_statistics = new ConfigBool(tr("Show Projection Statistics"), Config::GFX_OVERLAY_PROJ_STATS); + m_show_internal_resolution = + new ConfigBool(tr("Show Internal Resolution"), Config::GFX_SHOW_INTERNAL_RESOLUTION); debug_layout->addWidget(m_show_statistics, 0, 0); debug_layout->addWidget(m_show_proj_statistics, 0, 1); @@ -153,11 +153,6 @@ void OnScreenDisplayPane::AddDescriptions() QT_TR_NOOP("Shows the number of distinct frames rendered per second as a measure of " "visual smoothness.

If unsure, leave this " "unchecked."); - - static const char TR_SHOW_INTERNAL_RESOLUTION_DESCRIPTION[] = - QT_TR_NOOP("Shows the internal resolution in pixels, as a product of " - "width and height.

If unsure, leave this " - "unchecked."); static const char TR_SHOW_FTIMES_DESCRIPTION[] = QT_TR_NOOP("Shows the average time in ms between each distinct rendered frame alongside " "the standard deviation.

If unsure, leave this " @@ -225,12 +220,15 @@ void OnScreenDisplayPane::AddDescriptions() static const char TR_SHOW_PROJ_STATS_DESCRIPTION[] = QT_TR_NOOP("Shows various projection statistics.

If unsure, " "leave this unchecked."); + static const char TR_SHOW_INTERNAL_RESOLUTION_DESCRIPTION[] = + QT_TR_NOOP("Shows the internal resolution in pixels, as a product of " + "width and height.

If unsure, leave this " + "unchecked."); m_enable_osd->SetDescription(tr(TR_ENABLE_OSD_DESCRIPTION)); m_font_size->SetDescription(tr(TR_OSD_FONT_SIZE_DESCRIPTION)); m_show_fps->SetDescription(tr(TR_SHOW_FPS_DESCRIPTION)); - m_show_internal_resolution->SetDescription(tr(TR_SHOW_INTERNAL_RESOLUTION_DESCRIPTION)); m_show_ftimes->SetDescription(tr(TR_SHOW_FTIMES_DESCRIPTION)); m_show_vps->SetDescription(tr(TR_SHOW_VPS_DESCRIPTION)); m_show_vtimes->SetDescription(tr(TR_SHOW_VTIMES_DESCRIPTION)); @@ -251,4 +249,5 @@ void OnScreenDisplayPane::AddDescriptions() m_show_statistics->SetDescription(tr(TR_SHOW_STATS_DESCRIPTION)); m_show_proj_statistics->SetDescription(tr(TR_SHOW_PROJ_STATS_DESCRIPTION)); + m_show_internal_resolution->SetDescription(tr(TR_SHOW_INTERNAL_RESOLUTION_DESCRIPTION)); } diff --git a/Source/Core/DolphinQt/Settings/OnScreenDisplayPane.h b/Source/Core/DolphinQt/Settings/OnScreenDisplayPane.h index 27653d009c..8ae4e9bc76 100644 --- a/Source/Core/DolphinQt/Settings/OnScreenDisplayPane.h +++ b/Source/Core/DolphinQt/Settings/OnScreenDisplayPane.h @@ -25,7 +25,6 @@ private: // Performance ConfigBool* m_show_fps; - ConfigBool* m_show_internal_resolution; ConfigBool* m_show_ftimes; ConfigBool* m_show_vps; ConfigBool* m_show_vtimes; @@ -49,4 +48,5 @@ private: // Debug ConfigBool* m_show_statistics; ConfigBool* m_show_proj_statistics; + ConfigBool* m_show_internal_resolution; }; diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp index 448f447741..c56f32c00c 100644 --- a/Source/Core/VideoCommon/VideoConfig.cpp +++ b/Source/Core/VideoCommon/VideoConfig.cpp @@ -106,7 +106,6 @@ void VideoConfig::Refresh() iCropCustomBottom = Config::Get(Config::GFX_CROP_CUSTOM_BOTTOM); iSafeTextureCache_ColorSamples = Config::Get(Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES); bShowFPS = Config::Get(Config::GFX_SHOW_FPS); - bShowInternalResolution = Config::Get(Config::GFX_SHOW_INTERNAL_RESOLUTION); bShowFTimes = Config::Get(Config::GFX_SHOW_FTIMES); bShowVPS = Config::Get(Config::GFX_SHOW_VPS); bShowVTimes = Config::Get(Config::GFX_SHOW_VTIMES); @@ -118,6 +117,7 @@ void VideoConfig::Refresh() bOverlayStats = Config::Get(Config::GFX_OVERLAY_STATS); bOverlayProjStats = Config::Get(Config::GFX_OVERLAY_PROJ_STATS); bOverlayScissorStats = Config::Get(Config::GFX_OVERLAY_SCISSOR_STATS); + bShowInternalResolution = Config::Get(Config::GFX_SHOW_INTERNAL_RESOLUTION); bDumpTextures = Config::Get(Config::GFX_DUMP_TEXTURES); bDumpMipmapTextures = Config::Get(Config::GFX_DUMP_MIP_TEXTURES); bDumpBaseTextures = Config::Get(Config::GFX_DUMP_BASE_TEXTURES); diff --git a/Source/Core/VideoCommon/VideoConfig.h b/Source/Core/VideoCommon/VideoConfig.h index ec06f4a606..e16015491b 100644 --- a/Source/Core/VideoCommon/VideoConfig.h +++ b/Source/Core/VideoCommon/VideoConfig.h @@ -250,7 +250,6 @@ struct VideoConfig final // Information bool bShowFPS = false; - bool bShowInternalResolution = false; bool bShowFTimes = false; bool bShowVPS = false; bool bShowVTimes = false; @@ -261,6 +260,7 @@ struct VideoConfig final bool bOverlayStats = false; bool bOverlayProjStats = false; bool bOverlayScissorStats = false; + bool bShowInternalResolution = false; bool bTexFmtOverlayEnable = false; bool bTexFmtOverlayCenter = false; bool bLogRenderTimeToFile = false; -- cgit v1.2.3 From db77b117d9480f528b435c29f96c2bbc264a2610 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 19 Jun 2026 10:53:36 +0200 Subject: Android: Add missing graphics debug settings These are available in DolphinQt, so let's make them available in the Android GUI too. --- .../dolphinemu/features/settings/model/BooleanSetting.kt | 12 ++++++++++++ .../features/settings/ui/SettingsFragmentPresenter.kt | 16 ++++++++++++++++ Source/Android/app/src/main/res/values/strings.xml | 2 ++ 3 files changed, 30 insertions(+) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.kt index 1a03eac3f4..68c859082c 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.kt @@ -700,6 +700,18 @@ enum class BooleanSetting( false ), GFX_OVERLAY_STATS(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "OverlayStats", false), + GFX_OVERLAY_PROJ_STATS( + Settings.FILE_GFX, + Settings.SECTION_GFX_SETTINGS, + "OverlayProjStats", + false + ), + GFX_SHOW_INTERNAL_RESOLUTION( + Settings.FILE_GFX, + Settings.SECTION_GFX_SETTINGS, + "ShowInternalResolution", + false + ), GFX_DUMP_TEXTURES(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "DumpTextures", false), GFX_DUMP_MIP_TEXTURES( Settings.FILE_GFX, diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt index 78e36f7b42..08e73ea7dd 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt @@ -2169,6 +2169,22 @@ class SettingsFragmentPresenter( R.string.leave_this_unchecked ) ) + sl.add( + SwitchSetting( + context, + BooleanSetting.GFX_OVERLAY_PROJ_STATS, + R.string.show_proj_stats, + R.string.leave_this_unchecked + ) + ) + sl.add( + SwitchSetting( + context, + BooleanSetting.GFX_SHOW_INTERNAL_RESOLUTION, + R.string.show_internal_resolution, + R.string.leave_this_unchecked + ) + ) sl.add( SwitchSetting( context, diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml index 21a42e5939..71179b33b1 100644 --- a/Source/Android/app/src/main/res/values/strings.xml +++ b/Source/Android/app/src/main/res/values/strings.xml @@ -374,6 +374,8 @@ Debugging Enable Wireframe Show Statistics + Show Projection Statistics + Show Internal Resolution Texture Format Overlay Enable API Validation Layers Dump EFB Target -- cgit v1.2.3 From be1df92153d94b276fee69182d4774e7bfc1b3f1 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 5 Jul 2026 10:20:15 +0200 Subject: Rename "Show Internal Resolution" to "Show XFB Resolution" To make it extra clear that this is measuring the XFB, not the EFB. --- Source/Android/app/src/main/res/values/strings.xml | 2 +- Source/Core/DolphinQt/Settings/OnScreenDisplayPane.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml index 71179b33b1..07c5e7ebc0 100644 --- a/Source/Android/app/src/main/res/values/strings.xml +++ b/Source/Android/app/src/main/res/values/strings.xml @@ -375,7 +375,7 @@ Enable Wireframe Show Statistics Show Projection Statistics - Show Internal Resolution + Show XFB Resolution Texture Format Overlay Enable API Validation Layers Dump EFB Target diff --git a/Source/Core/DolphinQt/Settings/OnScreenDisplayPane.cpp b/Source/Core/DolphinQt/Settings/OnScreenDisplayPane.cpp index cc8248f15b..2c8b55b899 100644 --- a/Source/Core/DolphinQt/Settings/OnScreenDisplayPane.cpp +++ b/Source/Core/DolphinQt/Settings/OnScreenDisplayPane.cpp @@ -102,7 +102,7 @@ void OnScreenDisplayPane::CreateLayout() m_show_proj_statistics = new ConfigBool(tr("Show Projection Statistics"), Config::GFX_OVERLAY_PROJ_STATS); m_show_internal_resolution = - new ConfigBool(tr("Show Internal Resolution"), Config::GFX_SHOW_INTERNAL_RESOLUTION); + new ConfigBool(tr("Show XFB Resolution"), Config::GFX_SHOW_INTERNAL_RESOLUTION); debug_layout->addWidget(m_show_statistics, 0, 0); debug_layout->addWidget(m_show_proj_statistics, 0, 1); @@ -221,8 +221,8 @@ void OnScreenDisplayPane::AddDescriptions() QT_TR_NOOP("Shows various projection statistics.

If unsure, " "leave this unchecked."); static const char TR_SHOW_INTERNAL_RESOLUTION_DESCRIPTION[] = - QT_TR_NOOP("Shows the internal resolution in pixels, as a product of " - "width and height.

If unsure, leave this " + QT_TR_NOOP("Shows the size of the emulated external frame buffer (XFB) in pixels, as a " + "product of width and height.

If unsure, leave this " "unchecked."); m_enable_osd->SetDescription(tr(TR_ENABLE_OSD_DESCRIPTION)); -- cgit v1.2.3