From 45e13b03f372230dbf780f3fa87dd88f388af605 Mon Sep 17 00:00:00 2001 From: arades79 Date: Sat, 11 Feb 2023 13:28:03 -0500 Subject: add static lifetime to constexpr values to force compile time evaluation where possible Signed-off-by: arades79 --- src/video_core/buffer_cache/buffer_cache.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/video_core/buffer_cache/buffer_cache.h') 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

::CommitAsyncFlushesHigh() { buffer_id, }); // Align up to avoid cache conflicts - constexpr u64 align = 8ULL; - constexpr u64 mask = ~(align - 1ULL); + constexpr static u64 align = 8ULL; + constexpr static u64 mask = ~(align - 1ULL); total_size_bytes += (new_size + align - 1) & mask; largest_copy = std::max(largest_copy, new_size); }; @@ -1843,8 +1843,8 @@ void BufferCache

::DownloadBufferMemory(Buffer& buffer, VAddr cpu_addr, u64 si .size = new_size, }); // Align up to avoid cache conflicts - constexpr u64 align = 256ULL; - constexpr u64 mask = ~(align - 1ULL); + constexpr static u64 align = 256ULL; + constexpr static u64 mask = ~(align - 1ULL); total_size_bytes += (new_size + align - 1) & mask; largest_copy = std::max(largest_copy, new_size); }; -- cgit v1.2.3