summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-11-27 02:04:06 +0100
committerLiam <byteslice@airmail.cc>2023-11-27 02:04:06 +0100
commit7c1cb5e8c9e88f7d339698d729ec4a00a79ae2f8 (patch)
tree58046564c19783d2defa200ec6b1ad48ddf4aeb8 /src/video_core
parentMerge pull request #11535 from GPUCode/upload_cmdbuf (diff)
downloadyuzu-7c1cb5e8c9e88f7d339698d729ec4a00a79ae2f8.tar
yuzu-7c1cb5e8c9e88f7d339698d729ec4a00a79ae2f8.tar.gz
yuzu-7c1cb5e8c9e88f7d339698d729ec4a00a79ae2f8.tar.bz2
yuzu-7c1cb5e8c9e88f7d339698d729ec4a00a79ae2f8.tar.lz
yuzu-7c1cb5e8c9e88f7d339698d729ec4a00a79ae2f8.tar.xz
yuzu-7c1cb5e8c9e88f7d339698d729ec4a00a79ae2f8.tar.zst
yuzu-7c1cb5e8c9e88f7d339698d729ec4a00a79ae2f8.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/buffer_cache/usage_tracker.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/buffer_cache/usage_tracker.h b/src/video_core/buffer_cache/usage_tracker.h
index ab05fe415..5f8688d31 100644
--- a/src/video_core/buffer_cache/usage_tracker.h
+++ b/src/video_core/buffer_cache/usage_tracker.h
@@ -58,7 +58,7 @@ private:
void TrackPage(u64 page, u64 offset, u64 size) noexcept {
const size_t offset_in_page = offset % PAGE_BYTES;
const size_t first_bit = offset_in_page >> BYTES_PER_BIT_SHIFT;
- const size_t num_bits = std::min(size, PAGE_BYTES) >> BYTES_PER_BIT_SHIFT;
+ const size_t num_bits = std::min<size_t>(size, PAGE_BYTES) >> BYTES_PER_BIT_SHIFT;
const size_t mask = ~u64{0} >> (64 - num_bits);
pages[page] |= (~u64{0} & mask) << first_bit;
}
@@ -66,7 +66,7 @@ private:
bool IsPageUsed(u64 page, u64 offset, u64 size) const noexcept {
const size_t offset_in_page = offset % PAGE_BYTES;
const size_t first_bit = offset_in_page >> BYTES_PER_BIT_SHIFT;
- const size_t num_bits = std::min(size, PAGE_BYTES) >> BYTES_PER_BIT_SHIFT;
+ const size_t num_bits = std::min<size_t>(size, PAGE_BYTES) >> BYTES_PER_BIT_SHIFT;
const size_t mask = ~u64{0} >> (64 - num_bits);
const size_t mask2 = (~u64{0} & mask) << first_bit;
return (pages[page] & mask2) != 0;