From a456741ae65ebf139f95322474aa97a109d8f49c Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 25 Nov 2023 19:49:05 +1000 Subject: [PATCH] GPU/HW: Don't blend binary alpha texture filters --- src/core/gpu_hw.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/gpu_hw.cpp b/src/core/gpu_hw.cpp index 64b26b665..b65cb3cf3 100644 --- a/src/core/gpu_hw.cpp +++ b/src/core/gpu_hw.cpp @@ -71,7 +71,7 @@ ALWAYS_INLINE static bool ShouldDisableColorPerspective() } /// Returns true if the specified texture filtering mode requires dual-source blending. -ALWAYS_INLINE static bool TextureFilterRequiresDualSourceBlend(GPUTextureFilter filter) +ALWAYS_INLINE static bool IsBlendedTextureFiltering(GPUTextureFilter filter) { return (filter == GPUTextureFilter::Bilinear || filter == GPUTextureFilter::JINC2 || filter == GPUTextureFilter::xBR); } @@ -457,7 +457,7 @@ void GPU_HW::CheckSettings() TRANSLATE_STR("GPU_HW", "SSAA is not supported, using MSAA instead."), Host::OSD_ERROR_DURATION); } - if (!features.dual_source_blend && TextureFilterRequiresDualSourceBlend(m_texture_filtering)) + if (!features.dual_source_blend && IsBlendedTextureFiltering(m_texture_filtering)) { Host::AddIconOSDMessage( "TextureFilterUnsupported", ICON_FA_EXCLAMATION_TRIANGLE, @@ -850,7 +850,7 @@ bool GPU_HW::CompilePipelines() if ((static_cast(transparency_mode) != GPUTransparencyMode::Disabled && (static_cast(render_mode) != BatchRenderMode::TransparencyDisabled && static_cast(render_mode) != BatchRenderMode::OnlyOpaque)) || - m_texture_filtering != GPUTextureFilter::Nearest) + IsBlendedTextureFiltering(m_texture_filtering)) { plconfig.blend.enable = true; plconfig.blend.src_alpha_blend = GPUPipeline::BlendFunc::One;