mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-24 10:36:55 +00:00
[renderer_vulkan] Skip post-processing on applet layers (#4474)
- [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. ------------------- Detect applet layers via the absence of the Recording bit in layer_stack_mask (only AppletId::Application sets it) and skip PostProcessChain creation and application for them. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4474 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
@@ -98,7 +98,10 @@ void Layer::ConfigureDraw(const Device& device, PresentPushConstants* out_push_c
|
||||
RefreshResources(device, framebuffer);
|
||||
SetAntiAliasPass(device);
|
||||
#ifdef HAS_RESHADE
|
||||
SetPostProcessPass(device);
|
||||
const bool is_applet =
|
||||
(framebuffer.layer_stack_mask & Service::Nvnflinger::LayerStackBit(
|
||||
Service::Nvnflinger::LayerStackId::Recording)) == 0;
|
||||
SetPostProcessPass(device, is_applet);
|
||||
#endif
|
||||
|
||||
// Finish any pending renderpass
|
||||
@@ -228,7 +231,11 @@ void Layer::SetAntiAliasPass(const Device& device) {
|
||||
}
|
||||
|
||||
#ifdef HAS_RESHADE
|
||||
void Layer::SetPostProcessPass(const Device& device) {
|
||||
void Layer::SetPostProcessPass(const Device& device, bool is_applet) {
|
||||
if (is_applet) {
|
||||
post_process.reset();
|
||||
return;
|
||||
}
|
||||
const VkExtent2D render_area{
|
||||
.width = Settings::values.resolution_info.ScaleUp(raw_width),
|
||||
.height = Settings::values.resolution_info.ScaleUp(raw_height),
|
||||
|
||||
@@ -70,7 +70,7 @@ private:
|
||||
void RefreshResources(const Device& device, const Tegra::FramebufferConfig& framebuffer);
|
||||
void SetAntiAliasPass(const Device& device);
|
||||
#ifdef HAS_RESHADE
|
||||
void SetPostProcessPass(const Device& device);
|
||||
void SetPostProcessPass(const Device& device, bool is_applet);
|
||||
#endif
|
||||
void ReleaseRawImages();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user