Vulkan update: version 1.2 conformance for Raspberry Pi 4
Long before Raspberry Pi happened, I used to design graphics processing units (GPUs) for a living: along with James Adams, Gary Keall, and others, I designed the VideoCore 3d GPU that you can find in every Raspberry Pi computer.
From 2007 to 2012, I represented Broadcom at Khronos, the graphics API standards body. At the time, our primary focus was on the OpenGL and OpenGL ES APIs. These are pretty venerable standards, dating back to the mid 1990s. They abstract away the detail of how particular GPUs work, providing a common set of primitives (“here’s a texture”, “draw this list of triangles”) that authors can use to write 3D graphics applications that work on any platform, regardless of the underlying GPU.
But after twenty years OpenGL was starting to looking like a bad abstraction: it didn’t provide the capabilities application authors needed, and was an increasingly poor fit for how the underlying hardware worked. The result was an increasing amount of overhead and inefficiency, both in the application and in the driver stack.
The Vulkan project was a long-running effort to define a better, more modern, abstraction, which began during my time at Khronos, and led eventually to the release of Vulkan 1.0 in 2016. Since then, it has seen widespread adoption among GPU, operating system, and application developers.
For the last couple of years, we have been working with our friends at Igalia to bring Vulkan to the Raspberry Pi 4 platform, and today we’re happy to announce that we have achieved Vulkan 1.2 conformance from Khronos.
Igalia’s Iago Toral says:
“All the changes required for this have already been merged in the upstream v3dv Mesa driver and will eventually be available in future Raspberry Pi OS updates.
Aside from Vulkan 1.2 core functionality, we have also been adding support for various other extensions, some of which are core in Vulkan 1.3, as well as many bugfixes and performance improvements.”
Another interesting development came through a contribution by Roman Stratiienko, who added support for Android. If you are interested in this you may want to check out KonstaKANG’s Lineage OS releases for Raspberry Pi 4.
Igalia continue to work on improving Vulkan support for Raspberry Pi 4, so stay tuned for future updates.
So this is probably a bit of a noob overshoot, but what does one need to play with Vulkan on a Pi? apt install vulkan-something-dev? git clone jokull.it? Reflash the system?
Raspberry Pi Staff Liz Upton
I think that if you’re needing to ask, this very definitely isn’t for you yet! You’ll need a clean install of Mesa from GitHub, and then you’ll need to do some high-pitched screaming.
Thanks for honesty, Liz. If diaphragm must be involved, I may indeed want to wait a while…
Looks like Mesa 22.2 is the one we need.
I don’t see it in the repo yet so DIY compiling?
Or just wait, however some distributions might get it faster than Debian based Raspberry OS.
You could try piKiss. It basically installs the new mesa Vulkan drivers on the pi. However, I have to warn you I did it and eventually the desktop would stop booting after upgrading the drivers..
It may not be too impressive but you can easily run vkcube to get started:
sudo apt install vulkan-tools mesa-vulkan-drivers
The source code is here: https://github.com/KhronosGroup/Vulkan-Tools/tree/master/cube
Run vulkaninfo for more info about the hardware and driver.
Richard S Wright
The latest Vulkan SDK for Linux from LunarG will build on a Raspberry Pi 4 now. The Linux release notes have a quick start step by step to get you going. It’s not the “latest” Vulkan ICD, but it’s new enough.
I’ve been following these updates and it is great too see.
It would be great to see some news articles on people actually using this on a Pi4, who uses it and what it has been useful for, and why it has been worthwhile to them and you.
Also does it bring anything useful to the PiOS Desktop itself?
Raspberry Pi Staff Eben Upton — post author
Right now desktop compositing is handled by Glamor, which sits on top of OpenGL, not Vulkan. The best examples of “real world” applications for Vulkan on Raspberry Pi today are games running on Android/Lineage.
I believe also that Lakka supports Vulkan on the Pi4 with most of the available cores; it’s based on LibreELEC.
Done a basic example testing using VulkanSceneGraph compared to OpenSceneGraph. VSG is about twice as fast as OSG, that makes it usable on Pi4 compared to painfully slow. Warzone2100 is one game that should be able to use Vulkan once it is standard, it is my last benchmark game for OS 3D graphics testing. Compiling mesa3d etc is painful and it breaks if you update/upgrade. Lots of screaming if I do that by accident, haha. I am just going to wait now. I did notice the conformance was on 5.10 and I am running 5.15, no idea what that means. As for Desktop improvements, Chamferwm is the only Windows Manager using Vulkan?
Maybe Zink on Vulkan to get OpenGL 4.6? We will learn in time.
Any progress on hevc?
Raspberry Pi Staff Eben Upton — post author
If by HEVC you mean plumbing frames output by the hardware decoder in as textures for rendering then yes, this is happening: 8-bit is complete, 10-bit is in progress.
Thanks for continuing to bring the Raspberry Pi into conformance with Vulkan! This work and care is much appreciated. I look forward to seeing the support getting into all the upstream and downstream places necessary (eventually making it within an easy reach of Raspberry Pi OS’ normal “apt” package management).
Please get hardware video decode in the browser working. Been waiting for just that, for years now. I want this thing to work ok for a pc for just netflix and youtube
Hope to see that implemented into Recalbox. PS3 games coming 😂
Can you provide sample videos?
As some one who likes to learn programming the GPU, I urge RPi and Broadcom to release the GPU specification of VC6.