浏览代码

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>
tags/18.2-branchpoint
Lionel Landwerlin 7 年前
父节点
当前提交
b28a2510cc
共有 1 个文件被更改,包括 16 次插入0 次删除
  1. 16
    0
      src/mesa/drivers/dri/common/dri_util.c

+ 16
- 0
src/mesa/drivers/dri/common/dri_util.c 查看文件

@@ -936,6 +936,22 @@ static const struct {
.image_format = __DRI_IMAGE_FORMAT_SARGB8,
.mesa_format = MESA_FORMAT_B8G8R8A8_SRGB,
},
{
.image_format = __DRI_IMAGE_FORMAT_R16,
.mesa_format = MESA_FORMAT_R_UNORM16,
},
{
.image_format = __DRI_IMAGE_FORMAT_R16,
.mesa_format = MESA_FORMAT_L_UNORM16,
},
{
.image_format = __DRI_IMAGE_FORMAT_GR1616,
.mesa_format = MESA_FORMAT_R16G16_UNORM,
},
{
.image_format = __DRI_IMAGE_FORMAT_GR1616,
.mesa_format = MESA_FORMAT_L16A16_UNORM,
},
};

uint32_t

正在加载...
取消
保存