aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_opengl/present/layer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/renderer_opengl/present/layer.cpp')
-rw-r--r--src/video_core/renderer_opengl/present/layer.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/video_core/renderer_opengl/present/layer.cpp b/src/video_core/renderer_opengl/present/layer.cpp
index f18600e692..6c7092d229 100644
--- a/src/video_core/renderer_opengl/present/layer.cpp
+++ b/src/video_core/renderer_opengl/present/layer.cpp
@@ -1,6 +1,3 @@
-// SPDX-FileCopyrightText: Copyright 2025 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
@@ -57,12 +54,12 @@ GLuint Layer::ConfigureDraw(std::array<GLfloat, 3 * 2>& out_matrix,
switch (anti_aliasing) {
case Settings::AntiAliasing::Fxaa:
CreateFXAA();
- texture = std::get<FXAA>(anti_alias).Draw(program_manager, info.display_texture);
+ texture = fxaa->Draw(program_manager, info.display_texture);
break;
case Settings::AntiAliasing::Smaa:
default:
CreateSMAA();
- texture = std::get<SMAA>(anti_alias).Draw(program_manager, info.display_texture);
+ texture = smaa->Draw(program_manager, info.display_texture);
break;
}
}
@@ -71,7 +68,7 @@ GLuint Layer::ConfigureDraw(std::array<GLfloat, 3 * 2>& out_matrix,
if (filters.get_scaling_filter() == Settings::ScalingFilter::Fsr) {
if (!fsr || fsr->NeedsRecreation(layout.screen)) {
- fsr.emplace(layout.screen.GetWidth(), layout.screen.GetHeight());
+ fsr = std::make_unique<FSR>(layout.screen.GetWidth(), layout.screen.GetHeight());
}
texture = fsr->Draw(program_manager, texture, info.scaled_width, info.scaled_height, crop);
@@ -202,20 +199,23 @@ void Layer::ConfigureFramebufferTexture(const Tegra::FramebufferConfig& framebuf
glTextureStorage2D(framebuffer_texture.resource.handle, 1, internal_format,
framebuffer_texture.width, framebuffer_texture.height);
- anti_alias.emplace<std::monostate>();
+ fxaa.reset();
+ smaa.reset();
}
void Layer::CreateFXAA() {
- if (!std::holds_alternative<FXAA>(anti_alias)) {
- anti_alias.emplace<FXAA>(
+ smaa.reset();
+ if (!fxaa) {
+ fxaa = std::make_unique<FXAA>(
Settings::values.resolution_info.ScaleUp(framebuffer_texture.width),
Settings::values.resolution_info.ScaleUp(framebuffer_texture.height));
}
}
void Layer::CreateSMAA() {
- if (!std::holds_alternative<SMAA>(anti_alias)) {
- anti_alias.emplace<SMAA>(
+ fxaa.reset();
+ if (!smaa) {
+ smaa = std::make_unique<SMAA>(
Settings::values.resolution_info.ScaleUp(framebuffer_texture.width),
Settings::values.resolution_info.ScaleUp(framebuffer_texture.height));
}