[Piglit] [PATCH] EGL_EXT_image_dma_buf_import: add YUYV format support
Christian Gmeiner
christian.gmeiner at gmail.com
Fri Feb 22 12:42:47 UTC 2019
Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
---
tests/opengl.py | 2 ++
tests/spec/ext_image_dma_buf_import/sample_yuv.c | 13 +++++++++++++
tests/util/piglit-framework-gl/piglit_drm_dma_buf.c | 2 ++
3 files changed, 17 insertions(+)
diff --git a/tests/opengl.py b/tests/opengl.py
index d6cfa0986..685ffae62 100644
--- a/tests/opengl.py
+++ b/tests/opengl.py
@@ -3043,6 +3043,8 @@ with profile.test_list.group_manager(
'ext_image_dma_buf_import-sample_p012', run_concurrent=False)
g(['ext_image_dma_buf_import-sample_yuv', '-fmt=P016'],
'ext_image_dma_buf_import-sample_p016', run_concurrent=False)
+ g(['ext_image_dma_buf_import-sample_yuv', '-fmt=YUYV'],
+ 'ext_image_dma_buf_import-sample_yuyv', run_concurrent=False)
g(['ext_image_dma_buf_import-transcode-nv12-as-r8-gr88'],
'ext_image_dma_buf_import-transcode-nv12-as-r8-gr88',
run_concurrent=False)
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 faa4c300c..f33317af0 100644
--- a/tests/spec/ext_image_dma_buf_import/sample_yuv.c
+++ b/tests/spec/ext_image_dma_buf_import/sample_yuv.c
@@ -143,6 +143,16 @@ piglit_display(void)
160, 127, 70, 64,
160, 133, 90, 128,
160, 140, 110, 192,
+ }, yuyv[] = {
+ /* YUYV */
+ 0x32, 0x78, 0x46, 0x82,
+ 0x59, 0x8C, 0x6E, 0x82,
+ 0x32, 0x78, 0x46, 0x82,
+ 0x59, 0x8C, 0x6E, 0x82,
+ 0x32, 0x79, 0x46, 0xA1,
+ 0x5A, 0x8C, 0x6E, 0xA0,
+ 0x32, 0x79, 0x46, 0xA1,
+ 0x5A, 0x8C, 0x6E, 0xA0,
};
static unsigned char expected[4 * 4 * 4] = {
@@ -193,6 +203,9 @@ piglit_display(void)
case DRM_FORMAT_XYUV8888:
t = ayuv;
break;
+ case DRM_FORMAT_YUYV:
+ t = yuyv;
+ break;
default:
return PIGLIT_SKIP;
}
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 07e6cc219..15cba375c 100644
--- a/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c
+++ b/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c
@@ -144,6 +144,7 @@ piglit_intel_buf_create(unsigned w, unsigned h, unsigned fourcc,
break;
case DRM_FORMAT_GR88:
case DRM_FORMAT_RG88:
+ case DRM_FORMAT_YUYV:
cpp = 2;
break;
case DRM_FORMAT_XRGB8888:
@@ -279,6 +280,7 @@ piglit_gbm_buf_create(unsigned w, unsigned h, unsigned fourcc,
break;
case DRM_FORMAT_GR88:
case DRM_FORMAT_RG88:
+ case DRM_FORMAT_YUYV:
format = GBM_FORMAT_GR88;
cpp = 2;
src_stride = cpp * w;
--
2.20.1
More information about the Piglit
mailing list