anv/sparse: add the initial code for Sparse Resources
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Wed, 19 Apr 2023 00:26:05 +0000 (17:26 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 28 Sep 2023 06:16:40 +0000 (06:16 +0000)
commit6368c1445f44e3c05b399d9e279d36a79a1a6bcc
tree9db85f68bb81e586538ef84d2a79d0ce040b453f
parente4598f0eea38290c24eee758e979215bc02e2435
anv/sparse: add the initial code for Sparse Resources

This giant patch implements a huge chunk of the Vulkan Sparse
Resources API. I previously had this as a nice series of many smaller
patches that evolved as the xe.ko added more features, but once I was
asked to squash some of the major reworks I realized I wouldn't be
able easily rewrite history, so I just squased basically the whole
series into a giant patch. I may end up splitting this again later if
I find a way to properly do it.

If we want to support the DX12 API through vkd3d we need to support
part of the the Sparse Resources API. If we don't, a bunch of Steam
games won't work.

For now we only support the xe.ko backend, but the vast majority of
the code is KMD-independent and so an i915.ko implementation would use
most of what's here, just extending the part that binds and unbinds
memory.

v2+: There's no way to sanely track the version history of this patch
in this commit message. Please refer to Gitlab.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23045>
src/intel/vulkan/anv_batch_chain.c
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_formats.c
src/intel/vulkan/anv_image.c
src/intel/vulkan/anv_pipeline.c
src/intel/vulkan/anv_private.h
src/intel/vulkan/anv_sparse.c [new file with mode: 0644]
src/intel/vulkan/genX_cmd_buffer.c
src/intel/vulkan/meson.build