EGL_MESA_screen_surface version 5

Brian Paul brian.paul at tungstengraphics.com
Fri Apr 22 10:50:49 PDT 2005


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

Ah, right.  I wasn't thinking.


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

OK.


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

OK, let me clean things up a bit.  I'll check it in by the end of the day.


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

Yeah, we'll have to work out something "official" at some point.

-Brian


More information about the dri-egl mailing list