From 721192ed0d0a87385095d4d153d78b5adef06b0a Mon Sep 17 00:00:00 2001 From: Jesse Hall Date: Wed, 28 Nov 2012 16:18:03 -0800 Subject: [PATCH] Initial draft of EGL_ANDROID_image_native_buffer Change-Id: If9bdd27ffdb13fb85e9ef873b311d6721399f75f --- .../specs/EGL_ANDROID_image_native_buffer.txt | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 opengl/specs/EGL_ANDROID_image_native_buffer.txt diff --git a/opengl/specs/EGL_ANDROID_image_native_buffer.txt b/opengl/specs/EGL_ANDROID_image_native_buffer.txt new file mode 100644 index 000000000..f09375005 --- /dev/null +++ b/opengl/specs/EGL_ANDROID_image_native_buffer.txt @@ -0,0 +1,107 @@ +Name + + ANDROID_image_native_buffer + +Name Strings + + EGL_ANDROID_image_native_buffer + +Contributors + + Jamie Gennis + Jesse Hall + +Contact + + Jesse Hall, Google Inc. (jessehall 'at' google.com) + +Status + + Draft. + +Version + + Version 1, November 28, 2012 + +Number + + EGL Extension #XXX + +Dependencies + + EGL 1.2 is required. + + EGL_KHR_image_base is required. + + This extension is written against the wording of the EGL 1.2 + Specification. + +Overview + + This extension enables using an Android window buffer (struct + ANativeWindowBuffer) as an EGLImage source. + +New Types + + None. + +New Procedures and Functions + + None. + +New Tokens + + Accepted by the parameter of eglCreateImageKHR: + + EGL_NATIVE_BUFFER_ANDROID 0x3140 + +Changes to Chapter 3 of the EGL 1.2 Specification (EGL Functions and Errors) + + Add to section 2.5.1 "EGLImage Specification" (as defined by the + EGL_KHR_image_base specification), in the description of + eglCreateImageKHR: + + "Values accepted for are listed in Table aaa, below. + + +----------------------------+-----------------------------------------+ + | | Notes | + +----------------------------+-----------------------------------------+ + | EGL_NATIVE_BUFFER_ANDROID | Used for ANativeWindowBuffer objects | + +----------------------------+-----------------------------------------+ + Table aaa. Legal values for eglCreateImageKHR parameter + + ... + + If is EGL_NATIVE_BUFFER_ANDROID, must be a valid display, + must be EGL_NO_CONTEXT, must be a pointer to a valid + ANativeWindowBuffer object (cast into the type EGLClientBuffer), and + attributes other than EGL_IMAGE_PRESERVED_KHR are ignored." + + Add to the list of error conditions for eglCreateImageKHR: + + "* If is EGL_NATIVE_BUFFER_ANDROID and is not a + pointer to a valid ANativeWindowBuffer, the error EGL_BAD_PARAMETER + is generated. + + * If is EGL_NATIVE_BUFFER_ANDROID and is not + EGL_NO_CONTEXT, the error EGL_BAD_CONTEXT is generated. + + * If is EGL_NATIVE_BUFFER_ANDROID and was created + with properties (format, usage, dimensions, etc.) not supported by + the EGL implementation, the error EGL_BAD_PARAMETER is generated." + +Issues + + 1. Should this extension define what combinations of ANativeWindowBuffer + properties implementations are required to support? + + RESOLVED: No. + + The requirements have evolved over time and will continue to change with + future Android releases. The minimum requirements for a given Android + version should be documented by that version. + +Revision History + +#1 (Jesse Hall, November 28, 2012) + - Initial draft.