diff options
author | Tapani Pälli <[email protected]> | 2019-02-11 10:01:35 +0200 |
---|---|---|
committer | Tapani Pälli <[email protected]> | 2019-02-12 08:42:02 +0200 |
commit | 722f96bfc83b7ab2981756e5d887d0dc8ee1b4f0 (patch) | |
tree | 1b4d666359b0c58d5236d0b1b7194104b6b56d7c /src/egl/drivers/dri2 | |
parent | 19a85a704bb163c80e9c87aa5a03da1e6574a8dd (diff) |
dri: add P010, P012, P016 for 10bit/12bit/16bit YUV420 formats
Signed-off-by: Tapani Pälli <[email protected]>
Signed-off-by: Lin Johnson <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 390e99d9a7a..17bee797b4a 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -66,6 +66,20 @@ #include "util/u_vector.h" #include "mapi/glapi/glapi.h" +/* Additional definitions not yet in the drm_fourcc.h. + */ +#ifndef DRM_FORMAT_P010 +#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cb:Cr plane 10 bits per channel */ +#endif + +#ifndef DRM_FORMAT_P012 +#define DRM_FORMAT_P012 fourcc_code('P', '0', '1', '2') /* 2x2 subsampled Cb:Cr plane 12 bits per channel */ +#endif + +#ifndef DRM_FORMAT_P016 +#define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cb:Cr plane 16 bits per channel */ +#endif + #define NUM_ATTRIBS 12 static void @@ -2262,6 +2276,9 @@ dri2_num_fourcc_format_planes(EGLint format) case DRM_FORMAT_NV21: case DRM_FORMAT_NV16: case DRM_FORMAT_NV61: + case DRM_FORMAT_P010: + case DRM_FORMAT_P012: + case DRM_FORMAT_P016: return 2; case DRM_FORMAT_YUV410: |