[Memory] GetPhysicalAddress - Added case to assume that input address is already physical

- Restored break on Indirect Buffer failure (Hopefully it won't break anything)
This commit is contained in:
Gliniak
2026-03-28 20:11:43 +01:00
parent 9d6b27e2ad
commit 9b1ebffd27
2 changed files with 8 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ void COMMAND_PROCESSOR::ExecuteIndirectBuffer(uint32_t ptr,
// Return up a level if we encounter a bad packet.
XELOGE("**** INDIRECT RINGBUFFER: Failed to execute packet.");
assert_always();
// break;
break;
}
} while (reader_.read_count());

View File

@@ -527,9 +527,15 @@ uint32_t Memory::HostToGuestVirtualThunk(const void* context,
uint32_t Memory::GetPhysicalAddress(uint32_t address) const {
const BaseHeap* heap = LookupHeap(address);
if (!heap || heap->heap_type() != HeapType::kGuestPhysical) {
if (!heap) {
return UINT32_MAX;
}
// Assumption that we already received physical address, so just return it.
if (heap->heap_type() != HeapType::kGuestPhysical && address < 0x1FFFFFFF) {
return address;
}
return static_cast<const PhysicalHeap*>(heap)->GetPhysicalAddress(address);
}