Intel's Vulkan Linux Driver Gets ~30% Performance Boost, Now Faster Than OpenGL
Jason Ekstrand of Intel's OTC team who has been one of their prominent Vulkan Linux developers revived a patch series about doing relocations in user-space rather than kernel space. Ekstrand explained with the patch series:
This series is a revival of a patch of Kristian's from earlier this year to do relocations in userspace before handing the batch off to the kernel. The kernel refuses to write a relocation into a busy buffer (for obvious reasons). Because we use a single surface state buffer that is shared across batches, it is basically always busy so the kernel always stalls before writing relocations. Due to the way the driver is structured, however, we know that it's always safe to write the relocations even when it's busy. By doing relocations in userspace, we can take advantage of this knowledge and avoid the kernel stalls.
By doing relocations within user-space, the Dota 2 Vulkan performance is now about 30% faster on Skylake hardware, meaning that their ANV Vulkan driver is finally faster than the i965 Mesa OpenGL driver! Additionally, The Talos Prunciple is experiencing similar performance boosts. Doing the relocations in user-space is around 200 lines of changed code and will hopefully land soon in Mesa Git!