mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-23 08:50:57 +01:00
Revert "Memory: Always flush whole pages from surface cache"
This commit is contained in:
parent
20b832cfc1
commit
4798b1d04d
1 changed files with 0 additions and 10 deletions
|
@ -357,24 +357,14 @@ void RasterizerMarkRegionCached(PAddr start, u32 size, int count_delta) {
|
|||
}
|
||||
}
|
||||
|
||||
static void RoundToPages(PAddr& start, u32& size) {
|
||||
PAddr start_rounded_down = start & ~PAGE_MASK;
|
||||
PAddr end_rounded_up = ((start + size) + PAGE_MASK) & ~PAGE_MASK;
|
||||
|
||||
start = start_rounded_down;
|
||||
size = end_rounded_up - start_rounded_down;
|
||||
}
|
||||
|
||||
void RasterizerFlushRegion(PAddr start, u32 size) {
|
||||
if (VideoCore::g_renderer != nullptr) {
|
||||
RoundToPages(start, size);
|
||||
VideoCore::g_renderer->Rasterizer()->FlushRegion(start, size);
|
||||
}
|
||||
}
|
||||
|
||||
void RasterizerFlushAndInvalidateRegion(PAddr start, u32 size) {
|
||||
if (VideoCore::g_renderer != nullptr) {
|
||||
RoundToPages(start, size);
|
||||
VideoCore::g_renderer->Rasterizer()->FlushAndInvalidateRegion(start, size);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue