From 51414f3e1e1cc6f3227230250390d9c81382275d Mon Sep 17 00:00:00 2001 From: Gliniak Date: Wed, 29 Oct 2025 19:50:07 +0100 Subject: [PATCH] [Logging] Added ability to disable GPU related logs --- src/xenia/base/logging.cc | 2 +- src/xenia/base/logging.h | 11 +++-------- src/xenia/gpu/command_processor.cc | 4 ++-- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/xenia/base/logging.cc b/src/xenia/base/logging.cc index d38043996..9154306e6 100644 --- a/src/xenia/base/logging.cc +++ b/src/xenia/base/logging.cc @@ -55,7 +55,7 @@ DEFINE_bool(flush_log, true, "Flush log file after each log line batch.", DEFINE_uint32(log_mask, 0, "Disables specific categorizes for more granular debug logging. " - "Kernel = 1, Apu = 2, Cpu = 4.", + "Kernel = 1, Apu = 2, Cpu = 4, Gpu = 8.", "Logging"); DEFINE_int32( diff --git a/src/xenia/base/logging.h b/src/xenia/base/logging.h index 709aaf3a5..d0e62cdf4 100644 --- a/src/xenia/base/logging.h +++ b/src/xenia/base/logging.h @@ -38,12 +38,7 @@ enum class LogLevel { // bitmasks! namespace LogSrc { -enum : uint32_t { - Uncategorized = 0, - Kernel = 1, - Apu = 2, - Cpu = 4, -}; +enum : uint32_t { Uncategorized = 0, Kernel = 1, Apu = 2, Cpu = 4, Gpu = 8 }; } class LogSink { @@ -214,8 +209,8 @@ void XELOGAPU(std::string_view format, const Args&... args) { template void XELOGGPU(std::string_view format, const Args&... args) { - xe::logging::AppendLogLineFormat(xe::LogSrc::Uncategorized, - xe::LogLevel::Debug, 'G', format, args...); + xe::logging::AppendLogLineFormat(xe::LogSrc::Gpu, xe::LogLevel::Debug, 'G', + format, args...); } template diff --git a/src/xenia/gpu/command_processor.cc b/src/xenia/gpu/command_processor.cc index ba63db1f6..64d556f7a 100644 --- a/src/xenia/gpu/command_processor.cc +++ b/src/xenia/gpu/command_processor.cc @@ -774,8 +774,8 @@ void CommandProcessor::MakeCoherent() { } // TODO(benvanik): notify resource cache of base->size and type. - XELOGD("Make {:08X} -> {:08X} ({}b) coherent, action = {}", base_host, - base_host + size_host, size_host, action); + XELOGGPU("Make {:08X} -> {:08X} ({}b) coherent, action = {}", base_host, + base_host + size_host, size_host, action); // Mark coherent. regs_volatile[XE_GPU_REG_COHER_STATUS_HOST] = 0;