EGL_MESA_screen_surface version 5

Adam Jackson ajax at nwnk.net
Fri Apr 22 10:38:23 PDT 2005


On Friday 22 April 2005 12:57, Brian Paul wrote:
> Adam Jackson wrote:
> > There's a minor issue here, in that it's not clear whether
> > EGL_SCREEN_COUNT_MESA is the number of active screens or the number of
> > possible screens.  This is more of an issue for me trying to do a GLX
> > wrapper than it probably is for real hardware, for now anyway, but who
> > knows how hotpluggable things will be in the future.
> >
> > I suggest the following clarification.  EGL_SCREEN_COUNT_MESA is the
> > maximum number of screens on the device, where zero indicates that the
> > device is hotpluggable.  EGLint screen_number parameters are valid in the
> > range 0 to EGL_SCREEN_COUNT_MESA-1 when ESCM is >0.  When ESCM == 0, you
> > may check the validity of a particular screen_number by calling
> > QueryScreenSurface on it. EGL_FALSE/EGL_BAD_SCREEN_MESA indicates an
> > invalid screen number; EGL_TRUE indicates a valid screen number with
> > possibly no screen surface currently being displayed.
>
> How about "EGL_SCREEN_COUNT_MESA returns the number of currently
> available screens.  This may change as screens are added/removed from
> the system."
>
> We haven't yet spec'd how hotplug-like changes are detected.  We may
> punt on that for now.  But the idea is once you've detected a hardware
> change you'd re-query EGL_SCREEN_COUNT_MESA, the list of available
> display modes, etc. and respond accordingly.

The thing is, right now screen_numbers are magic.  The app doesn't have any 
way of knowing whether a given screen number is valid.  Imagine plugging in 
screens 0, 1, and 2, and then unplugging 1.  Right now we don't even specify 
whether screen numbers start at zero or one.  The app has to guess.

So we should specify that the count ranges over 0 to EGL_SCREEN_COUNT_MESA-1 
for now.  Future hotplug extensions will have to be turned on with 
eglEnableScreenHotplugXXX, after which the semantics can change.  Sound 
reasonable?

> > When doing EGL-GLX translation you can create arbitrary numbers of
> > screens, because they're just windows, so CreateScreenSurface can just
> > fail or succeed based on whether XCreateWindow works.  That should work
> > for more distributed setups too, but there might need to be a new
> > entrypoint to hand the application an opaque screen_number to use.  Not
> > something I think we need to design now though.
>
> OK.
>
> I'll post an updated spec by the end of the day.
>
> Adam, perhaps I should check my EGL code into the Mesa tree so you can
> use it.  Your EGL->GLX adaptor should fit into it as a device driver.

That would be great.

I'm going to assume for now that we're going to expose the EGL API from libGL.  
The letter of the OpenGL|ES spec says GLES implementations should be named 
libGLES_CM or libGLES_CL (depending on the profile), but we're not actually 
doing the embeddable subset, just stealing its windowing API.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dri-egl/attachments/20050422/f498ac8a/attachment.pgp


More information about the dri-egl mailing list