summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.h
diff options
context:
space:
mode:
authorAnthony <Helios747@users.noreply.github.com>2017-07-11 22:49:19 -0700
committerGitHub <noreply@github.com>2017-07-11 22:49:19 -0700
commitab5a5ee3eac3edfeaf4dd019fbc1b0ddf4114529 (patch)
tree871838bce61fcb39644f88a6c4a1751cc3bb18d1 /Source/Core/VideoCommon/TextureCacheBase.h
parent1de9bf2ccabe9a0563ec11f145ffa657c609c50d (diff)
parent5a9daac7a601cf2f3e55f79b142a926fe70e325e (diff)
Merge pull request #5726 from mimimi085181/minimal-tmem-cache-emulation
Implement minimal emulation of TMEM caching
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.h')
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.h b/Source/Core/VideoCommon/TextureCacheBase.h
index 23f25f48fc..56bf6fb849 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.h
+++ b/Source/Core/VideoCommon/TextureCacheBase.h
@@ -5,6 +5,7 @@
#pragma once
#include <array>
+#include <bitset>
#include <map>
#include <memory>
#include <tuple>
@@ -39,6 +40,7 @@ public:
bool is_efb_copy;
bool is_custom_tex;
bool may_have_overlapping_textures = true;
+ bool tmem_only = false; // indicates that this texture only exists in the tmem cache
unsigned int native_width,
native_height; // Texture dimensions from the GameCube's point of view
@@ -125,8 +127,9 @@ public:
virtual void DeleteShaders() = 0;
TCacheEntry* Load(const u32 stage);
- void UnbindTextures();
- virtual void BindTextures();
+ static void InvalidateAllBindPoints() { valid_bind_points.reset(); }
+ static bool IsValidBindPoint(u32 i) { return valid_bind_points.test(i); }
+ void BindTextures();
void CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat, u32 dstStride,
bool is_depth_copy, const EFBRectangle& srcRect, bool isIntensity,
bool scaleByHalf);
@@ -158,6 +161,7 @@ protected:
size_t temp_size = 0;
std::array<TCacheEntry*, 8> bound_textures{};
+ static std::bitset<8> valid_bind_points;
private:
// Minimal version of TCacheEntry just for TexPool