Pass video info to texture replacements.

This commit is contained in:
Unknown W. Brackets committed 2016-05-01 08:54:43 -07:00
1 parent f5b93bc6f0
commit c20075b0e0
5 files changed
+56 -17

No files matched your search

+10 -1
View File
@@ -1812,8 +1812,17 @@ void TextureCache::LoadTextureLevel(TexCacheEntry &entry, ReplacedTexture &repla
}
if (replacer.Enabled()) {
ReplacedTextureDecodeInfo replacedInfo;
replacedInfo.cachekey = entry.CacheKey();
replacedInfo.hash = entry.fullhash;
replacedInfo.addr = entry.addr;
replacedInfo.isVideo = videos_.find(entry.addr & 0x3FFFFFFF) != videos_.end();
replacedInfo.isFinal = (entry.status & TexCacheEntry::STATUS_TO_SCALE) == 0;
replacedInfo.scaleFactor = scaleFactor;
replacedInfo.fmt = FromGLESFormat(dstFmt, useBGRA);
int bpp = dstFmt == GL_UNSIGNED_BYTE ? 4 : 2;
replacer.NotifyTextureDecoded(entry.CacheKey(), entry.fullhash,entry.addr, pixelData, (useUnpack ? bufw : w) * bpp, level, w, h, scaleFactor, FromGLESFormat(dstFmt, useBGRA));
replacer.NotifyTextureDecoded(replacedInfo, pixelData, (useUnpack ? bufw : w) * bpp, level, w, h);
}
}