summaryrefslogtreecommitdiff
path: root/src/video_core/buffer_cache
diff options
context:
space:
mode:
authorGravatar arades792023-02-11 13:28:03 -0500
committerGravatar arades792023-02-14 12:33:11 -0500
commit45e13b03f372230dbf780f3fa87dd88f388af605 (patch)
tree555593e7e5016b6ba2a777d7417ada244abce458 /src/video_core/buffer_cache
parentMerge pull request #9795 from Kelebek1/biquad_fix (diff)
downloadyuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.gz
yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.xz
yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.zip
add static lifetime to constexpr values to force compile time evaluation where possible
Signed-off-by: arades79 <scravers@protonmail.com>
Diffstat (limited to 'src/video_core/buffer_cache')
-rw-r--r--src/video_core/buffer_cache/buffer_cache.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index 627917ab6..b650d0e59 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -890,8 +890,8 @@ void BufferCache<P>::CommitAsyncFlushesHigh() {
890 buffer_id, 890 buffer_id,
891 }); 891 });
892 // Align up to avoid cache conflicts 892 // Align up to avoid cache conflicts
893 constexpr u64 align = 8ULL; 893 constexpr static u64 align = 8ULL;
894 constexpr u64 mask = ~(align - 1ULL); 894 constexpr static u64 mask = ~(align - 1ULL);
895 total_size_bytes += (new_size + align - 1) & mask; 895 total_size_bytes += (new_size + align - 1) & mask;
896 largest_copy = std::max(largest_copy, new_size); 896 largest_copy = std::max(largest_copy, new_size);
897 }; 897 };
@@ -1843,8 +1843,8 @@ void BufferCache<P>::DownloadBufferMemory(Buffer& buffer, VAddr cpu_addr, u64 si
1843 .size = new_size, 1843 .size = new_size,
1844 }); 1844 });
1845 // Align up to avoid cache conflicts 1845 // Align up to avoid cache conflicts
1846 constexpr u64 align = 256ULL; 1846 constexpr static u64 align = 256ULL;
1847 constexpr u64 mask = ~(align - 1ULL); 1847 constexpr static u64 mask = ~(align - 1ULL);
1848 total_size_bytes += (new_size + align - 1) & mask; 1848 total_size_bytes += (new_size + align - 1) & mask;
1849 largest_copy = std::max(largest_copy, new_size); 1849 largest_copy = std::max(largest_copy, new_size);
1850 }; 1850 };