dri: add missing 16bits formats mapping
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 6 Jun 2018 11:57:18 +0000 (12:57 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 6 Jun 2018 23:09:21 +0000 (00:09 +0100)
commitb28a2510cc49711803b9ebcdc315c5011e9a282e
tree53fe673552e8d0c30e64997c5cfde68365c81db8
parent833c4046007f22ce1da0e1c2b89e8f1892f8d38e
dri: add missing 16bits formats mapping

i965 advertises the 16-bit R and RG formats through
eglQueryDmaBufFormatsEXT but falls over when a client tries to use or
asks more information about such a format because
driImageFormatToGLFormat returns MESA_FORMAT_NONE.

Found by Eero Tamminen.

v2: Add G16R16 formats (Lionel)

v3: Fix G16R16 mapping to mesa format (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106642
Reviewed-by: Plamena Manolova <plamena.manolova@intel.com> (v2)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/common/dri_util.c