mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-15 22:54:00 +00:00
Merge pull request #1457 from ogniK5377/unmap-buffer
Unmapping an unmapped buffer should succeed
This commit is contained in:
commit
3f1f82a8c4
1 changed files with 6 additions and 1 deletions
|
@ -157,7 +157,12 @@ u32 nvhost_as_gpu::UnmapBuffer(const std::vector<u8>& input, std::vector<u8>& ou
|
||||||
LOG_DEBUG(Service_NVDRV, "called, offset=0x{:X}", params.offset);
|
LOG_DEBUG(Service_NVDRV, "called, offset=0x{:X}", params.offset);
|
||||||
|
|
||||||
const auto itr = buffer_mappings.find(params.offset);
|
const auto itr = buffer_mappings.find(params.offset);
|
||||||
ASSERT_MSG(itr != buffer_mappings.end(), "Tried to unmap invalid mapping");
|
if (itr == buffer_mappings.end()) {
|
||||||
|
LOG_WARNING(Service_NVDRV, "Tried to unmap an invalid offset 0x{:X}", params.offset);
|
||||||
|
// Hardware tests shows that unmapping an already unmapped buffer always returns successful
|
||||||
|
// and doesn't fail.
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
auto& system_instance = Core::System::GetInstance();
|
auto& system_instance = Core::System::GetInstance();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue