(See also similar commit
7420c9dab4aaf87e6b840410226c296c4668a48f.)
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 on i915.
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. The Intel Mesa team has no intention of
really implementing GL_OES_image_external for the i915 driver. This is
just a workaround for people who want to experiment with Android on i915.
Change-Id: Id2fce598a749a20d0fe78a0ac574937ec35d3545
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
return D0_SAMPLE_TYPE_VOLUME;
case TEXTURE_CUBE_INDEX:
return D0_SAMPLE_TYPE_CUBE;
+ case TEXTURE_EXTERNAL_INDEX:
+ return D0_SAMPLE_TYPE_2D;
default:
i915_program_error(p, "TexSrcBit: %d", bit);
return 0;
switch (cap) {
case GL_TEXTURE_2D:
+ case GL_TEXTURE_EXTERNAL_OES:
break;
case GL_LIGHTING:
break;
case GL_TEXTURE_1D:
case GL_TEXTURE_2D:
+ case GL_TEXTURE_EXTERNAL_OES:
case GL_TEXTURE_RECTANGLE_ARB:
i915_miptree_layout_2d(mt);
break;
break;
case GL_TEXTURE_1D:
case GL_TEXTURE_2D:
+ case GL_TEXTURE_EXTERNAL_OES:
case GL_TEXTURE_RECTANGLE_ARB:
i945_miptree_layout_2d(mt);
break;
case TEXTURE_2D_BIT:
case TEXTURE_CUBE_BIT:
case TEXTURE_3D_BIT:
+ case TEXTURE_EXTERNAL_BIT:
ok = i915_update_tex_unit(intel, i, SS3_NORMALIZED_COORDS);
break;
case TEXTURE_RECT_BIT: