Re: [Piglit] [PATCH] EGL_EXT_image_dma_buf_import: fix error check with unknown drm format
Lionel Landwerlin writes: > According to the EGL_EXT_image_dma_buf_import spec, creating an EGL > image with a DRM format not supported should yield the BAD_MATCH > error : > > " >* If is EGL_LINUX_DMA_BUF_EXT, and the > EGL_LINUX_DRM_FOURCC_EXT > attribute is set to a format not supported by the EGL, EGL_BAD_MATCH > is generated. > " > > Signed-off-by: Lionel Landwerlin > Fixes: 0ee445dbbc161f ("tests/spec: EXT_image_dma_buf_import invalid > attributes") If you include that spec citation as a comment in the same style as say, test_buffer_not_null()'s, it gets my r-b. signature.asc Description: PGP signature ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 2/2] EGL_EXT_image_dma_buf_import: add fbo option to yuv formats with alpha channel
Lionel Landwerlin writes: > Depending on the platform you're running on, the test might fail with > the AYUV format. To make this reliable, force to render to fbo. While more fbo tests are good, I think you're missing config.window_visual = PIGLIT_GL_VISUAL_RGBA; in sample_yuv.c signature.asc Description: PGP signature ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] vulkan: Prefix group names for VkRunner tests with “vulkan”
Let me know when this is pushed, and I'll enable the tests in i965 CI. Dylan Baker writes: > Quoting Neil Roberts (2018-11-13 12:50:16) >> This will make it easier to distinguish tests written for Vulkan. It >> makes a bit of an inconsistency because the GL and CL tests don\u2019t have >> any prefix. Ideally maybe we would add a prefix for those too, but >> changing the test names at this late stage would probably cause a lot >> of hassle. >> >> Adding the prefix will avoid problems if we eventually decide to merge >> the Vulkan profile into the \u201cquick\u201d profile because otherwise we >> risk >> having name collisions when the same thing is tested on both Vulkan >> and GL. >> --- >> tests/vulkan.py | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/tests/vulkan.py b/tests/vulkan.py >> index eed199c55..ae01677a9 100644 >> --- a/tests/vulkan.py >> +++ b/tests/vulkan.py >> @@ -21,7 +21,8 @@ profile = TestProfile() >> for basedir in [TESTS_DIR, GENERATED_TESTS_DIR]: >> _basedir = os.path.join(basedir, 'vulkan') >> for dirpath, _, filenames in os.walk(_basedir): >> -groupname = grouptools.from_path(os.path.relpath(dirpath, _basedir)) >> +groupname = ('vulkan' + grouptools.SEPARATOR + >> + grouptools.from_path(os.path.relpath(dirpath, >> _basedir))) > > There's a grouptools.join function for this: > > groupname = grouptools.join('vulkan', grouptools.from_path(...)) > > With that change: > Reviewed-by: Dylan Baker > > Thanks for following up on this. > >> dirname = os.path.relpath(dirpath, os.path.join(basedir, '..')) >> for filename in filenames: >> testname, ext = os.path.splitext(filename) >> -- >> 2.17.1 >> ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [PATCH] vulkan: Prefix group names for VkRunner tests with “vulkan”
Quoting Neil Roberts (2018-11-13 12:50:16) > This will make it easier to distinguish tests written for Vulkan. It > makes a bit of an inconsistency because the GL and CL tests don\u2019t have > any prefix. Ideally maybe we would add a prefix for those too, but > changing the test names at this late stage would probably cause a lot > of hassle. > > Adding the prefix will avoid problems if we eventually decide to merge > the Vulkan profile into the \u201cquick\u201d profile because otherwise we > risk > having name collisions when the same thing is tested on both Vulkan > and GL. > --- > tests/vulkan.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/tests/vulkan.py b/tests/vulkan.py > index eed199c55..ae01677a9 100644 > --- a/tests/vulkan.py > +++ b/tests/vulkan.py > @@ -21,7 +21,8 @@ profile = TestProfile() > for basedir in [TESTS_DIR, GENERATED_TESTS_DIR]: > _basedir = os.path.join(basedir, 'vulkan') > for dirpath, _, filenames in os.walk(_basedir): > -groupname = grouptools.from_path(os.path.relpath(dirpath, _basedir)) > +groupname = ('vulkan' + grouptools.SEPARATOR + > + grouptools.from_path(os.path.relpath(dirpath, > _basedir))) There's a grouptools.join function for this: groupname = grouptools.join('vulkan', grouptools.from_path(...)) With that change: Reviewed-by: Dylan Baker Thanks for following up on this. > dirname = os.path.relpath(dirpath, os.path.join(basedir, '..')) > for filename in filenames: > testname, ext = os.path.splitext(filename) > -- > 2.17.1 > signature.asc Description: signature ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] vulkan: Prefix group names for VkRunner tests with “vulkan”
Reviewed-by: Mark Janes Tested-by: Mark Janes Neil Roberts writes: > This will make it easier to distinguish tests written for Vulkan. It > makes a bit of an inconsistency because the GL and CL tests don’t have > any prefix. Ideally maybe we would add a prefix for those too, but > changing the test names at this late stage would probably cause a lot > of hassle. > > Adding the prefix will avoid problems if we eventually decide to merge > the Vulkan profile into the “quick” profile because otherwise we risk > having name collisions when the same thing is tested on both Vulkan > and GL. > --- > tests/vulkan.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/tests/vulkan.py b/tests/vulkan.py > index eed199c55..ae01677a9 100644 > --- a/tests/vulkan.py > +++ b/tests/vulkan.py > @@ -21,7 +21,8 @@ profile = TestProfile() > for basedir in [TESTS_DIR, GENERATED_TESTS_DIR]: > _basedir = os.path.join(basedir, 'vulkan') > for dirpath, _, filenames in os.walk(_basedir): > -groupname = grouptools.from_path(os.path.relpath(dirpath, _basedir)) > +groupname = ('vulkan' + grouptools.SEPARATOR + > + grouptools.from_path(os.path.relpath(dirpath, > _basedir))) > dirname = os.path.relpath(dirpath, os.path.join(basedir, '..')) > for filename in filenames: > testname, ext = os.path.splitext(filename) > -- > 2.17.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] vulkan: Prefix group names for VkRunner tests with “vulkan”
This will make it easier to distinguish tests written for Vulkan. It makes a bit of an inconsistency because the GL and CL tests don’t have any prefix. Ideally maybe we would add a prefix for those too, but changing the test names at this late stage would probably cause a lot of hassle. Adding the prefix will avoid problems if we eventually decide to merge the Vulkan profile into the “quick” profile because otherwise we risk having name collisions when the same thing is tested on both Vulkan and GL. --- tests/vulkan.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/vulkan.py b/tests/vulkan.py index eed199c55..ae01677a9 100644 --- a/tests/vulkan.py +++ b/tests/vulkan.py @@ -21,7 +21,8 @@ profile = TestProfile() for basedir in [TESTS_DIR, GENERATED_TESTS_DIR]: _basedir = os.path.join(basedir, 'vulkan') for dirpath, _, filenames in os.walk(_basedir): -groupname = grouptools.from_path(os.path.relpath(dirpath, _basedir)) +groupname = ('vulkan' + grouptools.SEPARATOR + + grouptools.from_path(os.path.relpath(dirpath, _basedir))) dirname = os.path.relpath(dirpath, os.path.join(basedir, '..')) for filename in filenames: testname, ext = os.path.splitext(filename) -- 2.17.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 2/2] EGL_EXT_image_dma_buf_import: add fbo option to yuv formats with alpha channel
Depending on the platform you're running on, the test might fail with the AYUV format. To make this reliable, force to render to fbo. Signed-off-by: Lionel Landwerlin --- tests/opengl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/opengl.py b/tests/opengl.py index 8957de6e2..7c96e9412 100644 --- a/tests/opengl.py +++ b/tests/opengl.py @@ -3027,7 +3027,7 @@ 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'], 'ext_image_dma_buf_import-sample_yvu420', run_concurrent=False) -g(['ext_image_dma_buf_import-sample_yuv', '-fmt=AYUV'], +g(['ext_image_dma_buf_import-sample_yuv', '-fmt=AYUV', '-fbo'], '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', -- 2.19.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 1/2] EGL_EXT_image_dma_buf_import: drop alpha-one to sample yuv tests
This option only applies to the sample_rgb tests. Signed-off-by: Lionel Landwerlin --- tests/opengl.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/opengl.py b/tests/opengl.py index c672fdad4..8957de6e2 100644 --- a/tests/opengl.py +++ b/tests/opengl.py @@ -3021,11 +3021,11 @@ with profile.test_list.group_manager( 'ext_image_dma_buf_import-sample_argb', run_concurrent=False) g(['ext_image_dma_buf_import-sample_rgb', '-fmt=XR24', '-alpha-one'], 'ext_image_dma_buf_import-sample_xrgb', run_concurrent=False) -g(['ext_image_dma_buf_import-sample_yuv', '-fmt=NV12', '-alpha-one'], +g(['ext_image_dma_buf_import-sample_yuv', '-fmt=NV12'], 'ext_image_dma_buf_import-sample_nv12', run_concurrent=False) -g(['ext_image_dma_buf_import-sample_yuv', '-fmt=YU12', '-alpha-one'], +g(['ext_image_dma_buf_import-sample_yuv', '-fmt=YU12'], 'ext_image_dma_buf_import-sample_yuv420', run_concurrent=False) -g(['ext_image_dma_buf_import-sample_yuv', '-fmt=YV12', '-alpha-one'], +g(['ext_image_dma_buf_import-sample_yuv', '-fmt=YV12'], '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) -- 2.19.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] EGL_EXT_image_dma_buf_import: fix error check with unknown drm format
According to the EGL_EXT_image_dma_buf_import spec, creating an EGL image with a DRM format not supported should yield the BAD_MATCH error : " * If is EGL_LINUX_DMA_BUF_EXT, and the EGL_LINUX_DRM_FOURCC_EXT attribute is set to a format not supported by the EGL, EGL_BAD_MATCH is generated. " Signed-off-by: Lionel Landwerlin Fixes: 0ee445dbbc161f ("tests/spec: EXT_image_dma_buf_import invalid attributes") --- tests/spec/ext_image_dma_buf_import/invalid_attributes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/spec/ext_image_dma_buf_import/invalid_attributes.c b/tests/spec/ext_image_dma_buf_import/invalid_attributes.c index cc0b0462a..e41447936 100644 --- a/tests/spec/ext_image_dma_buf_import/invalid_attributes.c +++ b/tests/spec/ext_image_dma_buf_import/invalid_attributes.c @@ -165,7 +165,7 @@ test_invalid_format(unsigned w, unsigned h, int fd, unsigned stride, img = eglCreateImageKHR(eglGetCurrentDisplay(), EGL_NO_CONTEXT, EGL_LINUX_DMA_BUF_EXT, (EGLClientBuffer)0, attr); - if (!piglit_check_egl_error(EGL_BAD_ATTRIBUTE)) { + if (!piglit_check_egl_error(EGL_BAD_MATCH)) { if (img) eglDestroyImageKHR(eglGetCurrentDisplay(), img); return false; -- 2.19.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH v2] EGL_EXT_image_dma_buf_import: add AYUV format support
It would be indeed nice to test the alpha channel too, especially if we enable XYUV too but it can be added later ... with Eric's comment addressed; Reviewed-by: Tapani Pälli On 11/9/18 7:27 PM, Lionel Landwerlin wrote: v2: Forgot to add the new test to opengl.py Drop some code to deal with alpha channel Signed-off-by: Lionel Landwerlin --- 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] = { 44, 41, 25, 255, 67, 64, 48, 255, 90, 79, 111, 255, @@ -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_ABGR: case DRM_FORMAT_RGBA: case DRM_FORMAT_BGRA: + case DRM_FORMAT_AYUV: cpp = 4; break; case DRM_FORMAT_NV12: ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH v2] EGL_EXT_image_dma_buf_import: add AYUV format support
On 09/11/2018 17:31, Eric Engestrom wrote: On Friday, 2018-11-09 17:27:15 +, Lionel Landwerlin wrote: v2: Forgot to add the new test to opengl.py Drop some code to deal with alpha channel Signed-off-by: Lionel Landwerlin --- 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] = { I assume that wasn't meant to be committed? Indeed. Does the rest of the patch look okay? 44, 41, 25, 255, 67, 64, 48, 255, 90, 79, 111, 255, @@ -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_ABGR: case DRM_FORMAT_RGBA: case DRM_FORMAT_BGRA: + case DRM_FORMAT_AYUV: cpp = 4; break; case DRM_FORMAT_NV12: -- 2.19.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit