Vulkan Sparse for Anv
Hello
Here's my Vulkan Sparse implementation. 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
- crucible!142 (merged)
Related Issues:
- #5003 (closed) Generic "sparse support" request
- #8790 (closed) Resident Evil 4
- #9027 (closed) Street Fighter 6
- #9032 (closed) Venus
- #9381 (closed) Deathloop and SOTTR assert(validated)
- drm/xe/kernel#282 (closed) dmesg errors
- drm/xe/kernel#443 (closed) TGL is unusable on xe.ko
- drm/xe/kernel#495 (closed) 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
Games that don't use Sparse but require it due to DX12:
- Elden Ring (also works under Fake Sparse !24046 (merged))
- Armored core 6 (!25217 (merged))
- Marvel's Spider-Man Remastered
Games that require and use Sparse:
- Street Fighter 6
- Resident Evil 4
- Deathloop
- Assassin's Creed Valhalla
Games that still don't work, but Sparse moves things forward:
- 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)
- Dirt5 crashes during launch, before attempting to use Sparse (#9882 (closed))
- Marvel's Guardians of the Galaxy crashes after the Marvel logo, before attempting to use Sparse
- Forza Horizon 5 crashes during launch, before attempting to use Sparse (#9842)
Thanks,
Paulo