aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
authorRainer Hochecker <[email protected]>2017-01-05 16:58:56 +0100
committerBen Widawsky <[email protected]>2017-01-23 08:47:15 -0800
commit09b140abb532dede5de6b03b1cc3c03852c1c9e9 (patch)
tree8c0aa7210fba34a1a3a07581364dd8ef54df6dd0 /src/egl
parent1338d912f52b69f76ef75d1ad313893db77d4da8 (diff)
dri: allow 16bit R/GR images to be exported via drm buffers
This allows eglCreateImageKHR to access P010 surfaces created by vaapi Signed-off-by: Rainer Hochecker <[email protected]> Acked-by: Ben Widawky <[email protected]>
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 63e29fc48c4..94b7c201707 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -75,6 +75,14 @@
#define DRM_FORMAT_GR88 fourcc_code('G', 'R', '8', '8') /* [15:0] G:R 8:8 little endian */
#endif
+#ifndef DRM_FORMAT_R16
+#define DRM_FORMAT_R16 fourcc_code('R', '1', '6', ' ') /* [15:0] R 16 little endian */
+#endif
+
+#ifndef DRM_FORMAT_GR1616
+#define DRM_FORMAT_GR1616 fourcc_code('G', 'R', '3', '2') /* [31:0] R:G 16:16 little endian */
+#endif
+
const __DRIuseInvalidateExtension use_invalidate = {
.base = { __DRI_USE_INVALIDATE, 1 }
};
@@ -1957,6 +1965,8 @@ dri2_check_dma_buf_format(const _EGLImageAttribs *attrs)
case DRM_FORMAT_R8:
case DRM_FORMAT_RG88:
case DRM_FORMAT_GR88:
+ case DRM_FORMAT_R16:
+ case DRM_FORMAT_GR1616:
case DRM_FORMAT_RGB332:
case DRM_FORMAT_BGR233:
case DRM_FORMAT_XRGB4444: