102f4aeb0Sopenharmony_ciName
202f4aeb0Sopenharmony_ci
302f4aeb0Sopenharmony_ci    EXT_device_base
402f4aeb0Sopenharmony_ci
502f4aeb0Sopenharmony_ciName Strings
602f4aeb0Sopenharmony_ci
702f4aeb0Sopenharmony_ci    EGL_EXT_device_base
802f4aeb0Sopenharmony_ci
902f4aeb0Sopenharmony_ciContributors
1002f4aeb0Sopenharmony_ci
1102f4aeb0Sopenharmony_ci    James Jones
1202f4aeb0Sopenharmony_ci    Daniel Kartch
1302f4aeb0Sopenharmony_ci    Jamie Madill
1402f4aeb0Sopenharmony_ci
1502f4aeb0Sopenharmony_ciContacts
1602f4aeb0Sopenharmony_ci
1702f4aeb0Sopenharmony_ci    James Jones, NVIDIA  (jajones 'at' nvidia.com)
1802f4aeb0Sopenharmony_ci
1902f4aeb0Sopenharmony_ciStatus
2002f4aeb0Sopenharmony_ci
2102f4aeb0Sopenharmony_ci    Complete
2202f4aeb0Sopenharmony_ci    
2302f4aeb0Sopenharmony_ci    Rewritten in terms of split functionality in EXT_dispay_device and
2402f4aeb0Sopenharmony_ci    EXT_device_enumeration.
2502f4aeb0Sopenharmony_ci
2602f4aeb0Sopenharmony_ciVersion
2702f4aeb0Sopenharmony_ci
2802f4aeb0Sopenharmony_ci    Version 9 - March 24th, 2015
2902f4aeb0Sopenharmony_ci
3002f4aeb0Sopenharmony_ciNumber
3102f4aeb0Sopenharmony_ci
3202f4aeb0Sopenharmony_ci    EGL Extension #72
3302f4aeb0Sopenharmony_ci
3402f4aeb0Sopenharmony_ciExtension Type
3502f4aeb0Sopenharmony_ci
3602f4aeb0Sopenharmony_ci    EGL client extension
3702f4aeb0Sopenharmony_ci
3802f4aeb0Sopenharmony_ciDependencies
3902f4aeb0Sopenharmony_ci
4002f4aeb0Sopenharmony_ci    Written against the wording of EGL 1.5.
4102f4aeb0Sopenharmony_ci
4202f4aeb0Sopenharmony_ci    The specifications of EGL_EXT_device_query and
4302f4aeb0Sopenharmony_ci    EGL_EXT_device_enumeration are required to determine the
4402f4aeb0Sopenharmony_ci    specification of this extension, although those extensions may not
4502f4aeb0Sopenharmony_ci    be supported.
4602f4aeb0Sopenharmony_ci
4702f4aeb0Sopenharmony_ciOverview
4802f4aeb0Sopenharmony_ci
4902f4aeb0Sopenharmony_ci    Increasingly, EGL and its client APIs are being used in place of
5002f4aeb0Sopenharmony_ci    "native" rendering APIs to implement the basic graphics
5102f4aeb0Sopenharmony_ci    functionality of native windowing systems.  This creates demand
5202f4aeb0Sopenharmony_ci    for a method to initialize EGL displays and surfaces directly on
5302f4aeb0Sopenharmony_ci    top of native GPU or device objects rather than native window
5402f4aeb0Sopenharmony_ci    system objects.  The mechanics of enumerating the underlying
5502f4aeb0Sopenharmony_ci    native devices and constructing EGL displays and surfaces from
5602f4aeb0Sopenharmony_ci    them have been solved in various platform and implementation-
5702f4aeb0Sopenharmony_ci    specific ways.  The EGL device family of extensions offers a
5802f4aeb0Sopenharmony_ci    standardized framework for bootstrapping EGL without the use of
5902f4aeb0Sopenharmony_ci    any underlying "native" APIs or functionality.
6002f4aeb0Sopenharmony_ci
6102f4aeb0Sopenharmony_ci    This extension defines the first step of this bootstrapping
6202f4aeb0Sopenharmony_ci    process: Device enumeration.
6302f4aeb0Sopenharmony_ci
6402f4aeb0Sopenharmony_ciNew Types
6502f4aeb0Sopenharmony_ci
6602f4aeb0Sopenharmony_ci    As defined by EGL_EXT_device_query.
6702f4aeb0Sopenharmony_ci
6802f4aeb0Sopenharmony_ciNew Functions
6902f4aeb0Sopenharmony_ci
7002f4aeb0Sopenharmony_ci    As defined by EGL_EXT_device_query and EGL_EXT_device_enumeration.
7102f4aeb0Sopenharmony_ci
7202f4aeb0Sopenharmony_ciNew Tokens
7302f4aeb0Sopenharmony_ci
7402f4aeb0Sopenharmony_ci    As defined by EGL_EXT_device_query.
7502f4aeb0Sopenharmony_ci
7602f4aeb0Sopenharmony_ciAdd to section "3.2 Devices"
7702f4aeb0Sopenharmony_ci
7802f4aeb0Sopenharmony_ci    "EGL_EXT_device_base is equivalent to the combination of the
7902f4aeb0Sopenharmony_ci    functionality defined by EGL_EXT_device_query and
8002f4aeb0Sopenharmony_ci    EGL_EXT_device_enumeration."
8102f4aeb0Sopenharmony_ci
8202f4aeb0Sopenharmony_ciIssues
8302f4aeb0Sopenharmony_ci
8402f4aeb0Sopenharmony_ci    1.  Should there be a mechanism (such as an attribute list) to
8502f4aeb0Sopenharmony_ci        filter devices in eglQueryDevicesEXT()?
8602f4aeb0Sopenharmony_ci
8702f4aeb0Sopenharmony_ci        RESOLVED: No.  This could develop too much complexity, like
8802f4aeb0Sopenharmony_ci        the EGLConfig mechanism.  Instead, force applications to query
8902f4aeb0Sopenharmony_ci        all devices and implement any desired filtering themselves.
9002f4aeb0Sopenharmony_ci
9102f4aeb0Sopenharmony_ci    2.  Should there be an eglSetDeviceAttribEXT()?
9202f4aeb0Sopenharmony_ci
9302f4aeb0Sopenharmony_ci        RESOLVED: No.  Device properties are immutable.
9402f4aeb0Sopenharmony_ci
9502f4aeb0Sopenharmony_ci    3.  Should a device file descriptor attribute be included in the
9602f4aeb0Sopenharmony_ci        base specification?
9702f4aeb0Sopenharmony_ci
9802f4aeb0Sopenharmony_ci        RESOLVED: No.  It seems like an arbitrary attribute to include
9902f4aeb0Sopenharmony_ci        in the base extension.  Other extensions can easily be added
10002f4aeb0Sopenharmony_ci        if this or other device attributes are needed.
10102f4aeb0Sopenharmony_ci
10202f4aeb0Sopenharmony_ci    4.  Should EGLDeviceEXT handles be opaque pointers or 32-bit
10302f4aeb0Sopenharmony_ci        values?
10402f4aeb0Sopenharmony_ci
10502f4aeb0Sopenharmony_ci        RESOLVED: Opaque pointers.  The trend seems to be to use
10602f4aeb0Sopenharmony_ci        opaque pointers for object handles, and opaque pointers allow
10702f4aeb0Sopenharmony_ci        more implementation flexibility than 32-bit values.
10802f4aeb0Sopenharmony_ci        Additionally, the introduction of the EGLAttrib type allows
10902f4aeb0Sopenharmony_ci        inclusion of pointer-sized types in attribute lists, which was
11002f4aeb0Sopenharmony_ci        the only major advantage of 32-bit types.
11102f4aeb0Sopenharmony_ci
11202f4aeb0Sopenharmony_ci    5.  Should eglQueryDisplayAttribEXT be defined as part of this
11302f4aeb0Sopenharmony_ci        extension?
11402f4aeb0Sopenharmony_ci
11502f4aeb0Sopenharmony_ci        RESOLVED: Yes.  There are no other known uses for this
11602f4aeb0Sopenharmony_ci        function, so it should be defined here.  If other uses are
11702f4aeb0Sopenharmony_ci        found, future extension specifications can reference this
11802f4aeb0Sopenharmony_ci        extension or retroactively move it to a separate extension.
11902f4aeb0Sopenharmony_ci
12002f4aeb0Sopenharmony_ci    6.  How should bonded GPU configurations, such as SLI or Crossfire
12102f4aeb0Sopenharmony_ci        be enumerated?  What about other hybrid rendering solutions?
12202f4aeb0Sopenharmony_ci
12302f4aeb0Sopenharmony_ci        RESOLVED: Bonded GPUs should appear as one device in this API,
12402f4aeb0Sopenharmony_ci        since the client APIs generally treat them as one device.
12502f4aeb0Sopenharmony_ci        Further queries can be added to distinguish the lower-level
12602f4aeb0Sopenharmony_ci        hardware within these bonded devices.
12702f4aeb0Sopenharmony_ci
12802f4aeb0Sopenharmony_ci        Hybrid GPUs, which behave independently but are switched
12902f4aeb0Sopenharmony_ci        between in a manner transparent to the user, should be
13002f4aeb0Sopenharmony_ci        enumerated separately.  This extension is intended to be used
13102f4aeb0Sopenharmony_ci        at a level of the software stack below this type of automatic
13202f4aeb0Sopenharmony_ci        switching or output sharing.
13302f4aeb0Sopenharmony_ci
13402f4aeb0Sopenharmony_ci    7.  Should this extension require all displays to have an
13502f4aeb0Sopenharmony_ci        associated, queryable device handle?
13602f4aeb0Sopenharmony_ci
13702f4aeb0Sopenharmony_ci        RESOLVED: Yes.  This allows creating new namespace containers
13802f4aeb0Sopenharmony_ci        that all displays can be grouped in to and allows existing
13902f4aeb0Sopenharmony_ci        applications with display-based initialization code to easily
14002f4aeb0Sopenharmony_ci        add device-level functionality.  Future extensions are
14102f4aeb0Sopenharmony_ci        expected to expose methods to correlate EGL devices and native
14202f4aeb0Sopenharmony_ci        devices, and to use devices as namespaces for future objects
14302f4aeb0Sopenharmony_ci        and operations, such as cross-display EGL streams.
14402f4aeb0Sopenharmony_ci
14502f4aeb0Sopenharmony_ci    8.  Are device handles returned by EGL valid in other processes?
14602f4aeb0Sopenharmony_ci
14702f4aeb0Sopenharmony_ci        RESOLVED: No.  Another level of indirection is required to
14802f4aeb0Sopenharmony_ci        correlate two EGL devices in separate processes.
14902f4aeb0Sopenharmony_ci
15002f4aeb0Sopenharmony_ci    9.  Is a general display pointer query mechanism needed, or should
15102f4aeb0Sopenharmony_ci        an eglGetDevice call be added to query a display's associated
15202f4aeb0Sopenharmony_ci        device?
15302f4aeb0Sopenharmony_ci
15402f4aeb0Sopenharmony_ci        RESOLVED: A general mechanism is better.  It may have other
15502f4aeb0Sopenharmony_ci        uses in the future.
15602f4aeb0Sopenharmony_ci
15702f4aeb0Sopenharmony_ci    10. Should a new type of extension be introduced to query device-
15802f4aeb0Sopenharmony_ci        specific extensions?
15902f4aeb0Sopenharmony_ci
16002f4aeb0Sopenharmony_ci        RESOLVED: Yes.  Without this mechanism, it is likely that most
16102f4aeb0Sopenharmony_ci        device extensions would require a separate mechanism to
16202f4aeb0Sopenharmony_ci        determine which devices actually support them.  Further,
16302f4aeb0Sopenharmony_ci        requiring all device-level extensions to be listed as client
16402f4aeb0Sopenharmony_ci        extensions forces them to be implemented in the EGL client
16502f4aeb0Sopenharmony_ci        library, or "ICD".  This is unfortunate since vendors will
16602f4aeb0Sopenharmony_ci        likely wish to expose vendor-specific device extensions.
16702f4aeb0Sopenharmony_ci
16802f4aeb0Sopenharmony_ci        These advantages were weighed against the one known
16902f4aeb0Sopenharmony_ci        disadvantage of a separate extension type: Increasing the
17002f4aeb0Sopenharmony_ci        complexity of this extension and the EGL extension mechanism
17102f4aeb0Sopenharmony_ci        in general.
17202f4aeb0Sopenharmony_ci
17302f4aeb0Sopenharmony_ci    11. Is eglQueryDeviceStringEXT necessary, or should the device
17402f4aeb0Sopenharmony_ci        extension string be queried using eglQueryDeviceAttribEXT?
17502f4aeb0Sopenharmony_ci
17602f4aeb0Sopenharmony_ci        RESOLVED: Using a separate query seems more consistent with
17702f4aeb0Sopenharmony_ci        how the current extension strings are queried.
17802f4aeb0Sopenharmony_ci        
17902f4aeb0Sopenharmony_ci    12. Should this extension contain both device enumeration and
18002f4aeb0Sopenharmony_ci        the ability to query the device backing an EGLDisplay?
18102f4aeb0Sopenharmony_ci        
18202f4aeb0Sopenharmony_ci        RESOLVED: This extension initially included both of these
18302f4aeb0Sopenharmony_ci        abilities.  To allow simpler implementations to add only the
18402f4aeb0Sopenharmony_ci        ability to query the device of an existing EGLDisplay, this
18502f4aeb0Sopenharmony_ci        extension was split into two separate extensions:
18602f4aeb0Sopenharmony_ci        
18702f4aeb0Sopenharmony_ci           EGL_EXT_device_query
18802f4aeb0Sopenharmony_ci           EGL_EXT_device_enumeration
18902f4aeb0Sopenharmony_ci           
19002f4aeb0Sopenharmony_ci        The presence of this extension now only indicates support
19102f4aeb0Sopenharmony_ci        for both of the above extensions.
19202f4aeb0Sopenharmony_ci
19302f4aeb0Sopenharmony_ciRevision History:
19402f4aeb0Sopenharmony_ci
19502f4aeb0Sopenharmony_ci    #9  (March 24th, 2015) James Jones
19602f4aeb0Sopenharmony_ci        - Split the extension into two child extensions:
19702f4aeb0Sopenharmony_ci           EGL_EXT_device_query
19802f4aeb0Sopenharmony_ci           EGL_EXT_device_enumeration
19902f4aeb0Sopenharmony_ci
20002f4aeb0Sopenharmony_ci    #8  (May 16th, 2014) James Jones
20102f4aeb0Sopenharmony_ci        - Marked the extension complete.
20202f4aeb0Sopenharmony_ci        - Marked all issues resolved.
20302f4aeb0Sopenharmony_ci
20402f4aeb0Sopenharmony_ci    #7  (April 8th, 2014) James Jones
20502f4aeb0Sopenharmony_ci        - Renamed eglGetDisplayAttribEXT back to
20602f4aeb0Sopenharmony_ci          eglQueryDisplayAttribEXT.
20702f4aeb0Sopenharmony_ci        - Update wording based on the EGL 1.5 specification.
20802f4aeb0Sopenharmony_ci        - Use EGLAttrib instead of EGLAttribEXT.
20902f4aeb0Sopenharmony_ci        - Assigned values to tokens.
21002f4aeb0Sopenharmony_ci
21102f4aeb0Sopenharmony_ci    #6  (November 6th, 2013) James Jones
21202f4aeb0Sopenharmony_ci        - Added EGL_BAD_DEVICE_EXT error code.
21302f4aeb0Sopenharmony_ci        - Renamed some functions for consistency with the core spec
21402f4aeb0Sopenharmony_ci
21502f4aeb0Sopenharmony_ci    #5  (November 6th, 2013) James Jones
21602f4aeb0Sopenharmony_ci        - Specified this is a client extension
21702f4aeb0Sopenharmony_ci        - Renamed eglQueryDisplayPointerEXT eglGetDisplayAttribEXT
21802f4aeb0Sopenharmony_ci          and modified it to use the new EGLAttribEXT type rather than
21902f4aeb0Sopenharmony_ci          a void pointer
22002f4aeb0Sopenharmony_ci        - Introduced the "device" extension type.
22102f4aeb0Sopenharmony_ci        - Added eglQueryDeviceStringEXT to query device extension
22202f4aeb0Sopenharmony_ci          strings
22302f4aeb0Sopenharmony_ci        - Removed issues 5, 10, and 12 as they are no longer relevant
22402f4aeb0Sopenharmony_ci        - Added issues 10 and 11.
22502f4aeb0Sopenharmony_ci
22602f4aeb0Sopenharmony_ci    #4  (May 14th, 2013) James Jones
22702f4aeb0Sopenharmony_ci        - Merged in EGL_EXT_display_attributes
22802f4aeb0Sopenharmony_ci        - Changed eglGetDisplayPointerEXT to eglQueryDisplayPointerEXT
22902f4aeb0Sopenharmony_ci        - Remove eglGetDisplayAttribEXT since it has no known use case
23002f4aeb0Sopenharmony_ci
23102f4aeb0Sopenharmony_ci    #3  (April 23rd, 2013) James Jones
23202f4aeb0Sopenharmony_ci        - Include EGL_NO_DEVICE_EXT
23302f4aeb0Sopenharmony_ci        - Added issues 8 and 9
23402f4aeb0Sopenharmony_ci
23502f4aeb0Sopenharmony_ci    #2  (April 18th, 2013) James Jones
23602f4aeb0Sopenharmony_ci        - Reworded issue 3 and flipped the resolution
23702f4aeb0Sopenharmony_ci        - Added issues 5, 6, and 7
23802f4aeb0Sopenharmony_ci        - Filled in the actual spec language modifications
23902f4aeb0Sopenharmony_ci        - Renamed from EGL_EXT_device to EGL_EXT_device_base
24002f4aeb0Sopenharmony_ci        - Fixed some typos
24102f4aeb0Sopenharmony_ci
24202f4aeb0Sopenharmony_ci    #1  (April 16th, 2013) James Jones
24302f4aeb0Sopenharmony_ci        - Initial Draft
244