diff options
| author | 2022-11-21 11:31:18 -0500 | |
|---|---|---|
| committer | 2022-11-22 22:22:28 -0500 | |
| commit | 9737615948d431cf56826f3c109bbc0fef7b4d10 (patch) | |
| tree | 9d4742bf8f2b64b9a5b30ae33b105a5e9344ab3b /src/video_core/buffer_cache | |
| parent | Merge pull request #9279 from liamwhite/this-would-have-never-happened-in-rust (diff) | |
| download | yuzu-9737615948d431cf56826f3c109bbc0fef7b4d10.tar.gz yuzu-9737615948d431cf56826f3c109bbc0fef7b4d10.tar.xz yuzu-9737615948d431cf56826f3c109bbc0fef7b4d10.zip | |
general: fix compile for Apple Clang
Diffstat (limited to 'src/video_core/buffer_cache')
| -rw-r--r-- | src/video_core/buffer_cache/buffer_base.h | 2 | ||||
| -rw-r--r-- | src/video_core/buffer_cache/buffer_cache.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/video_core/buffer_cache/buffer_base.h b/src/video_core/buffer_cache/buffer_base.h index f9a6472cf..92d77eef2 100644 --- a/src/video_core/buffer_cache/buffer_base.h +++ b/src/video_core/buffer_cache/buffer_base.h | |||
| @@ -535,7 +535,7 @@ private: | |||
| 535 | const u64* const state_words = Array<type>(); | 535 | const u64* const state_words = Array<type>(); |
| 536 | const u64 num_query_words = size / BYTES_PER_WORD + 1; | 536 | const u64 num_query_words = size / BYTES_PER_WORD + 1; |
| 537 | const u64 word_begin = offset / BYTES_PER_WORD; | 537 | const u64 word_begin = offset / BYTES_PER_WORD; |
| 538 | const u64 word_end = std::min(word_begin + num_query_words, NumWords()); | 538 | const u64 word_end = std::min<u64>(word_begin + num_query_words, NumWords()); |
| 539 | const u64 page_limit = Common::DivCeil(offset + size, BYTES_PER_PAGE); | 539 | const u64 page_limit = Common::DivCeil(offset + size, BYTES_PER_PAGE); |
| 540 | u64 page_index = (offset / BYTES_PER_PAGE) % PAGES_PER_WORD; | 540 | u64 page_index = (offset / BYTES_PER_PAGE) % PAGES_PER_WORD; |
| 541 | for (u64 word_index = word_begin; word_index < word_end; ++word_index, page_index = 0) { | 541 | for (u64 word_index = word_begin; word_index < word_end; ++word_index, page_index = 0) { |
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index 599551013..b970f06dc 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include "common/literals.h" | 19 | #include "common/literals.h" |
| 20 | #include "common/lru_cache.h" | 20 | #include "common/lru_cache.h" |
| 21 | #include "common/microprofile.h" | 21 | #include "common/microprofile.h" |
| 22 | #include "common/polyfill_ranges.h" | ||
| 22 | #include "common/settings.h" | 23 | #include "common/settings.h" |
| 23 | #include "core/memory.h" | 24 | #include "core/memory.h" |
| 24 | #include "video_core/buffer_cache/buffer_base.h" | 25 | #include "video_core/buffer_cache/buffer_base.h" |