From 7506ac4118c6065b2557fe3cb94bab52c099ca37 Mon Sep 17 00:00:00 2001 From: Marshall Mohror Date: Tue, 19 Oct 2021 21:20:28 -0500 Subject: Presentation: Fix turning FSR on and off in settings --- src/video_core/renderer_vulkan/vk_blit_screen.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/video_core') diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.cpp b/src/video_core/renderer_vulkan/vk_blit_screen.cpp index 334eeb92e..ccf721008 100644 --- a/src/video_core/renderer_vulkan/vk_blit_screen.cpp +++ b/src/video_core/renderer_vulkan/vk_blit_screen.cpp @@ -362,6 +362,17 @@ void VKBlitScreen::CreateDynamicResources() { } void VKBlitScreen::RefreshResources(const Tegra::FramebufferConfig& framebuffer) { + if (Settings::values.scaling_filter.GetValue() == Settings::ScalingFilter::Fsr) { + if (!fsr) { + const auto& layout = render_window.GetFramebufferLayout(); + fsr = std::make_unique( + device, memory_allocator, image_count, + VkExtent2D{.width = layout.screen.GetWidth(), .height = layout.screen.GetHeight()}); + } + } else { + fsr.reset(); + } + if (framebuffer.width == raw_width && framebuffer.height == raw_height && !raw_images.empty()) { return; } -- cgit v1.2.3