aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2018-06-06 12:57:18 +0100
committerLionel Landwerlin <[email protected]>2018-06-07 00:09:21 +0100
commitb28a2510cc49711803b9ebcdc315c5011e9a282e (patch)
tree53fe673552e8d0c30e64997c5cfde68365c81db8 /src/mesa/drivers/dri/common
parent833c4046007f22ce1da0e1c2b89e8f1892f8d38e (diff)
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 <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106642 Reviewed-by: Plamena Manolova <[email protected]> (v2) Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index a591dfcd7d2..d257cb644c8 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/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