[Piglit] [v8 13/13] tests/spec: EXT_image_dma_buf_import intel img-ext with dma-buf only

Pohjolainen, Topi topi.pohjolainen at intel.com
Fri Aug 9 03:21:06 PDT 2013


On Wed, Jul 31, 2013 at 04:14:33PM -0700, Chad Versace wrote:
> >+enum piglit_result
> >+piglit_display(void)
> >+{
> >+	GLuint tex;
> >+	enum piglit_result result = PIGLIT_FAIL;
> >+	const unsigned char src[] = { 0x00, 0x00, 0x00, 0x00 };
> >+	EGLImageKHR img = create_tex_based_egl_image(1, 1, src);
> >+
> >+	if (img == EGL_NO_IMAGE_KHR)
> >+	       return PIGLIT_FAIL;
> >+
> >+	glGenTextures(1, &tex);
> >+	glBindTexture(GL_TEXTURE_EXTERNAL_OES, tex);
> >+
> >+	glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES,
> >+			       (GLeglImageOES)img);
> >+
> >+	if (piglit_check_gl_error(GL_INVALID_OPERATION))
> >+	       result = PIGLIT_PASS;
> >+
> >+	glDeleteTextures(1, &tex);
> 
> The texture is deleted twice, once in create_tex_based_egl_image
> and again here.

It is different texture, in 'create_tex_based_egl_image()' it is the texture
which is used as the target for the 'eglCreateImageKHR()'. Here this is the
external for which the image is trying to be bound as target.

> 
> 
> >+void
> >+piglit_init(int argc, char **argv)
> >+{
> >+	static const char intel_id[] = "Intel Open Source Technology Center";
> >+	const char *vendor_str;
> >+
> >+	piglit_require_egl_extension("EGL_EXT_image_dma_buf_import");
> 
> This test also requires  EGL_KHR_gl_texture_2d_image.

Yes, I'll add it. It is missing also in the previous test.


More information about the Piglit mailing list