EGL_MESA_screen_surface version 5

Brian Paul brian.paul at tungstengraphics.com
Fri Apr 22 09:57:50 PDT 2005


Adam Jackson wrote:
> 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.

Fixed.


>>   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.

Fixed, using 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?

eglQueryScreenMESA() takes a screen number.  There's no need for a 
screen parameter to eglQueryDisplayMESA().


> 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.


> 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.

-Brian


More information about the dri-egl mailing list