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

davyaxel at free.fr davyaxel at free.fr
Sun Dec 8 12:51:41 PST 2013


On 08/12/2013, Gaetan Nadon wrote :
> On 13-12-08 10:38 AM, davyaxel at free.fr wrote:
>> The Dri3 helpers rely on some EGL extension, and it would be great
>> to disable automatically the compilation of the DRI3 code if the
>> EGL extensions are not defined.
>>
>> For example EGL_EXT_image_dma_buf_import is recent, and the
>> definition of the symbols around the extension might be missing in the
>> OpenGL library.
> Looks like AC_CHECK_DECLS might be the macro to use. Checking for one of symbols from the extension might be good enough. For example, EGL_LINUX_DMA_BUF_EXT.
>>
>> Another issue is that we need EGLNativePixmapType to be (struct gbm_bo*).
>
>     typedef struct gbm_bo      *EGLNativePixmapType; 
>
> AC_CHECK_MEMBERS can be used to check for the declaration of members that would only be defined in the gbm version of EGLNativePixmapType.
> Can you provide a list of "things" to check? I can write it up, test to see if it works the way I expect and you can then use the #define it the code. If you need something other than the new #define in config.h, let me know what that might be. It could be, for example, to abort the configuration, or print a warning like "you asked for [...], but it is not possible because [...] is not available.
>
> In the mean time, I'll get back to the libgbm v9 issue. I suppose one part of the code can make do with <9 and another part needs >=9. Seems ok. I need to spend some more time understanding this module. I was surprised glamor_egl.c was not being compiled by the makefile given I have all the prereqs.

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>.

Perhaps it should be good to check <drm_fourcc.h> exists, and that it defines DRM_FORMAT_ARGB8888.

For EGLNativePixmapType, I've no idea of what we could check.

Axel Davy


More information about the Glamor mailing list