All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Buildroot + Rpi4 + Accelerated OpenGL + X11
@ 2021-08-31 22:05 David Corbeil
  2021-08-31 22:36 ` Giulio Benetti
  0 siblings, 1 reply; 3+ messages in thread
From: David Corbeil @ 2021-08-31 22:05 UTC (permalink / raw)
  To: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 2309 bytes --]

Hi,

Using Buildroot, I’m trying to build an OS that can run my OpenGL (not ES)
app with accelerated 3D graphics. I also want it to use X11 as a display
server. So far I haven’t tried my app directly on my built OS because it
has many dependencies but I’m using glmark2, kmscube and glxgear to debug
and try out different Buildroot configurations.

I tried the *vc4-kms-v3d-pi4* and *vc4-kms-v3d* overlays in the config.txt,
but I’ve had better results using the former.

So far I was able to get glmark2 to run but it was using a software OpenGL
renderer (swrast). Although performance is abysmal so that’s a no go.

I have 4 flavors of glmark2 in my OS, glmark2, glmark2-es2, glmark-es2-drm
and glmark2-drm. The only ones that run are glmark2-drm and
glmark2-es2-drm. They run really well at 60fps. kmscube runs really well as
well.

The problem comes when I try to run glxgears and glxinfo when X11 is
running. I get the following errors:

   -

   Glxgears

Error: Couldn’t get an RGB, Doubled-buffered visual


   -

   Glxinfo:

name of display: :0

Error: couldn’t find RGB GLX visual or fbconfig


   -

   Glmark2:

Error: GLX version >= 1.3 is required

Error: Error: Couldn’t get GL visual config

Error: main: Could not initialize canvas

I’d like to get the regular glmark2 to run since, from my understanding, it
uses regular OpenGL?

I’m pretty convinced my end goal is possible because I was able to get my
app to run flawlessly in Raspberry Pi OS using regular OpenGL. Just need to
find all the necessary packages and configure the OS correctly. Easy to
say, easy to do right?

I linked my defconfig, the xorg configuration file and xorg log file.

buidlroot Rpi4_32_defconfig_eudev: https://pastebin.com/xfJ9WbdQ

xorg.conf: https://pastebin.com/vewDwmtD

xorg log: https://pastebin.com/0yDXGDr7

Maybe the xorg configuration file needs to be modified? But how? According
to this <https://github.com/raspberrypi/linux/issues/4526>, I should not be
using fbturbo but I don’t know what to replace it with.


Mesa version: 21.1.6

Kernel version: 5.10.60

Thanks for the help.
-- 
*David Corbeil-Stroombergen*
Software development engineer
Dynon
www.dynon.aero <http://www.dynonavionics.com/>

[-- Attachment #1.2: Type: text/html, Size: 11382 bytes --]

[-- Attachment #2: Type: text/plain, Size: 145 bytes --]

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] Buildroot + Rpi4 + Accelerated OpenGL + X11
  2021-08-31 22:05 [Buildroot] Buildroot + Rpi4 + Accelerated OpenGL + X11 David Corbeil
@ 2021-08-31 22:36 ` Giulio Benetti
  2021-08-31 22:53   ` Giulio Benetti
  0 siblings, 1 reply; 3+ messages in thread
From: Giulio Benetti @ 2021-08-31 22:36 UTC (permalink / raw)
  To: David Corbeil, buildroot

Hi David,

On 9/1/21 12:05 AM, David Corbeil wrote:
> Hi,
> 
> 
> Using Buildroot, I’m trying to build an OS that can run my OpenGL (not 
> ES) app with accelerated 3D graphics. I also want it to use X11 as a 
> display server. So far I haven’t tried my app directly on my built OS 
> because it has many dependencies but I’m using glmark2, kmscube and 
> glxgear to debug and try out different Buildroot configurations.
> 
> 
> I tried the /vc4-kms-v3d-pi4/ and /vc4-kms-v3d/ overlays in the 
> config.txt, but I’ve had better results using the former.
> 
> 
> So far I was able to get glmark2 to run but it was using a software 
> OpenGL renderer (swrast). Although performance is abysmal so that’s a no 
> go.
> 
> 
> I have 4 flavors of glmark2 in my OS, glmark2, glmark2-es2, 
> glmark-es2-drm and glmark2-drm. The only ones that run are glmark2-drm 
> and glmark2-es2-drm. They run really well at 60fps. kmscube runs really 
> well as well.
> 
> 
> The problem comes when I try to run glxgears and glxinfo when X11 is 
> running. I get the following errors:
> 
>   *
> 
>     Glxgears
> 
>         Error: Couldn’t get an RGB, Doubled-bufferedvisual
> 
>   *
> 
>     Glxinfo:
> 
>         name of display: :0
> 
>         Error: couldn’t find RGB GLX visual or fbconfig >   *
> 
>     Glmark2:
> 
>         Error: GLX version >= 1.3 is required
> 
>         Error: Error: Couldn’t get GL visual config
> 
>         Error: main: Could not initialize canvas
> 
> I’d like to get the regular glmark2 to run since, from my understanding, 
> it uses regular OpenGL?

It depends on your OpenGL implementation, and here you have an ES 
implementation, so it's only a subset, but considering your defconfig 
below X tries to use the ES one but doesn't succeed because of fbturbo 
doesn't support your broadcom gpu.

> 
> I’m pretty convinced my end goal is possible because I was able to get 
> my app to run flawlessly in Raspberry Pi OS using regular OpenGL. Just 
> need to find all the necessary packages and configure the OS correctly. 
> Easy to say, easy to do right?

It is possible

> 
> I linked my defconfig, the xorg configuration file and xorg log file.
> 
> 
> buidlroot Rpi4_32_defconfig_eudev: https://pastebin.com/xfJ9WbdQ 
> <https://pastebin.com/xfJ9WbdQ>
> 
> xorg.conf: https://pastebin.com/vewDwmtD <https://pastebin.com/vewDwmtD>
> 
> xorg log: https://pastebin.com/0yDXGDr7 <https://pastebin.com/0yDXGDr7>
> 
> 
> Maybe the xorg configuration file needs to be modified? But how? 
> According to this <https://github.com/raspberrypi/linux/issues/4526>, I 
> should not be using fbturbo but I don’t know what to replace it with.

Yes, you need to use glamor as I recall, so you need to enable it in 
Buildroot and 'make clean; make'.

Try to take a look here for xorg.conf example:
https://www.mindwerks.net/2014/09/videocoreiv-glamor-on-your-raspberry-pi/

That way you tell X11 to use glamor and force Gallium(the Broadcom mesa 
driver). But you need to do some attempt, I don't know if it will work 
as it is.

Some time passed since I've had my hands on X11 on a Rockchip. But 
glamor should be the way.

I didn't check everything I've written above, so take it with a grain of 
salt.

Best regards
-- 
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] Buildroot + Rpi4 + Accelerated OpenGL + X11
  2021-08-31 22:36 ` Giulio Benetti
@ 2021-08-31 22:53   ` Giulio Benetti
  0 siblings, 0 replies; 3+ messages in thread
From: Giulio Benetti @ 2021-08-31 22:53 UTC (permalink / raw)
  To: David Corbeil, buildroot

Hi David,

> Il giorno 1 set 2021, alle ore 00:36, Giulio Benetti <giulio.benetti@benettiengineering.com> ha scritto:
> 
> Hi David,
> 
>> On 9/1/21 12:05 AM, David Corbeil wrote:
>> Hi,
>> Using Buildroot, I’m trying to build an OS that can run my OpenGL (not ES) app with accelerated 3D graphics. I also want it to use X11 as a display server. So far I haven’t tried my app directly on my built OS because it has many dependencies but I’m using glmark2, kmscube and glxgear to debug and try out different Buildroot configurations.
>> I tried the /vc4-kms-v3d-pi4/ and /vc4-kms-v3d/ overlays in the config.txt, but I’ve had better results using the former.
>> So far I was able to get glmark2 to run but it was using a software OpenGL renderer (swrast). Although performance is abysmal so that’s a no go.
>> I have 4 flavors of glmark2 in my OS, glmark2, glmark2-es2, glmark-es2-drm and glmark2-drm. The only ones that run are glmark2-drm and glmark2-es2-drm. They run really well at 60fps. kmscube runs really well as well.
>> The problem comes when I try to run glxgears and glxinfo when X11 is running. I get the following errors:
>>  *
>>    Glxgears
>>        Error: Couldn’t get an RGB, Doubled-bufferedvisual
>>  *
>>    Glxinfo:
>>        name of display: :0
>>        Error: couldn’t find RGB GLX visual or fbconfig >   *
>>    Glmark2:
>>        Error: GLX version >= 1.3 is required
>>        Error: Error: Couldn’t get GL visual config
>>        Error: main: Could not initialize canvas
>> I’d like to get the regular glmark2 to run since, from my understanding, it uses regular OpenGL?
> 
> It depends on your OpenGL implementation, and here you have an ES implementation, so it's only a subset, but considering your defconfig below X tries to use the ES one but doesn't succeed because of fbturbo doesn't support your broadcom gpu.
> 
>> I’m pretty convinced my end goal is possible because I was able to get my app to run flawlessly in Raspberry Pi OS using regular OpenGL. Just need to find all the necessary packages and configure the OS correctly. Easy to say, easy to do right?
> 
> It is possible
> 
>> I linked my defconfig, the xorg configuration file and xorg log file.
>> buidlroot Rpi4_32_defconfig_eudev: https://pastebin.com/xfJ9WbdQ <https://pastebin.com/xfJ9WbdQ>
>> xorg.conf: https://pastebin.com/vewDwmtD <https://pastebin.com/vewDwmtD>
>> xorg log: https://pastebin.com/0yDXGDr7 <https://pastebin.com/0yDXGDr7>
>> Maybe the xorg configuration file needs to be modified? But how? According to this <https://github.com/raspberrypi/linux/issues/4526>, I should not be using fbturbo but I don’t know what to replace it with.
> 
> Yes, you need to use glamor as I recall, so you need to enable it in Buildroot and 'make clean; make'.

Pardon, glamor should already been built.
Please check it. You should not need to rebuild Buildroot.

Giulio

> 
> Try to take a look here for xorg.conf example:
> https://www.mindwerks.net/2014/09/videocoreiv-glamor-on-your-raspberry-pi/
> 
> That way you tell X11 to use glamor and force Gallium(the Broadcom mesa driver). But you need to do some attempt, I don't know if it will work as it is.
> 
> Some time passed since I've had my hands on X11 on a Rockchip. But glamor should be the way.
> 
> I didn't check everything I've written above, so take it with a grain of salt.
> 
> Best regards
> -- 
> Giulio Benetti
> Benetti Engineering sas

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-31 22:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 22:05 [Buildroot] Buildroot + Rpi4 + Accelerated OpenGL + X11 David Corbeil
2021-08-31 22:36 ` Giulio Benetti
2021-08-31 22:53   ` Giulio Benetti

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.