summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.h
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2019-09-06 21:22:47 +1200
committerScott Mansell <phiren@gmail.com>2021-10-12 15:51:24 +1300
commit88bd10cd30d487cc3efba20875b32df7cdacb686 (patch)
treeaf82a40fbee79a65ca4720989d5f2ed1cc4a830b /Source/Core/VideoCommon/TextureCacheBase.h
parenteee302c040053c481c251ae8dd4b6cc33d34ec3b (diff)
Extend TMEM cache implementation
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
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.h')
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.h6
1 files changed, 3 insertions, 3 deletions
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 <unordered_set>
#include <vector>
+#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<int>* 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<int>& srcRect, bool isIntensity,