From 59aa49494c45b5a38484d7aed1147416e9eaf479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Mon, 3 Jul 2023 12:33:57 -0700 Subject: [PATCH] anv: Drop unnecessary intel_canonical_address() calls around bo->offset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bo->offset is set as canonical address no need to do it over again. Signed-off-by: José Roberto de Souza Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/vulkan/anv_allocator.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 2c46200dfdf..db0704c0c10 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -1564,8 +1564,7 @@ anv_device_alloc_bo(struct anv_device *device, if (new_bo._ccs_size > 0) { assert(device->info->has_aux_map); - intel_aux_map_add_mapping(device->aux_map_ctx, - intel_canonical_address(new_bo.offset), + intel_aux_map_add_mapping(device->aux_map_ctx, new_bo.offset, intel_canonical_address(new_bo.offset + new_bo.size), new_bo.size, 0 /* format_bits */); } @@ -1937,9 +1936,7 @@ anv_device_release_bo(struct anv_device *device, assert(device->physical->has_implicit_ccs); assert(device->info->has_aux_map); assert(bo->has_implicit_ccs); - intel_aux_map_unmap_range(device->aux_map_ctx, - intel_canonical_address(bo->offset), - bo->size); + intel_aux_map_unmap_range(device->aux_map_ctx, bo->offset, bo->size); } /* Memset the BO just in case. The refcount being zero should be enough to