i965: Lift some restrictions on dma_buf EGLImages
authorChad Versace <chad.versace@intel.com>
Fri, 10 Apr 2015 03:29:59 +0000 (20:29 -0700)
committerChad Versace <chad.versace@intel.com>
Mon, 13 Apr 2015 14:36:32 +0000 (07:36 -0700)
commita76dc15b2b37db18151b42be63b49438588a92fe
tree92536d9ae63adfe63973ff250636e03e29d2e03f
parent2943b15ce7ce1bc29424949124a69538253008f7
i965: Lift some restrictions on dma_buf EGLImages

Allow glEGLImageTargetRenderbufferStorageOES and
glEGLImageTargetTexture2DOES for dma_buf EGLImages if the image is
a single RGBA8 unorm plane. This is safe, despite fast color clears,
because i965 disables allocation of auxiliary buffers for EGLImages.

Chrome OS needs this, because its compositor uses dma_buf EGLImages for
its scanout buffers.

Testing:
  - Tested on Ivybridge Chromebook Pixel with WebGL Aquarium and
    YouTube.
  - No Piglit regressions on Broadwell with `piglit run -p gbm
    tests/quick.py`, with my Piglit patches that update the
    EGL_EXT_image_dma_buf_import tests.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/intel_fbo.c
src/mesa/drivers/dri/i965/intel_image.h
src/mesa/drivers/dri/i965/intel_tex_image.c