aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/buffer_cache/buffer_base.h
diff options
context:
space:
mode:
authorMai M <mathew1800@gmail.com>2021-06-23 08:03:01 -0400
committerGitHub <noreply@github.com>2021-06-23 08:03:01 -0400
commit17fff10e06e7935522a5a69705b9a750761aab79 (patch)
tree7e7b3ae9fedbc0fed85f6c5c58e92e8d047efd87 /src/video_core/buffer_cache/buffer_base.h
parent20f474b09ab503607fab651342bcee433d117c80 (diff)
parentf9b940a442d50875d2b45a0f2f380ccad88670da (diff)
Merge pull request #6465 from FernandoS27/sex-on-the-beach
GPU: Implement a garbage collector for GPU Caches (project Reaper+)
Diffstat (limited to 'src/video_core/buffer_cache/buffer_base.h')
-rw-r--r--src/video_core/buffer_cache/buffer_base.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/video_core/buffer_cache/buffer_base.h b/src/video_core/buffer_cache/buffer_base.h
index a39505903..b121d36a3 100644
--- a/src/video_core/buffer_cache/buffer_base.h
+++ b/src/video_core/buffer_cache/buffer_base.h
@@ -256,6 +256,16 @@ public:
stream_score += score;
}
+ /// Sets the new frame tick
+ void SetFrameTick(u64 new_frame_tick) noexcept {
+ frame_tick = new_frame_tick;
+ }
+
+ /// Returns the new frame tick
+ [[nodiscard]] u64 FrameTick() const noexcept {
+ return frame_tick;
+ }
+
/// Returns the likeliness of this being a stream buffer
[[nodiscard]] int StreamScore() const noexcept {
return stream_score;
@@ -586,6 +596,7 @@ private:
RasterizerInterface* rasterizer = nullptr;
VAddr cpu_addr = 0;
Words words;
+ u64 frame_tick = 0;
BufferFlagBits flags{};
int stream_score = 0;
};