diff options
author | Lionel Landwerlin <lionel.g.landwerlin@intel.com> | 2018-11-08 17:17:52 +0000 |
---|---|---|
committer | Lionel Landwerlin <lionel.g.landwerlin@intel.com> | 2018-11-13 11:45:16 +0000 |
commit | 4cc1642862c12e36e77e1924491d5f5690f2744f (patch) | |
tree | 12d3925ce78e4775295631cb9c9f8a9de6eca8be | |
parent | 649c149dbb96ac36765927fb13f731fd34e9acda (diff) |
EGL_EXT_image_dma_buf_import: add AYUV format support
v2: Forgot to add the new test to opengl.py
Drop some code to deal with alpha channel
v3: Don't remove static const from expected results (Eric/Tapani)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
-rw-r--r-- | tests/opengl.py | 2 | ||||
-rw-r--r-- | tests/spec/ext_image_dma_buf_import/sample_yuv.c | 24 | ||||
-rw-r--r-- | tests/util/piglit-framework-gl/piglit_drm_dma_buf.c | 1 |
3 files changed, 27 insertions, 0 deletions
diff --git a/tests/opengl.py b/tests/opengl.py index 83cc18fe0..c672fdad4 100644 --- a/tests/opengl.py +++ b/tests/opengl.py @@ -3027,6 +3027,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..38c0ee697 100644 --- a/tests/spec/ext_image_dma_buf_import/sample_yuv.c +++ b/tests/spec/ext_image_dma_buf_import/sample_yuv.c @@ -77,6 +77,27 @@ 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] = { @@ -114,6 +135,9 @@ piglit_display(void) case DRM_FORMAT_YVU420: t = yvu420; break; + case DRM_FORMAT_AYUV: + t = ayuv; + 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 869d9db7d..13bf883f2 100644 --- a/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c +++ b/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c @@ -154,6 +154,7 @@ piglit_intel_buf_create(unsigned w, unsigned h, unsigned fourcc, case DRM_FORMAT_ABGR8888: case DRM_FORMAT_RGBA8888: case DRM_FORMAT_BGRA8888: + case DRM_FORMAT_AYUV: cpp = 4; break; case DRM_FORMAT_NV12: |