anv: add a new NO_LOCAL_MEM allocation flag
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 2 Sep 2022 18:53:18 +0000 (21:53 +0300)
committerMarge Bot <emma+marge@anholt.net>
Tue, 6 Sep 2022 18:24:00 +0000 (18:24 +0000)
commit492761ab8d6ad94660d8465a93f41e244664da6e
treeb8ffcce6a42aac2e8beaf1f9781ac1d707a17a18
parentf41a6504a1c12f95f366dd758b4c07882907c889
anv: add a new NO_LOCAL_MEM allocation flag

We found a perf regression with 9027c5df4c51b ("anv: remove the
LOCAL_MEM allocation bit") which seems to be that we over subscribe
local memory, leading i915 to swap things in/out too much.

This change avoid putting buffers in local memory if they are not
allocated from a DEVICE_LOCAL heap.

Maybe we can revisit this later if i915 is better able to deal with
more buffers in local memory.

v2: Remove implicit_css from anv_bo when not in lmem (Ivan)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9027c5df4c51b ("anv: remove the LOCAL_MEM allocation bit")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7188
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18395>
src/intel/vulkan/anv_allocator.c
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_private.h