Re: gr-fosphor on AMD RX 550

2020-02-26 Thread Johannes Demel

Hi Sylvain,

It tried the GLFW version but the error is the same, the shaders fail.

How did you manage to install OpenCL + amdgpu? I tried that and thought 
I had succeeded but apparently that's not the case.


Cheers

PS: Yeah, taking it off the list was an error.


On 26.02.20 13:39, Sylvain Munaut wrote:

Hi Johannes,



I really hoped I could install AMD OpenCL on top of the open driver.
How do you do that? I guess, if I install the correct OpenCL + amdgpu version, 
this should actually work.


Yeah, that's what I did ... I use the AMD binary OpenCL stuff, but I
continued using the amdgpu driver.



It works and look fine. This is part of the output.


Oh, so that's interesting. That means the issue is somewhere in the
way the OpenGL context is setup by Qt, that's really strange.
Can you try the GLFW version of the fosphor GR block ?



If I do `./main` without an argument, a window is opened and unresponsive.


Yeah, that's expected, it's reading  sample data from stdin in that mode.


Cheers,

 Sylvain


PS: I re-cc'd the mailing list since taking it off seemed like an error ...





Re: gr-fosphor on AMD RX 550

2020-02-26 Thread Sylvain Munaut
Hi Johannes,


> I really hoped I could install AMD OpenCL on top of the open driver.
> How do you do that? I guess, if I install the correct OpenCL + amdgpu 
> version, this should actually work.

Yeah, that's what I did ... I use the AMD binary OpenCL stuff, but I
continued using the amdgpu driver.


> It works and look fine. This is part of the output.

Oh, so that's interesting. That means the issue is somewhere in the
way the OpenGL context is setup by Qt, that's really strange.
Can you try the GLFW version of the fosphor GR block ?


> If I do `./main` without an argument, a window is opened and unresponsive.

Yeah, that's expected, it's reading  sample data from stdin in that mode.


Cheers,

Sylvain


PS: I re-cc'd the mailing list since taking it off seemed like an error ...



Re: gr-fosphor on AMD RX 550

2020-02-25 Thread Sylvain Munaut
Hi,


> I attached the output of glxinfo and ran glmark2. The output is attached
> in this mail.

So from the GL info it looks like the OpenGL drivers you have are the
one from AMD and not the one from Mesa. I never used those.

Unfortunately, since they don't actually _report_ any error, I don't
have any clue what to do or how to debug that remotely ...
(and I checked the code by putting an error in the shader on my
machine, here I do correctly get the error message printed out, so
it's relly the AMD driver screwing up here)

You can try the standalone 'main' test (you can build by going to the
lib/fosphor subdir of the source tree and type make) and then run it
by giving it a .cfile as argument. This might give some clue (because
it's not tangled in the whole thread mess of Qt and gnuradio) as to
what's going on.


> Currently, I'm stuck with a 5.0 kernel because the system won't boot
> with newer kernels due to some MCS checks.

Is that the issue with Ryzen 7 ?  I know I had to use a kernel from a
PPA for my machine because the one from the official 19.10 wouldn't
boot either.


Cheers,

   Sylvain



AW: gr-fosphor on AMD RX 550

2020-02-25 Thread Johannes Demel

Hi Sylvain,

I attached the output of glxinfo and ran glmark2. The output is attached 
in this mail. I'm glad that this is supposed to run on my machine.
Currently, I'm stuck with a 5.0 kernel because the system won't boot 
with newer kernels due to some MCS checks. I'm confident this is fixed 
in kernel 5.5 and thus I'll migrate to Ubuntu 20.04 as soon as it's 
available. I hope that'll make it easier as well.


Cheers
Johannes


Von: Sylvain Munaut <246...@gmail.com>
Gesendet: Montag, 24. Februar 2020 23:47
An: Johannes Demel
Cc: discuss-gnuradio@gnu.org
Betreff: Re: gr-fosphor on AMD RX 550

Hi Johannes,

First off the RX550 should work just fine. I have a RX570 and run
fosphor on it with no issues.
I am using Ubuntu 19.10 though which is much newer kernel and newer Mesa.

The OpenCL procedure looks fine and if it gets to that point, that
also worked fine. For some reason the shader fail ... but it's
supposed to print the error message which it's obviously not doing :/

Can you provide the full output of glxinfo and also try some open gl
application / benchmark (like glmark) see if they run fine ?

Cheers,

 Sylvain



$ glmark2
===
glmark2 2014.03+git20150611.fa71af2d
===
OpenGL Information
GL_VENDOR: ATI Technologies Inc.
GL_RENDERER:   Radeon RX 550 Series
GL_VERSION:4.6.13581 Compatibility Profile Context 19.50
===
[build] use-vbo=false: FPS: 4433 FrameTime: 0.226 ms
[build] use-vbo=true: FPS: 7157 FrameTime: 0.140 ms
[texture] texture-filter=nearest: FPS: 6887 FrameTime: 0.145 ms
[texture] texture-filter=linear: FPS: 6761 FrameTime: 0.148 ms
[texture] texture-filter=mipmap: FPS: 6860 FrameTime: 0.146 ms
[shading] shading=gouraud: FPS: 6629 FrameTime: 0.151 ms
[shading] shading=blinn-phong-inf: FPS: 6572 FrameTime: 0.152 ms
[shading] shading=phong: FPS: 6373 FrameTime: 0.157 ms
[shading] shading=cel: FPS: 6317 FrameTime: 0.158 ms
[bump] bump-render=high-poly: FPS: 4981 FrameTime: 0.201 ms
[bump] bump-render=normals: FPS: 7201 FrameTime: 0.139 ms
[bump] bump-render=height: FPS: 7020 FrameTime: 0.142 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 6108 FrameTime: 0.164 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 3650 FrameTime: 
0.274 ms

[pulsar] light=false:quads=5:texture=false: FPS: 6707 FrameTime: 0.149 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: 
FPS: 2857 FrameTime: 0.350 ms

[desktop] effect=shadow:windows=4: FPS: 5108 FrameTime: 0.196 ms
[buffer] 
columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: 
FPS: 1094 FrameTime: 0.914 ms
[buffer] 
columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: 
FPS: 2714 FrameTime: 0.368 ms
[buffer] 
columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: 
FPS: 1320 FrameTime: 0.758 ms

[ideas] speed=duration: FPS: 5700 FrameTime: 0.175 ms
[jellyfish] : FPS: 5068 FrameTime: 0.197 ms
[terrain] : FPS: 569 FrameTime: 1.757 ms
[shadow] : FPS: 5056 FrameTime: 0.198 ms
[refract] : FPS: 1280 FrameTime: 0.781 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 7313 FrameTime: 
0.137 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 7263 FrameTime: 
0.138 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 7299 FrameTime: 
0.137 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 7295 
FrameTime: 0.137 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 7299 
FrameTime: 0.137 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 7260 
FrameTime: 0.138 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 7266 
FrameTime: 0.138 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 7244 
FrameTime: 0.138 ms

===
  glmark2 Score: 5535 
===



name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: AMD
server glx version string: 1.4
server glx extensions:
GLX_ARB_create_context, GLX_ARB_create_context_profile, 
GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample, 
GLX_EXT_create_context_es2_profile, GLX_EXT_framebuffer_sRGB, 
GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, 
GLX_EXT_visual_rating, GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, 
GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig, 
GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_SGI_swap_control
client glx vendor string: AMD
client glx version string: 1.4
client glx extensions:
GLX_ARB_context_flush_control, GLX_ARB_

Re: gr-fosphor on AMD RX 550

2020-02-24 Thread Sylvain Munaut
Hi Johannes,

First off the RX550 should work just fine. I have a RX570 and run
fosphor on it with no issues.
I am using Ubuntu 19.10 though which is much newer kernel and newer Mesa.

The OpenCL procedure looks fine and if it gets to that point, that
also worked fine. For some reason the shader fail ... but it's
supposed to print the error message which it's obviously not doing :/

Can you provide the full output of glxinfo and also try some open gl
application / benchmark (like glmark) see if they run fine ?

Cheers,

 Sylvain



gr-fosphor on AMD RX 550

2020-02-24 Thread Johannes Demel

Hi all,

We have some new AMD machines with RX 550 graphics. I want to run 
gr-fosphor on them. So far I've failed to make it work.


It's an AMD system with RX 550 and Ubuntu 18.04 with amdgpu open source 
drivers. I work with GR 3.8-master (or 3.9.0.0-git) 
`4f53ac5a76e3ab05960a81905a570cd74d2708d7`


Since it was quite tricky for me to install OpenCL and make gr-fosphor 
find it, I just document my workflow really quick.


I found this website:
https://einsteinathome.org/content/quick-guide-how-install-opencl-amd-gpus-linux-kubuntu-1804-and-similar-distro

First, I went to amd.com and got the drivers for my GPU:
https://www.amd.com/en/support/graphics/radeon-500-series/radeon-rx-500-series/radeon-rx-550

Then I ran:
./amdgpu-pro-install --opencl=legacy,pal
This does only install OpenCL

Further, I had to install these packages on Ubuntu:
libfreetype6-dev
ocl-icd-opencl-dev
libglfw3-dev

Also, `clinfo` was useful because it gives you some info about your system.

So finally, I could compile and install `gr-fosphor`. It appears in GRC 
and I can plug the block (Qt version) in a flowgraph.


But if I run this flowgraph, I get the following error:
```
[!] gl_cmap shader compilation failed (cmap_simple.glsl)
[w] Color map shader 'simple' failed to load, will use fallback
[!] gl_cmap shader compile log :

[!] gl_cmap shader compilation failed (cmap_bicubic.glsl)
[w] Color map shader 'bicubic' failed to load, will use fallback
[!] gl_cmap shader compile log :

[!] gl_cmap shader compilation failed (cmap_fallback.glsl)
[!] Color map shader 'fallback' failed, aborting
gr::log :ERROR: qt_sink_c0 - Failed to initialize fosphor
```

I have no idea why and so far googling brought me to some macports 
threads that were related to Intel GPUs on MacOS.


Did someone already succeed with gr-fosphor on this hardware? Do I have 
suitable hardware? Did I fail the installation process somewhere? Do I 
need to provide additional info?


Cheers
Johannes