summaryrefslogtreecommitdiffstats
path: root/src/video_core/rasterizer_accelerated.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-05-27 23:47:24 +0200
committerbunnei <bunneidev@gmail.com>2021-05-27 23:47:24 +0200
commit4b95b0df973027f4682549b0bd27bf9e05d8155f (patch)
tree652552c8f0bc1e6d0b06d463ec2d73c8f3134615 /src/video_core/rasterizer_accelerated.cpp
parentMerge pull request #6346 from lat9nq/apply-config-pgc (diff)
downloadyuzu-4b95b0df973027f4682549b0bd27bf9e05d8155f.tar
yuzu-4b95b0df973027f4682549b0bd27bf9e05d8155f.tar.gz
yuzu-4b95b0df973027f4682549b0bd27bf9e05d8155f.tar.bz2
yuzu-4b95b0df973027f4682549b0bd27bf9e05d8155f.tar.lz
yuzu-4b95b0df973027f4682549b0bd27bf9e05d8155f.tar.xz
yuzu-4b95b0df973027f4682549b0bd27bf9e05d8155f.tar.zst
yuzu-4b95b0df973027f4682549b0bd27bf9e05d8155f.zip
Diffstat (limited to 'src/video_core/rasterizer_accelerated.cpp')
-rw-r--r--src/video_core/rasterizer_accelerated.cpp6
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) {