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/RenderState.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Source/Core/VideoCommon/RenderState.cpp') diff --git a/Source/Core/VideoCommon/RenderState.cpp b/Source/Core/VideoCommon/RenderState.cpp index 358c99974e..85b3dc68c1 100644 --- a/Source/Core/VideoCommon/RenderState.cpp +++ b/Source/Core/VideoCommon/RenderState.cpp @@ -2,9 +2,10 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "VideoCommon/RenderState.h" + #include #include -#include "VideoCommon/SamplerCommon.h" + #include "VideoCommon/TextureConfig.h" void RasterizationState::Generate(const BPMemory& bp, PrimitiveType primitive_type) @@ -235,9 +236,9 @@ void SamplerState::Generate(const BPMemory& bp, u32 index) mag_filter = tm0.mag_filter == FilterMode::Linear ? Filter::Linear : Filter::Point; // If mipmaps are disabled, clamp min/max lod - max_lod = SamplerCommon::AreBpTexMode0MipmapsEnabled(tm0) ? tm1.max_lod.Value() : 0; + max_lod = tm0.mipmap_filter != MipMode::None ? tm1.max_lod.Value() : 0; min_lod = std::min(max_lod.Value(), static_cast(tm1.min_lod)); - lod_bias = SamplerCommon::AreBpTexMode0MipmapsEnabled(tm0) ? tm0.lod_bias * (256 / 32) : 0; + lod_bias = tm0.mipmap_filter != MipMode::None ? tm0.lod_bias * (256 / 32) : 0; // Address modes // Hardware testing indicates that wrap_mode set to 3 behaves the same as clamp. -- cgit v1.2.3