[Piglit] [PATCH] EGL_EXT_image_dma_buf_import: add support for XYUV format

Vivek Kasireddy vivek.kasireddy at intel.com
Sat Feb 16 01:43:37 UTC 2019


This format is similar to AYUV except that the alpha channel
is ignored.

Cc: Tapani Palli <tapani.palli at intel.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

Signed-off-by: Vivek Kasireddy <vivek.kasireddy at intel.com>
---
 tests/opengl.py                                     | 2 ++
 tests/spec/ext_image_dma_buf_import/sample_yuv.c    | 1 +
 tests/util/piglit-framework-gl/piglit_drm_dma_buf.c | 1 +
 tests/util/piglit-framework-gl/piglit_drm_dma_buf.h | 4 ++++
 4 files changed, 8 insertions(+)

diff --git a/tests/opengl.py b/tests/opengl.py
index 83f980177..e91056408 100644
--- a/tests/opengl.py
+++ b/tests/opengl.py
@@ -3035,6 +3035,8 @@ with profile.test_list.group_manager(
       'ext_image_dma_buf_import-sample_yvu420', run_concurrent=False)
     g(['ext_image_dma_buf_import-sample_yuv', '-fmt=AYUV'],
       'ext_image_dma_buf_import-sample_ayuv', run_concurrent=False)
+    g(['ext_image_dma_buf_import-sample_yuv', '-fmt=XYUV'],
+      'ext_image_dma_buf_import-sample_xyuv', run_concurrent=False)
     g(['ext_image_dma_buf_import-sample_yuv', '-fmt=P010'],
       'ext_image_dma_buf_import-sample_p010', run_concurrent=False)
     g(['ext_image_dma_buf_import-sample_yuv', '-fmt=P012'],
diff --git a/tests/spec/ext_image_dma_buf_import/sample_yuv.c b/tests/spec/ext_image_dma_buf_import/sample_yuv.c
index c7b4edfc0..faa4c300c 100644
--- a/tests/spec/ext_image_dma_buf_import/sample_yuv.c
+++ b/tests/spec/ext_image_dma_buf_import/sample_yuv.c
@@ -190,6 +190,7 @@ piglit_display(void)
 		t = yvu420;
 		break;
 	case DRM_FORMAT_AYUV:
+	case DRM_FORMAT_XYUV8888:
 		t = ayuv;
 		break;
 	default:
diff --git a/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c b/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c
index 8beafad77..07e6cc219 100644
--- a/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c
+++ b/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c
@@ -155,6 +155,7 @@ piglit_intel_buf_create(unsigned w, unsigned h, unsigned fourcc,
 	case DRM_FORMAT_RGBA8888:
 	case DRM_FORMAT_BGRA8888:
 	case DRM_FORMAT_AYUV:
+	case DRM_FORMAT_XYUV8888:
 		cpp = 4;
 		break;
 	case DRM_FORMAT_NV12:
diff --git a/tests/util/piglit-framework-gl/piglit_drm_dma_buf.h b/tests/util/piglit-framework-gl/piglit_drm_dma_buf.h
index 9f59bf7da..86c45b368 100644
--- a/tests/util/piglit-framework-gl/piglit_drm_dma_buf.h
+++ b/tests/util/piglit-framework-gl/piglit_drm_dma_buf.h
@@ -52,6 +52,10 @@
 #define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cb:Cr plane 16 bits per channel */
 #endif
 
+#ifndef DRM_FORMAT_XYUV8888
+#define DRM_FORMAT_XYUV8888 fourcc_code('X', 'Y', 'U', 'V') /* 8 bits per channel and no subsampling */
+#endif
+
 /* added in libdrm 2.4.95 */
 #ifndef DRM_FORMAT_INVALID
 #define DRM_FORMAT_INVALID 0
-- 
2.14.5



More information about the Piglit mailing list