102f4aeb0Sopenharmony_ciName
202f4aeb0Sopenharmony_ci
302f4aeb0Sopenharmony_ci    KHR_cl_event2
402f4aeb0Sopenharmony_ci
502f4aeb0Sopenharmony_ciName Strings
602f4aeb0Sopenharmony_ci
702f4aeb0Sopenharmony_ci    EGL_KHR_cl_event2
802f4aeb0Sopenharmony_ci
902f4aeb0Sopenharmony_ciContributors
1002f4aeb0Sopenharmony_ci
1102f4aeb0Sopenharmony_ci    Jon Leech, Khronos
1202f4aeb0Sopenharmony_ci    Alon Or-bach, Samsung Electronics
1302f4aeb0Sopenharmony_ci    Tom Cooksey, ARM
1402f4aeb0Sopenharmony_ci
1502f4aeb0Sopenharmony_ciContact
1602f4aeb0Sopenharmony_ci
1702f4aeb0Sopenharmony_ci    Jon Leech (jon 'at' alumni.caltech.edu)
1802f4aeb0Sopenharmony_ci
1902f4aeb0Sopenharmony_ciIP Status
2002f4aeb0Sopenharmony_ci
2102f4aeb0Sopenharmony_ci    No known claims.
2202f4aeb0Sopenharmony_ci
2302f4aeb0Sopenharmony_ciNotice
2402f4aeb0Sopenharmony_ci
2502f4aeb0Sopenharmony_ci    Copyright (c) 2010-2013 The Khronos Group Inc. Copyright terms at
2602f4aeb0Sopenharmony_ci        http://www.khronos.org/registry/speccopyright.html
2702f4aeb0Sopenharmony_ci
2802f4aeb0Sopenharmony_ciStatus
2902f4aeb0Sopenharmony_ci
3002f4aeb0Sopenharmony_ci    Complete.
3102f4aeb0Sopenharmony_ci    Approved by the EGL Working Group on December 4, 2013.
3202f4aeb0Sopenharmony_ci
3302f4aeb0Sopenharmony_ciVersion
3402f4aeb0Sopenharmony_ci
3502f4aeb0Sopenharmony_ci    Version 5, December 4, 2013
3602f4aeb0Sopenharmony_ci
3702f4aeb0Sopenharmony_ciNumber
3802f4aeb0Sopenharmony_ci
3902f4aeb0Sopenharmony_ci    EGL Extension #65
4002f4aeb0Sopenharmony_ci
4102f4aeb0Sopenharmony_ciDependencies
4202f4aeb0Sopenharmony_ci
4302f4aeb0Sopenharmony_ci    EGL 1.4 and the EGL_KHR_fence_sync extension are required.
4402f4aeb0Sopenharmony_ci
4502f4aeb0Sopenharmony_ci    This extension is written against the language added to EGL 1.2 by
4602f4aeb0Sopenharmony_ci    the EGL_KHR_fence_sync extension.
4702f4aeb0Sopenharmony_ci
4802f4aeb0Sopenharmony_ci    An OpenCL implementation supporting sharing OpenCL event objects
4902f4aeb0Sopenharmony_ci    with EGL is required.
5002f4aeb0Sopenharmony_ci
5102f4aeb0Sopenharmony_ci    Khronos recommends obsoleting and replacing implementations of
5202f4aeb0Sopenharmony_ci    EGL_KHR_cl_event with this extension as soon as possible.
5302f4aeb0Sopenharmony_ci
5402f4aeb0Sopenharmony_ciOverview
5502f4aeb0Sopenharmony_ci
5602f4aeb0Sopenharmony_ci    This extension allows creating an EGL sync object linked to an OpenCL
5702f4aeb0Sopenharmony_ci    event object, potentially improving efficiency of sharing images between
5802f4aeb0Sopenharmony_ci    the two APIs. The companion cl_khr_egl_event extension provides the
5902f4aeb0Sopenharmony_ci    complementary functionality of creating an OpenCL event object from an
6002f4aeb0Sopenharmony_ci    EGL sync object.
6102f4aeb0Sopenharmony_ci
6202f4aeb0Sopenharmony_ci    This extension is functionally identical to EGL_KHR_cl_event, but is
6302f4aeb0Sopenharmony_ci    intended to replace that extension. It exists only to address an
6402f4aeb0Sopenharmony_ci    implementation issue on 64-bit platforms where passing OpenCL event
6502f4aeb0Sopenharmony_ci    handles in an EGLint attribute list value is impossible, because the
6602f4aeb0Sopenharmony_ci    implementations use a 32-bit type for EGLint.
6702f4aeb0Sopenharmony_ci
6802f4aeb0Sopenharmony_ci    This extension also incorporates some required functionality from the
6902f4aeb0Sopenharmony_ci    EGL_KHR_fence_sync extension, similarly modified for 64-bit platforms.
7002f4aeb0Sopenharmony_ci
7102f4aeb0Sopenharmony_ciNew Types
7202f4aeb0Sopenharmony_ci
7302f4aeb0Sopenharmony_ci    /*
7402f4aeb0Sopenharmony_ci     * EGLAttribKHR is a integer type used to pass arrays of attribute
7502f4aeb0Sopenharmony_ci     * name/value pairs which may include pointer and handle attribute
7602f4aeb0Sopenharmony_ci     * values.
7702f4aeb0Sopenharmony_ci     */
7802f4aeb0Sopenharmony_ci    #include <khrplatform.h>
7902f4aeb0Sopenharmony_ci    typedef intptr_t EGLAttribKHR;
8002f4aeb0Sopenharmony_ci
8102f4aeb0Sopenharmony_ci    Event handles of type cl_event, defined in the OpenCL header files, may
8202f4aeb0Sopenharmony_ci    be included in the attribute list passed to eglCreateSync64KHR.
8302f4aeb0Sopenharmony_ci
8402f4aeb0Sopenharmony_ciNew Procedures and Functions
8502f4aeb0Sopenharmony_ci
8602f4aeb0Sopenharmony_ci    EGLSyncKHR eglCreateSync64KHR(
8702f4aeb0Sopenharmony_ci                        EGLDisplay dpy,
8802f4aeb0Sopenharmony_ci                        EGLenum type,
8902f4aeb0Sopenharmony_ci                        const EGLAttribKHR *attrib_list);
9002f4aeb0Sopenharmony_ci
9102f4aeb0Sopenharmony_ciNew Tokens
9202f4aeb0Sopenharmony_ci
9302f4aeb0Sopenharmony_ci    Accepted as attribute names in the <attrib_list> argument
9402f4aeb0Sopenharmony_ci    of eglCreateSync64KHR:
9502f4aeb0Sopenharmony_ci
9602f4aeb0Sopenharmony_ci        EGL_CL_EVENT_HANDLE_KHR         0x309C
9702f4aeb0Sopenharmony_ci
9802f4aeb0Sopenharmony_ci    Returned in <values> for eglGetSyncAttribKHR <attribute>
9902f4aeb0Sopenharmony_ci    EGL_SYNC_TYPE_KHR:
10002f4aeb0Sopenharmony_ci
10102f4aeb0Sopenharmony_ci        EGL_SYNC_CL_EVENT_KHR           0x30FE
10202f4aeb0Sopenharmony_ci
10302f4aeb0Sopenharmony_ci    Returned in <values> for eglGetSyncAttribKHR <attribute>
10402f4aeb0Sopenharmony_ci    EGL_SYNC_CONDITION_KHR:
10502f4aeb0Sopenharmony_ci
10602f4aeb0Sopenharmony_ci        EGL_SYNC_CL_EVENT_COMPLETE_KHR  0x30FF
10702f4aeb0Sopenharmony_ci
10802f4aeb0Sopenharmony_ciChanges to Chapter 3 of the EGL 1.2 Specification (EGL Functions and Errors)
10902f4aeb0Sopenharmony_ci
11002f4aeb0Sopenharmony_ci    Modify the language in section 3.8.1 (Sync Objects) starting at the
11102f4aeb0Sopenharmony_ci    sixth paragraph, describing commands to create sync objects:
11202f4aeb0Sopenharmony_ci
11302f4aeb0Sopenharmony_ci    "The commands
11402f4aeb0Sopenharmony_ci
11502f4aeb0Sopenharmony_ci        EGLSyncKHR eglCreateSync64KHR(
11602f4aeb0Sopenharmony_ci                        EGLDisplay dpy,
11702f4aeb0Sopenharmony_ci                        EGLenum type,
11802f4aeb0Sopenharmony_ci                        const EGLAttribKHR *attrib_list);
11902f4aeb0Sopenharmony_ci
12002f4aeb0Sopenharmony_ci    and
12102f4aeb0Sopenharmony_ci
12202f4aeb0Sopenharmony_ci        EGLSyncKHR eglCreateSyncKHR(
12302f4aeb0Sopenharmony_ci                        EGLDisplay dpy,
12402f4aeb0Sopenharmony_ci                        EGLenum type,
12502f4aeb0Sopenharmony_ci                        const EGLint *attrib_list);
12602f4aeb0Sopenharmony_ci
12702f4aeb0Sopenharmony_ci    create a sync object ...
12802f4aeb0Sopenharmony_ci
12902f4aeb0Sopenharmony_ci    ... When a fence sync object is created, eglCreateSyncKHR and
13002f4aeb0Sopenharmony_ci    eglCreateSync64KHR also insert a fence command into... "
13102f4aeb0Sopenharmony_ci
13202f4aeb0Sopenharmony_ci    Add following the eigth paragraph (the paragraph beginning "<Fence sync
13302f4aeb0Sopenharmony_ci    objects> are created..."):
13402f4aeb0Sopenharmony_ci
13502f4aeb0Sopenharmony_ci   "A <CL event sync object> reflects the status of a corresponding OpenCL
13602f4aeb0Sopenharmony_ci    event object to which the sync object is linked. This provides another
13702f4aeb0Sopenharmony_ci    method of coordinating sharing of images between EGL and OpenCL (see
13802f4aeb0Sopenharmony_ci    Chapter 9 of the OpenCL 1.0 Specification and the cl_khr_egl_sharing
13902f4aeb0Sopenharmony_ci    extension). Waiting on such a sync object is equivalent to waiting for
14002f4aeb0Sopenharmony_ci    completion of the linked CL event object.
14102f4aeb0Sopenharmony_ci
14202f4aeb0Sopenharmony_ci    CL event sync objects may only be created using the command
14302f4aeb0Sopenharmony_ci    eglCreateSync64KHR, because they require an attribute which may not be
14402f4aeb0Sopenharmony_ci    representable in the attrib_list argument of eglCreateSyncKHR."
14502f4aeb0Sopenharmony_ci
14602f4aeb0Sopenharmony_ci    Add following the description of fence sync objects (prior to the
14702f4aeb0Sopenharmony_ci    "Errors" section for eglCreateSyncKHR):
14802f4aeb0Sopenharmony_ci
14902f4aeb0Sopenharmony_ci   "If <type> is EGL_SYNC_CL_EVENT_KHR, a CL event sync object is
15002f4aeb0Sopenharmony_ci    created. In this case <attrib_list> must contain the attribute
15102f4aeb0Sopenharmony_ci    EGL_CL_EVENT_HANDLE_KHR, set to a valid OpenCL event. Note that
15202f4aeb0Sopenharmony_ci    EGL_CL_EVENT_HANDLE_KHR is not a queriable property of a sync
15302f4aeb0Sopenharmony_ci    object. Attributes of the CL event sync objects are set as follows:
15402f4aeb0Sopenharmony_ci
15502f4aeb0Sopenharmony_ci        Attribute Name          Initial Attribute Value(s)
15602f4aeb0Sopenharmony_ci        -------------           --------------------------
15702f4aeb0Sopenharmony_ci        EGL_SYNC_TYPE_KHR       EGL_SYNC_CL_EVENT_KHR
15802f4aeb0Sopenharmony_ci        EGL_SYNC_STATUS_KHR     Depends on status of <event>
15902f4aeb0Sopenharmony_ci        EGL_SYNC_CONDITION_KHR  EGL_SYNC_CL_EVENT_COMPLETE_KHR
16002f4aeb0Sopenharmony_ci
16102f4aeb0Sopenharmony_ci    The status of such a sync object depends on <event>. When the status
16202f4aeb0Sopenharmony_ci    of <event> is CL_QUEUED, CL_SUBMITTED, or CL_RUNNING, the status of
16302f4aeb0Sopenharmony_ci    the linked sync object will be EGL_UNSIGNALED_KHR. When the status
16402f4aeb0Sopenharmony_ci    of <event> changes to CL_COMPLETE, the status of the linked sync
16502f4aeb0Sopenharmony_ci    object will become EGL_SIGNALED_KHR.
16602f4aeb0Sopenharmony_ci
16702f4aeb0Sopenharmony_ci    Creating a linked sync object places a reference on the linked
16802f4aeb0Sopenharmony_ci    OpenCL event object. When the sync object is deleted, the reference
16902f4aeb0Sopenharmony_ci    will be removed from the event object.
17002f4aeb0Sopenharmony_ci
17102f4aeb0Sopenharmony_ci    However, implementations are not required to validate the OpenCL
17202f4aeb0Sopenharmony_ci    event, and passing an invalid event handle in <attrib_list> may
17302f4aeb0Sopenharmony_ci    result in undefined behavior up to and including program
17402f4aeb0Sopenharmony_ci    termination."
17502f4aeb0Sopenharmony_ci
17602f4aeb0Sopenharmony_ci    The command eglCreateSync64KHR must be used to create a CL event sync
17702f4aeb0Sopenharmony_ci    object[fn1].
17802f4aeb0Sopenharmony_ci
17902f4aeb0Sopenharmony_ci    [fn1] If the implementation also supports the older EGL_KHR_cl_event
18002f4aeb0Sopenharmony_ci          extension, then eglCreateSyncKHR may also be used to create a CL
18102f4aeb0Sopenharmony_ci          event sync object. However, this use is not recommended because it
18202f4aeb0Sopenharmony_ci          is not portable to platforms where OpenCL event handles are larger
18302f4aeb0Sopenharmony_ci          than 32 bits."
18402f4aeb0Sopenharmony_ci
18502f4aeb0Sopenharmony_ci    Modify the ninth and tenth paragraphs, starting "When the condition":
18602f4aeb0Sopenharmony_ci
18702f4aeb0Sopenharmony_ci    "When the condition of the sync object is satisfied, the sync is
18802f4aeb0Sopenharmony_ci    signaled by the associated client API context, causing any
18902f4aeb0Sopenharmony_ci    eglClientWaitSyncKHR commands (see below) blocking on <sync> to unblock.
19002f4aeb0Sopenharmony_ci
19102f4aeb0Sopenharmony_ci    The only condition supported for fence sync objects is
19202f4aeb0Sopenharmony_ci    EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR, which is satisfied by completion
19302f4aeb0Sopenharmony_ci    of the fence command corresponding to the sync object, and all preceding
19402f4aeb0Sopenharmony_ci    commands in the associated client API context's command stream. The sync
19502f4aeb0Sopenharmony_ci    object will not be signaled until all effects from these commands on the
19602f4aeb0Sopenharmony_ci    client API's internal and framebuffer state are fully realized. No other
19702f4aeb0Sopenharmony_ci    state is affected by execution of the fence command.
19802f4aeb0Sopenharmony_ci
19902f4aeb0Sopenharmony_ci    Each client API which supports fence commands indicates this support
20002f4aeb0Sopenharmony_ci    in the form of a client API extension. If the GL_OES_EGL_sync
20102f4aeb0Sopenharmony_ci    extension is supported by OpenGL ES (either version 1.x or 2.0), a
20202f4aeb0Sopenharmony_ci    fence sync object may be created when the currently bound API is
20302f4aeb0Sopenharmony_ci    OpenGL ES. If the VG_KHR_EGL_sync extension is supported by OpenVG,
20402f4aeb0Sopenharmony_ci    a fence sync object may be created when the currently bound API is
20502f4aeb0Sopenharmony_ci    OpenVG.
20602f4aeb0Sopenharmony_ci
20702f4aeb0Sopenharmony_ci    The only condition supported for CL event sync objects is
20802f4aeb0Sopenharmony_ci    EGL_SYNC_CL_EVENT_COMPLETE_KHR, which is satisfied when the status of
20902f4aeb0Sopenharmony_ci    the OpenCL event associated with the sync object changes to CL_COMPLETE."
21002f4aeb0Sopenharmony_ci
21102f4aeb0Sopenharmony_ci    Add to the "Errors" section for eglCreateSyncKHR and eglCreateSync64KHR:
21202f4aeb0Sopenharmony_ci
21302f4aeb0Sopenharmony_ci   "* If <type> is EGL_SYNC_CL_EVENT_KHR then
21402f4aeb0Sopenharmony_ci
21502f4aeb0Sopenharmony_ci    ** If eglCreateSyncKHR was called, then EGL_NO_SYNC_KHR is returned and
21602f4aeb0Sopenharmony_ci       an EGL_BAD_ATTRIBUTE error is generated.
21702f4aeb0Sopenharmony_ci
21802f4aeb0Sopenharmony_ci    ** If eglCreateSync64KHR was called and EGL_CL_EVENT_HANDLE_KHR is not
21902f4aeb0Sopenharmony_ci       specified in <attrib_list>, or its attribute value is not a valid
22002f4aeb0Sopenharmony_ci       OpenCL event handle returned by a call to clEnqueueReleaseGLObjects
22102f4aeb0Sopenharmony_ci       or clEnqueueReleaseEGLObjects, then EGL_NO_SYNC_KHR is returned and
22202f4aeb0Sopenharmony_ci       an EGL_BAD_ATTRIBUTE error is generated."
22302f4aeb0Sopenharmony_ci
22402f4aeb0Sopenharmony_ci    Replace the EGL_SYNC_CONDITION_KHR row of table 3.cc with:
22502f4aeb0Sopenharmony_ci
22602f4aeb0Sopenharmony_ci   "Attribute              Description                Supported Sync Objects
22702f4aeb0Sopenharmony_ci    -----------------      -----------------------    ----------------------
22802f4aeb0Sopenharmony_ci    EGL_SYNC_CONDITION_KHR Signaling condition        EGL_SYNC_FENCE_KHR or
22902f4aeb0Sopenharmony_ci                                                      EGL_SYNC_CL_EVENT_KHR
23002f4aeb0Sopenharmony_ci
23102f4aeb0Sopenharmony_ci    Table 3.cc  Attributes Accepted by eglGetSyncAttribKHR Command"
23202f4aeb0Sopenharmony_ci
23302f4aeb0Sopenharmony_ci
23402f4aeb0Sopenharmony_ci    Replace the second paragraph describing eglDestroySync with:
23502f4aeb0Sopenharmony_ci
23602f4aeb0Sopenharmony_ci   "If any eglClientWaitSyncKHR commands are blocking on <sync> when
23702f4aeb0Sopenharmony_ci    eglDestroySyncKHR is called, <sync> is flagged for deletion and will
23802f4aeb0Sopenharmony_ci    be deleted when the associated fence command or CL event object has
23902f4aeb0Sopenharmony_ci    completed, and <sync> is no longer blocking any eglClientWaitSyncKHR
24002f4aeb0Sopenharmony_ci    command. Otherwise, the sync object is destroyed immediately."
24102f4aeb0Sopenharmony_ci
24202f4aeb0Sopenharmony_ciSample Code
24302f4aeb0Sopenharmony_ci
24402f4aeb0Sopenharmony_ci    None
24502f4aeb0Sopenharmony_ci
24602f4aeb0Sopenharmony_ciConformance Tests
24702f4aeb0Sopenharmony_ci
24802f4aeb0Sopenharmony_ci    None yet
24902f4aeb0Sopenharmony_ci
25002f4aeb0Sopenharmony_ciIssues
25102f4aeb0Sopenharmony_ci
25202f4aeb0Sopenharmony_ci    Note that some issues from the EGL_KHR_cl_event and EGL_KHR_fence_sync
25302f4aeb0Sopenharmony_ci    extensions also apply to this extension, which incorporates
25402f4aeb0Sopenharmony_ci    functionality from both of those extensions while making it usable on a
25502f4aeb0Sopenharmony_ci    64-bit architecture. Issues specific to this extension are below.
25602f4aeb0Sopenharmony_ci
25702f4aeb0Sopenharmony_ci    1) Why does this extension exist?
25802f4aeb0Sopenharmony_ci
25902f4aeb0Sopenharmony_ci    The existence of this extension is an unfortunate necessity. Khronos did
26002f4aeb0Sopenharmony_ci    not define EGLint as a 64-bit type in the version of <khrplatform.h> we
26102f4aeb0Sopenharmony_ci    provided, assuming that vendors on those platforms would do so. By the
26202f4aeb0Sopenharmony_ci    time we discovered that not all vendors had done this, it was too late
26302f4aeb0Sopenharmony_ci    to fix, because ABI considerations made it impossible for those vendors
26402f4aeb0Sopenharmony_ci    to change to a 64-bit EGLint type. Our only option was to define new
26502f4aeb0Sopenharmony_ci    extensions and commands using a new attribute type, EGLAttribKHR, which
26602f4aeb0Sopenharmony_ci    is explicitly large enough to hold a pointer or handle.
26702f4aeb0Sopenharmony_ci
26802f4aeb0Sopenharmony_ci    2) What is the relationship of this extension to EGL_KHR_cl_event?
26902f4aeb0Sopenharmony_ci
27002f4aeb0Sopenharmony_ci    RESOLVED: The only functional difference is that the new
27102f4aeb0Sopenharmony_ci    eglCreateSync64KHR command must be used to create CL event sync objects.
27202f4aeb0Sopenharmony_ci    This is necessary because some 64-bit platforms define EGLint as a
27302f4aeb0Sopenharmony_ci    32-bit type, making it impossible to pass an arbitrary OpenCL event
27402f4aeb0Sopenharmony_ci    handle in the EGLint *attrib_list passed to eglCreateSyncKHR.
27502f4aeb0Sopenharmony_ci
27602f4aeb0Sopenharmony_ci    3) How are pointer- and handle-sized attributes represented?
27702f4aeb0Sopenharmony_ci
27802f4aeb0Sopenharmony_ci    RESOLVED: Using the new type EGLAttribKHR, which is explicitly defined
27902f4aeb0Sopenharmony_ci    as an integer type large enough to hold a pointer.
28002f4aeb0Sopenharmony_ci
28102f4aeb0Sopenharmony_ci    EGLAttribKHR is defined as an alias of the ISO C intptr_t type, rather
28202f4aeb0Sopenharmony_ci    than using one of the explicitly-sized types from khrplatform.h.
28302f4aeb0Sopenharmony_ci    Requiring this means that khrplatform.h must make sure to include the
28402f4aeb0Sopenharmony_ci    appropriate header file (probably <stdint.h>) and that a C compiler
28502f4aeb0Sopenharmony_ci    supporting intptr_t must be used. In the past we were concerned about
28602f4aeb0Sopenharmony_ci    older C/C++ compilers, but this seems an acceptable choice in 2013.
28702f4aeb0Sopenharmony_ci
28802f4aeb0Sopenharmony_ci    We could choose to use intptr_t as the base type of attribute lists,
28902f4aeb0Sopenharmony_ci    instead of the EGLAttribKHR alias. As Ian Romanick has pointed out
29002f4aeb0Sopenharmony_ci    passionately in ARB discussions, modern C compilers are required to
29102f4aeb0Sopenharmony_ci    support a well-defined set of scalar types. There is no requirement to
29202f4aeb0Sopenharmony_ci    use API-specific scalar types when explicitly defining a C API.
29302f4aeb0Sopenharmony_ci
29402f4aeb0Sopenharmony_ci    However, there is some value in semantically tagging parameters with EGL
29502f4aeb0Sopenharmony_ci    types. Also, using 'intptr_t *attrib_list' would be cosmetically
29602f4aeb0Sopenharmony_ci    objectionable due to mixing EGL* and C native scalar types in EGL APIs.
29702f4aeb0Sopenharmony_ci
29802f4aeb0Sopenharmony_ci    We probably want to wait until there's an EGL API compatibility break -
29902f4aeb0Sopenharmony_ci    a hypothetical "EGL 2.0" - before moving to native ISO C types in our
30002f4aeb0Sopenharmony_ci    interfaces.
30102f4aeb0Sopenharmony_ci
30202f4aeb0Sopenharmony_ci    4) Why is the new fence sync creation function defined here, instead of
30302f4aeb0Sopenharmony_ci    in a separate EGL_KHR_fence_sync2 extension?
30402f4aeb0Sopenharmony_ci
30502f4aeb0Sopenharmony_ci    RESOLVED: eglCreateSync64KHR is defined here because this is the only
30602f4aeb0Sopenharmony_ci    functionality requiring it, and we expect this extension to be a stopgap
30702f4aeb0Sopenharmony_ci    for 64-bit platforms until the time that EGL 1.5 is defined. The EGL 1.5
30802f4aeb0Sopenharmony_ci    core will presumably include only the EGLAttribKHR-based version of this
30902f4aeb0Sopenharmony_ci    command.
31002f4aeb0Sopenharmony_ci
31102f4aeb0Sopenharmony_ci    If there are any new extensions using handle or pointer attributes in
31202f4aeb0Sopenharmony_ci    the meantime, they should copy the EGLAttribKHR and eglCreateSync64KHR
31302f4aeb0Sopenharmony_ci    language here as required. There is no harm in defining the same type or
31402f4aeb0Sopenharmony_ci    command in multiple extensions, so long as the definitions are
31502f4aeb0Sopenharmony_ci    compatible.
31602f4aeb0Sopenharmony_ci
31702f4aeb0Sopenharmony_ci    5) Why is the new command called eglCreateSync64KHR?
31802f4aeb0Sopenharmony_ci
31902f4aeb0Sopenharmony_ci    UNRESOLVED: For consistency with OpenGL, which has '64'-suffixed
32002f4aeb0Sopenharmony_ci    commands for representing 64-bit integers and arbitrary offsets into GPU
32102f4aeb0Sopenharmony_ci    memory. If we ever support EGL on 128-bit platforms this would be a
32202f4aeb0Sopenharmony_ci    silly naming convention, but that time is probably many decades away and
32302f4aeb0Sopenharmony_ci    by then EGL 1.5 should be defined and widely supported. The name
32402f4aeb0Sopenharmony_ci    eglCreateSync2KHR was originally suggested.
32502f4aeb0Sopenharmony_ci
32602f4aeb0Sopenharmony_ci    6) Why is there no command for querying EGLAttribKHR attributes from
32702f4aeb0Sopenharmony_ci    sync objects?
32802f4aeb0Sopenharmony_ci
32902f4aeb0Sopenharmony_ci    RESOLVED: Because the only sync attribute which requires the extra bits
33002f4aeb0Sopenharmony_ci    in an EGLAttribKHR type is EGL_CL_EVENT_HANDLE_KHR, which is not
33102f4aeb0Sopenharmony_ci    queryable. Sync attributes which are queryable will all fit into the
33202f4aeb0Sopenharmony_ci    EGLint returned by eglGetSyncAttribKHR.
33302f4aeb0Sopenharmony_ci
33402f4aeb0Sopenharmony_ci    NOTE: It's unfortunate that this name is used, since it uses the
33502f4aeb0Sopenharmony_ci    "AttribKHR" name for command returning EGLints. In EGL 1.5 we should use
33602f4aeb0Sopenharmony_ci    a different name for the query.
33702f4aeb0Sopenharmony_ci
33802f4aeb0Sopenharmony_ci    7) Does this extension replace EGL_KHR_fence_sync and EGL_KHR_cl_event?
33902f4aeb0Sopenharmony_ci
34002f4aeb0Sopenharmony_ci    RESOLVED: It does not replace EGL_KHR_fence_sync, but extends it to
34102f4aeb0Sopenharmony_ci    support creation of a new type of sync object, the CL event sync object.
34202f4aeb0Sopenharmony_ci
34302f4aeb0Sopenharmony_ci    RESOLVED: It is intended to replace EGL_KHR_cl_event; this extension
34402f4aeb0Sopenharmony_ci    must be used for OpenCL interop on 64-bit platforms, and we hope all
34502f4aeb0Sopenharmony_ci    vendors will implement it even on 32-bit platforms, for maximum code
34602f4aeb0Sopenharmony_ci    portability.
34702f4aeb0Sopenharmony_ci
34802f4aeb0Sopenharmony_ciRevision History
34902f4aeb0Sopenharmony_ci
35002f4aeb0Sopenharmony_ci    Version 5, 20130/12/04 (Jon Leech) - minor cleanup for public release.
35102f4aeb0Sopenharmony_ci
35202f4aeb0Sopenharmony_ci    Version 4, 20130/10/16 (Jon Leech) - add Dependencies and Overview text
35302f4aeb0Sopenharmony_ci    noting that this extension obsoletes and should replace
35402f4aeb0Sopenharmony_ci    EGL_KHR_cl_event.
35502f4aeb0Sopenharmony_ci
35602f4aeb0Sopenharmony_ci    Version 3, 20130/10/15 (Jon Leech) - change type of EGLAttribKHR from
35702f4aeb0Sopenharmony_ci    uintptr to intptr (Bug 11027).
35802f4aeb0Sopenharmony_ci
35902f4aeb0Sopenharmony_ci    Version 2, 20130/10/12 (Jon Leech) - merge EGL_KHR_fence_sync2 with this
36002f4aeb0Sopenharmony_ci    extension, change the naming scheme, define EGLAttribKHR as uintptr_t,
36102f4aeb0Sopenharmony_ci    and add a new issues list.
36202f4aeb0Sopenharmony_ci
36302f4aeb0Sopenharmony_ci    Version 1, 2010/10/02 (Tom Cooksey) - initial version based on
36402f4aeb0Sopenharmony_ci    EGL_KHR_cl_event and adding 64-bit EGLAttrKHR variants.
365