diff options
author | Rafael Antognolli <[email protected]> | 2019-02-20 15:26:43 -0800 |
---|---|---|
committer | Rafael Antognolli <[email protected]> | 2020-04-20 10:59:06 -0700 |
commit | 0d387da08349e1bdd222efae0657fc74009d9955 (patch) | |
tree | 93a87107583a585722188743a2a327d4ad24c0cb /src/intel/vulkan/anv_allocator.c | |
parent | d1c1ead7cd6ea8a9025703f519b09f0e0e8c673c (diff) |
anv: Add anv_device parameter to anv_gem_munmap.
Also update all of its callers.
On the next commit, the device will be used by anv_gem_munmap to choose
whether we need to call the valgrind code or not, depending on which
type of mmap we are using.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1675>
Diffstat (limited to 'src/intel/vulkan/anv_allocator.c')
-rw-r--r-- | src/intel/vulkan/anv_allocator.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 010da4b8c4e..42bc0405e81 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -434,7 +434,7 @@ anv_block_pool_finish(struct anv_block_pool *pool) { anv_block_pool_foreach_bo(bo, pool) { if (bo->map) - anv_gem_munmap(bo->map, bo->size); + anv_gem_munmap(pool->device, bo->map, bo->size); anv_gem_close(pool->device, bo->gem_handle); } @@ -1643,7 +1643,7 @@ anv_device_alloc_bo(struct anv_device *device, align, alloc_flags, explicit_address); if (new_bo.offset == 0) { if (new_bo.map) - anv_gem_munmap(new_bo.map, size); + anv_gem_munmap(device, new_bo.map, size); anv_gem_close(device, new_bo.gem_handle); return vk_errorf(device, NULL, VK_ERROR_OUT_OF_DEVICE_MEMORY, "failed to allocate virtual address for BO"); @@ -1968,7 +1968,7 @@ anv_device_release_bo(struct anv_device *device, assert(bo->refcount == 0); if (bo->map && !bo->from_host_ptr) - anv_gem_munmap(bo->map, bo->size); + anv_gem_munmap(device, bo->map, bo->size); if (bo->_ccs_size > 0) { assert(device->physical->has_implicit_ccs); |