From a78e0e76decac358bc2bdcd6f869422930ef1a52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 6 May 2026 00:12:12 +0200 Subject: [PATCH] Disable the GPU profiler for OpenGL. Also restrict to in-game. --- Common/GPU/OpenGL/GLProfiler.cpp | 9 +++++++-- UI/DebugOverlay.cpp | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Common/GPU/OpenGL/GLProfiler.cpp b/Common/GPU/OpenGL/GLProfiler.cpp index 73c690e013..27a2a695d5 100644 --- a/Common/GPU/OpenGL/GLProfiler.cpp +++ b/Common/GPU/OpenGL/GLProfiler.cpp @@ -38,6 +38,10 @@ void GLProfiler::Init() { scopes_.clear(); scopeStack_.clear(); + // NOTE: Getting a lot of hangs on Android from this, I'm disabling it entirely for now. + // Will later re-enable on desktop. +#if 0 + // Check for extension support // Function pointers are declared in gl3stub.h and loaded appropriately per platform if (gl_extensions.EXT_disjoint_timer_query) { @@ -53,6 +57,7 @@ void GLProfiler::Init() { INFO_LOG(Log::G3D, "GLProfiler: Using GL_ARB_timer_query"); } } +#endif if (supported_) { // Pre-allocate query objects @@ -105,7 +110,7 @@ void GLProfiler::BeginFrame() { static const char * const indent[4] = { "", " ", " ", " " }; if (!scopes_.empty()) { - INFO_LOG(Log::G3D, "OpenGL profiling events this frame:"); + DEBUG_LOG(Log::G3D, "OpenGL profiling events this frame:"); } // Log results @@ -122,7 +127,7 @@ void GLProfiler::BeginFrame() { // Times are in nanoseconds, convert to milliseconds double milliseconds = (double)(endTime - startTime) / 1000000.0; - INFO_LOG(Log::G3D, "%s%s (%0.3f ms)", indent[scope.level & 3], scope.name, milliseconds); + DEBUG_LOG(Log::G3D, "%s%s (%0.3f ms)", indent[scope.level & 3], scope.name, milliseconds); } } diff --git a/UI/DebugOverlay.cpp b/UI/DebugOverlay.cpp index b8c65ab45b..5e517c8910 100644 --- a/UI/DebugOverlay.cpp +++ b/UI/DebugOverlay.cpp @@ -245,12 +245,12 @@ void DrawDebugOverlay(UIContext *ctx, const Bounds &bounds, DebugOverlay overlay break; #if !PPSSPP_PLATFORM(UWP) && !PPSSPP_PLATFORM(SWITCH) case DebugOverlay::GPU_PROFILE: - if (g_Config.iGPUBackend == (int)GPUBackend::VULKAN || g_Config.iGPUBackend == (int)GPUBackend::OPENGL) { + if (inGame && (g_Config.iGPUBackend == (int)GPUBackend::VULKAN || g_Config.iGPUBackend == (int)GPUBackend::OPENGL)) { DrawGPUProfilerVis(ctx, gpu); } break; case DebugOverlay::GPU_ALLOCATOR: - if (g_Config.iGPUBackend == (int)GPUBackend::VULKAN || g_Config.iGPUBackend == (int)GPUBackend::OPENGL) { + if (inGame && (g_Config.iGPUBackend == (int)GPUBackend::VULKAN || g_Config.iGPUBackend == (int)GPUBackend::OPENGL)) { DrawGPUMemoryVis(ctx, gpu); } break;