I'm trying to build mex with EGL on my Atom, but Mesa doesn't PROVIDE virtual/egl.
(In reply to comment #0) > I'm trying to build mex with EGL on my Atom, but Mesa doesn't PROVIDE > virtual/egl. Ross, You mean enable EGL support in MESA, right? Adding extra configure option should be okay. What's mex? Thanks, Edwin
mex is Media Explorer - http://media-explorer.org/. Whilst typically build using GLX, it's possible to build it using EGL. Mesa is already building libegl, but virtual/egl (as used by the TI drivers IIRC) isn't a provides in Mesa anywhere.
(In reply to comment #2) > mex is Media Explorer - http://media-explorer.org/. Whilst typically build > using GLX, it's possible to build it using EGL. > > Mesa is already building libegl, but virtual/egl (as used by the TI drivers > IIRC) isn't a provides in Mesa anywhere. I find "--disable-egl" is appended to the mesa-dri(package of libegl is empty), maybe TI layers orerride it. I'm not sure just adding following line can fix you issue: PROVIDES = "virtual/egl"
Created attachment 498 [details] Enable egl in mesa Ross, Does this patch fix your issue. Sorry, I have no environment to test mex. Thanks, Edwin
IIRC, if you turn on egl with --enable-egl you also have to add --enable-shared-glapi. The other thing that is missing from the mesa packaging for building mex (or more precisely cogl) is the gbm library; this gets enabled with --enable-gbm and then has to be packaged. The following bbappend is what I needed to get cogl with kms egl backend to build: https://github.com/Guacamole/meta-guacamole/blob/master/meta-guacamole/recipes-graphics/mesa/mesa-dri_7.11.bbappend.
(In reply to comment #5) > > The following bbappend is what I needed to get cogl with kms egl backend to > build: > https://github.com/Guacamole/meta-guacamole/blob/master/meta-guacamole/ > recipes-graphics/mesa/mesa-dri_7.11.bbappend. TF, Thanks for your patch. Maybe you can push it into the repo for related layer? If making changes in meta/(i.e. oe-core), we need clear usage model: * mesa-dri provides virtual/egl * others inside meta/ also provides virtual/egl * pushed mex into oe-core, to requires virtual/egl oe-core is independent part, other recipes sit in different layer from different repo. So pushing this patch into related repo is a good choice.
Mark it as WONTFIX, because all the required changes are limited in specific layer out of yocto and oe-core. TF already provided patch.
I guess the question is *why* you oe-core is building mesa with egl and dbm disabled?
(In reply to comment #8) > I guess the question is *why* you oe-core is building mesa with egl and dbm > disabled? I guess oe-core is just for common usage like qemu-XXX and other common device. We can ask for turning on egl on the oe-core mailing list with patch. But adding PROVIDES = "virtual/egl" without anybody depending on it is not acceptable.(In reply to comment #8)
I totally disagree. oe-core should be building all useful variations of Mesa and letting the image/layer pick the ones it needs. If someone is using (say) Clutter on X they'll want GLX, and we're already building that. It's equally useful to use Clutter without X using EGL instead of GLX. oe-core shouldn't be saying that we only support Mesa+GLX, that's the *opposite* of being layer-independent. Also Guacamole was renamed Guacamayo, so the correct URL from Tomas is now https://github.com/Guacamayo/meta-guacamayo/blob/master/meta-guacamayo/recipes-graphics/mesa/mesa-dri_7.11.bbappend.
(In reply to comment #10) > I totally disagree. > > oe-core should be building all useful variations of Mesa and letting the > image/layer pick the ones it needs. If someone is using (say) Clutter on X > they'll want GLX, and we're already building that. It's equally useful to > use Clutter without X using EGL instead of GLX. > > oe-core shouldn't be saying that we only support Mesa+GLX, that's the > *opposite* of being layer-independent. I don't remember I said only support Mesa+GLX. oe-core can support everything as long as it follow the general rules. For PROVIDE/REQUIRE case, we need following: * mesa-dri provides virtual/egl * others inside meta/ also provides virtual/egl * pushed mex into oe-core, to requires virtual/egl. oe-core can support everything, but it should be self-contained system. one provides egl, but nobody inside oe-core requires it, which will be challenged by community. Again, I'm not arguing whether need support egl, but the way how to support. Current patch based on provides/requires is not good enough, until you keep it in your layer. Maybe you can try packages or features? Thanks, Edwin
> * mesa-dri provides virtual/egl The bbappend does this. > * others inside meta/ also provides virtual/egl Nothing else inside oe-core/meta/ provides EGL. > * pushed mex into oe-core, to requires virtual/egl. mex isn't appropriate for oe-core, it's a large application.
I think it is reasonable to enable egl and gbm as long as they get packaged separately.
I've a branch ross/mesa in poky-contrib that does this along with plenty of other things.
Richard landed this in oe-core, rev: 03136ebc529dbc82f2db14055e124114da7e84b3.
Verified on master branch, commit ID:78983e939ab17f02f8911c8b0d0e326b419856b9