mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
VideoCommon: Refactor TexMode0 mipmaps disabled test into a helper function
This commit is contained in:
parent
902e5cddf7
commit
0b9a72a62d
8 changed files with 35 additions and 15 deletions
|
@ -4,6 +4,9 @@
|
|||
|
||||
#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.
|
||||
|
@ -16,3 +19,12 @@ constexpr bool IsBpTexMode0PointFiltering(const T& tm0)
|
|||
{
|
||||
return tm0.min_filter < 4 && !tm0.mag_filter;
|
||||
}
|
||||
|
||||
// Check if the minification filter has mipmap based filtering modes enabled.
|
||||
template<class T>
|
||||
constexpr bool AreBpTexMode0MipmapsEnabled(const T& tm0)
|
||||
{
|
||||
return (tm0.min_filter & 3) != 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue