102f4aeb0Sopenharmony_ciName
202f4aeb0Sopenharmony_ci
302f4aeb0Sopenharmony_ci    KHR_image_pixmap
402f4aeb0Sopenharmony_ci
502f4aeb0Sopenharmony_ciName Strings
602f4aeb0Sopenharmony_ci
702f4aeb0Sopenharmony_ci    EGL_KHR_image_pixmap
802f4aeb0Sopenharmony_ci
902f4aeb0Sopenharmony_ciContributors
1002f4aeb0Sopenharmony_ci
1102f4aeb0Sopenharmony_ci    Jeff Juliano
1202f4aeb0Sopenharmony_ci    Gary King
1302f4aeb0Sopenharmony_ci    Jon Leech
1402f4aeb0Sopenharmony_ci    Jonathan Grant
1502f4aeb0Sopenharmony_ci    Barthold Lichtenbelt
1602f4aeb0Sopenharmony_ci    Aaftab Munshi
1702f4aeb0Sopenharmony_ci    Acorn Pooley
1802f4aeb0Sopenharmony_ci    Chris Wynn
1902f4aeb0Sopenharmony_ci    Ray Smith
2002f4aeb0Sopenharmony_ci
2102f4aeb0Sopenharmony_ciContacts
2202f4aeb0Sopenharmony_ci
2302f4aeb0Sopenharmony_ci    Jon Leech (jon 'at' alumni.caltech.edu)
2402f4aeb0Sopenharmony_ci    Gary King, NVIDIA Corporation (gking 'at' nvidia.com)
2502f4aeb0Sopenharmony_ci
2602f4aeb0Sopenharmony_ciNotice
2702f4aeb0Sopenharmony_ci
2802f4aeb0Sopenharmony_ci    Copyright (c) 2008-2013 The Khronos Group Inc. Copyright terms at
2902f4aeb0Sopenharmony_ci        http://www.khronos.org/registry/speccopyright.html
3002f4aeb0Sopenharmony_ci
3102f4aeb0Sopenharmony_ciStatus
3202f4aeb0Sopenharmony_ci
3302f4aeb0Sopenharmony_ci    Complete. Functionality approved (as part of KHR_image) by the
3402f4aeb0Sopenharmony_ci    Khronos Board of Promoters on February 11, 2008.
3502f4aeb0Sopenharmony_ci
3602f4aeb0Sopenharmony_ci    Split into KHR_image_base and KHR_image_pixmap approved by the
3702f4aeb0Sopenharmony_ci    Khronos Technical Working Group on November 19, 2008.
3802f4aeb0Sopenharmony_ci
3902f4aeb0Sopenharmony_ciVersion
4002f4aeb0Sopenharmony_ci
4102f4aeb0Sopenharmony_ci    Version 5, November 13, 2013
4202f4aeb0Sopenharmony_ci
4302f4aeb0Sopenharmony_ciNumber
4402f4aeb0Sopenharmony_ci
4502f4aeb0Sopenharmony_ci    EGL Extension #9
4602f4aeb0Sopenharmony_ci
4702f4aeb0Sopenharmony_ciDependencies
4802f4aeb0Sopenharmony_ci
4902f4aeb0Sopenharmony_ci    EGL 1.2 is required.
5002f4aeb0Sopenharmony_ci
5102f4aeb0Sopenharmony_ci    EGL_KHR_image_base is required.
5202f4aeb0Sopenharmony_ci
5302f4aeb0Sopenharmony_ci    The EGL implementation must define an EGLNativePixmapType (although it
5402f4aeb0Sopenharmony_ci    is not required either to export any EGLConfigs supporting rendering to
5502f4aeb0Sopenharmony_ci    native pixmaps, or to support eglCreatePixmapSurface).
5602f4aeb0Sopenharmony_ci
5702f4aeb0Sopenharmony_ci    This extension is written against the wording of the EGL 1.4
5802f4aeb0Sopenharmony_ci    Specification.
5902f4aeb0Sopenharmony_ci
6002f4aeb0Sopenharmony_ciOverview
6102f4aeb0Sopenharmony_ci
6202f4aeb0Sopenharmony_ci    This extension allows creating an EGLImage from a native pixmap
6302f4aeb0Sopenharmony_ci    image.
6402f4aeb0Sopenharmony_ci
6502f4aeb0Sopenharmony_ciNew Types
6602f4aeb0Sopenharmony_ci
6702f4aeb0Sopenharmony_ci    None
6802f4aeb0Sopenharmony_ci
6902f4aeb0Sopenharmony_ciNew Procedures and Functions
7002f4aeb0Sopenharmony_ci
7102f4aeb0Sopenharmony_ci    None
7202f4aeb0Sopenharmony_ci
7302f4aeb0Sopenharmony_ciNew Tokens
7402f4aeb0Sopenharmony_ci
7502f4aeb0Sopenharmony_ci    Accepted by the <target> parameter of eglCreateImageKHR:
7602f4aeb0Sopenharmony_ci
7702f4aeb0Sopenharmony_ci        EGL_NATIVE_PIXMAP_KHR                          0x30B0
7802f4aeb0Sopenharmony_ci
7902f4aeb0Sopenharmony_ciAdditions to Chapter 2 of the EGL 1.4 Specification (EGL Operation)
8002f4aeb0Sopenharmony_ci
8102f4aeb0Sopenharmony_ci    Rename section 2.2.2.1 "Native Surface Coordinate Systems" to "Native
8202f4aeb0Sopenharmony_ci    Surface and EGLImage Pixmap Coordinate Systems" and add to the end of
8302f4aeb0Sopenharmony_ci    the section:
8402f4aeb0Sopenharmony_ci
8502f4aeb0Sopenharmony_ci   "EGLImages created with target EGL_NATIVE_PIXMAP_KHR share the same
8602f4aeb0Sopenharmony_ci    coordinate system as native pixmap surfaces. When that coordinate system
8702f4aeb0Sopenharmony_ci    is inverted, client APIs must invert their <y> coordinate when accessing
8802f4aeb0Sopenharmony_ci    such images as described above."
8902f4aeb0Sopenharmony_ci    
9002f4aeb0Sopenharmony_ci    Add to section 2.5.1 "EGLImage Specification" (as defined by the
9102f4aeb0Sopenharmony_ci    EGL_KHR_image_base specification), in the description of
9202f4aeb0Sopenharmony_ci    eglCreateImageKHR:
9302f4aeb0Sopenharmony_ci
9402f4aeb0Sopenharmony_ci   "Values accepted for <target> are listed in Table aaa, below.
9502f4aeb0Sopenharmony_ci
9602f4aeb0Sopenharmony_ci      +-------------------------+--------------------------------------------+
9702f4aeb0Sopenharmony_ci      |  <target>               |  Notes                                     |
9802f4aeb0Sopenharmony_ci      +-------------------------+--------------------------------------------+
9902f4aeb0Sopenharmony_ci      |  EGL_NATIVE_PIXMAP_KHR  |   Used for EGLNativePixmapType objects     |
10002f4aeb0Sopenharmony_ci      +-------------------------+--------------------------------------------+
10102f4aeb0Sopenharmony_ci       Table aaa.  Legal values for eglCreateImageKHR <target> parameter
10202f4aeb0Sopenharmony_ci
10302f4aeb0Sopenharmony_ci    ...
10402f4aeb0Sopenharmony_ci
10502f4aeb0Sopenharmony_ci    If <target> is EGL_NATIVE_PIXMAP_KHR, <dpy> must be a valid display, <ctx>
10602f4aeb0Sopenharmony_ci    must be EGL_NO_CONTEXT; <buffer> must be a handle to a valid
10702f4aeb0Sopenharmony_ci    NativePixmapType object, cast into the type EGLClientBuffer; and
10802f4aeb0Sopenharmony_ci    attributes other than EGL_IMAGE_PRESERVED_KHR are ignored."
10902f4aeb0Sopenharmony_ci
11002f4aeb0Sopenharmony_ci    Add to the list of error conditions for eglCreateImageKHR:
11102f4aeb0Sopenharmony_ci
11202f4aeb0Sopenharmony_ci      "* If <target> is EGL_NATIVE_PIXMAP_KHR and <buffer> is not a
11302f4aeb0Sopenharmony_ci         valid native pixmap handle, or if <buffer> is a native pixmap
11402f4aeb0Sopenharmony_ci         whose color buffer format is incompatible with the system's
11502f4aeb0Sopenharmony_ci         EGLImage implementation, the error EGL_BAD_PARAMETER is
11602f4aeb0Sopenharmony_ci         generated.
11702f4aeb0Sopenharmony_ci
11802f4aeb0Sopenharmony_ci       * If <target> is EGL_NATIVE_PIXMAP_KHR, and <dpy> is not a valid
11902f4aeb0Sopenharmony_ci         EGLDisplay object the error EGL_BAD_DISPLAY is generated.
12002f4aeb0Sopenharmony_ci
12102f4aeb0Sopenharmony_ci       * If <target> is EGL_NATIVE_PIXMAP_KHR, and <ctx> is not EGL_NO_CONTEXT,
12202f4aeb0Sopenharmony_ci         the error EGL_BAD_PARAMETER is generated.
12302f4aeb0Sopenharmony_ci
12402f4aeb0Sopenharmony_ci       * If <target> is EGL_NATIVE_PIXMAP_KHR, and <buffer> is not a handle
12502f4aeb0Sopenharmony_ci         to a valid NativePixmapType object, the error EGL_BAD_PARAMETER
12602f4aeb0Sopenharmony_ci         is generated."
12702f4aeb0Sopenharmony_ci
12802f4aeb0Sopenharmony_ciIssues
12902f4aeb0Sopenharmony_ci
13002f4aeb0Sopenharmony_ci    1) Should this specification allow EGLImages to be created from native
13102f4aeb0Sopenharmony_ci       pixmaps which already have a pixmap surface associated with them, and
13202f4aeb0Sopenharmony_ci       vice versa?
13302f4aeb0Sopenharmony_ci
13402f4aeb0Sopenharmony_ci       RESOLVED: Yes. There are practical usecases for this, and it is
13502f4aeb0Sopenharmony_ci       already the application's responsibility to handle any format
13602f4aeb0Sopenharmony_ci       mismatch or synchronization issues that this may allow.
13702f4aeb0Sopenharmony_ci
13802f4aeb0Sopenharmony_ciRevision History
13902f4aeb0Sopenharmony_ci
14002f4aeb0Sopenharmony_ci#5  (Jon Leech, November 13, 2013)
14102f4aeb0Sopenharmony_ci    - Add Issue #1 regarding use cases for multiple EGL consumer/producers
14202f4aeb0Sopenharmony_ci      of a native pixmap (Bug 7779).
14302f4aeb0Sopenharmony_ci
14402f4aeb0Sopenharmony_ci#4  (Jon Leech, October 16, 2013)
14502f4aeb0Sopenharmony_ci    - Add language allowing native pixmap and client API image y coordinate
14602f4aeb0Sopenharmony_ci      convention to differ. Re-base extension against EGL 1.4 (Bug 9701).
14702f4aeb0Sopenharmony_ci
14802f4aeb0Sopenharmony_ci#3  (Jon Leech, November 25, 2008)
14902f4aeb0Sopenharmony_ci    - Remove dependency on EGLConfig in error conditions.
15002f4aeb0Sopenharmony_ci
15102f4aeb0Sopenharmony_ci#2  (Jon Leech, November 12, 2008)
15202f4aeb0Sopenharmony_ci    - Clarified dependency on EGLNativePixmapType such that pixmap configs
15302f4aeb0Sopenharmony_ci      and surfaces are not required.
15402f4aeb0Sopenharmony_ci
15502f4aeb0Sopenharmony_ci#1  (Jon Leech, October 21, 2008)
15602f4aeb0Sopenharmony_ci    - Split native pixmap functionality from EGL_KHR_image into a layered
15702f4aeb0Sopenharmony_ci      extension on EGL_KHR_image_base, and note interaction with the new
15802f4aeb0Sopenharmony_ci      EGL_IMAGE_PRESERVED_KHR attribute.
159