[Piglit] [PATCH] EXT_image_dma_buf_import: Update tests for Intel driver

Chad Versace chad.versace at intel.com
Thu Apr 9 20:51:46 PDT 2015


Change this from a negative test to a positive test, because the Intel
driver now supports glEGLImageTargetRenderbufferStorageOES and
glEGLImageTargetTexture2DOES(GL_TEXTURE_2D) for EGLImages imported with
EGL_EXT_image_dma_buf_import, as long as the image has a single plane
and a non-exotic format. This test verifies that the two calls succeed
with a RGBA dma_buf.

This is only an API test. It doesn't actually render to or texture from the
EGLImage.

Cc: Topi Pohjolainen <topi.pohjolainen at intel.com>
Cc: Tapani Palli <tapani.palli at intel.com>
---

This patch lives on my Piglit branch

    git://github.com/chadversary/piglit i965-disable-aux-buffers-for-EGLImages

and requires the patches in my Mesa tag

    git://github.com/chadversary/mesa i965-disable-aux-buffers-for-EGLImages-v03


 .../intel_external_sampler_only.c                     | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/tests/spec/ext_image_dma_buf_import/intel_external_sampler_only.c b/tests/spec/ext_image_dma_buf_import/intel_external_sampler_only.c
index e4b15a5..59772e1 100644
--- a/tests/spec/ext_image_dma_buf_import/intel_external_sampler_only.c
+++ b/tests/spec/ext_image_dma_buf_import/intel_external_sampler_only.c
@@ -24,13 +24,16 @@
 #include "image_common.h"
 
 /**
- * @file intel_external_sampler_only.c
+ * @file
  *
- * Intel driver does not allow imported dma-buffers to be rendered but to be
- * read only. In addition the driver allows the buffers to be sampled only using
- * the image external extension.
- * This test creates an egl image based on a dma buffer and tries to use the
- * image as target for a 2D texture and for a render buffer.
+ * The Intel driver supports glEGLImageTargetRenderbufferStorageOES and
+ * glEGLImageTargetTexture2DOES(GL_TEXTURE_2D) for EGLImages imported with
+ * EGL_EXT_image_dma_buf_import, as long as the image has a single plane and
+ * a non-exotic format. This test verifies that the two calls succeed with
+ * an RGBA dma_buf.
+ *
+ * This is only an API test. It doesn't actually render to or texture from the
+ * EGLImage.
  */
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
@@ -71,7 +74,7 @@ try_as_texture_2d(EGLImageKHR img)
 
 	/* Set the image as level zero */
 	glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, (GLeglImageOES)img);
-	res = piglit_check_gl_error(GL_INVALID_OPERATION);
+	res = piglit_check_gl_error(GL_NO_ERROR);
 
 	glDeleteTextures(1, &tex);
 
@@ -88,7 +91,7 @@ try_as_render_buffer(EGLImageKHR img)
 	piglit_glBindRenderbufferOES(GL_RENDERBUFFER_OES, rbo);
 
 	glEGLImageTargetRenderbufferStorageOES(GL_RENDERBUFFER_OES, img);
-	res = piglit_check_gl_error(GL_INVALID_OPERATION);
+	res = piglit_check_gl_error(GL_NO_ERROR);
 
 	piglit_glDeleteRenderbuffersOES(1, &rbo);
 
-- 
2.2.0



More information about the Piglit mailing list