[Mesa-dev] Beignet Mesa EGL extension

Steven Newbury steve at snewbury.org.uk
Thu Jun 19 04:25:53 PDT 2014


I was looking at getting Beignet compiling against current mesa working
again a few weeks ago. Really there needs to be some coordination with
the Mesa devs to provide a suitable API since what was being used has
been since removed. To that end; I've cc'd mesa-dev, hopefully there can
be progress made.

As to my own efforts; unfortunately, after making some progress, I
accidentally lost my patches(!), but since I spent a while reading the
code, I'm sure the below commit which has attempted to at least get it
working with 10.1 is only partially right. See inline.  


> commit c2d2853c55d7ab12e422301d1c359b4f736b87d8
> Author: Abrahm Scully <abrahm.scully at gmail.com>
> Date:   Wed Jun 18 22:28:08 2014 -0400
> 
>     Fix build with mesa 10.1.
>     
>     Mesa renamed some constants and a directory.
>     
>     Signed-off-by: Abrahm Scully <abrahm.scully at gmail.com>
>     Reviewed-by: Zhigang Gong <zhigang.gong at linux.intel.com>
> 
> diff --git a/CMake/FindMesaSrc.cmake b/CMake/FindMesaSrc.cmake
> index c1d4fc6..978cb4e 100644
> --- a/CMake/FindMesaSrc.cmake
> +++ b/CMake/FindMesaSrc.cmake
> @@ -18,7 +18,7 @@ SET(MESA_SOURCE_INCLUDES ${MESA_SOURCE_PREFIX}/src/mesa
>                           ${MESA_SOURCE_PREFIX}/include
>                           ${MESA_SOURCE_PREFIX}/src/mapi
>                           ${MESA_SOURCE_PREFIX}/src/mesa/drivers/dri/i965/
> -                         ${MESA_SOURCE_PREFIX}/src/mesa/drivers/dri/intel/
> +                         ${MESA_SOURCE_PREFIX}/src/mesa/drivers/dri/i915/

The i915 is the "other" intel driver, it's *wrong* to include the
headers even though they happen to provide the missing definitions which
were in the headers present in the common "intel" directory.  If they're
still valid for i965 it would be better to define them in the beignet
source until upsteam Mesa provides an API for beignet to use.

>                           ${MESA_SOURCE_PREFIX}/src/mesa/drivers/dri/common/)
>  SET(MESA_SOURCE_FOUND 1 CACHE STRING "Set to 1 if mesa source code is found, 0 otherwise")
>  ELSE(MESA_SOURCE_PREFIX)
> diff --git a/src/intel/intel_dri_resource_sharing.c b/src/intel/intel_dri_resource_sharing.c
> index b31844e..188c1fa 100644
> --- a/src/intel/intel_dri_resource_sharing.c
> +++ b/src/intel/intel_dri_resource_sharing.c
> @@ -119,12 +119,12 @@ intel_get_gl_obj_from_texture(void *driver,
>  }
>  
>  static GLenum
> -get_cl_gl_format(gl_format format)
> +get_cl_gl_format(mesa_format format)
>  {
>     switch (format) {
> -   case MESA_FORMAT_RGBA8888:
> +   case MESA_FORMAT_R8G8B8A8_UNORM:
>        return GL_RGBA;
> -   case MESA_FORMAT_ARGB8888:
> +   case MESA_FORMAT_A8R8G8B8_UNORM:
>        return GL_BGRA;
>     default:
>        return GL_BGRA;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140619/ee954a41/attachment.sig>


More information about the mesa-dev mailing list