<div dir="ltr"><div>Hi Sylvain,</div><div><br></div><div>Thanks for the help!</div><div><br></div><div>I recompiled and reinstalled gr-fosphor with your modifications, but the output of the error is exactly the same. Maybe I need to enable debugging somewhere else as well?</div><div><br></div><div>Regards,</div><div>Csaba<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Sylvain Munaut <<a href="mailto:tnt@246tnt.com">tnt@246tnt.com</a>> ezt írta (időpont: 2021. jan. 19., K, 9:18):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
> [!] gl_cmap shader compilation failed (cmap_simple.glsl)<br>
> [w] Color map shader 'simple' failed to load, will use fallback<br>
> [!] gl_cmap shader compilation failed (cmap_bicubic.glsl)<br>
> [w] Color map shader 'bicubic' failed to load, will use fallback<br>
> [!] gl_cmap shader compilation failed (cmap_fallback.glsl)<br>
> [!] Color map shader 'fallback' failed, aborting<br>
> gr::log :ERROR: qt_sink_c0 - Failed to initialize fosphor<br>
<br>
:/<br>
<br>
In theory it's supposed to print the compile log from the driver<br>
(which ideally would show why it failed), but apparently the driver<br>
didn't return any logs so that mean I have no clue whatsoever why it<br>
would have failed<br>
<br>
Try to add some more debugging to the GL calls preceding the error :<br>
<br>
<br>
--- a/lib/fosphor/gl_cmap.c<br>
+++ b/lib/fosphor/gl_cmap.c<br>
@@ -60,6 +60,15 @@ struct fosphor_gl_cmap_ctx {<br>
 /* Helpers / Internal API<br>
        */<br>
 /* --------------------------------------------------------------------------<br>
*/<br>
<br>
+static void<br>
+gl_check(const char *s)<br>
+{<br>
+       GLenum x;<br>
+       if ((x = glGetError()) != GL_NO_ERROR) {<br>
+               fprintf(stderr, "[!] GL Error %d at %s\n", x, s);<br>
+       }<br>
+}<br>
+<br>
 static int<br>
 gl_cmap_init_shader(struct gl_cmap_shader *shader, const char *name)<br>
 {<br>
@@ -73,11 +82,15 @@ gl_cmap_init_shader(struct gl_cmap_shader *shader,<br>
const char *name)<br>
<br>
        /* Allocate shader */<br>
        shader->prog = glCreateProgram();<br>
+       gl_check("glCreateProgram");<br>
        shader->shader = glCreateShader(GL_FRAGMENT_SHADER);<br>
+       gl_check("glCreateShader");<br>
<br>
        /* Compile / Link / Attach */<br>
        glShaderSource(shader->shader, 1, (const char **)&shader_src, NULL);<br>
+       gl_check("glShaderSource");<br>
        glCompileShader(shader->shader);<br>
+       gl_check("glCompileShader");<br>
<br>
        /* Check success and compile log */<br>
        glGetShaderiv(shader->shader, GL_COMPILE_STATUS, &orv);<br>
<br>
<br>
<br>
<br>
> The app is running, but the render area of the spectrum is completely blank.<br>
><br>
> I am on your "gr3.8" branch. OpenCL is exactly the same as on Ubuntu 18.04 (I need the older 340 Nvidia driver on my old NVS 4200M, if you remember), GLFW is the latest master. Everything compiles just fine, only at runtime this issue presents itself.<br>
<br>
This is unrelated to OpenCL.<br>
Theses shaders are purely OpenGL stuff.<br>
<br>
Cheers,<br>
<br>
    Sylvain<br>
</blockquote></div>