turnip: add cached and cached-coherent memory types
authorDanylo Piliaiev <dpiliaiev@igalia.com>
Fri, 6 Jan 2023 17:59:36 +0000 (18:59 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 30 Mar 2023 15:50:47 +0000 (15:50 +0000)
commit5a594109623fff43fcd3b874b160c711e81bf55d
tree1e75fe543f874cb77eb49c957fcee5fb8f117607
parentbd816084c6a0637cdf573da2ed7a0eff56eb26fd
turnip: add cached and cached-coherent memory types

vkd3d requires cached memory type.

MSM backend doesn't have a special ioctl for memory
flushing/invalidation, we'd have to use cvac and civac
arm assembly instructions (would be done in following commit).

KGSL has an the ioctl for this, which is used in this commit.

Note, CTS tests doesn't seem good at testing flushing and
invalidating, the ones I found passed on KGSL with both
functions being no-op.

Based on the old patch from Jonathan Marek.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7636

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20550>
src/freedreno/vulkan/tu_device.cc
src/freedreno/vulkan/tu_device.h
src/freedreno/vulkan/tu_image.cc
src/freedreno/vulkan/tu_knl.cc
src/freedreno/vulkan/tu_knl.h
src/freedreno/vulkan/tu_knl_drm_msm.cc
src/freedreno/vulkan/tu_knl_kgsl.cc