[Piglit] [v8 13/13] tests/spec: EXT_image_dma_buf_import intel img-ext with dma-buf only
Chad Versace
chad.versace at linux.intel.com
Wed Jul 31 16:14:33 PDT 2013
> +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.
> +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.
More information about the Piglit
mailing list