Memory: move MarkRegionCached into class
This commit is contained in:
parent
2582d64fb3
commit
d18cda5a5d
3 changed files with 10 additions and 8 deletions
|
@ -305,7 +305,7 @@ static std::vector<VAddr> PhysicalToVirtualAddressForRasterizer(PAddr addr) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
void RasterizerMarkRegionCached(PAddr start, u32 size, bool cached) {
|
void MemorySystem::RasterizerMarkRegionCached(PAddr start, u32 size, bool cached) {
|
||||||
if (start == 0) {
|
if (start == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,11 +180,6 @@ enum : VAddr {
|
||||||
|
|
||||||
extern std::array<u8, Memory::FCRAM_N3DS_SIZE> fcram;
|
extern std::array<u8, Memory::FCRAM_N3DS_SIZE> fcram;
|
||||||
|
|
||||||
/**
|
|
||||||
* Mark each page touching the region as cached.
|
|
||||||
*/
|
|
||||||
void RasterizerMarkRegionCached(PAddr start, u32 size, bool cached);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flushes any externally cached rasterizer resources touching the given region.
|
* Flushes any externally cached rasterizer resources touching the given region.
|
||||||
*/
|
*/
|
||||||
|
@ -258,6 +253,11 @@ public:
|
||||||
/// Gets offset in FCRAM from a pointer inside FCRAM range
|
/// Gets offset in FCRAM from a pointer inside FCRAM range
|
||||||
u32 GetFCRAMOffset(u8* pointer);
|
u32 GetFCRAMOffset(u8* pointer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mark each page touching the region as cached.
|
||||||
|
*/
|
||||||
|
void RasterizerMarkRegionCached(PAddr start, u32 size, bool cached);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T Read(const VAddr vaddr);
|
T Read(const VAddr vaddr);
|
||||||
|
|
|
@ -1718,9 +1718,11 @@ void RasterizerCacheOpenGL::UpdatePagesCachedCount(PAddr addr, u32 size, int del
|
||||||
const u32 interval_size = interval_end_addr - interval_start_addr;
|
const u32 interval_size = interval_end_addr - interval_start_addr;
|
||||||
|
|
||||||
if (delta > 0 && count == delta)
|
if (delta > 0 && count == delta)
|
||||||
Memory::RasterizerMarkRegionCached(interval_start_addr, interval_size, true);
|
VideoCore::g_memory->RasterizerMarkRegionCached(interval_start_addr, interval_size,
|
||||||
|
true);
|
||||||
else if (delta < 0 && count == -delta)
|
else if (delta < 0 && count == -delta)
|
||||||
Memory::RasterizerMarkRegionCached(interval_start_addr, interval_size, false);
|
VideoCore::g_memory->RasterizerMarkRegionCached(interval_start_addr, interval_size,
|
||||||
|
false);
|
||||||
else
|
else
|
||||||
ASSERT(count >= 0);
|
ASSERT(count >= 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue