aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/macro.cpp
diff options
context:
space:
mode:
authorxbzk <xbzk@eden-emu.dev>2026-06-27 02:52:13 +0200
committercrueter <crueter@eden-emu.dev>2026-06-27 02:52:13 +0200
commit09b6b3b71e74a47ae8b8ffe64b1803fc34bae6a2 (patch)
tree7949d8522bafb1565b98c3821db07c2b96867f89 /src/video_core/macro.cpp
parent629ebf1bdee023d3d3ecc96c3276cf3285f8f727 (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/macro.cpp')
-rw-r--r--src/video_core/macro.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/video_core/macro.cpp b/src/video_core/macro.cpp
index 0d026a1ce5..1632d03664 100644
--- a/src/video_core/macro.cpp
+++ b/src/video_core/macro.cpp
@@ -1328,22 +1328,14 @@ Macro::Opcode MacroJITx64Impl::GetOpCode() const {
#endif
static void Dump(u64 hash, std::span<const u32> code, bool decompiled = false) {
- const auto base_dir{Common::FS::GetEdenPath(Common::FS::EdenPath::DumpDir)};
- const auto macro_dir{base_dir / "macros"};
- if (!Common::FS::CreateDir(base_dir) || !Common::FS::CreateDir(macro_dir)) {
- LOG_ERROR(Common_Filesystem, "Failed to create macro dump directories");
+ const auto dump_dir{Common::FS::GetEdenPath(Common::FS::EdenPath::DumpDir)};
+ if (!Common::FS::CreateDir(dump_dir)) {
+ LOG_ERROR(Common_Filesystem, "Failed to create dump directory");
return;
}
- auto name{macro_dir / fmt::format("{:016x}.macro", hash)};
-
- if (decompiled) {
- auto new_name{macro_dir / fmt::format("decompiled_{:016x}.macro", hash)};
- if (Common::FS::Exists(name)) {
- (void)Common::FS::RenameFile(name, new_name);
- return;
- }
- name = new_name;
- }
+ const char* const variant_suffix = decompiled ? "jit" : "raw";
+ const auto name{dump_dir / fmt::format("{:016x}_{:016x}_{}.macro",
+ Settings::GetCurrentProgramID(), hash, variant_suffix)};
std::fstream macro_file(name, std::ios::out | std::ios::binary);
if (!macro_file) {