mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
TexCache: Avoid hashing videos at all in lazy mode.
This commit is contained in:
1 parent
e2c7366c92
commit
2d9719ed26
1 file changed
+10
-1
@@ -1724,6 +1724,15 @@ void TextureCacheCommon::DeleteTexture(TexCache::iterator it) {
|
||||
bool TextureCacheCommon::CheckFullHash(TexCacheEntry *entry, bool &doDelete) {
|
||||
int w = gstate.getTextureWidth(0);
|
||||
int h = gstate.getTextureHeight(0);
|
||||
bool isVideo = IsVideo(entry->addr);
|
||||
|
||||
// Don't even check the texture, just assume it has changed.
|
||||
if (isVideo && g_Config.bTextureBackoffCache) {
|
||||
// Attempt to ensure the hash doesn't incorrectly match in if the video stops.
|
||||
entry->fullhash = (entry->fullhash + 0xA535A535) * 11 + (entry->fullhash & 4);
|
||||
return false;
|
||||
}
|
||||
|
||||
u32 fullhash;
|
||||
{
|
||||
PROFILE_THIS_SCOPE("texhash");
|
||||
@@ -1731,7 +1740,7 @@ bool TextureCacheCommon::CheckFullHash(TexCacheEntry *entry, bool &doDelete) {
|
||||
}
|
||||
|
||||
if (fullhash == entry->fullhash) {
|
||||
if (g_Config.bTextureBackoffCache && !IsVideo(entry->addr)) {
|
||||
if (g_Config.bTextureBackoffCache && !isVideo) {
|
||||
if (entry->GetHashStatus() != TexCacheEntry::STATUS_HASHING && entry->numFrames > TexCacheEntry::FRAMES_REGAIN_TRUST) {
|
||||
// Reset to STATUS_HASHING.
|
||||
entry->SetHashStatus(TexCacheEntry::STATUS_HASHING);
|
||||
|
||||
Reference in new issue
Block a user