[Mesa-dev] Using Gallium on an embedded system

Brian Paul brian.e.paul at gmail.com
Tue Jul 19 07:17:38 PDT 2011


On Tue, Jul 19, 2011 at 8:02 AM, Marcus Comstedt <marcus at mc.pp.se> wrote:
>
> Hi Brian.
>
> Thanks for your reply.
>
>
> Brian Paul <brian.e.paul at gmail.com> writes:
>
>> The app would call eglCreateContext() or glXCreateContext() or
>> similar.
>
> It certainly wouldn't call glXCreateContext(), because there is no X.
> I'm making my own Winsys, remember?  :-)

In gallium terms "winsys" is basically all the stuff that's needed to
interface the OS-neutral gallium driver to the OS/window system
environment.  I don't know what (if any) window system you might be
using.

If you look in src/gallium/winsys you'll see a subdir for each driver
and in each of those dirs you'll see subdirs for one or more
environments (dri, xlib, etc).

Above all this is the GL/window system API.  Examples include GLX, WGL
and EGL.  These interface provide functions for creating rendering
contexts, binding them to drawing surfaces, etc.  If you're not
familiar with these you should probably read up on EGL.  It's probably
the most likely API for embedded projects if you're not using X.


> I'm not sure what egl is or whether it would help in this case.  Does
> it interface directly with Gallium, or would even more layers of
> adaptation be needed?

We already have all the code for using EGL with gallium drivers.


>>>  Normally it would call something in mesa/drivers/XXX
>>> to do that, but there is no mesa/drivers/gallium...
>>
>> Try src/gallium/drivers/
>
> Do you mean that the App should call something in
> src/gallium/drivers/nvfx directly?  In that case, what?

No.  An application should only call OpenGL and EGL functions.  You
should probably spend some time reading up on all this.  I think the
khronos website has plenty of info.

-Brian


More information about the mesa-dev mailing list