diff options
| author | iwubcode <iwubcode@users.noreply.github.com> | 2023-03-14 00:10:40 -0500 |
|---|---|---|
| committer | iwubcode <iwubcode@users.noreply.github.com> | 2023-04-08 02:54:00 -0500 |
| commit | e101f7f6aeb941b54bed30af05d6c83bad8ee0aa (patch) | |
| tree | cce6212eebf8cb3a0c3c58987288cb1d2fabf70d /Source/Core/VideoCommon/TextureCacheBase.h | |
| parent | aaedc2827d7399a7144830f5ba0535ba95dcabaf (diff) | |
VideoCommon: refactor GetTexture into a separate function for creation, separating the custom texture data path from the game's texture data path
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.h')
| -rw-r--r-- | Source/Core/VideoCommon/TextureCacheBase.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.h b/Source/Core/VideoCommon/TextureCacheBase.h index ce001bb53c..10018732b1 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.h +++ b/Source/Core/VideoCommon/TextureCacheBase.h @@ -32,6 +32,11 @@ class AbstractStagingTexture; class PointerWrap; struct VideoConfig; +namespace VideoCommon +{ +class CustomTextureData; +} + constexpr std::string_view EFB_DUMP_PREFIX = "efb1"; constexpr std::string_view XFB_DUMP_PREFIX = "xfb1"; @@ -242,6 +247,14 @@ public: TexPoolEntry(std::unique_ptr<AbstractTexture> tex, std::unique_ptr<AbstractFramebuffer> fb); }; + struct TextureCreationInfo + { + u64 base_hash; + u64 full_hash; + u32 bytes_per_block; + u32 palette_size; + }; + TextureCacheBase(); virtual ~TextureCacheBase(); @@ -328,6 +341,11 @@ private: void SetBackupConfig(const VideoConfig& config); + RcTcacheEntry CreateTextureEntry(const TextureCreationInfo& creation_info, + const TextureInfo& texture_info, int safety_color_sample_size, + VideoCommon::CustomTextureData* custom_texture_data, + bool custom_arbitrary_mipmaps); + RcTcacheEntry GetXFBFromCache(u32 address, u32 width, u32 height, u32 stride); RcTcacheEntry ApplyPaletteToEntry(RcTcacheEntry& entry, const u8* palette, TLUTFormat tlutfmt); |
