diff options
author | bunnei <bunneidev@gmail.com> | 2021-05-28 00:48:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-28 00:48:21 +0200 |
commit | 3289abe1cce1bb2ae529c814fe51ab5f4615b1b1 (patch) | |
tree | 2d3be8d0866b2124c4c9fe8612b3bde02472c74c /src/video_core/rasterizer_accelerated.cpp | |
parent | Merge pull request #6369 from lat9nq/cmake-fix-dep-opt (diff) | |
parent | video_core: rasterizer_cache: Use u16 for cached page count. (diff) | |
download | yuzu-3289abe1cce1bb2ae529c814fe51ab5f4615b1b1.tar yuzu-3289abe1cce1bb2ae529c814fe51ab5f4615b1b1.tar.gz yuzu-3289abe1cce1bb2ae529c814fe51ab5f4615b1b1.tar.bz2 yuzu-3289abe1cce1bb2ae529c814fe51ab5f4615b1b1.tar.lz yuzu-3289abe1cce1bb2ae529c814fe51ab5f4615b1b1.tar.xz yuzu-3289abe1cce1bb2ae529c814fe51ab5f4615b1b1.tar.zst yuzu-3289abe1cce1bb2ae529c814fe51ab5f4615b1b1.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/rasterizer_accelerated.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/rasterizer_accelerated.cpp b/src/video_core/rasterizer_accelerated.cpp index 62d84c0f8..6decd2546 100644 --- a/src/video_core/rasterizer_accelerated.cpp +++ b/src/video_core/rasterizer_accelerated.cpp @@ -18,10 +18,10 @@ RasterizerAccelerated::~RasterizerAccelerated() = default; void RasterizerAccelerated::UpdatePagesCachedCount(VAddr addr, u64 size, int delta) { const auto page_end = Common::DivCeil(addr + size, Core::Memory::PAGE_SIZE); for (auto page = addr >> Core::Memory::PAGE_BITS; page != page_end; ++page) { - auto& count = cached_pages.at(page >> 3).Count(page); + auto& count = cached_pages.at(page >> 2).Count(page); if (delta > 0) { - ASSERT_MSG(count < UINT8_MAX, "Count may overflow!"); + ASSERT_MSG(count < UINT16_MAX, "Count may overflow!"); } else if (delta < 0) { ASSERT_MSG(count > 0, "Count may underflow!"); } else { @@ -29,7 +29,7 @@ void RasterizerAccelerated::UpdatePagesCachedCount(VAddr addr, u64 size, int del } // Adds or subtracts 1, as count is a unsigned 8-bit value - count += static_cast<u8>(delta); + count += static_cast<u16>(delta); // Assume delta is either -1 or 1 if (count == 0) { |