From 3096f77ba09fe3510a785e073602a8a829a02d9e Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Sun, 8 Aug 2021 11:05:32 -0700 Subject: Eliminate SamplerCommon::AreBpTexMode0MipmapsEnabled This was added in 0b9a72a62d38481ff08f742b2318d07f29ff5dff but became irrelevant in 70f9fc4e7526fc9cfc008a43cd33229f62be99b6 as the check is now self-explanatory due to a rejiggering of the bitfields. --- Source/Core/VideoCommon/TextureCacheBase.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp') diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 0f66284180..ff15a755ba 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -979,9 +979,8 @@ static void SetSamplerState(u32 index, float custom_tex_scale, bool custom_tex, { state.min_filter = SamplerState::Filter::Linear; state.mag_filter = SamplerState::Filter::Linear; - state.mipmap_filter = SamplerCommon::AreBpTexMode0MipmapsEnabled(tm0) ? - SamplerState::Filter::Linear : - SamplerState::Filter::Point; + state.mipmap_filter = tm0.mipmap_filter != MipMode::None ? SamplerState::Filter::Linear : + SamplerState::Filter::Point; } // Custom textures may have a greater number of mips @@ -1000,7 +999,7 @@ static void SetSamplerState(u32 index, float custom_tex_scale, bool custom_tex, // disabling anisotropy, or changing the anisotropic algorithm employed. state.min_filter = SamplerState::Filter::Linear; state.mag_filter = SamplerState::Filter::Linear; - if (SamplerCommon::AreBpTexMode0MipmapsEnabled(tm0)) + if (tm0.mipmap_filter != MipMode::None) state.mipmap_filter = SamplerState::Filter::Linear; state.anisotropic_filtering = 1; } @@ -1009,7 +1008,7 @@ static void SetSamplerState(u32 index, float custom_tex_scale, bool custom_tex, state.anisotropic_filtering = 0; } - if (has_arbitrary_mips && SamplerCommon::AreBpTexMode0MipmapsEnabled(tm0)) + if (has_arbitrary_mips && tm0.mipmap_filter != MipMode::None) { // Apply a secondary bias calculated from the IR scale to pull inwards mipmaps // that have arbitrary contents, eg. are used for fog effects where the -- cgit v1.2.3