From 54cd5fb8ebf11b71c676b72a32811873caef20de Mon Sep 17 00:00:00 2001 From: Maufeat Date: Sat, 29 Aug 2026 01:04:02 +0200 Subject: [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 Reviewed-by: CamilleLaVey Reviewed-by: MaranBr --- src/video_core/framebuffer_config.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/video_core/framebuffer_config.cpp') diff --git a/src/video_core/framebuffer_config.cpp b/src/video_core/framebuffer_config.cpp index e28d41f84c..7145b02c07 100644 --- a/src/video_core/framebuffer_config.cpp +++ b/src/video_core/framebuffer_config.cpp @@ -1,11 +1,35 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include + #include "common/assert.h" #include "video_core/framebuffer_config.h" namespace Tegra { +std::span FilterLayerStack( + std::span layers, Service::Nvnflinger::LayerStackId stack, + std::vector& scratch) { + const u32 bit = Service::Nvnflinger::LayerStackBit(stack); + + if (std::ranges::all_of(layers, + [bit](const auto& layer) { return (layer.layer_stack_mask & bit) != 0; })) + return layers; + + scratch.clear(); + for (const auto& layer : layers) { + if ((layer.layer_stack_mask & bit) != 0) { + scratch.push_back(layer); + } + } + + return scratch; +} + Common::Rectangle NormalizeCrop(const FramebufferConfig& framebuffer, u32 texture_width, u32 texture_height) { f32 left, top, right, bottom; -- cgit v1.2.3