Cross-posting an inquiry I sent yesterday to discuss-gnuradio; perhaps osmocom-sdr may be a more appropriate venue. ---------- Forwarded message ---------- From: "Card, Stu" stu.card@axenterprize.com Date: May 7, 2016 4:08 PM Subject: gr-fosphor: n00b run-time errors with benchmark tool and sink block on AMD APU To: discuss-gnuradio@gnu.org Cc:
My apologies for this n00b question, but I have not found answers in the
usual places.
I have carefully followed the instructions at
http://sdr.osmocom.org/trac/wiki/fosphor
For building the benchmark tool, I replaced the line
make LDFLAGS=-L/opt/intel/opencl-1.2-4.5.0.8/lib64
with
make LDFLAGS=-L/opt/AMDAPPSDK-3.0/lib/x86_64/sdk
for my AMD APU (CPU w/on-chip GPU) hardware
and
edited the Makefile to remove "-Werror" from the CFLAGS as otherwise the warning about cl_create_command_queue being deprecated causes Make to give up.
After thus building the benchmark tool, running main yields
libEGL warning: DRI2: failed to authenticate [+] Selected device: Devastator libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 157 (GLX) Minor opcode of failed request: 5 (X_GLXMakeCurrent) Serial number of failed request: 30 Current serial number in output stream: 30C
Attempting to use the GRC fosphor sink block in a trivial flowgraph (with a signal source, noise source and add operation, intended to give me a tone with a noise floor), I get no output until I manually terminate it, and then in the GRC message pane I see
libEGL warning: DRI2: failed to find _glapi_get_proc_address [+] Selected device: Devastator [!] CL Error (-34, /home/stu/gr-fosphor/lib/fosphor/cl.c:464): Unable to share waterfall texture into OpenCL context
The same flowgraph, with the fosphor sink replaced by a QT GUI waterfall sink, works as expected.
Any pointers would be greatly appreciated.
-- Stu Card stu.card@axenterprize.com
Hi,
libEGL warning: DRI2: failed to authenticate [+] Selected device: Devastator libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 157 (GLX) Minor opcode of failed request: 5 (X_GLXMakeCurrent) Serial number of failed request: 30 Current serial number in output stream: 30C
Your GL setup seems broken ...
Post the output of glxinfo and clinfo
libEGL warning: DRI2: failed to find _glapi_get_proc_address
Again, something seems broken in your OpenGL setup
[+] Selected device: Devastator [!] CL Error (-34, /home/stu/gr-fosphor/lib/fosphor/cl.c:464): Unable to share waterfall texture into OpenCL context
So you GL/CL drivers reported that they could share info and it allowed fosphor to create a context for it, then when asked to actually share info, it refuses wit CL_INVALID_CONTEXT ...
Look in lib/fosphor/cl.c in the cl_do_init function at the very beginning of the function and comment out : " self->flags |= FLG_FOSPHOR_USE_CLGL_SHARING; "
This will prevent it to try and share data between CL and GL ...
Cheers,
Sylvain
glxinfo > https://drive.google.com/file/d/0B4pXeWtf9qhpN3ViLWpTNlRJWEU/view?usp=sharin...
clinfo > https://drive.google.com/file/d/0B4pXeWtf9qhpYlZQXzJHZWxHMXc/view?usp=sharin...
Commenting out the CLGL sharing flag and rebuilding the benchmark tool still yields the first two lines of the previous error messages: libEGL warning: DRI2: failed to authenticate [+] Selected device: Devastator
Behavior of sink block in GRC is, of course, unchanged, as I have not yet changed any code there.
Comparing the remaining error running the benchmark tool with that running the sink block in GRC, it appears we are down to a single error, common to both run times.
On Sun, May 8, 2016 at 2:18 PM, Sylvain Munaut 246tnt@gmail.com wrote:
Hi,
libEGL warning: DRI2: failed to authenticate [+] Selected device: Devastator libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 157 (GLX) Minor opcode of failed request: 5 (X_GLXMakeCurrent) Serial number of failed request: 30 Current serial number in output stream: 30C
Your GL setup seems broken ...
Post the output of glxinfo and clinfo
libEGL warning: DRI2: failed to find _glapi_get_proc_address
Again, something seems broken in your OpenGL setup
[+] Selected device: Devastator [!] CL Error (-34, /home/stu/gr-fosphor/lib/fosphor/cl.c:464): Unable to share waterfall texture into OpenCL context
So you GL/CL drivers reported that they could share info and it allowed fosphor to create a context for it, then when asked to actually share info, it refuses wit CL_INVALID_CONTEXT ...
Look in lib/fosphor/cl.c in the cl_do_init function at the very beginning of the function and comment out : " self->flags |= FLG_FOSPHOR_USE_CLGL_SHARING; "
This will prevent it to try and share data between CL and GL ...
Cheers,
Sylvain
Hi,
On Sun, May 8, 2016 at 10:07 PM, Card, Stu stu.card@axenterprize.com wrote:
glxinfo > https://drive.google.com/file/d/0B4pXeWtf9qhpN3ViLWpTNlRJWEU/view?usp=sharin...
clinfo > https://drive.google.com/file/d/0B4pXeWtf9qhpYlZQXzJHZWxHMXc/view?usp=sharin...
Commenting out the CLGL sharing flag and rebuilding the benchmark tool still yields the first two lines of the previous error messages: libEGL warning: DRI2: failed to authenticate [+] Selected device: Devastator
Just google that libEGL error, you'll see there is a bunch of similar issues. It all boils down to something being screwed up in your GL libs and has nothing to do with fosphor itself.
Cheers,
Sylvain