diff options
| author | Morph <39850852+Morph1984@users.noreply.github.com> | 2023-05-03 10:52:56 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-03 10:52:56 -0400 |
| commit | 5e21f326b257ae9c8ce97c58e54f6a509e76303d (patch) | |
| tree | 83a4f930dc66b099c29311f2301e2d8d266dee23 /src/video_core/buffer_cache | |
| parent | 069637f4ff1e4d3c7629a41c50295ab6ddbe3b22 (diff) | |
| parent | 2438a0b0876bafed6c6f60d235eb675a9dd7a977 (diff) | |
Merge pull request #10143 from liamwhite/fruit-company-moment
video_core: fix build on Apple Clang
Diffstat (limited to 'src/video_core/buffer_cache')
| -rw-r--r-- | src/video_core/buffer_cache/buffer_cache.h | 2 | ||||
| -rw-r--r-- | src/video_core/buffer_cache/memory_tracker_base.h | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index 7975564b52..e534e1e9ca 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -1426,7 +1426,7 @@ bool BufferCache<P>::SynchronizeBufferNoModified(Buffer& buffer, VAddr cpu_addr, .size = sub_size, }); total_size_bytes += sub_size; - largest_copy = std::max(largest_copy, sub_size); + largest_copy = std::max<u64>(largest_copy, sub_size); } const std::span<BufferCopy> copies_span(copies.data(), copies.size()); UploadMemory(buffer, total_size_bytes, largest_copy, copies_span); diff --git a/src/video_core/buffer_cache/memory_tracker_base.h b/src/video_core/buffer_cache/memory_tracker_base.h index 4bc59017f1..dc4ebfcaa7 100644 --- a/src/video_core/buffer_cache/memory_tracker_base.h +++ b/src/video_core/buffer_cache/memory_tracker_base.h @@ -170,7 +170,8 @@ private: std::size_t page_index{cpu_address >> HIGHER_PAGE_BITS}; u64 page_offset{cpu_address & HIGHER_PAGE_MASK}; while (remaining_size > 0) { - const std::size_t copy_amount{std::min(HIGHER_PAGE_SIZE - page_offset, remaining_size)}; + const std::size_t copy_amount{ + std::min<std::size_t>(HIGHER_PAGE_SIZE - page_offset, remaining_size)}; auto* manager{top_tier[page_index]}; if (manager) { if constexpr (BOOL_BREAK) { @@ -206,7 +207,8 @@ private: u64 begin = std::numeric_limits<u64>::max(); u64 end = 0; while (remaining_size > 0) { - const std::size_t copy_amount{std::min(HIGHER_PAGE_SIZE - page_offset, remaining_size)}; + const std::size_t copy_amount{ + std::min<std::size_t>(HIGHER_PAGE_SIZE - page_offset, remaining_size)}; auto* manager{top_tier[page_index]}; const auto execute = [&] { auto [new_begin, new_end] = func(manager, page_offset, copy_amount); |
