v2: Forgot to add the new test to opengl.py
Drop some code to deal with alpha channel
Signed-off-by: Lionel Landwerlin <lionel.g.landwer...@intel.com>
---
tests/opengl.py | 2 ++
.../ext_image_dma_buf_import/sample_yuv.c | 26 ++++++++++++++++++-
.../piglit-framework-gl/piglit_drm_dma_buf.c | 1 +
3 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/tests/opengl.py b/tests/opengl.py
index b74606be1..e01f3e6e7 100644
--- a/tests/opengl.py
+++ b/tests/opengl.py
@@ -3029,6 +3029,8 @@ with profile.test_list.group_manager(
'ext_image_dma_buf_import-sample_yuv420', run_concurrent=False)
g(['ext_image_dma_buf_import-sample_yuv', '-fmt=YV12', '-alpha-one'],
'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-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 a314bc56f..bb9997102 100644
--- a/tests/spec/ext_image_dma_buf_import/sample_yuv.c
+++ b/tests/spec/ext_image_dma_buf_import/sample_yuv.c
@@ -77,9 +77,30 @@ piglit_display(void)
/* U */
120, 140,
120, 140,
+ }, ayuv[] = {
+ /* AYUV (TODO: find a way to test alpha channel) */
+ 130, 120, 50, 255,
+ 130, 127, 70, 255,
+ 130, 133, 90, 255,
+ 130, 140, 110, 255,
+
+ 140, 120, 50, 255,
+ 140, 127, 70, 255,
+ 140, 133, 90, 255,
+ 140, 140, 110, 255,
+
+ 150, 120, 50, 255,
+ 150, 127, 70, 255,
+ 150, 133, 90, 255,
+ 150, 140, 110, 255,
+
+ 160, 120, 50, 255,
+ 160, 127, 70, 255,
+ 160, 133, 90, 255,
+ 160, 140, 110, 255,
};
- static const unsigned char expected[4 * 4 * 4] = {
+ unsigned char expected[4 * 4 * 4] = {