Vulkan Sparse for Anv

Open Paulo Zanoni requested to merge pzanoni/mesa:xe_sparse into main

Hello

Here's the work-in-progress of my Vulkan Sparse implementation. It contains all the pre-requisite MRs, so feel free to test this branch directly.

This only works on xe.ko (needs to be a recent one!), although most of the code is independent of the driver (we really just need a vm_bind ioctl to behave the same as the one in xe.ko). I am currently testing Alchemist (formerly DG2) and TGL.

Here's what we already have:

  • sparseBinding
  • sparseResidencyBuffer
  • sparseResidencyImage2D
  • sparseResidencyAliased
  • residencyStandard2DBlockShape = True
  • residencyNonResidentStrict = True
  • sparseResidencyImage3D
  • residencyStandard3DBlockShape = True
  • shaderResourceResidency

Required/related MRs:

Related Issues:

Games affected by Sparse:

  • Elden Ring now works but doesn't use sparse (also works under Fake Sparse !24046 (merged))
  • Street Fighter 6, Resident Evil 4 use sparse and now work(and possibly the other RE Engine games)
  • Deathloop now works, unless using the debug build (#9381 (closed))
  • Shadow of the Tomb Raider in DX12 mode now loads the main menu (but is also affected by #9381 (closed))
  • Halo: Infinite now loads the loading screen which uses sparse (but crashes in non-Sparse code from another thread after spending a very long time in the loading screen)
  • Assassin's Creed: Valhalla doesn't crash and doesn't do anything, but appears to successfully use Sparse on its launcher.
  • Other games that we're aware use sparse but don't work or crash before even attempting to use sparse: Forza Horizon 5, Marvel's Spider-Man Remastered, Marvel Guardians of the Galaxy, Dirt 5, Monster Hunter World on DX12 mode, Apex Legends on DX12 mode.

Thanks,
Paulo

Edited by Paulo Zanoni

Merge request reports