SMMU: Implement physical memory mirroring

This commit is contained in:
Fernando Sahmkow 2023-12-29 07:53:52 +01:00 committed by Liam
parent 0a2536a0df
commit 34a8d0cc8e
8 changed files with 226 additions and 40 deletions

View file

@ -554,9 +554,8 @@ void RasterizerOpenGL::InvalidateRegion(DAddr addr, u64 size, VideoCommon::Cache
}
}
bool RasterizerOpenGL::OnCPUWrite(PAddr p_addr, u64 size) {
bool RasterizerOpenGL::OnCPUWrite(DAddr addr, u64 size) {
MICROPROFILE_SCOPE(OpenGL_CacheManagement);
const DAddr addr = device_memory.GetAddressFromPAddr(p_addr);
if (addr == 0 || size == 0) {
return false;
}
@ -577,9 +576,9 @@ bool RasterizerOpenGL::OnCPUWrite(PAddr p_addr, u64 size) {
return false;
}
void RasterizerOpenGL::OnCacheInvalidation(PAddr p_addr, u64 size) {
void RasterizerOpenGL::OnCacheInvalidation(DAddr addr, u64 size) {
MICROPROFILE_SCOPE(OpenGL_CacheManagement);
const DAddr addr = device_memory.GetAddressFromPAddr(p_addr);
if (addr == 0 || size == 0) {
return;
}

View file

@ -602,8 +602,7 @@ void RasterizerVulkan::InnerInvalidation(std::span<const std::pair<DAddr, std::s
}
}
bool RasterizerVulkan::OnCPUWrite(PAddr p_addr, u64 size) {
const DAddr addr = device_memory.GetAddressFromPAddr(p_addr);
bool RasterizerVulkan::OnCPUWrite(DAddr addr, u64 size) {
if (addr == 0 || size == 0) {
return false;
}
@ -624,8 +623,7 @@ bool RasterizerVulkan::OnCPUWrite(PAddr p_addr, u64 size) {
return false;
}
void RasterizerVulkan::OnCacheInvalidation(PAddr p_addr, u64 size) {
const DAddr addr = device_memory.GetAddressFromPAddr(p_addr);
void RasterizerVulkan::OnCacheInvalidation(DAddr addr, u64 size) {
if (addr == 0 || size == 0) {
return;
}