summaryrefslogtreecommitdiffstats
path: root/src/video_core/buffer_cache/map_interval.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-05-16 23:07:03 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-05-21 21:02:54 +0200
commit3b0baf746ea6863d38d90521abba95303f321bf3 (patch)
tree5c3b648e083919099f15a45f6e592efcd6e7bac3 /src/video_core/buffer_cache/map_interval.h
parentbuffer_cache: Minor style changes (diff)
downloadyuzu-3b0baf746ea6863d38d90521abba95303f321bf3.tar
yuzu-3b0baf746ea6863d38d90521abba95303f321bf3.tar.gz
yuzu-3b0baf746ea6863d38d90521abba95303f321bf3.tar.bz2
yuzu-3b0baf746ea6863d38d90521abba95303f321bf3.tar.lz
yuzu-3b0baf746ea6863d38d90521abba95303f321bf3.tar.xz
yuzu-3b0baf746ea6863d38d90521abba95303f321bf3.tar.zst
yuzu-3b0baf746ea6863d38d90521abba95303f321bf3.zip
Diffstat (limited to 'src/video_core/buffer_cache/map_interval.h')
-rw-r--r--src/video_core/buffer_cache/map_interval.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/video_core/buffer_cache/map_interval.h b/src/video_core/buffer_cache/map_interval.h
index 1e77012d9..ad4db0135 100644
--- a/src/video_core/buffer_cache/map_interval.h
+++ b/src/video_core/buffer_cache/map_interval.h
@@ -9,30 +9,32 @@
namespace VideoCommon {
-struct MapIntervalBase {
- constexpr explicit MapIntervalBase(VAddr start, VAddr end, GPUVAddr gpu_addr) noexcept
+struct MapInterval {
+ constexpr explicit MapInterval() noexcept = default;
+
+ constexpr explicit MapInterval(VAddr start, VAddr end, GPUVAddr gpu_addr) noexcept
: start{start}, end{end}, gpu_addr{gpu_addr} {}
- constexpr bool IsInside(const VAddr other_start, const VAddr other_end) const noexcept {
+ constexpr bool IsInside(VAddr other_start, VAddr other_end) const noexcept {
return (start <= other_start && other_end <= end);
}
- constexpr void MarkAsModified(bool is_modified_, u64 ticks_) noexcept {
- is_modified = is_modified_;
- ticks = ticks_;
- }
-
- constexpr bool operator==(const MapIntervalBase& rhs) const noexcept {
+ constexpr bool operator==(const MapInterval& rhs) const noexcept {
return start == rhs.start && end == rhs.end;
}
- constexpr bool operator!=(const MapIntervalBase& rhs) const noexcept {
+ constexpr bool operator!=(const MapInterval& rhs) const noexcept {
return !operator==(rhs);
}
- VAddr start;
- VAddr end;
- GPUVAddr gpu_addr;
+ constexpr void MarkAsModified(bool is_modified_, u64 ticks_) noexcept {
+ is_modified = is_modified_;
+ ticks = ticks_;
+ }
+
+ VAddr start = 0;
+ VAddr end = 0;
+ GPUVAddr gpu_addr = 0;
VAddr cpu_addr = 0;
u64 ticks = 0;
bool is_written = false;