dri_util: add driImageFormatToSizedInternalGLFormat function
authorGurchetan Singh <gurchetansingh@chromium.org>
Thu, 7 Nov 2019 01:18:13 +0000 (17:18 -0800)
committerGurchetan Singh <gurchetansingh@chromium.org>
Mon, 13 Jan 2020 22:57:22 +0000 (14:57 -0800)
commitbf576772ab4d9e76dae716640bed6de879f19567
tree4e58e191324ac1f6255e92bf8ef5a1aa34574e5e
parentb68ff2b8731427b3b68c9c81902f7ba93606caaf
dri_util: add driImageFormatToSizedInternalGLFormat function

This is needed to implement the EXT_EGL_image_storage spec:

"If <target> is GL_TEXTURE_2D, then the resultant texture must have a
sized internal format which is colorspace and size compatible with the
dma-buf.  If the GL is unable to determine such a format, the error
INVALID_OPERATION is generated."

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/mesa/drivers/dri/common/dri_util.c
src/mesa/drivers/dri/common/dri_util.h