summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache/surface_base.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-05-11 05:42:08 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-06-21 02:36:12 +0200
commit1bbc9debfbcbd960874e2f877604506d174f613c (patch)
treea5977d5db90882e0eb5240af45d42aad4a3dd266 /src/video_core/texture_cache/surface_base.h
parenttexture_cache: Implement GPU Dirty Flags (diff)
downloadyuzu-1bbc9debfbcbd960874e2f877604506d174f613c.tar
yuzu-1bbc9debfbcbd960874e2f877604506d174f613c.tar.gz
yuzu-1bbc9debfbcbd960874e2f877604506d174f613c.tar.bz2
yuzu-1bbc9debfbcbd960874e2f877604506d174f613c.tar.lz
yuzu-1bbc9debfbcbd960874e2f877604506d174f613c.tar.xz
yuzu-1bbc9debfbcbd960874e2f877604506d174f613c.tar.zst
yuzu-1bbc9debfbcbd960874e2f877604506d174f613c.zip
Diffstat (limited to 'src/video_core/texture_cache/surface_base.h')
-rw-r--r--src/video_core/texture_cache/surface_base.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/video_core/texture_cache/surface_base.h b/src/video_core/texture_cache/surface_base.h
index 095deb602..78db2d665 100644
--- a/src/video_core/texture_cache/surface_base.h
+++ b/src/video_core/texture_cache/surface_base.h
@@ -218,12 +218,12 @@ public:
virtual void DownloadTexture(std::vector<u8>& staging_buffer) = 0;
void MarkAsModified(const bool is_modified_, const u64 tick) {
- is_modified = is_modified_ || is_protected;
+ is_modified = is_modified_ || is_target;
modification_tick = tick;
}
- void MarkAsProtected(const bool is_protected) {
- this->is_protected = is_protected;
+ void MarkAsRenderTarget(const bool is_target) {
+ this->is_target = is_target;
}
void MarkAsPicked(const bool is_picked) {
@@ -235,7 +235,12 @@ public:
}
bool IsProtected() const {
- return is_protected;
+ // Only 3D Slices are to be protected
+ return is_target && params.block_depth > 0;
+ }
+
+ bool IsRenderTarget() const {
+ return is_target;
}
bool IsRegistered() const {
@@ -307,7 +312,7 @@ private:
}
bool is_modified{};
- bool is_protected{};
+ bool is_target{};
bool is_registered{};
bool is_picked{};
u64 modification_tick{};