i965: Add a RGBX->RGBA fallback for glEGLImageTextureTarget2D()
authorChad Versace <chadversary@chromium.org>
Tue, 30 May 2017 19:27:54 +0000 (12:27 -0700)
committerChad Versace <chadversary@chromium.org>
Tue, 27 Jun 2017 23:56:30 +0000 (16:56 -0700)
commit74db56b97a65d488c38a8cfbb600b019439c2f91
tree990fa8b809c3fbfb67ff8d349d2892947c118208
parenta1983223d8839a0c9f5ca5aaf305ca6d2e01860b
i965: Add a RGBX->RGBA fallback for glEGLImageTextureTarget2D()

This enables support for importing RGBX8888 EGLImage textures on
Skylake.

Chrome OS needs support for RGBX8888 EGLImage textures because because
the Android framework produces HAL_PIXEL_FORMAT_RGBX8888 winsys
surfaces, which the Chrome OS compositor consumes as dma_bufs.  On
hardware for which RGBX is unsupported or disabled, normally core Mesa
provides the RGBX->RGBA fallback during glTexStorage.  But the DRIimage
code bypasses core Mesa, so we must do the fallback in i965.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/intel_tex_image.c