[Beignet] clCreateFromGLTexture working?
Sean Lynch
seanl at literati.org
Tue Mar 29 13:40:52 UTC 2016
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.pan at 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-bounces at lists.freedesktop.org] *On Behalf
> Of *Sean Lynch
> *Sent:* Tuesday, March 29, 2016 2:15 PM
> *To:* beignet at 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
>
> #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
>
> #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?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/beignet/attachments/20160329/16c35ebf/attachment.html>
More information about the Beignet
mailing list