mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12:00
RSX Memory Viewer: Fix local memory displaying
This commit is contained in:
parent
3899248305
commit
ec6d6adebc
1 changed files with 4 additions and 2 deletions
|
@ -420,14 +420,16 @@ void* memory_viewer_panel::to_ptr(u32 addr, u32 size) const
|
||||||
{
|
{
|
||||||
u32 final_addr = 0;
|
u32 final_addr = 0;
|
||||||
|
|
||||||
if (size > 0x2000'0000 || rsx::constants::local_mem_base + 0x1000'0000 - size < addr)
|
constexpr u32 local_mem = rsx::constants::local_mem_base;
|
||||||
|
|
||||||
|
if (size > 0x2000'0000 || local_mem + 0x1000'0000 - size < addr)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (u32 i = addr; i >> 20 <= (addr + size - 1) >> 20; i += 0x100000)
|
for (u32 i = addr; i >> 20 <= (addr + size - 1) >> 20; i += 0x100000)
|
||||||
{
|
{
|
||||||
const u32 temp = rsx::get_address(i, i < rsx::constants::local_mem_base ? CELL_GCM_LOCATION_MAIN : CELL_GCM_LOCATION_LOCAL, true);
|
const u32 temp = rsx::get_address(i - (i >= local_mem ? local_mem : 0), i < local_mem ? CELL_GCM_LOCATION_MAIN : CELL_GCM_LOCATION_LOCAL, true);
|
||||||
|
|
||||||
if (!temp)
|
if (!temp)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue