Beignet previously support a mesa version. But as mesa changes, things may not 
work correct now.
So we disable the mesa extension in below commit.
commit 47ebe2e96c777d9fd2ba07cef0e681eaff243fa1
Author: Zhigang Gong <zhigang.g...@intel.com>
Date:   Fri Dec 5 10:19:21 2014 +0800

    CL: Don't find mesa source code.

    As build with mesa has been broken for a long time, we
    disable it to avoid potential build problem.

    Signed-off-by: Zhigang Gong <zhigang.g...@intel.com>
Reviewed-by: "Yang, Rong R" rong.r.y...@intel.com<mailto:rong.r.y...@intel.com>

The last workable mesa version was 10.1, which is very old.
commit c2d2853c55d7ab12e422301d1c359b4f736b87d8
Author: Abrahm Scully <abrahm.scu...@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.scu...@gmail.com>
Reviewed-by: Zhigang Gong 
zhigang.g...@linux.intel.com<mailto:zhigang.g...@linux.intel.com>
If you are interested, you can take a try to see whether the latest mesa is 
easy to support.

Thanks!
Ruiling
From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of Sean 
Lynch
Sent: Tuesday, March 29, 2016 9:41 PM
To: Pan, Xiuli <xiuli....@intel.com>
Cc: beignet@lists.freedesktop.org
Subject: Re: [Beignet] clCreateFromGLTexture working?


Thanks for the pointer to that file. That's helpful. I'm using ocl-icd to load 
Beignet, because the Beignet package on Arch requires "libcl" and assumes you 
will be using an ICD loader. If I try to use Beignet's libcl.so directly, 
PyOpenCL fails to load with missing symbols for clCreateGLBuffer and friends. I 
think all the extension checking happens at compile time, not runtime, but with 
ocl-icd one would obviously need some runtime checking.

My goal is realtime raytracing, so having to copy back and forth to main memory 
is not an attractive option. Is there any other option available to me besides 
cl_khr_gl_sharing? I'd prefer not to have to use GLSL, but that's starting to 
look like my only option. It may well be the better approach if I want any hope 
of having my code eventually run on Android anyway.

The docs claim clCreateFromGLTexture works[1], so they should probably be 
updated:

"Currently, the working APIs are clCreateFromGLTexture,clCreateFromGLTexture2D."

[1] https://www.freedesktop.org/wiki/Software/Beignet/
On Mar 28, 2016 23:28, "Pan, Xiuli" 
<xiuli....@intel.com<mailto:xiuli....@intel.com>> wrote:
Hi Sean,

It seems we do not support API clCreateFromGLTexture in beignet, you can get 
what api we support from the file src/cl_khr_icd.c.
If PyOpenCL can run into this maybe there is something wrong with the device 
extension check either for them or for beignet. I will recheck about this and 
give you a clear reply then.

Thanks
Xiuli

From: Beignet 
[mailto:beignet-boun...@lists.freedesktop.org<mailto:beignet-boun...@lists.freedesktop.org>]
 On Behalf Of Sean Lynch
Sent: Tuesday, March 29, 2016 2:15 PM
To: beignet@lists.freedesktop.org<mailto:beignet@lists.freedesktop.org>
Subject: [Beignet] clCreateFromGLTexture working?

I'm getting a segfault with the following stack when trying to call 
clCreateFromGLTexture from PyOpenCL (which just got preliminary support for it):

#0  0x0000000000000000 in ?? ()
#1  0x00007f8b6af995bd in clCreateFromGLTexture () from /usr/lib/libOpenCL.so.1
#2  0x00007f8b6b1f3a78 in create_from_gl_texture () from 
/home/seanl/project/voxel/pyenv/lib/python3.5/site-packages/pyopencl-2015.2.4-py3.5-linux-x86_64.egg/pyopencl/_cffi.cpython-35m-x86_64-linux-gnu.so<http://cffi.cpython-35m-x86_64-linux-gnu.so>
#3  0x00007f8b6b1cb10b in _cffi_f_create_from_gl_texture(_object*, _object*) () 
from 
/home/seanl/project/voxel/pyenv/lib/python3.5/site-packages/pyopencl-2015.2.4-py3.5-linux-x86_64.egg/pyopencl/_cffi.cpython-35m-x86_64-linux-gnu.so<http://cffi.cpython-35m-x86_64-linux-gnu.so>
#4  0x00007f8b75f755e9 in PyCFunction_Call () from /usr/lib/libpython3.5m.so.1.0
#5  0x00007f8b75fed5f1 in PyEval_EvalFrameEx () from 
/usr/lib/libpython3.5m.so.1.0
#6  0x00007f8b75fee9e2 in ?? () from /usr/lib/libpython3.5m.so.1.0
#7  0x00007f8b75feeac3 in PyEval_EvalCodeEx () from 
/usr/lib/libpython3.5m.so.1.0
#8  0x00007f8b75f58b98 in ?? () from /usr/lib/libpython3.5m.so.1.0
#9  0x00007f8b75f2e0da in PyObject_Call () from /usr/lib/libpython3.5m.so.1.0
#10 0x00007f8b75f44d64 in ?? () from /usr/lib/libpython3.5m.so.1.0
#11 0x00007f8b75f2e0da in PyObject_Call () from /usr/lib/libpython3.5m.so.1.0
#12 0x00007f8b75f8aa10 in ?? () from /usr/lib/libpython3.5m.so.1.0
#13 0x00007f8b75f88de6 in ?? () from /usr/lib/libpython3.5m.so.1.0
#14 0x00007f8b75f2e0da in PyObject_Call () from /usr/lib/libpython3.5m.so.1.0
#15 0x00007f8b75fe74bc in PyEval_EvalFrameEx () from 
/usr/lib/libpython3.5m.so.1.0
#16 0x00007f8b75fed942 in PyEval_EvalFrameEx () from 
/usr/lib/libpython3.5m.so.1.0
#17 0x00007f8b75fee9e2 in ?? () from /usr/lib/libpython3.5m.so.1.0
#18 0x00007f8b75feeac3 in PyEval_EvalCodeEx () from 
/usr/lib/libpython3.5m.so.1.0
#19 0x00007f8b75feeaeb in PyEval_EvalCode () from /usr/lib/libpython3.5m.so.1.0
#20 0x00007f8b7600dc64 in ?? () from /usr/lib/libpython3.5m.so.1.0
#21 0x00007f8b76010175 in PyRun_FileExFlags () from 
/usr/lib/libpython3.5m.so.1.0
#22 0x00007f8b760102e6 in PyRun_SimpleFileExFlags () from 
/usr/lib/libpython3.5m.so.1.0
#23 0x00007f8b760270f4 in Py_Main () from /usr/lib/libpython3.5m.so.1.0
#24 0x0000000000400af7 in main ()

Should this work with current Beignet master?
_______________________________________________
Beignet mailing list
Beignet@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to