diff options
| author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-04-30 17:14:06 +0200 |
|---|---|---|
| committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-05-07 23:46:12 +0200 |
| commit | 6bc60f78d9dda1a6aeae90ad6b8ace4815916f8f (patch) | |
| tree | 0d71092cfad84e47a193917028200e2fc216f5e6 /src/video_core/buffer_cache/buffer_base.h | |
| parent | 36a670a4c9a91c2f91a26755404d5c58fb3ed5df (diff) | |
GPU: Add Reactive flushing
Diffstat (limited to 'src/video_core/buffer_cache/buffer_base.h')
| -rw-r--r-- | src/video_core/buffer_cache/buffer_base.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video_core/buffer_cache/buffer_base.h b/src/video_core/buffer_cache/buffer_base.h index 9cbd95c4b0..0bb3bf8ae7 100644 --- a/src/video_core/buffer_cache/buffer_base.h +++ b/src/video_core/buffer_cache/buffer_base.h @@ -18,6 +18,7 @@ namespace VideoCommon { enum class BufferFlagBits { Picked = 1 << 0, CachedWrites = 1 << 1, + PreemtiveDownload = 1 << 2, }; DECLARE_ENUM_FLAG_OPERATORS(BufferFlagBits) @@ -54,6 +55,10 @@ public: flags |= BufferFlagBits::Picked; } + void MarkPreemtiveDownload() noexcept { + flags |= BufferFlagBits::PreemtiveDownload; + } + /// Unmark buffer as picked void Unpick() noexcept { flags &= ~BufferFlagBits::Picked; @@ -84,6 +89,10 @@ public: return True(flags & BufferFlagBits::CachedWrites); } + bool IsPreemtiveDownload() const noexcept { + return True(flags & BufferFlagBits::PreemtiveDownload); + } + /// Returns the base CPU address of the buffer [[nodiscard]] VAddr CpuAddr() const noexcept { return cpu_addr; |
