summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache/image_base.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2021-06-13 15:47:54 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-06-16 21:35:02 +0200
commitd8ad6aa18754eeebbcc1a59a683c7c3ff216ebe7 (patch)
tree21aced60b83b8bc16fb8920a4911b4a2070ddd81 /src/video_core/texture_cache/image_base.h
parentInitial Reaper Setup (diff)
downloadyuzu-d8ad6aa18754eeebbcc1a59a683c7c3ff216ebe7.tar
yuzu-d8ad6aa18754eeebbcc1a59a683c7c3ff216ebe7.tar.gz
yuzu-d8ad6aa18754eeebbcc1a59a683c7c3ff216ebe7.tar.bz2
yuzu-d8ad6aa18754eeebbcc1a59a683c7c3ff216ebe7.tar.lz
yuzu-d8ad6aa18754eeebbcc1a59a683c7c3ff216ebe7.tar.xz
yuzu-d8ad6aa18754eeebbcc1a59a683c7c3ff216ebe7.tar.zst
yuzu-d8ad6aa18754eeebbcc1a59a683c7c3ff216ebe7.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/texture_cache/image_base.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/image_base.h b/src/video_core/texture_cache/image_base.h
index 0f69d8a32..40c047ea1 100644
--- a/src/video_core/texture_cache/image_base.h
+++ b/src/video_core/texture_cache/image_base.h
@@ -25,6 +25,12 @@ enum class ImageFlagBits : u32 {
Strong = 1 << 5, ///< Exists in the image table, the dimensions are can be trusted
Registered = 1 << 6, ///< True when the image is registered
Picked = 1 << 7, ///< Temporary flag to mark the image as picked
+
+ // Garbage Collection Flags
+ BadOverlap = 1 << 8, ///< This image overlaps other but doesn't fit, has higher
+ ///< garbage collection priority
+ Alias = 1 << 9, ///< This image has aliases and has priority on garbage
+ ///< collection
};
DECLARE_ENUM_FLAG_OPERATORS(ImageFlagBits)
@@ -51,6 +57,9 @@ struct ImageBase {
return cpu_addr < overlap_end && overlap_cpu_addr < cpu_addr_end;
}
+ void CheckBadOverlapState();
+ void CheckAliasState();
+
ImageInfo info;
u32 guest_size_bytes = 0;
@@ -74,6 +83,7 @@ struct ImageBase {
std::vector<SubresourceBase> slice_subresources;
std::vector<AliasedImage> aliased_images;
+ std::vector<ImageId> overlapping_images;
};
struct ImageAllocBase {