GS/HW: Improve PS2 trilinear selection

trilinear_auto should only be set when using basic, trilinear can be
used with PS2 mips.
This commit is contained in:
Connor McLaughlin 2022-09-28 22:06:07 +10:00 committed by refractionpcsx2
parent 3bbb510b7a
commit 56d6014626
1 changed files with 15 additions and 11 deletions

View File

@ -3031,25 +3031,29 @@ void GSRendererHW::EmulateTextureSampler(const GSTextureCache::Source* tex)
bool bilinear = m_vt.IsLinear();
int trilinear = 0;
bool trilinear_auto = false;
bool trilinear_auto = false; // Generate mipmaps if needed (basic).
switch (GSConfig.UserHacks_TriFilter)
{
case TriFiltering::Forced:
{
// force bilinear otherwise we can end up with min/mag nearest and mip linear.
bilinear = true;
trilinear = static_cast<u8>(GS_MIN_FILTER::Linear_Mipmap_Linear);
trilinear_auto = !need_mipmap || GSConfig.HWMipmap != HWMipmapLevel::Full;
}
break;
{
// Force bilinear otherwise we can end up with min/mag nearest and mip linear.
// We don't need to check for HWMipmapLevel::Off here, because forced trilinear implies forced mipmaps.
bilinear = true;
trilinear = static_cast<u8>(GS_MIN_FILTER::Linear_Mipmap_Linear);
trilinear_auto = !need_mipmap || GSConfig.HWMipmap != HWMipmapLevel::Full;
}
break;
case TriFiltering::PS2:
if (need_mipmap && GSConfig.HWMipmap != HWMipmapLevel::Full)
{
// Can only use PS2 trilinear when mipmapping is enabled.
if (need_mipmap && GSConfig.HWMipmap != HWMipmapLevel::Off)
{
trilinear = m_context->TEX1.MMIN;
trilinear_auto = true;
trilinear_auto = GSConfig.HWMipmap != HWMipmapLevel::Full;
}
break;
}
break;
case TriFiltering::Automatic:
case TriFiltering::Off: