Browse Source

[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>
master
PavelBARABANOV 20 hours ago
committed by crueter
parent
commit
cb73a4dcc7
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 11
      src/video_core/renderer_vulkan/present/layer.cpp
  2. 2
      src/video_core/renderer_vulkan/present/layer.h

11
src/video_core/renderer_vulkan/present/layer.cpp

@ -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),

2
src/video_core/renderer_vulkan/present/layer.h

@ -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();

Loading…
Cancel
Save