diff options
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 9348b0297..aef1c5979 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | |||
| @@ -1428,9 +1428,9 @@ void RasterizerCacheOpenGL::UnregisterSurface(const Surface& surface) { | |||
| 1428 | } | 1428 | } |
| 1429 | 1429 | ||
| 1430 | void RasterizerCacheOpenGL::UpdatePagesCachedCount(Tegra::GPUVAddr addr, u64 size, int delta) { | 1430 | void RasterizerCacheOpenGL::UpdatePagesCachedCount(Tegra::GPUVAddr addr, u64 size, int delta) { |
| 1431 | const u64 num_pages = | 1431 | const u64 num_pages = ((addr + size - 1) >> Tegra::MemoryManager::PAGE_BITS) - |
| 1432 | ((addr + size - 1) >> Memory::PAGE_BITS) - (addr >> Memory::PAGE_BITS) + 1; | 1432 | (addr >> Tegra::MemoryManager::PAGE_BITS) + 1; |
| 1433 | const u64 page_start = addr >> Memory::PAGE_BITS; | 1433 | const u64 page_start = addr >> Tegra::MemoryManager::PAGE_BITS; |
| 1434 | const u64 page_end = page_start + num_pages; | 1434 | const u64 page_end = page_start + num_pages; |
| 1435 | 1435 | ||
| 1436 | // Interval maps will erase segments if count reaches 0, so if delta is negative we have to | 1436 | // Interval maps will erase segments if count reaches 0, so if delta is negative we have to |
| @@ -1444,9 +1444,9 @@ void RasterizerCacheOpenGL::UpdatePagesCachedCount(Tegra::GPUVAddr addr, u64 siz | |||
| 1444 | const int count = pair.second; | 1444 | const int count = pair.second; |
| 1445 | 1445 | ||
| 1446 | const Tegra::GPUVAddr interval_start_addr = boost::icl::first(interval) | 1446 | const Tegra::GPUVAddr interval_start_addr = boost::icl::first(interval) |
| 1447 | << Memory::PAGE_BITS; | 1447 | << Tegra::MemoryManager::PAGE_BITS; |
| 1448 | const Tegra::GPUVAddr interval_end_addr = boost::icl::last_next(interval) | 1448 | const Tegra::GPUVAddr interval_end_addr = boost::icl::last_next(interval) |
| 1449 | << Memory::PAGE_BITS; | 1449 | << Tegra::MemoryManager::PAGE_BITS; |
| 1450 | const u64 interval_size = interval_end_addr - interval_start_addr; | 1450 | const u64 interval_size = interval_end_addr - interval_start_addr; |
| 1451 | 1451 | ||
| 1452 | if (delta > 0 && count == delta) | 1452 | if (delta > 0 && count == delta) |