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:
- !22974 (merged) Tile64 improvements
- !23620 (merged) Yf/Ys support + 3D for Tile64 + Miptails (related: !9835 (closed))
- !23882 (merged) shaderResourceResidency
- !24046 (merged) fake sparse
- !24681 (merged) vm_bind reworks
Related Issues:
- #5003 Generic "sparse support" request
- #8790 Resident Evil 4
- #9027 Street Fighter 6
- #9032 Venus
- #9381 (closed) Deathloop and SOTTR assert(validated)
- drm/xe/kernel#282 dmesg errors
- drm/xe/kernel#443 TGL is unusable on xe.ko
- drm/xe/kernel#495 Kernel vm_bind use-after-free
- drm/xe/kernel#496 waiting after unbinding an unbound address should work
- drm/xe/kernel#528 (closed) multi-operation vm_bind doesn't work (we have a workaround for it!)
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