[core, hle, video_core, memory] Improve multi-process, display layers, dynamic shader cache and rework overlay (#4238)

- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

- Dynamic shader cache reloading capability for qlaunch
- Multi-process improvements (thanks to @frank1734), instead of just using the main application we now respect caller process (also did it for HID devices while I was at it)
- Layer stack masks & shared buffer screenshot for video core, added different masks (screenshot, recording, etc.) this was discovered as an issue due to how in qlaunch the transition was not right between applications. May not be perfect but also fixes screenshots while using qlaunch
- Reworked overlay display management (input and visibility) - instead of random numbers as I've previously did, I decided to add an AppletZIndex enum for better readability. Also split capability of input by touch and gamepad.
- etc.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4238
Reviewed-by: Samuel <lizzie@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
Maufeat
2026-08-29 01:04:02 +02:00
committed by crueter
parent 119291dc77
commit 54cd5fb8eb
90 changed files with 1410 additions and 366 deletions
+27
View File
@@ -6,6 +6,7 @@
#include <iostream>
#include <memory>
#include <mutex>
#include <regex>
#include <string>
#include "common/settings_enums.h"
@@ -34,6 +35,8 @@
#include "input_common/main.h"
#include "network/network.h"
#include "sdl_config.h"
#include "video_core/gpu.h"
#include "video_core/rasterizer_interface.h"
#include "video_core/renderer_base.h"
#include "yuzu_cmd/emu_window/emu_window_sdl3.h"
#ifdef HAS_OPENGL
@@ -463,6 +466,30 @@ extern "C" SDL_AppResult SDL_AppInit(void **appstate, int argc, char **argv) {
// don't do anything, SDL3 already exists for us :D
state->system.RegisterExitCallback([] {});
// QLaunch launched applications (should) now reload shader cache.
static std::mutex shader_cache_reload_mutex;
state->system.RegisterApplicationChangedCallback([&state](u64 changed_program_id) {
if (!Settings::values.use_disk_shader_cache.GetValue()) {
return;
}
std::scoped_lock lk{shader_cache_reload_mutex};
LOG_INFO(Frontend, "Reloading disk shader cache for {:016X}", changed_program_id);
state->system.Pause();
state->system.GPU().WaitForIdle();
state->system.GPU().ObtainContext();
state->system.Renderer().ReadRasterizer()->LoadDiskResources(
changed_program_id, std::stop_token{},
[](VideoCore::LoadCallbackStage, size_t, size_t) {});
state->system.GPU().ReleaseContext();
state->system.Run();
});
void(state->system.Run());
if (state->system.DebuggerEnabled())
state->system.InitializeDebugger();