mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-11-23 21:23:48 +00:00
GPU: Allow GpuToCpuAddress to return boost::none for unmapped addresses.
This commit is contained in:
parent
50ef2beb58
commit
e9d147349b
1 changed files with 2 additions and 2 deletions
|
@ -100,9 +100,9 @@ boost::optional<GPUVAddr> MemoryManager::FindFreeBlock(u64 size, u64 align) {
|
||||||
|
|
||||||
boost::optional<VAddr> MemoryManager::GpuToCpuAddress(GPUVAddr gpu_addr) {
|
boost::optional<VAddr> MemoryManager::GpuToCpuAddress(GPUVAddr gpu_addr) {
|
||||||
VAddr base_addr = PageSlot(gpu_addr);
|
VAddr base_addr = PageSlot(gpu_addr);
|
||||||
ASSERT(base_addr != static_cast<u64>(PageStatus::Unmapped));
|
|
||||||
|
|
||||||
if (base_addr == static_cast<u64>(PageStatus::Allocated)) {
|
if (base_addr == static_cast<u64>(PageStatus::Allocated) ||
|
||||||
|
base_addr == static_cast<u64>(PageStatus::Unmapped)) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue