diff options
| author | xbzk <xbzk@eden-emu.dev> | 2026-06-27 02:52:13 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-06-27 02:52:13 +0200 |
| commit | 09b6b3b71e74a47ae8b8ffe64b1803fc34bae6a2 (patch) | |
| tree | 7949d8522bafb1565b98c3821db07c2b96867f89 /src/video_core/vulkan_common | |
| parent | 629ebf1bdee023d3d3ecc96c3276cf3285f8f727 (diff) | |
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>
Diffstat (limited to 'src/video_core/vulkan_common')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_debug_callback.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 11 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_memory_allocator.cpp | 8 |
3 files changed, 9 insertions, 12 deletions
diff --git a/src/video_core/vulkan_common/vulkan_debug_callback.cpp b/src/video_core/vulkan_common/vulkan_debug_callback.cpp index 8d59a74a30..0f9aaa9a0b 100644 --- a/src/video_core/vulkan_common/vulkan_debug_callback.cpp +++ b/src/video_core/vulkan_common/vulkan_debug_callback.cpp @@ -76,7 +76,7 @@ VkBool32 DebugUtilCallback(VkDebugUtilsMessageSeverityFlagBitsEXT severity, } // Route to GPU logger for tracking Vulkan validation messages - if (Settings::values.gpu_logging_enabled.GetValue() && + if (GPU::Logging::IsActive() && Settings::values.gpu_log_vulkan_calls.GetValue()) { // Convert severity to result code for logging (negative = error) int result_code = 0; diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index cd42bd22af..7bf73dcead 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -1518,7 +1518,10 @@ std::vector<VkDeviceQueueCreateInfo> Device::GetDeviceQueueCreateInfos() const { } void Device::InitializeGPULogging() { - if (!Settings::values.gpu_logging_enabled.GetValue()) { + // Get log level from settings — Off is the disable. + const auto log_level = static_cast<GPU::Logging::LogLevel>( + static_cast<u32>(Settings::values.gpu_log_level.GetValue())); + if (log_level == GPU::Logging::LogLevel::Off) { return; } @@ -1532,18 +1535,12 @@ void Device::InitializeGPULogging() { detected_driver = GPU::Logging::DriverType::Qualcomm; } - // Get log level from settings - const auto log_level = static_cast<GPU::Logging::LogLevel>( - static_cast<u32>(Settings::values.gpu_log_level.GetValue())); - // Initialize GPU logger GPU::Logging::GPULogger::GetInstance().Initialize(log_level, detected_driver); // Configure feature flags GPU::Logging::GPULogger::GetInstance().EnableVulkanCallTracking( Settings::values.gpu_log_vulkan_calls.GetValue()); - GPU::Logging::GPULogger::GetInstance().EnableShaderDumps( - Settings::values.gpu_log_shader_dumps.GetValue()); GPU::Logging::GPULogger::GetInstance().EnableMemoryTracking( Settings::values.gpu_log_memory_tracking.GetValue()); GPU::Logging::GPULogger::GetInstance().EnableDriverDebugInfo( diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp index 9a382fc0eb..e57864ede8 100644 --- a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp +++ b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp @@ -111,7 +111,7 @@ namespace Vulkan { : allocator{alloc}, allocation{a}, memory{info.deviceMemory}, offset{info.offset}, size{info.size}, mapped_ptr{info.pMappedData} { // Log GPU memory allocation - if (Settings::values.gpu_logging_enabled.GetValue() && + if (GPU::Logging::IsActive() && Settings::values.gpu_log_memory_tracking.GetValue()) { GPU::Logging::GPULogger::GetInstance().LogMemoryAllocation( reinterpret_cast<uintptr_t>(memory), @@ -179,7 +179,7 @@ namespace Vulkan { void MemoryCommit::Release() { if (allocation && allocator) { // Log GPU memory deallocation - if (Settings::values.gpu_logging_enabled.GetValue() && + if (GPU::Logging::IsActive() && Settings::values.gpu_log_memory_tracking.GetValue() && memory != VK_NULL_HANDLE) { GPU::Logging::GPULogger::GetInstance().LogMemoryDeallocation( @@ -243,7 +243,7 @@ namespace Vulkan { vk::Check(vmaCreateImage(allocator, &ci, &alloc_ci, &handle, &allocation, &alloc_info)); // Log GPU memory allocation for images - if (Settings::values.gpu_logging_enabled.GetValue() && + if (GPU::Logging::IsActive() && Settings::values.gpu_log_memory_tracking.GetValue()) { GPU::Logging::GPULogger::GetInstance().LogMemoryAllocation( reinterpret_cast<uintptr_t>(alloc_info.deviceMemory), @@ -281,7 +281,7 @@ namespace Vulkan { vmaGetAllocationMemoryProperties(allocator, allocation, &property_flags); // Log GPU memory allocation for buffers - if (Settings::values.gpu_logging_enabled.GetValue() && + if (GPU::Logging::IsActive() && Settings::values.gpu_log_memory_tracking.GetValue()) { GPU::Logging::GPULogger::GetInstance().LogMemoryAllocation( reinterpret_cast<uintptr_t>(alloc_info.deviceMemory), |
