[Mesa-dev] [RFC-PATCH 00/11] add support for GL_OES_EGL_image_external

Ian Romanick idr at freedesktop.org
Mon Oct 31 14:24:40 PDT 2011


On 10/30/2011 12:07 PM, Chia-I Wu wrote:
> From: Chia-I Wu<olv at lunarg.com>
>
> Hi,
>
> This patch series adds support for the OpenGL ES specific
> GL_OES_EGL_image_external extension[1].  It is enabled in st/mesa.
>
> The extension adds a new texture target, GL_TEXTURE_EXTERNAL_OES.  It can only
> be specified with an EGLImage.  Calling gl*Tex*Image* to manipulate an
> external texture will result in GL_INVALID_ENUM.  Because of the restrictions,
> it allows formats that are not otherwise supported to be sampled from.
>
> The extension is written with YUV formats in mind.  It describes two possible
> ways to to support them.  One is to insert extra instructions to the shaders
> to let GPU perform the necessary color conversions on the fly.  The other is
> to allocate an internal storage to perform the conversions when the EGLImage
> is specified.  Neither is supported for this series.  It effectively makes the
> implementation a subset of GL_OES_EGL_image function-wise.

Both of these methods are horrible.  The only useful color conversion to 
do is in the texture sampler hardware before filtering.  If the 
conversion has to be done at any other time or any other way, the 
application should do it by hand.  As Eric said in his reply, that's why 
applications can write their own shaders.

> Later, I plan to adopt the latter, also easier, approach to support NV21 and
> YV12 formats[2] (for Android, but haven't started).  The changes will be
> limitied to the winsys code.  The idea is that the pixel format of an EGLImage
> is winsys dependent.  There are too many formats, well defined or not, to be
> enumerated in pipe_format or gl_format.
>
> This series is tested with piglit quick.tests on i965 and llvmpipe without
> regressions.  I am unfamiliar with more than a couple of areas touched by this
> series.  Comments are appreciated.
>
> [1]
> http://www.khronos.org/registry/gles/extensions/OES/OES_EGL_image_external.txt
> [2] http://www.fourcc.org/yuv.php


More information about the mesa-dev mailing list