GS/TextureReplacements: Add options to filter dumping to direct/palette textures

This commit is contained in:
Connor McLaughlin 2022-05-11 20:36:04 +10:00 committed by refractionpcsx2
parent d329cabf07
commit 322ff3fcb9
4 changed files with 16 additions and 7 deletions

View File

@ -475,6 +475,8 @@ struct Pcsx2Config
DumpReplaceableTextures : 1,
DumpReplaceableMipmaps : 1,
DumpTexturesWithFMVActive : 1,
DumpDirectTextures : 1,
DumpPaletteTextures : 1,
LoadTextureReplacements : 1,
LoadTextureReplacementsAsync : 1,
PrecacheTextureReplacements : 1;

View File

@ -1326,6 +1326,8 @@ void GSApp::Init()
m_default_configuration["DumpReplaceableTextures"] = "0";
m_default_configuration["DumpReplaceableMipmaps"] = "0";
m_default_configuration["DumpTexturesWithFMVActive"] = "0";
m_default_configuration["DumpDirectTextures"] = "1";
m_default_configuration["DumpPaletteTextures"] = "1";
m_default_configuration["extrathreads"] = "2";
m_default_configuration["extrathreads_height"] = "4";
m_default_configuration["filter"] = std::to_string(static_cast<s8>(BiFiltering::PS2));

View File

@ -1543,7 +1543,8 @@ extern bool FMVstarted;
GSTextureCache::HashCacheEntry* GSTextureCache::LookupHashCache(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, bool& paltex, const u32* clut, const GSVector2i* lod)
{
// don't bother hashing if we're not dumping or replacing.
const bool dump = GSConfig.DumpReplaceableTextures && (!FMVstarted || GSConfig.DumpTexturesWithFMVActive);
const bool dump = GSConfig.DumpReplaceableTextures && (!FMVstarted || GSConfig.DumpTexturesWithFMVActive) &&
(clut ? GSConfig.DumpPaletteTextures : GSConfig.DumpDirectTextures);
const bool replace = GSConfig.LoadTextureReplacements;
const bool can_cache = CanCacheTextureSize(TEX0.TW, TEX0.TH);
if (!dump && !replace && !can_cache)

View File

@ -336,6 +336,8 @@ Pcsx2Config::GSOptions::GSOptions()
DumpReplaceableTextures = false;
DumpReplaceableMipmaps = false;
DumpTexturesWithFMVActive = false;
DumpDirectTextures = true;
DumpPaletteTextures = true;
LoadTextureReplacements = false;
LoadTextureReplacementsAsync = true;
PrecacheTextureReplacements = false;
@ -551,12 +553,14 @@ void Pcsx2Config::GSOptions::ReloadIniSettings()
GSSettingBoolEx(SaveFrame, "savef");
GSSettingBoolEx(SaveTexture, "savet");
GSSettingBoolEx(SaveDepth, "savez");
GSSettingBoolEx(DumpReplaceableTextures, "DumpReplaceableTextures");
GSSettingBoolEx(DumpReplaceableMipmaps, "DumpReplaceableMipmaps");
GSSettingBoolEx(DumpTexturesWithFMVActive, "DumpTexturesWithFMVActive");
GSSettingBoolEx(LoadTextureReplacements, "LoadTextureReplacements");
GSSettingBoolEx(LoadTextureReplacementsAsync, "LoadTextureReplacementsAsync");
GSSettingBoolEx(PrecacheTextureReplacements, "PrecacheTextureReplacements");
GSSettingBool(DumpReplaceableTextures);
GSSettingBool(DumpReplaceableMipmaps);
GSSettingBool(DumpTexturesWithFMVActive);
GSSettingBool(DumpDirectTextures);
GSSettingBool(DumpPaletteTextures);
GSSettingBool(LoadTextureReplacements);
GSSettingBool(LoadTextureReplacementsAsync);
GSSettingBool(PrecacheTextureReplacements);
GSSettingIntEnumEx(InterlaceMode, "deinterlace");