diff options
| author | 2018-10-08 01:20:18 -0400 | |
|---|---|---|
| committer | 2018-10-08 01:20:18 -0400 | |
| commit | 3f1f82a8c49b18f3a890044e70b9cc726a231fdb (patch) | |
| tree | 33345311fb17d55776fdf8c5a7e55f15a35164f6 /src | |
| parent | Merge pull request #1419 from DarkLordZach/homebrew-args (diff) | |
| parent | Unmapping an unmapped buffer should succeed (diff) | |
| download | yuzu-3f1f82a8c49b18f3a890044e70b9cc726a231fdb.tar.gz yuzu-3f1f82a8c49b18f3a890044e70b9cc726a231fdb.tar.xz yuzu-3f1f82a8c49b18f3a890044e70b9cc726a231fdb.zip | |
Merge pull request #1457 from ogniK5377/unmap-buffer
Unmapping an unmapped buffer should succeed
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp index d8b8037a8..7555bbe7d 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp | |||
| @@ -157,7 +157,12 @@ u32 nvhost_as_gpu::UnmapBuffer(const std::vector<u8>& input, std::vector<u8>& ou | |||
| 157 | LOG_DEBUG(Service_NVDRV, "called, offset=0x{:X}", params.offset); | 157 | LOG_DEBUG(Service_NVDRV, "called, offset=0x{:X}", params.offset); |
| 158 | 158 | ||
| 159 | const auto itr = buffer_mappings.find(params.offset); | 159 | const auto itr = buffer_mappings.find(params.offset); |
| 160 | ASSERT_MSG(itr != buffer_mappings.end(), "Tried to unmap invalid mapping"); | 160 | if (itr == buffer_mappings.end()) { |
| 161 | LOG_WARNING(Service_NVDRV, "Tried to unmap an invalid offset 0x{:X}", params.offset); | ||
| 162 | // Hardware tests shows that unmapping an already unmapped buffer always returns successful | ||
| 163 | // and doesn't fail. | ||
| 164 | return 0; | ||
| 165 | } | ||
| 161 | 166 | ||
| 162 | auto& system_instance = Core::System::GetInstance(); | 167 | auto& system_instance = Core::System::GetInstance(); |
| 163 | 168 | ||