[Glamor] [PATCH v3] Add DRI3 support to glamor

Gaetan Nadon memsize at videotron.ca
Sun Dec 8 17:12:45 PST 2013


On 13-12-08 03:51 PM, davyaxel at free.fr wrote:
> I've searched, and it should do to check if "EGL_KHR_image", "EGL_KHR_gl_texture_2D_image" and "EGL_EXT_image_dma_buf_import" are defined.
> Those should be defined in <EGL/eglext.h>.
The <EGL/eglext.h> header is include in the "egl" software package.

This is the code to add to configure.ac to check for the 3 symbols which
should be added after the PKG_CHECK_MODULES for EGL.

    SAVE_CFLAGS=$CFLAGS
    CFLAGS="$EGL_CFLAGS"
    AC_CHECK_DECLS([EGL_KHR_image, EGL_KHR_gl_texture_2D_image,
    EGL_EXT_image_dma_buf_import], [], [],[
             AC_INCLUDES_DEFAULT
             #include <EGL/egl.h>
             #include <EGL/eglext.h>
    ])
    CFLAGS=$SAVE_CFLAGS

When you run ./autogen.sh, a new ./configure script is created which
includes a short C program to test if the symbols are declared. Running
the new script yields this output:

    checking whether EGL_KHR_image is declared... yes
    checking whether EGL_KHR_gl_texture_2D_image is declared... yes
    checking whether EGL_EXT_image_dma_buf_import is declared... yes

New #defines have also been added in config.h:

    /* Define to 1 if you have the declaration of
    `EGL_EXT_image_dma_buf_import',
       and to 0 if you don't. */
    #define HAVE_DECL_EGL_EXT_IMAGE_DMA_BUF_IMPORT 1

    /* Define to 1 if you have the declaration of
    `EGL_KHR_gl_texture_2D_image',
       and to 0 if you don't. */
    #define HAVE_DECL_EGL_KHR_GL_TEXTURE_2D_IMAGE 1

    /* Define to 1 if you have the declaration of `EGL_KHR_image', and
    to 0 if you
       don't. */
    #define HAVE_DECL_EGL_KHR_IMAGE 1

Should the C test program fails when running ./configure, the compiler
output and the program listing is written in config.log.

Have a go at it and experiment. See if this will help you write
conditional around the egl extension.

Skipping the includes, this is the short C program:

     int
     main ()
     {
     #ifndef EGL_KHR_image
     #ifdef __cplusplus
       (void) EGL_KHR_image;
     #else
       (void) EGL_KHR_image;
     #endif
     #endif
       ;
       return 0;
     }




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/glamor/attachments/20131208/812d5459/attachment.html>


More information about the Glamor mailing list