hippy
Posts: 5373
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

[RESOLVED] GL performance expectations

Wed May 15, 2019 4:40 pm

In a thread discussing performance of a BBC BASIC IDE I reported sluggish behaviour and was asked what GL driver performance I was getting running 'glxgears'.

https://www.raspberrypi.org/forums/view ... 8#p1466047

On my Pi 3B (non-plus), Raspbian Stretch, standard Pi desktop, 1080 HDMI -

Code: Select all

47 FPS - G1 GL (Full KMS) OpenGL desktop driver with full KMS
47 FPS - G2 GL (Fake KMS) OpenGL desktop driver with fake KMS
45 FPS - G3 Legacy        Original non-GL desktop driver
Not much in it, and I would have expected some greater difference.

Is what I'm seeing as expected, or is there something odd with those figures ?
Last edited by hippy on Thu May 16, 2019 1:28 pm, edited 1 time in total.

User avatar
RichardRussell
Posts: 536
Joined: Thu Jun 21, 2012 10:48 am

Re: GL performance expectations

Wed May 15, 2019 4:56 pm

hippy wrote:
Wed May 15, 2019 4:40 pm
Not much in it, and I would have expected some greater difference.
Is what I'm seeing as expected, or is there something odd with those figures ?
What is your monitor's refresh rate? With the VC4 driver enabled I would have expected glxgears to synchronise with vSync and the reported frame rate to be exactly 50 fps or (very nearly) 60 fps depending on the monitor/display. In those cirumstances it's the reduction in CPU load that indicates the effectiveness of the hardware acceleration.

The fact that it's reporting 47 fps, which isn't a standard frame rate, I find puzzling. How do the CPU usage figures compare? Below are my original measurements when the Stretch regression was identified (without the VC4 driver in both cases).

Image

hippy
Posts: 5373
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: GL performance expectations

Wed May 15, 2019 5:34 pm

I'm using a UK TV which reports "[email protected]" on its OSD pop-up. Interestingly, but probably unimportant, "[email protected]" when connected to a VM TIVO.

The FPS / CPU / %CPU seems about the same for each setting -

46 FPS / 71% / 270%

Closer to 280% with GL disabled, but no significant differences otherwise.

No HDMI settings specified in config.txt but I do have 'framebuffer_depth=16' to support working with DisplayLink USB monitors, though none presently plugged in to USB.

Perhaps that's what's holding it back ?

User avatar
RichardRussell
Posts: 536
Joined: Thu Jun 21, 2012 10:48 am

Re: GL performance expectations

Wed May 15, 2019 7:15 pm

hippy wrote:
Wed May 15, 2019 5:34 pm
Perhaps that's what's holding it back ?
No idea TBH, but it does seem that you are not getting hardware acceleration even with the VC4 driver enabled, so it's not surprising you're seeing issues with apps that rely on it to give acceptable performance.

hippy
Posts: 5373
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: GL performance expectations

Thu May 16, 2019 1:24 pm

It's not the "framebuffer_depth=16" per se. I'm seeing the same with that commented out, the "Accelerator : No" last line may be significant ...

Code: Select all

[email protected]:~ $ fbset -i -v -fb /dev/fb0
Linux Frame Buffer Device Configuration Version 2.1 (23/06/1999)
(C) Copyright 1995-1999 by Geert Uytterhoeven

Opening frame buffer device `/dev/fb0'
Using current video mode from `/dev/fb0'

mode "1920x1080"
    geometry 1920 1080 1920 1080 32
    timings 0 0 0 0 0 0 0
    accel true
    rgba 8/16,8/8,8/0,0/0
endmode

Getting further frame buffer information
Frame buffer device information:
    Name        : 
    Address     : 0xdff00000
    Size        : 8294400
    Type        : PACKED PIXELS
    Visual      : TRUECOLOR
    XPanStep    : 1
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 7680
    Accelerator : No
I've selected "G1 GL (Full KMS)" and raspi-config inserted a "dtoverlay=vc4-kms-v3d" into config.txt, and it's been re-booted, but it doesn't seem to be having any effect.

Added: But finally, solved it; removed everything form "/etc/X11/xorg.conf" needed to configure the Pi for dual-screen and DisplayLink use, and bingo -

Code: Select all

[email protected]:~/tmp $ glxgears
libGL error: MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
Running synchronized to the vertical refresh.  The framerate should be approximately the same as the monitor refresh rate.
307 frames in 5.0 seconds = 61.349 FPS
301 frames in 5.0 seconds = 60.000 FPS
301 frames in 5.0 seconds = 60.000 FPS
So, now -

60 FPS / 0% / 8%

And an understatement to say that's much better than 46 FPS / 71% / 270%

So it seems I can ether have my Pi configured for dual-screen use and accept anything which needs GL or accelerated graphics won't be that usable, or forego dual-screen use. Given that most things I do don't appear to need accelerated graphics I'll opt for dual-screen use.

Return to “Troubleshooting”