summaryrefslogtreecommitdiffstats
path: root/src/video_core/rasterizer_accelerated.cpp
diff options
context:
space:
mode:
authorKyle Kienapfel <Docteh@users.noreply.github.com>2022-08-19 01:28:55 +0200
committerKyle Kienapfel <Docteh@users.noreply.github.com>2022-08-20 01:08:40 +0200
commit14e9de6678dab47625826006f001d5e94dfb2716 (patch)
treeddb17512c52f678de96abf6dedf33a02b6a497ec /src/video_core/rasterizer_accelerated.cpp
parentMerge pull request #8685 from FearlessTobi/multiplayer-part2 (diff)
downloadyuzu-14e9de6678dab47625826006f001d5e94dfb2716.tar
yuzu-14e9de6678dab47625826006f001d5e94dfb2716.tar.gz
yuzu-14e9de6678dab47625826006f001d5e94dfb2716.tar.bz2
yuzu-14e9de6678dab47625826006f001d5e94dfb2716.tar.lz
yuzu-14e9de6678dab47625826006f001d5e94dfb2716.tar.xz
yuzu-14e9de6678dab47625826006f001d5e94dfb2716.tar.zst
yuzu-14e9de6678dab47625826006f001d5e94dfb2716.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/rasterizer_accelerated.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/video_core/rasterizer_accelerated.cpp b/src/video_core/rasterizer_accelerated.cpp
index 87a29e144..4a197d65d 100644
--- a/src/video_core/rasterizer_accelerated.cpp
+++ b/src/video_core/rasterizer_accelerated.cpp
@@ -24,8 +24,8 @@ void RasterizerAccelerated::UpdatePagesCachedCount(VAddr addr, u64 size, int del
u64 cache_bytes = 0;
std::atomic_thread_fence(std::memory_order_acquire);
- const u64 page_end = Common::DivCeil(addr + size, PAGE_SIZE);
- for (u64 page = addr >> PAGE_BITS; page != page_end; ++page) {
+ const u64 page_end = Common::DivCeil(addr + size, YUZU_PAGESIZE);
+ for (u64 page = addr >> YUZU_PAGEBITS; page != page_end; ++page) {
std::atomic_uint16_t& count = cached_pages.at(page >> 2).Count(page);
if (delta > 0) {
@@ -44,26 +44,27 @@ void RasterizerAccelerated::UpdatePagesCachedCount(VAddr addr, u64 size, int del
if (uncache_bytes == 0) {
uncache_begin = page;
}
- uncache_bytes += PAGE_SIZE;
+ uncache_bytes += YUZU_PAGESIZE;
} else if (uncache_bytes > 0) {
- cpu_memory.RasterizerMarkRegionCached(uncache_begin << PAGE_BITS, uncache_bytes, false);
+ cpu_memory.RasterizerMarkRegionCached(uncache_begin << YUZU_PAGEBITS, uncache_bytes,
+ false);
uncache_bytes = 0;
}
if (count.load(std::memory_order::relaxed) == 1 && delta > 0) {
if (cache_bytes == 0) {
cache_begin = page;
}
- cache_bytes += PAGE_SIZE;
+ cache_bytes += YUZU_PAGESIZE;
} else if (cache_bytes > 0) {
- cpu_memory.RasterizerMarkRegionCached(cache_begin << PAGE_BITS, cache_bytes, true);
+ cpu_memory.RasterizerMarkRegionCached(cache_begin << YUZU_PAGEBITS, cache_bytes, true);
cache_bytes = 0;
}
}
if (uncache_bytes > 0) {
- cpu_memory.RasterizerMarkRegionCached(uncache_begin << PAGE_BITS, uncache_bytes, false);
+ cpu_memory.RasterizerMarkRegionCached(uncache_begin << YUZU_PAGEBITS, uncache_bytes, false);
}
if (cache_bytes > 0) {
- cpu_memory.RasterizerMarkRegionCached(cache_begin << PAGE_BITS, cache_bytes, true);
+ cpu_memory.RasterizerMarkRegionCached(cache_begin << YUZU_PAGEBITS, cache_bytes, true);
}
}