Memory: Support more regions in the VAddr-PAddr translation functions

Also adds better documentation and removes the one-off reimplementation
of the function in pica.h.
This commit is contained in:
Yuri Kunde Schlesner 2015-05-09 03:08:11 -03:00
parent e7b6ed7578
commit 28a9e4c1d5
7 changed files with 45 additions and 51 deletions

View file

@ -159,7 +159,7 @@ void TextureInfoDockWidget::OnStrideChanged(int value) {
}
QPixmap TextureInfoDockWidget::ReloadPixmap() const {
u8* src = Memory::GetPointer(Pica::PAddrToVAddr(info.physical_address));
u8* src = Memory::GetPointer(Memory::PhysicalToVirtualAddress(info.physical_address));
return QPixmap::fromImage(LoadTexture(src, info));
}
@ -274,7 +274,7 @@ void GPUCommandListWidget::SetCommandInfo(const QModelIndex& index) {
auto format = Pica::registers.GetTextures()[index].format;
auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(config, format);
u8* src = Memory::GetPointer(Pica::PAddrToVAddr(config.GetPhysicalAddress()));
u8* src = Memory::GetPointer(Memory::PhysicalToVirtualAddress(config.GetPhysicalAddress()));
new_info_widget = new TextureInfoWidget(src, info);
} else {
new_info_widget = new QWidget;