DRI2 driver for EGL in the works

View: New views
7 Messages — Rating Filter:   Alert me  

DRI2 driver for EGL in the works

by Kristian Høgsberg :: Rate this Message:

| View Threaded | Show Only this Message

Hi all,

I'm working on a DRI2 driver for the mesa EGL, implementation.  I have
an egl-dri2 branch in my repo over here:

  http://cgit.freedesktop.org/~krh/mesa/commit/?h=egl-dri2

I know that the xdri driver also supports dri2 by including the glx
source, but I don't think that's the best way to do it.  The above
branch has around 800 lines of code to interface the EGL stack to DRI2
and it's a nice, self-contained implementation., that mostly just
forwards to the DRI2 driver entry points.  Also, I'm going to add
support for EGL with a DRI2 driver on the KMS framebuffer with this
implementation, something that's hard to do if we try to share the
sources with GLX.

cheers,
Kristian

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@...
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Re: DRI2 driver for EGL in the works

by Jesse Barnes-2 :: Rate this Message:

| View Threaded | Show Only this Message

On Wed, 3 Feb 2010 10:34:11 -0500
Kristian Høgsberg <krh@...> wrote:

> Hi all,
>
> I'm working on a DRI2 driver for the mesa EGL, implementation.  I have
> an egl-dri2 branch in my repo over here:
>
>   http://cgit.freedesktop.org/~krh/mesa/commit/?h=egl-dri2
>
> I know that the xdri driver also supports dri2 by including the glx
> source, but I don't think that's the best way to do it.  The above
> branch has around 800 lines of code to interface the EGL stack to DRI2
> and it's a nice, self-contained implementation., that mostly just
> forwards to the DRI2 driver entry points.  Also, I'm going to add
> support for EGL with a DRI2 driver on the KMS framebuffer with this
> implementation, something that's hard to do if we try to share the
> sources with GLX.

Nice, I agree.  This looks a lot like what I was hoping it would.
Aside from fixing the obvious stuff like /home/krh (I don't think
everyone has a /home/krh, though maybe we should codify that :) and
swapbuffers, we'll also need to add a TFP like extension, or is that
already handled by Mesa's EGL core with the current setTexBuffer stuff?

We'll probably also want an INTEL_swap_event for EGL like we have for
GLX, though apparently the common practice for EGL apps is to just have
swapbuffers called in a separate thread, so it may not be that
important.

I'll find you on IRC to talk about some of the other things we might
do; got some interesting suggestions from the Clutter and Qt guys about
handling swapbuffers even better...

Thanks,
Jesse

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@...
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Re: DRI2 driver for EGL in the works

by Chia-I Wu-2 :: Rate this Message:

| View Threaded | Show Only this Message

2010/2/3 Kristian Høgsberg <krh@...>:

> I'm working on a DRI2 driver for the mesa EGL, implementation.  I have
> an egl-dri2 branch in my repo over here:
>  http://cgit.freedesktop.org/~krh/mesa/commit/?h=egl-dri2
> I know that the xdri driver also supports dri2 by including the glx
> source, but I don't think that's the best way to do it.  The above
> branch has around 800 lines of code to interface the EGL stack to DRI2
> and it's a nice, self-contained implementation., that mostly just
> forwards to the DRI2 driver entry points.  Also, I'm going to add
> support for EGL with a DRI2 driver on the KMS framebuffer with this
> implementation, something that's hard to do if we try to share the
> sources with GLX.
It is really great to hear about the new driver!  If you like, you can merge it
to mesa master and continue the development there.  Or if you prefer, I can do
it for you whenever you like.  Just ping me.

I don't quite like xdri either, for the same reason.  Once EGL dri2 driver is
merged, I will remove it.  I would also like to remove EGL dri driver once KMS
support is added to dri2.

Last but not least, do you think there will be code duplication between the new
driver and src/gallium/state_trackers/egl/?  Is there a way we can base one on
another?

-olv

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@...
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Re: DRI2 driver for EGL in the works

by Chia-I Wu-2 :: Rate this Message:

| View Threaded | Show Only this Message

2010/2/4 Jesse Barnes <jbarnes@...>:
> Nice, I agree.  This looks a lot like what I was hoping it would.
> Aside from fixing the obvious stuff like /home/krh (I don't think
> everyone has a /home/krh, though maybe we should codify that :) and
> swapbuffers, we'll also need to add a TFP like extension, or is that
> already handled by Mesa's EGL core with the current setTexBuffer stuff?
setTexBuffer can be used to implement eglBindTexImage.  But that is for
texture-from-pbuffer.

For texture-from-pixmap, the suggested way to do it in EGL is through

http://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_image_pixmap.txt
http://www.khronos.org/registry/gles/extensions/OES/OES_EGL_image.txt

The former allows EGL to create an EGLImage from a pixmap;  The latter allows
OpenGL ES to bind an EGLImage as a texture image.  There is nothing stop the
latter extension to be implemented for OpenGL.

I've done some work a while ago for my Android port.  These two commits
implement GL_OES_EGL_image for intel dri driver

http://gitorious.org/android-eeepc/mesa/commit/c4a8ce7ffdf603c515b5202e2322e1b965f69f3a
http://gitorious.org/android-eeepc/mesa/commit/4e5934fed17373e55bd2bac6a35632734beeab30

EGL_KHR_image_base and EGL_KHR_image_pixmap are also implemented in egl_android
driver.

I am slowly adding EGLImage support to st/egl.  It takes a different route and
it depends on a new st_api.h (replacing st_public.h) that was discussed last
month.
> We'll probably also want an INTEL_swap_event for EGL like we have for
> GLX, though apparently the common practice for EGL apps is to just have
> swapbuffers called in a separate thread, so it may not be that
> important.
> I'll find you on IRC to talk about some of the other things we might
> do; got some interesting suggestions from the Clutter and Qt guys about
> handling swapbuffers even better...
swapbuffers behavior is one field that hasn't been explored in the EGL
implementation.

Is there an IRC channel for Mesa-dev?  I would like to join the channel.

-olv

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@...
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Re: DRI2 driver for EGL in the works

by Dan Nicholson-2 :: Rate this Message:

| View Threaded | Show Only this Message

On Wed, Feb 3, 2010 at 6:40 PM, Chia-I Wu <olvaffe@...> wrote:
>
> Is there an IRC channel for Mesa-dev?  I would like to join the channel.

I think you want #dri-devel on freenode.

--
Dan

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@...
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Re: DRI2 driver for EGL in the works

by Chia-I Wu-2 :: Rate this Message:

| View Threaded | Show Only this Message

On Thu, Feb 4, 2010 at 12:22 PM, Dan Nicholson <dbn.lists@...> wrote:
> On Wed, Feb 3, 2010 at 6:40 PM, Chia-I Wu <olvaffe@...> wrote:
>> Is there an IRC channel for Mesa-dev?  I would like to join the channel.
> I think you want #dri-devel on freenode.
Thanks, Kristian and Dan.  I've joined the channel.

I just don't want to miss any future discussion.  I am still more easily
reachable through mails though :)

-olv

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@...
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Re: DRI2 driver for EGL in the works

by Dan Nicholson-2 :: Rate this Message:

| View Threaded | Show Only this Message

On Wed, Feb 3, 2010 at 8:29 PM, Chia-I Wu <olvaffe@...> wrote:
> On Thu, Feb 4, 2010 at 12:22 PM, Dan Nicholson <dbn.lists@...> wrote:
>> On Wed, Feb 3, 2010 at 6:40 PM, Chia-I Wu <olvaffe@...> wrote:
>>> Is there an IRC channel for Mesa-dev?  I would like to join the channel.
>> I think you want #dri-devel on freenode.
> Thanks, Kristian and Dan.  I've joined the channel.
>
> I just don't want to miss any future discussion.  I am still more easily
> reachable through mails though :)

Cristoph Brill keeps logs of the channel here:

http://people.freedesktop.org/~cbrill/dri-log/

--
Dan

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@...
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev