mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
nvk: only unmap heap bos that were mapped
Otherwise we munmap(0, size) and remove the cts binary maps
Also add an assert, though NULL is legal for munmap in theory,
nothing should be using it in practice on Linux.
Fixes: e6f137e9ed ("nvk: Only map heaps that explicitly request maps")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28006>
This commit is contained in:
parent
2feb3c6e30
commit
ac391536eb
1 changed files with 4 additions and 1 deletions
|
|
@ -55,7 +55,10 @@ nvk_heap_finish(struct nvk_device *dev, struct nvk_heap *heap)
|
|||
nouveau_ws_bo_unbind_vma(dev->ws_dev, heap->bos[bo_idx].addr,
|
||||
heap->bos[bo_idx].bo->size);
|
||||
}
|
||||
nouveau_ws_bo_unmap(heap->bos[bo_idx].bo, heap->bos[bo_idx].map);
|
||||
if (heap->map_flags) {
|
||||
assert(heap->bos[bo_idx].map);
|
||||
nouveau_ws_bo_unmap(heap->bos[bo_idx].bo, heap->bos[bo_idx].map);
|
||||
}
|
||||
nouveau_ws_bo_destroy(heap->bos[bo_idx].bo);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue