summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.h
diff options
context:
space:
mode:
authoriwubcode <iwubcode@users.noreply.github.com>2021-05-01 00:59:24 -0500
committeriwubcode <iwubcode@users.noreply.github.com>2021-05-11 22:58:36 -0500
commit182dfc38e6cb6256cc41f5dd3437a7e4f407ff17 (patch)
tree03cef62f7bed7594f3e71956f8ac7e7a1816b691 /Source/Core/VideoCommon/TextureCacheBase.h
parent1f26b694dc824be2ba6b77ac3f5a09c916ba15f0 (diff)
VideoCommon: move all texture calculations to a "TextureInfo" class. This ever so slightly improves readability and allows for the full texture name to be generated outside of the hires texture cache
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.h')
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.h b/Source/Core/VideoCommon/TextureCacheBase.h
index 599f1c2a79..7aef40f080 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.h
+++ b/Source/Core/VideoCommon/TextureCacheBase.h
@@ -21,6 +21,7 @@
#include "VideoCommon/BPMemory.h"
#include "VideoCommon/TextureConfig.h"
#include "VideoCommon/TextureDecoder.h"
+#include "VideoCommon/TextureInfo.h"
class AbstractFramebuffer;
class AbstractStagingTexture;
@@ -216,11 +217,7 @@ public:
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(u32 address, u32 width, u32 height, const TextureFormat texformat,
- const int textureCacheSafetyColorSampleSize, u32 tlutaddr = 0,
- TLUTFormat tlutfmt = TLUTFormat::IA8, bool use_mipmaps = false,
- u32 tex_levels = 1, bool from_tmem = false, u32 tmem_address_even = 0,
- u32 tmem_address_odd = 0);
+ TCacheEntry* GetTexture(const int textureCacheSafetyColorSampleSize, TextureInfo& texture_info);
TCacheEntry* GetXFBTexture(u32 address, u32 width, u32 height, u32 stride,
MathUtil::Rectangle<int>* display_rect);
@@ -286,11 +283,11 @@ private:
TCacheEntry* GetXFBFromCache(u32 address, u32 width, u32 height, u32 stride, u64 hash);
- TCacheEntry* ApplyPaletteToEntry(TCacheEntry* entry, u8* palette, TLUTFormat tlutfmt);
+ TCacheEntry* ApplyPaletteToEntry(TCacheEntry* entry, const u8* palette, TLUTFormat tlutfmt);
TCacheEntry* ReinterpretEntry(const TCacheEntry* existing_entry, TextureFormat new_format);
- TCacheEntry* DoPartialTextureUpdates(TCacheEntry* entry_to_update, u8* palette,
+ TCacheEntry* DoPartialTextureUpdates(TCacheEntry* entry_to_update, const u8* palette,
TLUTFormat tlutfmt);
void StitchXFBCopy(TCacheEntry* entry_to_update);