Name

    ANGLE_workaround_control

Name Strings

    EGL_ANGLE_workaround_control

Contributors

    Jonah Ryan-Davis  (jonahr 'at' google.com)

Contact

    Jonah Ryan-Davis  (jonahr 'at' google.com)

Status

    Draft

Version

    Version 1, May 23, 2019

Number

    EGL Extension #XXX

Extension Type

    EGL device extension

Dependencies

    This extension is written against the wording of the EGL 1.4
    Specification.

    EGL_EXT_device_query affects the definition of this extension.

Overview

    This extension adds two methods to query arrays holding
    information about the available workarounds for a given device.
    One method is used to query the total count of available
    workarounds. Another method is used to query a string property
    of an individual workaround given the workaround index.

IP Status

    No known claims.

New Types

    None.

New Procedures and Functions

    const char *eglQueryStringiANGLE(
        EGLDisplay dpy,
        EGLint name,
        EGLint index);

    EGLBoolean eglQueryDisplayAttribANGLE(
        EGLDisplay dpy,
        EGLint attribute,
        EGLAttrib *value);

New Tokens

    Accepted as a queried <name> in eglQueryStringiANGLE:

        EGL_WORKAROUND_NAME_ANGLE          0x3460
        EGL_WORKAROUND_CATEGORY_ANGLE      0x3461
        EGL_WORKAROUND_DESCRIPTION_ANGLE   0x3462
        EGL_WORKAROUND_BUG_ANGLE           0x3463
        EGL_WORKAROUND_ENABLED_ANGLE       0x3464

    Accepted as a queried <attribute> in eglQueryDisplayAttribANGLE

        EGL_WORKAROUND_COUNT_ANGLE         0x3465

Add the following to the end of section 3.3 "EGL Queries":

        const char *eglQueryStringiANGLE(EGLDisplay dpy,
            EGLint name, EGLint index);

    eGLQueryStringiANGLE returns a pointer to a static, zero-
    terminated string describing some aspect of the EGL
    implementation running on the specified display, from an array of
    strings. name may be one of EGL_WORKAROUND_NAME_ANGLE,
    EGL_WORKAROUND_CATEGORY_ANGLE, EGL_WORKAROUND_DESCRIPTION_ANGLE,
    EGL_WORKAROUND_BUG_ANGLE, or EGL_WORKAROUND_ENABLED_ANGLE. Index
    must be a valid index to access into the array of strings.
        The EGL_WORKAROUND_NAME_ANGLE array contains strings that
    describe the name of each workaround available in the display.
        The EGL_WORKAROUND_CATEGORY_ANGLE array contains strings
    with corresponding indices to the array of names. Each string
    describes the category of the workaround at the specified index.
        The EGL_WORKAROUND_DESCRIPTION_ANGLE array contains strings
    with corresponding indices to the array of names. Each string
    describes the workaround at the specified index.
        The EGL_WORKAROUND_BUG_ANGLE array contains strings
    with corresponding indices to the array of names. Each string
    describes the bug related to the workaround at the specified
    index.
        The EGL_WORKAROUND_ENABLED_ANGLE array contains strings
    with corresponding indices to the array of names. Each string has
    the value "true" if the workaround is currently enabled, or
    "false" if the workaround is currently disabled.

    Errors

    On failure, NULL is returned.
    An EGL_BAD_DISPLAY error is generated if dpy is not a valid
    display.
    An EGL_BAD_PARAMETER error is generated if name is not one of the
    values described above.
    An EGL_BAD_PARAMETER error is generated if index is not within
    the valid range of indices for the array.

Add a section "3.4 Display Attributes" after "3.3 EGL Versioning"

    To query attributes of an initialized display, use:

        EGLBoolean eglQueryDisplayAttribANGLE(EGLDisplay dpy,
                                            EGLint attribute,
                                            EGLAttrib *value);

    On success, EGL_TRUE is returned.
    If <attribute> is EGL_WORKAROUND_COUNT_ANGLE, the total count of
    available workarounds is returned in <value>.

    On failure, EGL_FALSE is returned.
    An EGL_BAD_DISPLAY error is generated if dpy is not a valid
    display.
    An EGL_BAD_ATTRIBUTE error is generated if <attribute> is not a
    valid value.

Issues

    None

Revision History

    Version 1, May 23, 2019 (Jonah Ryan-Davis)
        - Initial Draft
