diff options
author | Liam <liamwhite@users.noreply.github.com> | 2023-05-03 00:05:30 +0200 |
---|---|---|
committer | Liam <liamwhite@users.noreply.github.com> | 2023-05-03 00:05:30 +0200 |
commit | e1c74cea10591d1e9fba9353d20f3929ec41d4f0 (patch) | |
tree | 6888b14cde5aeb475ac07861d4200a4bb45fe29c /src | |
parent | Merge pull request #10084 from FernandoS27/yuzu-goes-broom-broom (diff) | |
download | yuzu-e1c74cea10591d1e9fba9353d20f3929ec41d4f0.tar yuzu-e1c74cea10591d1e9fba9353d20f3929ec41d4f0.tar.gz yuzu-e1c74cea10591d1e9fba9353d20f3929ec41d4f0.tar.bz2 yuzu-e1c74cea10591d1e9fba9353d20f3929ec41d4f0.tar.lz yuzu-e1c74cea10591d1e9fba9353d20f3929ec41d4f0.tar.xz yuzu-e1c74cea10591d1e9fba9353d20f3929ec41d4f0.tar.zst yuzu-e1c74cea10591d1e9fba9353d20f3929ec41d4f0.zip |
Diffstat (limited to 'src')
-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 | ||||
-rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index 7975564b5..e534e1e9c 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 4bc59017f..dc4ebfcaa 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); diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index e601f8446..f335009d0 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -888,7 +888,7 @@ void TextureCache<P>::DownloadImageIntoBuffer(typename TextureCache<P>::Image* i buffer, download_map.buffer, }; - std::array buffer_offsets{ + std::array<u64, 2> buffer_offsets{ buffer_offset, download_map.offset, }; |