venus: expose at least one cached memory type
authorYiwei Zhang <zzyiwei@chromium.org>
Thu, 24 Aug 2023 19:26:32 +0000 (12:26 -0700)
committerMarge Bot <emma+marge@anholt.net>
Mon, 28 Aug 2023 18:21:48 +0000 (18:21 +0000)
commit72f104791d1547a6ad88cec2d9244ae48fe56c68
treefab1c48ddc3a507a5c0ac34f326f180a321c6198
parent7c98510d173b6a1408bbb2c9087a2588cd488fb7
venus: expose at least one cached memory type

Kernel makes every mapping coherent. If a memory type is truly
incoherent, it's better to remove the host-visible flag than silently
making it coherent. However, for app compatibility purpose, when
coherent-cached memory type is unavailable, we emulate the first cached
memory type with the first coherent memory type.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24875>
src/virtio/vulkan/vn_device_memory.c
src/virtio/vulkan/vn_physical_device.c
src/virtio/vulkan/vn_physical_device.h