GS/wx: Change TriFilter name and move it to main renderer tab on wx.

Matches Qt behavior.
This commit is contained in:
lightningterror 2022-10-01 05:32:31 +02:00 committed by refractionpcsx2
parent aafb7e22df
commit d908fa5e38
10 changed files with 16 additions and 27 deletions

View File

@ -549,7 +549,7 @@ struct Pcsx2Config
int UserHacks_TCOffsetX{0};
int UserHacks_TCOffsetY{0};
int UserHacks_CPUSpriteRenderBW{0};
TriFiltering UserHacks_TriFilter{TriFiltering::Automatic};
TriFiltering TriFilter{TriFiltering::Automatic};
int OverrideTextureBarriers{-1};
int OverrideGeometryShaders{-1};

View File

@ -2633,7 +2633,7 @@ void FullscreenUI::DrawGraphicsSettingsPage()
DrawIntListSetting(bsi, "Bilinear Filtering", "Selects where bilinear filtering is utilized when rendering textures.", "EmuCore/GS",
"filter", static_cast<int>(BiFiltering::PS2), s_bilinear_options, std::size(s_bilinear_options));
DrawIntListSetting(bsi, "Trilinear Filtering", "Selects where trilinear filtering is utilized when rendering textures.",
"EmuCore/GS", "UserHacks_TriFilter", static_cast<int>(TriFiltering::Automatic), s_trilinear_options,
"EmuCore/GS", "TriFilter", static_cast<int>(TriFiltering::Automatic), s_trilinear_options,
std::size(s_trilinear_options), -1);
DrawStringListSetting(bsi, "Anisotropic Filtering", "Selects where anistropic filtering is utilized when rendering textures.",
"EmuCore/GS", "MaxAnisotropy", "0", s_anisotropic_filtering_entries, s_anisotropic_filtering_values,

View File

@ -833,7 +833,7 @@ void GSUpdateConfig(const Pcsx2Config::GSOptions& new_config)
if (
(GSConfig.UseHardwareRenderer() && GSConfig.HWMipmap != old_config.HWMipmap) ||
GSConfig.TexturePreloading != old_config.TexturePreloading ||
GSConfig.UserHacks_TriFilter != old_config.UserHacks_TriFilter ||
GSConfig.TriFilter != old_config.TriFilter ||
GSConfig.GPUPaletteConversion != old_config.GPUPaletteConversion ||
GSConfig.PreloadFrameWithGSData != old_config.PreloadFrameWithGSData ||
GSConfig.WrapGSMem != old_config.WrapGSMem ||
@ -1498,6 +1498,7 @@ void GSApp::Init()
m_default_configuration["SkipDuplicateFrames"] = "0";
m_default_configuration["texture_preloading"] = "2";
m_default_configuration["ThreadedPresentation"] = "0";
m_default_configuration["TriFilter"] = std::to_string(static_cast<s8>(TriFiltering::Automatic));
m_default_configuration["TVShader"] = "0";
m_default_configuration["upscale_multiplier"] = "1";
m_default_configuration["UseBlitSwapChain"] = "0";
@ -1519,7 +1520,6 @@ void GSApp::Init()
m_default_configuration["UserHacks_TCOffsetX"] = "0";
m_default_configuration["UserHacks_TCOffsetY"] = "0";
m_default_configuration["UserHacks_TextureInsideRt"] = "0";
m_default_configuration["UserHacks_TriFilter"] = std::to_string(static_cast<s8>(TriFiltering::Automatic));
m_default_configuration["UserHacks_WildHack"] = "0";
m_default_configuration["wrap_gs_mem"] = "0";
m_default_configuration["vsync"] = "0";

View File

@ -1516,7 +1516,7 @@ void GSRendererHW::Draw()
m_src = tex_psm.depth ? m_tc->LookupDepthSource(TEX0, env.TEXA, tmm.coverage) :
m_tc->LookupSource(TEX0, env.TEXA, tmm.coverage, (GSConfig.HWMipmap >= HWMipmapLevel::Basic ||
GSConfig.UserHacks_TriFilter == TriFiltering::Forced) ? &hash_lod_range : nullptr);
GSConfig.TriFilter == TriFiltering::Forced) ? &hash_lod_range : nullptr);
const int tw = 1 << TEX0.TW;
const int th = 1 << TEX0.TH;
@ -3032,7 +3032,7 @@ void GSRendererHW::EmulateTextureSampler(const GSTextureCache::Source* tex)
bool bilinear = m_vt.IsLinear();
int trilinear = 0;
bool trilinear_auto = false; // Generate mipmaps if needed (basic).
switch (GSConfig.UserHacks_TriFilter)
switch (GSConfig.TriFilter)
{
case TriFiltering::Forced:
{

View File

@ -496,7 +496,7 @@ void GSTextureReplacements::PrecacheReplacementTextures()
// predict whether the requests will come with mipmaps
// TODO: This will be wrong for hw mipmap games like Jak.
const bool mipmap = GSConfig.HWMipmap >= HWMipmapLevel::Basic ||
GSConfig.UserHacks_TriFilter == TriFiltering::Forced;
GSConfig.TriFilter == TriFiltering::Forced;
// pretty simple, just go through the filenames and if any aren't cached, cache them
for (const auto& it : s_replacement_texture_filenames)

View File

@ -52,6 +52,7 @@ enum
IDC_AFCOMBO,
IDC_DITHERING,
IDC_MIPMAP_HW,
IDC_TRI_FILTER,
IDC_CRC_LEVEL,
IDC_ACCURATE_BLEND_UNIT,
// Rendering Hacks
@ -63,7 +64,6 @@ enum
IDC_MEMORY_WRAPPING,
IDC_PRELOAD_GS,
IDC_HALF_SCREEN_TS,
IDC_TRI_FILTER,
IDC_SKIPDRAWEND,
IDC_SKIPDRAWHACKEDIT,
IDC_SKIPDRAWSTART,

View File

@ -293,6 +293,7 @@ RendererTab::RendererTab(wxWindow* parent)
m_ui.addComboBoxAndLabel(hw_choice_grid, "Anisotropic Filtering:", "MaxAnisotropy", &theApp.m_gs_max_anisotropy, IDC_AFCOMBO, aniso_prereq);
m_ui.addComboBoxAndLabel(hw_choice_grid, "Dithering (PgDn):", "dithering_ps2", &theApp.m_gs_dithering, IDC_DITHERING, hw_prereq);
m_ui.addComboBoxAndLabel(hw_choice_grid, "Mipmapping:", "mipmap_hw", &theApp.m_gs_hw_mipmapping, IDC_MIPMAP_HW, hw_prereq);
m_ui.addComboBoxAndLabel(hw_choice_grid, "Trilinear Filtering:", "TriFilter", &theApp.m_gs_trifilter, IDC_TRI_FILTER, hw_prereq);
m_ui.addComboBoxAndLabel(hw_choice_grid, "CRC Hack Level:", "crc_hack_level", &theApp.m_gs_crc_level, IDC_CRC_LEVEL, hw_prereq);
m_ui.addComboBoxAndLabel(hw_choice_grid, "Blending Accuracy:", "accurate_blending_unit", &theApp.m_gs_acc_blend_level, IDC_ACCURATE_BLEND_UNIT, hw_prereq);
m_ui.addComboBoxAndLabel(hw_choice_grid, "Texture Preloading:", "texture_preloading", &theApp.m_gs_texture_preloading, IDC_PRELOAD_TEXTURES, hw_prereq);
@ -371,7 +372,6 @@ HacksTab::HacksTab(wxWindow* parent)
// Renderer Hacks:
m_ui.addComboBoxAndLabel(rend_hack_choice_grid, "Half Screen Fix:", "UserHacks_Half_Bottom_Override", &theApp.m_gs_generic_list, IDC_HALF_SCREEN_TS, hacks_prereq);
m_ui.addComboBoxAndLabel(rend_hack_choice_grid, "Trilinear Filtering:", "UserHacks_TriFilter", &theApp.m_gs_trifilter, IDC_TRI_FILTER, hacks_prereq);
// Skipdraw Range
add_label(this, rend_hack_choice_grid, "Skipdraw Range:", IDC_SKIPDRAWEND);

View File

@ -318,14 +318,8 @@ bool GameDatabaseSchema::isUserHackHWFix(GSHWFixId id)
case GSHWFixId::Mipmap:
case GSHWFixId::TexturePreloading:
case GSHWFixId::PointListPalette:
return false;
#ifdef PCSX2_CORE
// Trifiltering isn't a hack in Qt.
case GSHWFixId::TrilinearFiltering:
return false;
#endif
default:
return true;
}
@ -479,7 +473,7 @@ bool GameDatabaseSchema::GameEntry::configMatchesHWFix(const Pcsx2Config::GSOpti
return (config.HWMipmap == HWMipmapLevel::Automatic || static_cast<int>(config.HWMipmap) == value);
case GSHWFixId::TrilinearFiltering:
return (config.UserHacks_TriFilter == TriFiltering::Automatic || static_cast<int>(config.UserHacks_TriFilter) == value);
return (config.TriFilter == TriFiltering::Automatic || static_cast<int>(config.TriFilter) == value);
case GSHWFixId::SkipDrawStart:
return (config.SkipDrawStart == value);
@ -597,9 +591,9 @@ u32 GameDatabaseSchema::GameEntry::applyGSHardwareFixes(Pcsx2Config::GSOptions&
{
if (value >= 0 && value <= static_cast<int>(TriFiltering::Forced))
{
if (config.UserHacks_TriFilter == TriFiltering::Automatic)
config.UserHacks_TriFilter = static_cast<TriFiltering>(value);
else if (config.UserHacks_TriFilter == TriFiltering::Off)
if (config.TriFilter == TriFiltering::Automatic)
config.TriFilter = static_cast<TriFiltering>(value);
else if (config.TriFilter == TriFiltering::Off)
Console.Warning("[GameDB] Game requires trilinear filtering but it has been force disabled.");
}
}

View File

@ -407,6 +407,7 @@ bool Pcsx2Config::GSOptions::OptionsAreEqual(const GSOptions& right) const
OpEqu(MaxAnisotropy) &&
OpEqu(SWExtraThreads) &&
OpEqu(SWExtraThreadsHeight) &&
OpEqu(TriFilter) &&
OpEqu(TVShader) &&
OpEqu(SkipDrawEnd) &&
OpEqu(SkipDrawStart) &&
@ -417,7 +418,6 @@ bool Pcsx2Config::GSOptions::OptionsAreEqual(const GSOptions& right) const
OpEqu(UserHacks_TCOffsetX) &&
OpEqu(UserHacks_TCOffsetY) &&
OpEqu(UserHacks_CPUSpriteRenderBW) &&
OpEqu(UserHacks_TriFilter) &&
OpEqu(OverrideTextureBarriers) &&
OpEqu(OverrideGeometryShaders) &&
@ -603,7 +603,7 @@ void Pcsx2Config::GSOptions::ReloadIniSettings()
GSSettingIntEx(UserHacks_TCOffsetX, "UserHacks_TCOffsetX");
GSSettingIntEx(UserHacks_TCOffsetY, "UserHacks_TCOffsetY");
GSSettingIntEx(UserHacks_CPUSpriteRenderBW, "UserHacks_CPUSpriteRenderBW");
GSSettingIntEnumEx(UserHacks_TriFilter, "UserHacks_TriFilter");
GSSettingIntEnumEx(TriFilter, "TriFilter");
GSSettingIntEx(OverrideTextureBarriers, "OverrideTextureBarriers");
GSSettingIntEx(OverrideGeometryShaders, "OverrideGeometryShaders");
@ -652,11 +652,6 @@ void Pcsx2Config::GSOptions::MaskUserHacks()
UserHacks_CPUSpriteRenderBW = 0;
SkipDrawStart = 0;
SkipDrawEnd = 0;
// in wx, we put trilinear filtering behind user hacks, but not in qt.
#ifndef PCSX2_CORE
UserHacks_TriFilter = TriFiltering::Automatic;
#endif
}
void Pcsx2Config::GSOptions::MaskUpscalingHacks()

View File

@ -1799,7 +1799,7 @@ void VMManager::WarnAboutUnsafeSettings()
messages += ICON_FA_IMAGES " Mipmapping is not set to automatic. This may break rendering in some games.\n";
if (EmuConfig.GS.TextureFiltering != BiFiltering::PS2)
messages += ICON_FA_FILTER " Texture filtering is not set to Bilinear (PS2). This will break rendering in some games.\n";
if (EmuConfig.GS.UserHacks_TriFilter != TriFiltering::Automatic)
if (EmuConfig.GS.TriFilter != TriFiltering::Automatic)
messages += ICON_FA_PAGER " Trilinear filtering is not set to automatic. This may break rendering in some games.\n";
if (EmuConfig.GS.AccurateBlendingUnit <= AccBlendLevel::Minimum)
messages += ICON_FA_BLENDER " Blending is below basic, this may break effects in some games.\n";