diff options
author | Liam <byteslice@airmail.cc> | 2024-01-28 01:10:22 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-02-09 15:20:53 +0100 |
commit | 78aac6b403de732e33a83c1b78eaa5384fd2ae61 (patch) | |
tree | 5c48687e626ff1a5dd1b993aa57d26c752812725 /src/video_core/renderer_opengl/present/layer.cpp | |
parent | nvnflinger/gpu: implement applet capture (diff) | |
download | yuzu-78aac6b403de732e33a83c1b78eaa5384fd2ae61.tar yuzu-78aac6b403de732e33a83c1b78eaa5384fd2ae61.tar.gz yuzu-78aac6b403de732e33a83c1b78eaa5384fd2ae61.tar.bz2 yuzu-78aac6b403de732e33a83c1b78eaa5384fd2ae61.tar.lz yuzu-78aac6b403de732e33a83c1b78eaa5384fd2ae61.tar.xz yuzu-78aac6b403de732e33a83c1b78eaa5384fd2ae61.tar.zst yuzu-78aac6b403de732e33a83c1b78eaa5384fd2ae61.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/present/layer.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/present/layer.cpp b/src/video_core/renderer_opengl/present/layer.cpp index 3e4377db4..6c7092d22 100644 --- a/src/video_core/renderer_opengl/present/layer.cpp +++ b/src/video_core/renderer_opengl/present/layer.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "video_core/framebuffer_config.h" +#include "video_core/present.h" #include "video_core/renderer_opengl/gl_blit_screen.h" #include "video_core/renderer_opengl/gl_rasterizer.h" #include "video_core/renderer_opengl/present/fsr.h" @@ -14,8 +15,9 @@ namespace OpenGL { -Layer::Layer(RasterizerOpenGL& rasterizer_, Tegra::MaxwellDeviceMemoryManager& device_memory_) - : rasterizer(rasterizer_), device_memory(device_memory_) { +Layer::Layer(RasterizerOpenGL& rasterizer_, Tegra::MaxwellDeviceMemoryManager& device_memory_, + const PresentFilters& filters_) + : rasterizer(rasterizer_), device_memory(device_memory_), filters(filters_) { // Allocate textures for the screen framebuffer_texture.resource.Create(GL_TEXTURE_2D); @@ -39,7 +41,7 @@ GLuint Layer::ConfigureDraw(std::array<GLfloat, 3 * 2>& out_matrix, auto crop = Tegra::NormalizeCrop(framebuffer, info.width, info.height); GLuint texture = info.display_texture; - auto anti_aliasing = Settings::values.anti_aliasing.GetValue(); + auto anti_aliasing = filters.get_anti_aliasing(); if (anti_aliasing != Settings::AntiAliasing::None) { glEnablei(GL_SCISSOR_TEST, 0); auto viewport_width = Settings::values.resolution_info.ScaleUp(framebuffer_texture.width); @@ -64,7 +66,7 @@ GLuint Layer::ConfigureDraw(std::array<GLfloat, 3 * 2>& out_matrix, glDisablei(GL_SCISSOR_TEST, 0); - if (Settings::values.scaling_filter.GetValue() == Settings::ScalingFilter::Fsr) { + if (filters.get_scaling_filter() == Settings::ScalingFilter::Fsr) { if (!fsr || fsr->NeedsRecreation(layout.screen)) { fsr = std::make_unique<FSR>(layout.screen.GetWidth(), layout.screen.GetHeight()); } |