Vulkan is coming to Raspberry Pi: first triangle

Following on from our recent announcement that Raspberry Pi 4 is OpenGL ES 3.1 conformant, we have some more news to share on the graphics front. We have started work on a much requested feature: an open-source Vulkan driver!

Vulkan

Standards body Khronos describes Vulkan as “a new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs”. The Vulkan API has been designed to better accommodate modern GPUs and address common performance bottlenecks in OpenGL, providing graphics developers with new means to squeeze the best performance out of the hardware.

First triangle

The “first triangle” image is something of a VideoCore graphics tradition: while I arrived at Broadcom too late to witness the VideoCore III version, I still remember the first time James and Gary were able to get a flawless, single-tile, RGB triangle out of VideoCore IV in simulation. So, without further ado, here’s the VideoCore VI Vulkan version.

First triangle out of Vulkan

Before you get too excited, remember that this is just the start of the development process for Vulkan on Raspberry Pi. While there have been community efforts in the direction of Vulkan support (originally on VideoCore IV) as far back as 2018, Igalia has only been working on this new driver for a few weeks, and we still have a very long development roadmap ahead of us before we can put an actual driver in the hands of our users. So don’t hold your breath, and instead look forward to more news from us and Igalia as they make further development progress.

51 comments

Anders avatar

A “graphics and compute” api, I’m interested in the compute part.

It would be very useful if the Pi had a layer like cuda on NVidia to expose the gpu for AI computation, it would open up deep learning study on the Pi in the territory of Jetson Nano which is a device with similar format to PI compute module. Could this be taken into consideration with Vulkan? Seems a ripe time to do it in such a growth area of study.

ProDigit avatar

Ai on the pi?
Not really a good idea.
The pi only has like 4 GPU cores max, vs 192 for Nvidia’s Xavier system, 768 cores for the 5 year old GTX 730, and 4500+ cores for an RTX 2080Ti.

anders avatar

Not talking about big models and training. Just instructional and learning examples (for the human operator).

I can, and do, use pytorch just on the ARM CPU.

Eben Upton avatar

Even earlier versions of Raspberry Pi are a pretty good fit for medium-complexity inference. See for example (https://www.hackster.io/news/benchmarking-machine-learning-on-the-new-raspberry-pi-4-model-b-88db9304ce4).

Unless you want to run big models, or do continuous interference (and so care about energy) or ultra-low latency, then it’s not clear there’s an advantage to having dedicated AI hardware (or lots and lots of shader cores).

Anders avatar

The advantage in having a layer equivalent to NVidia CUDA where the GPU handles the tensors etc, to make it a faithful learning environment.

Anders avatar

In fact, a little more research I’ve discovered that OpenCL has been independently ported to Pi. So This might provide sufficient access to GPU for compute purposes for my needs.
I will be looking into this for the next few weeks.

Pablo Rogina avatar

@Anders if you’re refering to VC4CL[1] “OpenCL implementation running on the VideoCore IV GPU of the Raspberry Pi models” please bear in mind that such component is not suitable for RPi 4 boards.

[1] https://github.com/doe300/VC4CL

Dirk Broer avatar

You know that the last BeagleBone is the BeagleBone AI?

Anders avatar

Yes, but I’m not too impressed with Beaglebone software. If I was going to choose another platform it would be Jetson Nano. But I prefer to stay in the Pi world.

Raja Sundaram S avatar

I would like to see something comparable with nVidia Jetson Nano. Support for CUDA in pi. That way I see vulkan as a great start heading towards a GPU dominant Pi. Love Pi for what it is!

Matha Goram avatar

What is the best way to “kick some tires” with Vulkan on Raspberry Pi?

Eben Upton avatar

Once we have something suitable for tire-kicking we’ll do another post with instructions. Probably six months or so.

Robert Osfield avatar

This is great news, I have been wanting on a Vulkan driver before diving into the Pi world. What is the time frame you are working on? Do you need beta testers?

Eben Upton avatar

We’ll run a public beta once we can run a useful subset of programs. Probably in the second half of this year.

JeGX avatar

Great news! Next step, a textured quad.

Eben Upton avatar

Baby steps :)

James Carroll avatar

I just watched a video on YT Explaining Computers channel where he compares the pi to the Jetson Nano and Odroid N2 running Kdenlive. When he rendered the clip I thought the pi would get crushed but it embarrassed the other two SBC boards. The obvious conclusion is that the software support for the Pi is far superior. You guys are doing amazing work and I’m sure that this Vulkan upgrade will be more of the same.

rpiMike avatar

Excellent news, the Pi just gets better and better :)

Saket SInha avatar

Could someone share the git repo link where the current development is being carried out ?

Eben Upton avatar

We’re not developing in the open yet. Watch this space.

Andrew Cox avatar

It would be great to be part of this effort.

ericb avatar

Hello,

Can you resize the window ? (not joking, difficulty’s inside)

W. H. Heydt avatar

So…does this mean that when Vulkan goes Pi mainstream, we can look forward to an initial triangle, rather than an initial square?

At least when helping out newcomers, we’d have a quick way to tell if they were running an up to date version of the software…

Brian G avatar

hahaha. I would personally love an opening triangle! I think it would look really cool. :)

Grey Hodge avatar

The square is produced by the gpu not the os. The gpu actually comes up first and is in charge of loading the os. So while it is possible to alter the gpu firmware to display a triangle, it would not be an indicator that the os supports vulkan.

Charlie Birks avatar

Ooh, this is exciting! Can’t wait to test my little engine on it!

Jon avatar

This is awesome. Especially GPU compute on the pi. Congrats.

chris stagg avatar

On the way to get Godot 4 working with it, sweet.

chris stagg avatar

And possibly blender when that gets Vulcan support.

spock avatar

blender 2.8x needs opengl 3.3. if videocore VI doesn’t have the features to support opengl 3.3 (according to statements made by the driver developers), why would it support enough of vulkan to run blender (once blender switches to vulkan)? blender for sure won’t use less modern rendering features with vulkan than it does with opengl 3.3.

blender 2.79b runs fine by the way and is still useful too…

Eben Upton avatar

It’s not clear to me why Blender requires OpenGL 3.3. Certainly if they’re planning to migrate to Vulkan I don’t believe they can be using features which the hardware doesn’t support.

Plaonder avatar

Cool!

andras avatar

rock on!

RICARDO DORNELLES WOLF avatar

Rasp3 version released?

Eben Upton avatar

The VideoCore IV graphics IP in earlier Raspberry Pi models doesn’t support all the features required for Vulkan. You could imagine supporting a subset, but it’s not clear that this would be helpful to users.

Remember there is a Mesa OpenGL ES 2.0 driver for VideoCore IV, which is still under active development.

StephZ avatar

Very interesting.

Now what about bringing the entire desktop rendering over to Vulkan once significant milestones have been reached? I love Raspbian, but the UI performance still feels very Windows9x-ish …

Jon avatar

Yeah, Team!

This is good news. It seems there is a big push in the Graphics Community to move away from OpenGL(es) to Vulkan and it is nice to see the Raspberry Pi folks looking to move in this direction as well. The team at id have moved all of their dev with id Tech 7 to Vulkan and even Adobe had developed their Premiere Rush product using Vulkan. The Raspberry Pi will make a nice low end dev platform for folks learning Vulkan.

Thanks!

Cheers,

Jon

qxsnap avatar

This is great news. Look forward to using the Pi4 to learn Vulkan.

Andy avatar

Fantastic news this is! I’m more than very keen to support this however I can. Where do I sign up to be a beta tester?

Gavin McIntosh avatar

Not fair, I haven’t even got any OpenGLES3.1 code working.
The compute shaders on that should be able to run Edge ML/CV/AI stuff. I suppose if Vulkan gets working there would be no point going back and emulating OpenGL 3.3/4.x?
Vulkan version of Blender? Next year maybe?

Anon avatar

Since it’s going to be open source why not release the source earlier than later? There is no reason to keep the source code hidden unless you want leave open the possibility of keeping it closed source.
<but we will have to support it
Just state that it is prealpha and you should run it at your own risk.

kołtun avatar
Archimedes5000 avatar

There are already developments on this. Doesn’t it make sense to work together?
https://github.com/abergmeier/mesa-vulkan-broadcom
Greetings Axel

Andrew Cox avatar

The author seems just to be finding his feet with his driver. In the talk he gave this month he says “don’t expect much” when he links to his repo. His talk title is also “…an Exercise in Futility “ ?
* https://ftp.belnet.be/mirror/FOSDEM/2020/K.4.401/rpi4_vulkan.mp4

Colin avatar

Can you rotate the first triangle on future examples by 120 degrees (clockwise). That way it will match the CIE diagram, which is used to represent human colour vision.

Andrew Cox avatar

Is this all being done by reverse engineering or do the Igalia developers have access to hardware documentation?

HGH avatar

So maybe in about an year we’ll have an usable driver.

HGH avatar

Hopefully directly Vulkan 1.2 :)

John Ward avatar

Hi,
Is your VideoCore VI driver upstreamed to Mesa or is it closed source?
Thanks,
John

Eben Upton avatar

It’s upstreamed. While the license might permit it, I don’t think closed-source Mesa drivers are really a thing.

Robert avatar

This is going to be one of the best thing for this low cost single board computer. computing and gaming would be smooth and easier especially for “windows on raspberry pi and android OS”. which is commonly used by everyone, today in their PC and tablet.

Comments are closed