From 88bd10cd30d487cc3efba20875b32df7cdacb686 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Fri, 6 Sep 2019 21:22:47 +1200 Subject: Extend TMEM cache implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now works with games that deliberately avoid invalidating TMEM because they know textures are too large to fit: * Sonic Riders * Metal Arms: Glitch in the System * Godzilla: Destroy All Monsters Melee * NHL Slapshot * Tak and the Power of Juju * Night at the Museum: Battle of the Smithsonian * 428: Fūsa Sareta Shibuya de --- Source/Core/VideoCommon/TextureCacheBase.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/VideoCommon/TextureCacheBase.h') diff --git a/Source/Core/VideoCommon/TextureCacheBase.h b/Source/Core/VideoCommon/TextureCacheBase.h index 0d456bfddf..12db848aa3 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.h +++ b/Source/Core/VideoCommon/TextureCacheBase.h @@ -14,6 +14,7 @@ #include #include +#include "Common/BitSet.h" #include "Common/CommonTypes.h" #include "Common/MathUtil.h" #include "VideoCommon/AbstractTexture.h" @@ -175,6 +176,7 @@ public: bool IsEfbCopy() const { return is_efb_copy; } bool IsCopy() const { return is_xfb_copy || is_efb_copy; } + u32 NumBlocksX() const; u32 NumBlocksY() const; u32 BytesPerRow() const; @@ -214,13 +216,11 @@ public: void Invalidate(); TCacheEntry* Load(const u32 stage); - static void InvalidateAllBindPoints() { valid_bind_points.reset(); } - static bool IsValidBindPoint(u32 i) { return valid_bind_points.test(i); } TCacheEntry* GetTexture(const int textureCacheSafetyColorSampleSize, TextureInfo& texture_info); TCacheEntry* GetXFBTexture(u32 address, u32 width, u32 height, u32 stride, MathUtil::Rectangle* display_rect); - virtual void BindTextures(); + virtual void BindTextures(BitSet32 used_textures); void CopyRenderTargetToTexture(u32 dstAddr, EFBCopyFormat dstFormat, u32 width, u32 height, u32 dstStride, bool is_depth_copy, const MathUtil::Rectangle& srcRect, bool isIntensity, -- cgit v1.2.3