mesa: add missing formats to driGLFormatToImageFormat
authorTapani Pälli <tapani.palli@intel.com>
Thu, 20 Oct 2016 08:03:26 +0000 (11:03 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Tue, 25 Oct 2016 04:24:11 +0000 (07:24 +0300)
Fixes following dEQP tests:

   dEQP-EGL.functional.image.api.create_image_gles2_tex2d_luminance
   dEQP-EGL.functional.image.api.create_image_gles2_tex2d_luminance_alpha

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98328

src/mesa/drivers/dri/common/dri_util.c

index 79cb0506dd8aa3a905843e41505e93d205e77766..3b81799c646c5dc6efac9f9284e78494993f454b 100644 (file)
@@ -842,8 +842,10 @@ driGLFormatToImageFormat(mesa_format format)
       return __DRI_IMAGE_FORMAT_ABGR8888;
    case MESA_FORMAT_R8G8B8X8_UNORM:
       return __DRI_IMAGE_FORMAT_XBGR8888;
+   case MESA_FORMAT_L_UNORM8:
    case MESA_FORMAT_R_UNORM8:
       return __DRI_IMAGE_FORMAT_R8;
+   case MESA_FORMAT_L8A8_UNORM:
    case MESA_FORMAT_R8G8_UNORM:
       return __DRI_IMAGE_FORMAT_GR88;
    case MESA_FORMAT_NONE: