Vulkan update: merged to Mesa

Today we have another guest post from Igalia’s Iago Toral, who has spent the past year working on the Mesa graphic driver stack for Raspberry Pi 4.

Four months ago we announced that work on the Vulkan effort for Raspberry Pi 4 (v3dv) was progressing well, and that we were moving the development to an open repository.

vkQuake3 on Raspberry Pi 4

This week, the Vulkan driver for Raspberry Pi 4 has been merged with Mesa upstream, becoming one of the official Vulkan Mesa drivers. This brings several advantages:

  • Easier to find: now anyone willing to test the driver just needs to go to the official Mesa repository
  • Bug tracking: issues/bugs can now be filed on the official Mesa repository bug tracker. If the problem affects other parts of the project, it will be easier for us to involve other Mesa developers.
  • Releasing: v3dv will be included in all Mesa releases. In due course, you will no longer need to go to an external repository to obtain the driver, as it will be included in the Mesa package for your distribution.
  • Maintenance: v3dv will be included in the Mesa Continuous Integration system, so every merge request will be tested to ensure that our driver still builds. More effort can go to new features and bug fixes rather than just keeping up with upstream changes.

Progress, and current status

We said back in June that we were passing over 70,000 tests from the Khronos Conformance Test Suite for Vulkan 1.0, and that we had an implementation for a significant subset of the Vulkan 1.0 API. Now we are passing over 100,000 tests, and have implemented the full Vulkan 1.0 API. Only a handful of CTS tests remain to be fixed.

Sascha Willems’ deferred multisampling demo

This doesn’t mean that our work is done, of course. Although the CTS is a really complete test suite, it is not the same as a real use case. As mentioned some of our updates, we have been testing the driver with Vulkan ports of the original Quake trilogy, but deeper and more detailed testing is needed. So the next step will be to test the driver with more use cases, and fixing any bugs or performance issues that we find during the process.

37 comments

Avatar

I don’t know a lot about graphic APIs and how they link to existing applications. So I was wondering if the Vulcan updates will provide improved performance for applications, like Skype or Zoom.

Avatar

They won’t be helped.

This is a graphics API. This will only help 3D Graphics. Nothing else. And boy will it!

Avatar

Amazing work guys! Very exciting to see progress on this :)

Avatar

Brilliant news.
Is there a timeline for when this may be part of Raspberry Pi OS?

Avatar

If you add the mesa repo, it’s as simple as apt-get and you will have it.

The problem is pi software has not been compiled (yet) to take advantage of it.

Avatar

Where? All I can find are compile instructions.

Avatar

Thanks for the info, SwordII. Can you add any more detail? “apt-get” and what? What if an earlier version is installed already? For example, I already have mesa installed, but I want to be sure my vulkan drivers are updated.

Avatar

Really nice to hear more of this. The little pi can be a wonder sbc. Now it is too. But when that run on that….. Awesome work how ever.

Avatar

@Jack: The RPI has both a GPU (graphics processing unit) and VPU (video processing unit). The API (application programming interface) for the VPU is what those programs will be utilizing. Your search will be for “Skype Zoom rpi video encoder decoder”
@Albert look under the first photo with the line in bold “Easier to find”

Avatar

Now blender is starting with their vulkan implementation, that would be the utility test… eventually.

Avatar

blender 2.8x and up needs opengl 3.3 and vc5 only support opengl 2.1. so at the moment blender 2.79 is the last version that runs on a raspberry pi.

would this be different with vulkan? if blender needs opengl 3.3 features and vc5 doesn’t support those features (otherwise there would be an opengl 3.3 driver), why would it support those features with vulkan?

Avatar

Why would you think that it’d be supported- this requires someone to come up with the driver infrastructure to support that given OpenGL level. In truth, the Vulkan stuff is going to be more demanding/advanced than the other…just as a hint.

Avatar

I’m also not particularly well-versed in the finer points of graphics APIs and various accelerants, but I can see that a lot of people are excited about this. Could someone be so kind as to explain just what Vulkan is, what it can do for us (as users), and what this means for the Raspberry Pi?

Avatar

Vulkan is just a 3D graphics api. It is basically the spiritual successor to OpenGL. So instead of workinng to get the Pi video drivers to the latest and greatest OpenGL version, the Foundation is basically sidestepping ahead to the future 3D platform which most commercial vendors are slowly migrating to already.

And what drives 3D graphics interest on any OS? GAMES!!
Think of all those thousands of Android games for ARM that could esentially be able to run on the Pi in the near future. Google has already specified that from Android 10, Vulkan compatibility is required for branding. The only question will be if game studios will make the small tweaks to allow running those games directly on the Pi. Or if the community will have to create an Android runtime environment to trick those games into loading (like WINE). Come on game studios – you know you want to do it! That means the Pi would be not relegated to running Retro games, but would actually be able to play the latest 3D games as well. No wonder there is so much excitement!

Speaking of Android, hopefully with this merge into the default Mesa will also go a long way into getting that OS to run more smoothly on the Pi. Since Google tied Anroid so heavily with 3D just for normal functionality, currently having to use the ARM cpu for 3D stuff instead of the GPU is painfully slow. The new Pi 4 cpu and larger memory option helps, but not optimal, especially compared to simliar hardware on phones. (Side note, with the announcement of CM4 this week, this is the perfect time for someone with skills and money to put all this together and make a real piPhone. Please – I need a truly open and widely supported mobile device.)

But besides games the other major area for 3D graphics is just a smattering of science based apps here and there. Nothing too important. ;)

Otherwise if none of thse areas make your mouth water with anticipation, then the only other benefit would being able run a windows manager that has all those eye candy enabled to show you how cool you are. You know – those swishing windows that disappear like being sucked into a vortex or switching virtual desktops using a 3D cube, etc.

Avatar

Heh. There’s more than 3D graphics. GPGPU compute is more possible and plausible with Vulkan, esp. with Compute Shader support there.

Avatar

Thanks so much Glenn — that’s exactly the information I was looking for! I feel smarter now :-)

Avatar

Simply put anything that is graphics intensive (emulation, games, possibly video editing/CAD) will get a huge performance boost

Avatar

What does it mean for the Raspberry Pi? Potentially, eventually, a greater variety of fast, schmick graphics applications – everything from Inkscape to GIMP to Doom.

Avatar

Depends on what user means.
A full implementation of Vulkan means, that CAD or 3D games can draw their objects faster, if they use this API.

Maybe it can be used for other calculations as well. AI or [Seti|foldinge|..]@home run much faster on GPUs. But on the PI this will be limited by the 32-Bit-RAM interface. So it will not be 100 times faster than using NEON.

Avatar

I am really glad that with linux 5.9 raspberry pi has finnaly working linux kernel DRM (display driver)
https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=288234&p=1745911#p1745858

So we can finally use gnome or fully desktop enviroment.
THX

Avatar

You could already use some “fully desktop” environment. DRM doesn’t play into 2D operations, just for starters. And I know that XFCE4, Enlightenment, and a few others work just fine and they count as “fully desktop”. If GNOME doesn’t play nice in this space, it could be that it’s a bit heavy to begin with.

Avatar

Great, thanks for the good news. I look forward to its next availability in Raspbian, my favorite distribution :)

Avatar

Will there be a document (like there is for the camera) that will help teach us how to interface our programs with the new 3d API and drivers?

Avatar

Is this available also for 64bit OS?

Avatar

The core Mesa source code has been supporting and working on 64-bit systems for some time. If referring specifically to Raspbian, it was mentioned previously the new Vulkan parts has mainly been developed and tested on stable 32-bit version. But this is all open source and therefore “available” on all platforms. So free to download 64-bit Raspbian and Mesa and give the compile a go to help the cause.

Avatar

This is awesome! :D Thank you!

Avatar

Awesome news!
Will it take much longer for v3dv to work on the DRM MESA platform? (In other words, Vulkan without X, directly on KMS/DRM).
That’s the most important bit it’s missing right now: X requeriment is killing performance and boot times.

Avatar

Nice job. But where the stable version of 64-bit Raspberri Pi OS?

Avatar

Stable can be subjective. Here is the latest 64bit Pi image:
https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2020-08-24/2020-08-20-raspios-buster-arm64.zip
Try it to see if it works for your needs.

Avatar

Stable 64-bit Rasberry Pi OS + Vulkan will be the ultimate Christmas gift !!

Avatar

I just used the fresh Raspios arm64 image and applied the infos from this video:
https://www.youtube.com/watch?v=TLzFPIoHhS8
works!

Avatar

I have used apt-get to update my Pi4, and installed the vulkan packages. But if I try to run vkcube it says “vkEnumerateInstanceExtensionProperties afiled to find the VK_KHR_surface extension” and “Do you have a compatible Vulkan installable client driver (ICD) installed?”. Probably not, but how do I determine the answer to that question, and where would I get a compatible Vulkan installable client driver?

Avatar

Does Vulcan work in a Console-only environment?
This is very important to performance in tasks that don’t require a GUI, because the X11 windowing environment comes with a performance penalty.
If Vulcan can be used in the console, it would really be a boost for Machine Learning tasks and AI.
Thanks

Avatar

Will this eventually be out of testing and in a regular update? Also, would this increase the frame rate in Minecraft? (I have 1.16 downloaded on pi)

Avatar

If this means Linux desktop will work way faster then I’m in. Even for x86 machines I find XFCE4 more sluggish than Windows 7 with same hardware. I don’t really care about 3D as that would be oriented at light gaming, and for me a lightning fast desktop is much more important, but even when I drag windows I see CPU usage goes way higher than in Windows 7, and it indeed has something to do with the GPU.

As I’m not an expert I don’t know where is the cause for that as Intel is supposed to release their drivers with the source code, so using them in Linux is supposed to be someway easy. And as far as I know, since Intel HD 520 Vulkan is already supported, but again, I don’t know if that would help in the performance of the desktop, as Windows is using their own DirectX and it may be not comparable.

Leave a Comment

Comments are closed