User avatar
Ultibo
Posts: 97
Joined: Wed Sep 30, 2015 10:29 am
Location: Australia

Ultibo core 2.0, now with OpenGL ES, OpenVG, OpenMAX...

Tue Sep 19, 2017 9:46 am

We've just released Ultibo core 2.0 and the major new feature is full support for the VideoCore IV GPU in all models of the Pi, that means Ultibo can now take advantage of hardware accelerated graphics including OpenGL ES for 3D, OpenVG for 2D, OpenMAX IL for multimedia audio and video as well as the Broadcom specific Multimedia Abstraction Layer (MMAL) which gives full access to the official Pi camera.

The new Ultibo core 2.0 installer is now available for download from https://ultibo.org and includes more than 20 new examples showing what can be done with all the new features, if you're just curious and want a very quick look we've posted a couple of 30 second videos on our Facebook and Twitter pages so you can see the results. Or if you have a Raspberry Pi handy we've also made one of the OpenGL ES examples available to download as a zip file so you can just extract it to an SD card and see for yourself.

Of course all of the existing features are still available as well so everything we listed in our original announcement can now be combined with the power of full access to the VC4 GPU. You can find more information and the Windows installer download on the Ultibo website, the wiki contains lots of information including how to build the source for various Linux distributions or if you have questions please feel free to ask at our forum.

This is the first time we know of that full hardware accelerated graphics has been made available on a bare metal platform without the overhead of a full operating system, we know there have many that have asked if (and how) this can be done so now there is proof that nothing in the VC4 is off limits without Linux.

We should note that this is not a radical reverse engineering of the VC4 internals, we have simply ported the Userland libraries to Ultibo and written a brand new VCHIQ driver to support the communication. If you are trying to implement this yourself in a bare metal environment be aware that it depends heavily on threading and synchronization features so it is not enough to simply stub out the missing items and hope for the best, you really need to implement those features or spend a lot of time redesigning how things work.

Thanks,
Ultibo.org | Make something amazing
https://ultibo.org

StevoD
Posts: 8
Joined: Tue Aug 29, 2017 11:37 am

Re: Ultibo core 2.0, now with OpenGL ES, OpenVG, OpenMAX...

Tue Sep 19, 2017 12:23 pm

Awesome, thank you!

LdB
Posts: 554
Joined: Wed Dec 07, 2016 2:29 pm

Re: Ultibo core 2.0, now with OpenGL ES, OpenVG, OpenMAX...

Tue Sep 19, 2017 12:38 pm

Grats guys really nice option for peeps, I did think you should be able to do that with your thread system.

My only complaint why not BLUE colour theme :-)

User avatar
Gavinmc42
Posts: 1440
Joined: Wed Aug 28, 2013 3:31 am

Re: Ultibo core 2.0, now with OpenGL ES, OpenVG, OpenMAX...

Tue Sep 19, 2017 2:03 pm

We have just discover Garry is colour blind, beetroots are green :lol:
I think it it his way of messing with our heads, apart from showing me how lame I am as a programmer :oops:
There are also a number of smaller libraries and internal interfaces which we have not provided Free Pascal units for at this stage
Now he has me going through the source looking for other secret stuff :lol:

This release pretty much put Ultibo on the map for embedded graphics stuff, digital signs etc.
Things I only spoke about as one day possible a few days ago are doable this week :o
I will have to go back to posts from last year/last month/ last week and cross off what is now possible right now.
It might not be truly baremetal anymore but it works and it is based on RPF libraries so it has support too.

Lots to learn but there are books for these levels OpenGLES etc, whew.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

LdB
Posts: 554
Joined: Wed Dec 07, 2016 2:29 pm

Re: Ultibo core 2.0, now with OpenGL ES, OpenVG, OpenMAX...

Tue Sep 19, 2017 2:26 pm

Seriously for a lot of people it's will be perfect, they just need to learn one of the GL platforms ... hint hint Gavin :-)
I did say to you I was surprised Ultibo hadn't done it and to hassle him.
I am sure it will improve user numbers big time for the system.

Certainly a lot better than beating up the VC4 directly with little or no documentation like I was. For me it is just fun playing with the GL pipeline and seeing what it can do but Ultibo is right it's not something you want newbies doing. I have lots more I am going to do but only because it interests me and largely because of what Eric is doing opensource which is a game changer.

As another aside if you know anyone interested in micropython running over the top of ultibo, I can probably port. When I was porting micropython one of the things I noticed was how easily it would be to sit it over the top of ultibo subsystem.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5100
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Ultibo core 2.0, now with OpenGL ES, OpenVG, OpenMAX...

Tue Sep 19, 2017 2:42 pm

Ultibo wrote:
Tue Sep 19, 2017 9:46 am
We should note that this is not a radical reverse engineering of the VC4 internals, we have simply ported the Userland libraries to Ultibo and written a brand new VCHIQ driver to support the communication. If you are trying to implement this yourself in a bare metal environment be aware that it depends heavily on threading and synchronization features so it is not enough to simply stub out the missing items and hope for the best, you really need to implement those features or spend a lot of time redesigning how things work.
Impressive. I think you are the first to port VCHIQ to a bare metal platform and get the userland libraries running.
Back at Broadcom there were a number of platform ports to different mobile phone architectures and it generally took a number of engineers
a significant amount of time. And they generally had an established RTOS to begin with (and access to support engineers for questions).
Nice job!

User avatar
Gavinmc42
Posts: 1440
Joined: Wed Aug 28, 2013 3:31 am

Re: Ultibo core 2.0, now with OpenGL ES, OpenVG, OpenMAX...

Wed Sep 20, 2017 1:03 am

Seriously for a lot of people it's will be perfect, they just need to learn one of the GL platforms ... hint hint Gavin :-)
I can take a hint, eventually :lol:
OpenVG will do the 2D stuff I have been doing on Pi's with pygame.
People say OpenVG is dead but for single purpose applications like Ultibo it is good for making coding easier.
Let you know after I try it ;) Could be used for UI's too.

Knowing Garry he probably has all the lower level stuff accessible via registers etc so it could be done that way too, hint ;)

LdB, I use micropython on piCore OS, it comes as standard, but the Linus OS gets in the way sometimes, hence moving to Ultibo.
Pascalscript seems to work on Ultibo, I expect Micropython will be easy for someone with the skillset, hint :lol:
Probably any language interpreter could be got working as all the lower level stuff is done. Basic anyone?

I even made some shell extensions that made me think I could do a version of BASH.
I am not a coder yet in a few hours I made shell extensions with Ultibo.
Not sure how long it would take me to do that in Linux? Months if not years to get up to speed.

I am a newbie with Open???? and I don't want to go deep into register level coding so this is a big breakthrough for users like me .
And I had not been hassling Garry, I suspected he had been really quiet for a reason but there was clues what was coming.
I just did not expect it so soon and so sorted :D

I don't know what to call this stuff, but this is a new way of coding on Pi's.
Eventually it can be ported to other SoC/SBC's so it is a game changer for developers too as it is much faster than the traditional methods.
So it is a new alternative that Garry has pretty much single handed let free into the world to shake things up :D
The really great thing is it is based on existing, well tested bits and pieces like Laz/FPC/VCHIQ.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

fanoush
Posts: 231
Joined: Mon Feb 27, 2012 2:37 pm

Re: Ultibo core 2.0, now with OpenGL ES, OpenVG, OpenMAX...

Fri Sep 22, 2017 2:07 pm

Gavinmc42 wrote:
Wed Sep 20, 2017 1:03 am
Basic anyone?
There is SpecBas which is written in pascal so it should be easier to build for Ultibo (?)
https://sites.google.com/site/pauldunn/
http://zxnet.co.uk/websvn/listing.php?repname=SpecBAS

User avatar
Gavinmc42
Posts: 1440
Joined: Wed Aug 28, 2013 3:31 am

Re: Ultibo core 2.0, now with OpenGL ES, OpenVG, OpenMAX...

Sat Sep 23, 2017 12:46 am

SpecBasic, hmm written in Pascal :D
Looks like it uses OpenGL and SDL so the graphics stuff will need some rework.
Probably quite easy to convert for an expert FPC coder., but since I am not one it looks like a lot of work :lol:

Not sure how much of OpenGL is working now on Pi's.
There does not seem to be much info around yet, or I am looking in the wrong spots.

Any tuts on OpenGL on Pi's?
It will be interesting to try them on Raspbian then see if they still work on Ultibo and see if it works and is faster.

Porting SDL to Ultibo?
According to this, SDL is a library? And since the VC4 stuff are libraries, SDL could be ported too?
https://www.libsdl.org/

Pascal binding https://www.libsdl.org/languages.php
If OpenGL and SDL are ported to Ultibo and working then SpecBasic should be much easier ;)
Which version of SDL works in Raspbian?
I have used Pygame which uses SDL so one version works.
Need to refer this to the expert :lol:
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

ghans
Posts: 7365
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Ultibo core 2.0, now with OpenGL ES, OpenVG, OpenMAX...

Sat Sep 23, 2017 7:26 am

Congratulations. Which other OS not based on Linux supports the 3D/video hardware ??? FreeBSD seems the only one. I suppose that means OpenGL ES software written in C just needs to be (statically) compiled to work on Ultibo ?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

LdB
Posts: 554
Joined: Wed Dec 07, 2016 2:29 pm

Re: Ultibo core 2.0, now with OpenGL ES, OpenVG, OpenMAX...

Sun Sep 24, 2017 2:45 pm

Gavinmc42 wrote:
Sat Sep 23, 2017 12:46 am
Not sure how much of OpenGL is working now on Pi's.
There does not seem to be much info around yet, or I am looking in the wrong spots.
That is a depends question and you are best asking Gary and DOM from Pi foundation about what I am about to tell you.

So the base OpenGL driver that comes thru the Pi blob does OpenGL 2.1 spec plus a few extra bits.
You can bring it up to OpenGL 3.xx on using Eric's linux driver and using vc4-kms-v3d or vc4-fkms-v3d but that kills the blob and libGLESv2.so drops dead. Not sure exactly how Gary has setup the shim so ask him, or do a glGetString and look at what version it reports it will be 2.1 or 3.x. I don't know how far Gary took the process, technically there is no reason he couldn't support Eric's driver he has everything he needs. I have been far to busy getting dirty on the VC4 to play around to see what he did.
Gavinmc42 wrote:
Sat Sep 23, 2017 12:46 am
Any tuts on OpenGL on Pi's?
It will be interesting to try them on Raspbian then see if they still work on Ultibo and see if it works and is faster.
There is nothing special about the Pi OpenGL you just need to use 2.1 or 3.xx depending what driver you are using. Just do a search for OpenGL and whatever version. That is the whole point about OpenGL to create a standard.
Gavinmc42 wrote:
Sat Sep 23, 2017 12:46 am
Porting SDL to Ultibo?
According to this, SDL is a library? And since the VC4 stuff are libraries, SDL could be ported too?
https://www.libsdl.org.
The Pi has got SDL support at something like 1.2 and 2.0.??? but it's only partly accelerated. Whether that stuff is in the userland files or special linux drivers again Gary or DOM would be your source to ask.

User avatar
Ultibo
Posts: 97
Joined: Wed Sep 30, 2015 10:29 am
Location: Australia

Re: Ultibo core 2.0, now with OpenGL ES, OpenVG, OpenMAX...

Mon Sep 25, 2017 2:13 am

ghans wrote:
Sat Sep 23, 2017 7:26 am
Which other OS not based on Linux supports the 3D/video hardware ??? FreeBSD seems the only one.
The only examples we were able to find were FreeBSD (which possibly also includes NetBSD etc), Windows 10 IoT and RiscOS.

I'm not sure if RiscOS has complete support for all of the functionality, certainly OpenGL ES seems to be working.

Microsoft say that the port for Windows 10 IoT is not complete but they don't give any details about what is missing.
ghans wrote:
Sat Sep 23, 2017 7:26 am
I suppose that means OpenGL ES software written in C just needs to be (statically) compiled to work on Ultibo ?
In many cases yes, Ultibo applications can include libc and libm (from Newlib) in order to support code compiled in C, beyond that we also provide a full implementation of pThreads, POSIX semaphores, sockets and a number of Linux specific functions like msleep.
Ultibo.org | Make something amazing
https://ultibo.org

LdB
Posts: 554
Joined: Wed Dec 07, 2016 2:29 pm

Re: Ultibo core 2.0, now with OpenGL ES, OpenVG, OpenMAX...

Mon Sep 25, 2017 8:21 am

Ultibo wrote:
Mon Sep 25, 2017 2:13 am
Microsoft say that the port for Windows 10 IoT is not complete but they don't give any details about what is missing.
That is not quite correct, Microsoft has been very clear and you are actually ahead of them now :-)
Graphics acceleration is not available on the RPi for the reasons given. It is available on other boards that are DirectX capable or that the OEM provided a custom driver for their hardware. I hope that this response clarifies the answer. Originally it was thought that the GPU on the Pi would be capable but further investigation revealed more custom hardware on the Pi than was anticipated. Fully targeted OS implementations like Raspian only run on Raspberry Pi so include much custom development for that specific board but are highly vulnerable to board changes. Windows looks to the OEM to provide the custom layer (BSP) while focusing on an implementation that is hardware agnostic so that it may run on many platforms.

With that in mind, anyone could attempt to write a driver for the Pi that shimmed the missing features in some other way but it would be highly custom. The GITHUB you refer to is at https://github.com/Microsoft/graphics-driver-samples and provides such a starting framework.
So they have a software renderer via DirectX currently on IOT and if you look at there sample directories they have my problem
https://github.com/Microsoft/graphics-d ... e/CubeTest.
They need the shader compiler to assembler .S code and load it and I think they winced at it a bit like me.

They did help my Baremetal direct on the GL pipeline work because look what is here and where the .S files come from :-)
https://github.com/Microsoft/graphics-d ... oscompiler

The other options are you can load the gallium driver from Eric Anholt and go thru the MESA interface or he has an Angle directory on his site.
https://github.com/Microsoft/angle/wiki
https://github.com/anholt/angle

The common problem to everything is the missing shader compiler which Mesa and Angle are providing or you have to shim them much like you have already done.

Hardware Acceleration: Ultibo : 1 MS : 0

Return to “Bare metal”

Who is online

Users browsing this forum: No registered users and 4 guests