mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Merge pull request #21369 from chrisfand/tagforce-changes
Adds one more image size (128x128) option for DXT1 block skipping in texture replacement
This commit is contained in:
@@ -308,6 +308,7 @@ bool TextureReplacer::LoadIniValues(IniFile &ini, VFSBackend *dir, bool isOverri
|
||||
options->Get("reduceHash", &reduceHash_);
|
||||
options->Get("ignoreMipmap", &ignoreMipmap_);
|
||||
options->Get("skipLastDXT1Blocks128x64", &skipLastDXT1Blocks128x64_);
|
||||
options->Get("skipLastDXT1Blocks128x128", &skipLastDXT1Blocks128x128_);
|
||||
if (reduceHash_ && hash_ == ReplacedTextureHash::QUICK) {
|
||||
reduceHash_ = false;
|
||||
ERROR_LOG(Log::TexReplacement, "Texture Replacement: reduceHash option requires safer hash, use xxh32 or xxh64 instead.");
|
||||
@@ -540,6 +541,9 @@ u32 TextureReplacer::ComputeHash(u32 addr, int bufw, int w, int h, bool swizzled
|
||||
// Skip the last few blocks as specified.
|
||||
sizeInRAM -= 8 * skipLastDXT1Blocks128x64_;
|
||||
}
|
||||
if (skipLastDXT1Blocks128x128_ && fmt == GE_TFMT_DXT1 && w == 128 && h == 128) {
|
||||
sizeInRAM -= 8 * skipLastDXT1Blocks128x128_;
|
||||
}
|
||||
|
||||
switch (hash_) {
|
||||
case ReplacedTextureHash::QUICK:
|
||||
|
||||
@@ -150,6 +150,7 @@ protected:
|
||||
bool reduceHash_ = false;
|
||||
bool ignoreMipmap_ = false;
|
||||
int skipLastDXT1Blocks128x64_ = 0;
|
||||
int skipLastDXT1Blocks128x128_ = 0;
|
||||
|
||||
float reduceHashGlobalValue = 0.5f; // Global value for textures dump pngs of all sizes, 0.5 by default but can be set in textures.ini
|
||||
|
||||
|
||||
Reference in New Issue
Block a user