anv: add fake sparse support
authorFelix DeGrood <felix.j.degrood@intel.com>
Fri, 7 Jul 2023 20:21:01 +0000 (20:21 +0000)
committerMarge Bot <emma+marge@anholt.net>
Thu, 3 Aug 2023 19:57:18 +0000 (19:57 +0000)
commit7db20032096143620c3bfe4aa8e572d6805595b8
tree181506c87020afed02211abd8a2b6c73c09ab7b7
parent17e505cb2d79221e92596c205365f47aaac8c173
anv: add fake sparse support

Some DX12 games require sparse resource support but don't
actually use sparse resources. Add a way to make these games work
while we still don't have sparse resources fully working on every
KMD backend.

When fake_sparse=true, anv advertises sparse resource support
despite lacking full support.

Based-on-patch-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24046>
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_private.h
src/util/driconf.h