From cb26ea154c9eedc5fd8dae33a39cd86ca1d927ab Mon Sep 17 00:00:00 2001 From: lizzie Date: Tue, 20 Jan 2026 02:36:24 +0100 Subject: [vk, ogl/IR, dynarmic/IR] friendlier IR identity pointer chasing, inline AA passes (#3250) Only merge once we find out wth is causing the crashes [we know it's fsr] This reverts commit 82f9d489e7916318b56dac59fc52efc46fe0df7e. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3250 Reviewed-by: DraVee Reviewed-by: MaranBr Co-authored-by: lizzie Co-committed-by: lizzie --- src/video_core/renderer_opengl/present/layer.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/video_core/renderer_opengl/present/layer.cpp') diff --git a/src/video_core/renderer_opengl/present/layer.cpp b/src/video_core/renderer_opengl/present/layer.cpp index 6c7092d229..d0a8e1186e 100644 --- a/src/video_core/renderer_opengl/present/layer.cpp +++ b/src/video_core/renderer_opengl/present/layer.cpp @@ -1,3 +1,6 @@ +// 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 @@ -54,12 +57,12 @@ GLuint Layer::ConfigureDraw(std::array& out_matrix, switch (anti_aliasing) { case Settings::AntiAliasing::Fxaa: CreateFXAA(); - texture = fxaa->Draw(program_manager, info.display_texture); + texture = std::get(anti_alias).Draw(program_manager, info.display_texture); break; case Settings::AntiAliasing::Smaa: default: CreateSMAA(); - texture = smaa->Draw(program_manager, info.display_texture); + texture = std::get(anti_alias).Draw(program_manager, info.display_texture); break; } } @@ -68,7 +71,7 @@ GLuint Layer::ConfigureDraw(std::array& out_matrix, if (filters.get_scaling_filter() == Settings::ScalingFilter::Fsr) { if (!fsr || fsr->NeedsRecreation(layout.screen)) { - fsr = std::make_unique(layout.screen.GetWidth(), layout.screen.GetHeight()); + fsr.emplace(layout.screen.GetWidth(), layout.screen.GetHeight()); } texture = fsr->Draw(program_manager, texture, info.scaled_width, info.scaled_height, crop); @@ -199,23 +202,20 @@ void Layer::ConfigureFramebufferTexture(const Tegra::FramebufferConfig& framebuf glTextureStorage2D(framebuffer_texture.resource.handle, 1, internal_format, framebuffer_texture.width, framebuffer_texture.height); - fxaa.reset(); - smaa.reset(); + anti_alias.emplace(); } void Layer::CreateFXAA() { - smaa.reset(); - if (!fxaa) { - fxaa = std::make_unique( + if (!std::holds_alternative(anti_alias)) { + anti_alias.emplace( Settings::values.resolution_info.ScaleUp(framebuffer_texture.width), Settings::values.resolution_info.ScaleUp(framebuffer_texture.height)); } } void Layer::CreateSMAA() { - fxaa.reset(); - if (!smaa) { - smaa = std::make_unique( + if (!std::holds_alternative(anti_alias)) { + anti_alias.emplace( Settings::values.resolution_info.ScaleUp(framebuffer_texture.width), Settings::values.resolution_info.ScaleUp(framebuffer_texture.height)); } -- cgit v1.2.3