Wednesday 3 July 2019

Raspberry Pi4

Exciting stuff,  the Pi 4 is here, its ~3 times the CPU power, but not yet a massive difference in GPU power, though there is a bit of a boost and it will improve as it settles in. Also it does have OpenGLES3.0 on board at last so it will be possible to write much better render functions to take care of instancing and other cool features that improve performance markedly.

On tiny concern is that it no longer uses the old Broadcom DispmanX video system to create render surfaces, it now uses tradtional X11 or DRM based windows, so that makes setting up for the Pi 4 the same as the other SBC's running linux and X11. This has good and bad sides

The good side, using mesa libs should ensure continued open source support.

The bad side.. well it breaks all the code in my book, DispmanX no longer works on my Pi4..Also I don't currently know how to use smaller renderbuffers, which was simple to do on the DispmanX system, so the buffers are now the same res as the screen we set. Thats nice in one way but it means more pixels to render and it impacts on speed.
This image below runs comfortably on a Pi3B  at 60fps, at 1080p res, but the render buffer is half that res and I can make it smaller still on lesser Pi's



But on the Pi 4 the render buffer is also 1920x1080 and even with the extra speed of the CPU and slight boost in GPU, it struggles to do 20fps. I am sure this can be overcome though, I just need to do a bit more research than I have so far.

Also it does mean we now have to build different builds for Pi4 and other Pi's or have a system for testing the version of Pi and setup accordingly.

Its a small annoyance really, but for beginners using my book, the 1st couple of chapters won't work now.. Lets hope it increases the traffic to the support site to find the solutions.

But for sure the Pi4 is exciting, the speed is impressive, and as software matures those video drivers will start to see 3.1 and 3.2 come on line...More memory too makes a big difference (I have a 4G one) it really will be fun to build something cool on it with less restrictions to worry about.