<p dir="ltr">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.</p>
<p dir="ltr">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.</p>
<p dir="ltr">The docs claim clCreateFromGLTexture works[1], so they should probably be updated:</p>
<p dir="ltr">"Currently, the working APIs are clCreateFromGLTexture,clCreateFromGLTexture2D."</p>
<p dir="ltr">[1] <a href="https://www.freedesktop.org/wiki/Software/Beignet/">https://www.freedesktop.org/wiki/Software/Beignet/</a></p>
<div class="gmail_quote">On Mar 28, 2016 23:28, "Pan, Xiuli" <<a href="mailto:xiuli.pan@intel.com">xiuli.pan@intel.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hi Sean,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">It seems we do not support API clCreateFromGLTexture in beignet, you can get what api we support from the file
<a name="m_-188448345257385386__MailEndCompose">src/cl_khr_icd.c.<u></u><u></u></a></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Thanks<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Xiuli<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><a name="m_-188448345257385386______replyseparator"></a><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Beignet [mailto:<a href="mailto:beignet-bounces@lists.freedesktop.org" target="_blank">beignet-bounces@lists.freedesktop.org</a>]
<b>On Behalf Of </b>Sean Lynch<br>
<b>Sent:</b> Tuesday, March 29, 2016 2:15 PM<br>
<b>To:</b> <a href="mailto:beignet@lists.freedesktop.org" target="_blank">beignet@lists.freedesktop.org</a><br>
<b>Subject:</b> [Beignet] clCreateFromGLTexture working?<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">I'm getting a segfault with the following stack when trying to call clCreateFromGLTexture from PyOpenCL (which just got preliminary support for it):<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">#0 0x0000000000000000 in ?? ()<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#1 0x00007f8b6af995bd in clCreateFromGLTexture () from /usr/lib/libOpenCL.so.1<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#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/_<a href="http://cffi.cpython-35m-x86_64-linux-gnu.so" target="_blank">cffi.cpython-35m-x86_64-linux-gnu.so</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#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/_<a href="http://cffi.cpython-35m-x86_64-linux-gnu.so" target="_blank">cffi.cpython-35m-x86_64-linux-gnu.so</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#4 0x00007f8b75f755e9 in PyCFunction_Call () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#5 0x00007f8b75fed5f1 in PyEval_EvalFrameEx () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#6 0x00007f8b75fee9e2 in ?? () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#7 0x00007f8b75feeac3 in PyEval_EvalCodeEx () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#8 0x00007f8b75f58b98 in ?? () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#9 0x00007f8b75f2e0da in PyObject_Call () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#10 0x00007f8b75f44d64 in ?? () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#11 0x00007f8b75f2e0da in PyObject_Call () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#12 0x00007f8b75f8aa10 in ?? () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#13 0x00007f8b75f88de6 in ?? () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#14 0x00007f8b75f2e0da in PyObject_Call () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#15 0x00007f8b75fe74bc in PyEval_EvalFrameEx () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#16 0x00007f8b75fed942 in PyEval_EvalFrameEx () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#17 0x00007f8b75fee9e2 in ?? () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#18 0x00007f8b75feeac3 in PyEval_EvalCodeEx () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#19 0x00007f8b75feeaeb in PyEval_EvalCode () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#20 0x00007f8b7600dc64 in ?? () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#21 0x00007f8b76010175 in PyRun_FileExFlags () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#22 0x00007f8b760102e6 in PyRun_SimpleFileExFlags () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#23 0x00007f8b760270f4 in Py_Main () from /usr/lib/libpython3.5m.so.1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#24 0x0000000000400af7 in main ()<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Should this work with current Beignet master?<u></u><u></u></p>
</div>
</div>
</div>
</div>
</blockquote></div>