mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-01 20:10:56 +01:00
19 lines
743 B
C
19 lines
743 B
C
|
// Copyright 2016 Dolphin Emulator Project
|
||
|
// Licensed under GPLv2+
|
||
|
// Refer to the license.txt file included.
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
// 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 < 4 && !tm0.mag_filter;
|
||
|
}
|