intel: Return a bool from intel_aux_map_add_mapping
authorNanley Chery <nanley.g.chery@intel.com>
Tue, 10 Oct 2023 19:14:28 +0000 (15:14 -0400)
committerMarge Bot <emma+marge@anholt.net>
Mon, 23 Oct 2023 21:37:24 +0000 (21:37 +0000)
commitb1a14fe9231e62d5b65e47bbf934e9b14f47f722
tree5e19d1aaec0a19669b2a9aa9966e685737a03a83
parent16e116365172f9c1d42072eebfa9b0b1d4f7fb7b
intel: Return a bool from intel_aux_map_add_mapping

Make intel_aux_map_add_mapping return false if a mapping is attempted
that would conflict with an existing one. If this function doesn't
return false, it will either fail to return or return true.

The Vulkan driver will make use of this feature to opportunistically
enable CCS if a BO's VMA range has not been already mapped.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003>
src/gallium/drivers/iris/iris_resource.c
src/intel/common/intel_aux_map.c
src/intel/common/intel_aux_map.h
src/intel/vulkan/anv_allocator.c