i965: Create mock implementation of GL_OES_EGL_image_external
authorChad Versace <chad.versace@linux.intel.com>
Thu, 22 Dec 2011 02:34:19 +0000 (18:34 -0800)
committerChad Versace <chad.versace@linux.intel.com>
Tue, 27 Dec 2011 18:20:25 +0000 (10:20 -0800)
commit7420c9dab4aaf87e6b840410226c296c4668a48f
tree7082af0fdad79031a5c117bbc19293c4c5ba3edc
parent7e5ffd9be2da66c076e84ae4bc854cca5665620c
i965: Create mock implementation of GL_OES_EGL_image_external

In Android IceCreamSandwich, SurfaceFlinger requires GL_OES_image_external
for basic compositing tasks. Without the extension, SurfaceFlinger fails
to start.

Despite the incompleteness of the extension's implementation introduced by
this patch, it is good enough to enable SurfaceFlinger and to unblock the
people who need to begin testing Mesa on IceCreamSandwich.

To enable the extension, set the environment variable
MESA_EXTENSION_OVERRIDE="+GL_OES_EGL_image_external". Ideally, Android
should set this in init.rc.

WARNING: This implementation of GL_OES_EGL_image_external is not complete.
Some of it is even incorrect. When we begin to really implement
GL_OES_EGL_image_external, much of the patch will need reverting.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/i965/brw_wm_emit.c
src/mesa/drivers/dri/i965/brw_wm_pass1.c
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/drivers/dri/intel/intel_tex_image.c