mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-01 01:20:40 +00:00
This was added in 0b9a72a62d38481ff08f742b2318d07f29ff5dff but became irrelevant in 70f9fc4e7526fc9cfc008a43cd33229f62be99b6 as the check is now self-explanatory due to a rejiggering of the bitfields.
21 lines
813 B
C++
21 lines
813 B
C++
// Copyright 2016 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
namespace SamplerCommon
|
|
{
|
|
// Helper for checking if a BPMemory TexMode0 register is set to Point
|
|
// Filtering modes. This is used to decide whether Anisotropic enhancements
|
|
// are (mostly) safe in the VideoBackends.
|
|
// If both the minification and magnification filters are set to POINT modes
|
|
// then applying anisotropic filtering is equivalent to forced filtering. Point
|
|
// mode textures are usually some sort of 2D UI billboard which will end up
|
|
// misaligned from the correct pixels when filtered anisotropically.
|
|
template <class T>
|
|
constexpr bool IsBpTexMode0PointFiltering(const T& tm0)
|
|
{
|
|
return tm0.min_filter == FilterMode::Near && tm0.mag_filter == FilterMode::Near;
|
|
}
|
|
} // namespace SamplerCommon
|