From 632518e6e2ca3b78a17fe43636ab81a465b47177 Mon Sep 17 00:00:00 2001 From: CamilleLaVey Date: Fri, 28 Nov 2025 00:37:15 -0400 Subject: [PATCH] [revert] Added linear filtering in texture blitting operations --- .../renderer_vulkan/vk_texture_cache.cpp | 49 +++++-------------- .../renderer_vulkan/vk_texture_cache.h | 1 - 2 files changed, 12 insertions(+), 38 deletions(-) diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index 71fc77a325..e2d932c4e9 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp @@ -739,7 +739,7 @@ void TryTransformSwizzleIfNeeded(PixelFormat format, std::array copies) { // As per the size-compatible formats section of vulkan, copy manually via ReinterpretImage @@ -2045,9 +2025,7 @@ bool Image::ScaleUp(bool ignore) { if (NeedsScaleHelper()) { return BlitScaleHelper(true); } else { - const bool supports_linear_filter = runtime->SupportsLinearFilter(info.format); - BlitScale(*scheduler, *original_image, *scaled_image, info, aspect_mask, resolution, - supports_linear_filter); + BlitScale(*scheduler, *original_image, *scaled_image, info, aspect_mask, resolution); } return true; } @@ -2072,9 +2050,7 @@ bool Image::ScaleDown(bool ignore) { if (NeedsScaleHelper()) { return BlitScaleHelper(false); } else { - const bool supports_linear_filter = runtime->SupportsLinearFilter(info.format); - BlitScale(*scheduler, *scaled_image, *original_image, info, aspect_mask, resolution, - supports_linear_filter, false); + BlitScale(*scheduler, *scaled_image, *original_image, info, aspect_mask, resolution, false); } return true; } @@ -2083,10 +2059,9 @@ bool Image::BlitScaleHelper(bool scale_up) { using namespace VideoCommon; static constexpr auto BLIT_OPERATION = Tegra::Engines::Fermi2D::Operation::SrcCopy; const bool is_color{aspect_mask == VK_IMAGE_ASPECT_COLOR_BIT}; - const bool supports_linear_filter = runtime->SupportsLinearFilter(info.format); - const bool is_bilinear = is_color && supports_linear_filter; - const auto filter_mode = is_bilinear ? Tegra::Engines::Fermi2D::Filter::Bilinear - : Tegra::Engines::Fermi2D::Filter::Point; + const bool is_bilinear{is_color && !IsPixelFormatInteger(info.format)}; + const auto operation = is_bilinear ? Tegra::Engines::Fermi2D::Filter::Bilinear + : Tegra::Engines::Fermi2D::Filter::Point; const bool is_2d = info.type == ImageType::e2D; const auto& resolution = runtime->resolution; diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.h b/src/video_core/renderer_vulkan/vk_texture_cache.h index 9d8917a6a6..b62310a97f 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.h +++ b/src/video_core/renderer_vulkan/vk_texture_cache.h @@ -122,7 +122,6 @@ public: bool IsFormatDitherable(VideoCore::Surface::PixelFormat format); bool IsFormatScalable(VideoCore::Surface::PixelFormat format); - bool SupportsLinearFilter(VideoCore::Surface::PixelFormat format) const; VkFormat GetSupportedFormat(VkFormat requested_format, VkFormatFeatureFlags required_features) const;