[Beignet] [Mesa-dev] Beignet Mesa EGL extension
Emil Velikov
emil.l.velikov at gmail.com
Sun Jun 22 11:37:20 PDT 2014
On 19/06/14 12:25, Steven Newbury wrote:
> 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.
>
Assuming that by "other intel driver" you mean "the driver not
written/supported by Intel", I believe that you're in a mistake. The i915 is
not the same as i915g. The former is the original and supported classic DRI
driver while the latter is a gallium based one, written by Stephane Marchesin
and resides at src/gallium/drivers/i915.
Hope this clears things a bit.
Emil
>> ${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;
>
>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
More information about the Beignet
mailing list