<div dir="ltr">Thanks your help,<div><br></div><div>I used mesa 9.2.1 and it's contains this patch.</div><div><div><br></div><div>I set mesa source and gone previous errors but I gave these compile errors. I used opencl 1.2 branch:</div>
<div><br></div><div><div>/home/evil85/Development/beignet_opencl_1_2/src/intel/intel_dri_resource_sharing.c: In function ‘intel_get_gl_obj_from_texture’:</div><div>/home/evil85/Development/beignet_opencl_1_2/src/intel/intel_dri_resource_sharing.c:103:38: error: dereferencing pointer to incomplete type</div>
<div> obj = __mesa_lookup_texture(&intel->ctx, texture);</div><div> ^</div><div>/home/evil85/Development/beignet_opencl_1_2/src/intel/intel_dri_resource_sharing.c:109:42: error: dereferencing pointer to incomplete type</div>
<div> __mesa_test_texobj_completeness(&intel->ctx, obj);</div></div><div><br></div><div><br></div><div>Maybe I made some mistake? </div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/11/27 Zhigang Gong <span dir="ltr"><<a href="mailto:zhigang.gong@linux.intel.com" target="_blank">zhigang.gong@linux.intel.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The root cause of this is that the cl_khr_gl_sharing extension depends<br>
on a specific mesa version:<br>
<br>
92e6260c1960f78692417433206c38170ec1a625<br>
<br>
You can find your mesa source code tree. It should be in ${HOME}/mesa.<br>
Or you can check the CMakeCache.txt in your build directory to find<br>
the following statement:<br>
<br>
//Set to 1 if mesa source code is found, 0 otherwise<br>
MESA_SOURCE_FOUND:STRING=1<br>
<br>
//The mesa source directory which is needed for cl_khr_gl_sharing.<br>
MESA_SOURCE_PREFIX:PATH=dir-to-your-mesa-source-code<br>
<br>
You can enter the above mesa source code directory and checkout the above specific<br>
version and rebuild and install mesa, then build beignet again.<br>
<br>
If you don't want to use cl_khr_gl_sharing, you can just simply rename that<br>
mesa source code directory to another name or use ccmake to set MESA_SOURCE_FOUND<br>
to zero, then configure and regenerate the build files.<br>
MESA_SOURCE_FOUND 0<br>
<div><div class="h5"><br>
<br>
On Tue, Nov 26, 2013 at 11:11:16PM +0100, Robert Jobbagy wrote:<br>
> Sry, It's Ubuntu package bug, I reported it :<br>
> <a href="https://bugs.launchpad.net/ubuntu/+source/beignet/+bug/1255323" target="_blank">https://bugs.launchpad.net/ubuntu/+source/beignet/+bug/1255323</a><br>
><br>
> I tried master branch but I gave this knew error :<br>
><br>
> <a href="http://lists.freedesktop.org/archives/beignet/2013-August/001302.html" target="_blank">http://lists.freedesktop.org/archives/beignet/2013-August/001302.html</a><br>
><br>
> and I switch to opencl 1.2 branch and I gave this :<br>
><br>
> /home/evil85/Development/beignet_opencl_1_2/src/intel/intel_dri_resource_sharing.c:<br>
> In function ‘intel_get_gl_obj_from_texture’:<br>
> /home/evil85/Development/beignet_opencl_1_2/src/intel/intel_dri_resource_sharing.c:103:38:<br>
> error: dereferencing pointer to incomplete type<br>
> obj = __mesa_lookup_texture(&intel->ctx, texture);<br>
> ^<br>
> /home/evil85/Development/beignet_opencl_1_2/src/intel/intel_dri_resource_sharing.c:109:42:<br>
> error: dereferencing pointer to incomplete type<br>
> __mesa_test_texobj_completeness(&intel->ctx, obj);<br>
> ^<br>
> /home/evil85/Development/beignet_opencl_1_2/src/intel/intel_dri_resource_sharing.c:<br>
> In function ‘intelAcquireTexture’:<br>
> /home/evil85/Development/beignet_opencl_1_2/src/intel/intel_dri_resource_sharing.c:145:4:<br>
> warning: passing argument 2 of ‘intel_get_gl_obj_from_texture’ from<br>
> incompatible pointer type [enabled by default]<br>
> obj = intel_get_gl_obj_from_texture(driver, intel, target, level,<br>
> texture, face);<br>
> ^<br>
> /home/evil85/Development/beignet_opencl_1_2/src/intel/intel_dri_resource_sharing.c:96:1:<br>
> note: expected ‘struct intel_context *’ but argument is of type ‘struct<br>
> intel_context *’<br>
> intel_get_gl_obj_from_texture(void *driver,<br>
> ^<br>
> /home/evil85/Development/beignet_opencl_1_2/src/intel/intel_dri_resource_sharing.c:150:4:<br>
> warning: passing argument 2 of ‘intel_setup_cl_region_from_mipmap_tree’<br>
> from incompatible pointer type [enabled by default]<br>
> return intel_setup_cl_region_from_mipmap_tree(driver, intel, iobj->mt,<br>
> level, 0, region);<br>
> ^<br>
> /home/evil85/Development/beignet_opencl_1_2/src/intel/intel_dri_resource_sharing.c:52:1:<br>
> note: expected ‘struct intel_context *’ but argument is of type ‘struct<br>
> intel_context *’<br>
> intel_setup_cl_region_from_mipmap_tree(void *driver,<br>
> ^<br>
> /home/evil85/Development/beignet_opencl_1_2/src/intel/intel_dri_resource_sharing.c:<br>
> In function ‘intelReleaseTexture’:<br>
> /home/evil85/Development/beignet_opencl_1_2/src/intel/intel_dri_resource_sharing.c:163:4:<br>
> warning: passing argument 2 of ‘intel_get_gl_obj_from_texture’ from<br>
> incompatible pointer type [enabled by default]<br>
> obj = intel_get_gl_obj_from_texture(driver, intel, target, level,<br>
> texture, face);<br>
> ^<br>
> /home/evil85/Development/beignet_opencl_1_2/src/intel/intel_dri_resource_sharing.c:96:1:<br>
> note: expected ‘struct intel_context *’ but argument is of type ‘struct<br>
> intel_context *’<br>
> intel_get_gl_obj_from_texture(void *driver,<br>
> ^<br>
> make[2]: *** [src/CMakeFiles/cl.dir/intel/intel_dri_resource_sharing.c.o]<br>
> Error 1<br>
> make[1]: *** [src/CMakeFiles/cl.dir/all] Error 2<br>
> make: *** [all] Error 2<br>
><br>
><br>
> what is missing ?<br>
><br>
> I used this dependencies packages :<br>
><br>
> libdrm-dev<br>
> 2.4.46+git20130910.58d00888-0ubuntu0sarvatt<br>
> libdrm-intel1:amd64<br>
> 2.4.46+git20130910.58d00888-0ubuntu0sarvatt<br>
><br>
> llvm 3.2 and clang 3.2<br>
><br>
> and mesa 9.2.1<br>
><br>
> Thanks.<br>
><br>
><br>
> 2013/11/26 Robert Jobbagy <<a href="mailto:jobbagy.robert@gmail.com">jobbagy.robert@gmail.com</a>><br>
><br>
> > Hi guys,<br>
> ><br>
> > I use Ubuntu 13.10 with beignet 0.3 on IVB ( Intel HD 4000 ) and I used<br>
> > this opencl sample program :<br>
> > <a href="https://codeload.github.com/hpc12/tools/tar.gz/master" target="_blank">https://codeload.github.com/hpc12/tools/tar.gz/master</a><br>
> > from <a href="http://wiki.tiker.net/OpenCLHowTo" target="_blank">http://wiki.tiker.net/OpenCLHowTo</a><br>
> > and gave this error : fatal error: malformed or corrupted PCH file:<br>
> > 'could not find file<br>
> > '/build/buildd/beignet-0.3/obj-x86_64-linux-gnu/backend/src/ocl_stdlib.h'<br>
> > referenced by AST file' 1 error generated. *** build of 'sum' on 'Intel HD<br>
> > Graphics Family' said: *** (end of message) *** 'clBuildProgram' in<br>
> > 'cl-helper.c' on line 470 failed with error 'invalid program'. Aborted<br>
> > (core dumped)<br>
> ><br>
> ><br>
> > What can I do ?<br>
> ><br>
> > Thanks your time.<br>
> > --<br>
> > Best Regards,<br>
> ><br>
> > Robert<br>
> ><br>
><br>
><br>
><br>
> --<br>
> Best Regards,<br>
><br>
> Robert<br>
<br>
</div></div>> _______________________________________________<br>
> Beignet mailing list<br>
> <a href="mailto:Beignet@lists.freedesktop.org">Beignet@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/beignet" target="_blank">http://lists.freedesktop.org/mailman/listinfo/beignet</a><br>
<br>
_______________________________________________<br>
Beignet mailing list<br>
<a href="mailto:Beignet@lists.freedesktop.org">Beignet@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/beignet" target="_blank">http://lists.freedesktop.org/mailman/listinfo/beignet</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Best Regards,<br><br>Robert
</div>