diff options
author | Chad Versace <[email protected]> | 2011-12-21 18:34:19 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2011-12-27 10:20:25 -0800 |
commit | 7420c9dab4aaf87e6b840410226c296c4668a48f (patch) | |
tree | 7082af0fdad79031a5c117bbc19293c4c5ba3edc /src/mesa/drivers/dri/intel | |
parent | 7e5ffd9be2da66c076e84ae4bc854cca5665620c (diff) |
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 <[email protected]>
Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/intel')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex_image.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index dd0c6d34c63..107d3147279 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_image.c +++ b/src/mesa/drivers/dri/intel/intel_tex_image.c @@ -84,6 +84,8 @@ intel_miptree_create_for_teximage(struct intel_context *intel, intelImage->base.Base.Level == firstLevel && (intel->gen < 4 || firstLevel == 0)) { lastLevel = firstLevel; + } else if (intelObj->base.Target == GL_TEXTURE_EXTERNAL_OES) { + lastLevel = firstLevel; } else { lastLevel = firstLevel + _mesa_logbase2(MAX2(MAX2(width, height), depth)); } |