On Sat, Dec 26, 2009 at 02:22:37AM +0100, Luca Barbieri wrote:
> This patch adds MESA_screen_surface support to the egl_glx EGL->GLX
> wrapper and egl_xlib Gallium state tracker.
> With this patch applied, you should be able to just run eglgears from
> an X11 terminal and get a maximized hardware accelerated gears window.
> Screen surfaces are window surfaces where the X11 window is created by
> the EGL driver. Showing a screen surface calls XMapWindow on it. The
> window is automatically made maximized or fullscreen if the size makes
> it necessary.
> A single screen mode is advertised, which sized by default like the
> size of the client area of a maximized window.
> The EGL_FULLSCREEN=[WxH[xRATE]] and EGL_WINDOW=WxH options can be used
> to force fullscreen or a window with the appropriate dimensions.
> It also changes the default EGL driver for X11 to be egl_glx rather
> than egl_softpipe, as this gives a good chance of being able to use
> hardware acceleration.
> The core X11 code is in src/egl/main/eglx11.[ch] and it is called both
> by egl_x11 and Gallium egl_xlib.
> It uses the WM protocol to determine work area and frame sizes and
> (try to) compute the size of a maximized window and xrandr to change
> fullscreen mode.
Great work.  I want to do this for a while, but I've been busy with
other stuff.  I have some comments though.

Screen surfaces are by definition scan-out buffers of the adapters.  In
theory, the extension is used by opengl applications in an environment
without display server, or used by the display server itself.  And the
extension cannot be supported by any X11 driver.

The main reason, at least for me, to "emulate" it under X11 is that
about half of the demos require the extension to run.  It might scare
away those who are new to EGL when half of the demos fail to run under
X11.  But to emulate it, I would like it to be as simple as possible.

What do you think if the changes are made minimal and are made to a
single driver?  I think eglx11.[ch] may be simplified for less
flexibility and functionality, but still enough to support the demos.
Also, I would like to move it to either egl_softpipe or egl_glx.  I
prefer egl_softpipe because it supports APIs other than OpenGL (which is
why it is default).  But if you would like to have acceleration, egl_glx
is fine too.

There are 3 EGL drivers for X11 right now.  Longer term, I would like to
have a single driver that supports multiple APIs and acceleration.  The
driver should talk DRI2 (the protocol) and probably minimal GLX to the X
server.

-- 
Regards,
olv

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to