EGL_MESA_screen_surface version 5

Adam Jackson ajax at nwnk.net
Fri Apr 22 09:19:58 PDT 2005


On Wednesday 06 April 2005 18:12, Brian Paul wrote:

I've been implementing this in my IndieGL toy and I've found a few issues.

eglScreenPositionMESA() is listed in the Additions section but not in the New 
Procedures and Functions section.

>    EGLBoolean eglQueryDisplayMESA(EGLDisplay dpy, EGLint screen_number,
>                                   EGLint attrib, EGLint *value)
>
>    Used to query display parameters.  <attrib> may be one of the following:
>
>        Name                Return value description
>        ------------------  ---------------------------------------------
>        EGL_NUM_SCREENS     Number of screens associated with the display

In the new tokens section this was called EGL_SCREEN_COUNT_MESA.

I don't see any semantic value in passing a screen_number to QueryDisplay, are 
we just leaving that in for future expansion?

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.

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.

- 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/9bd40d66/attachment.pgp


More information about the dri-egl mailing list