Module: Mesa
Branch: main
Commit: 59aa49494c45b5a38484d7aed1147416e9eaf479
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=59aa49494c45b5a38484d7aed1147416e9eaf479

Author: José Roberto de Souza <[email protected]>
Date:   Mon Jul  3 12:33:57 2023 -0700

anv: Drop unnecessary intel_canonical_address() calls around bo->offset

bo->offset is set as canonical address no need to do it over again.

Signed-off-by: José Roberto de Souza <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23977>

---

 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

Reply via email to