Hello! I have been developing a software for a few years under Linux (x86_64) using a custom library which encapsulates OpenGL calls. Until today, I used to insert each shader code (vertex, geometry, fragment) one at a time, compile, link, and if no error occurred process the next one. However earlier today I ran into what looks like a stalling bug. After compiling successfully a vertex shader, and attaching it to an empty program, I tried to link the program (glLinkProgram). While I never had any problem in the past with a vertex-shader-only program, this time the glLinkProgram just stalls, eating a good amount of memory, until I interrupt (CTRL+C) my software. As for today, possible sources of change include:
- Upgraded from Catalyst 10.6 to 10.12
- Started using instancing (gl_InstanceID with glDrawElementsInstanced) after I read a workaround for another bug (see this post)
Earlier today it went up to eating all the memory of the system, leaving me with no other solution but to reboot. This seems to have vanished, and now the stall just consumes a few hundreds of megs (visible on system monitor in task bar). Interrupting the software releases the memory though.
I didn't manage to find whether it is an error to use a vertex-shader-only GPU program in the OpenGL 3.3 and GLSL 3.30 specs, but in any case if it is I guess the glLinkProgram() should simply return with an error, not stalls the software.
As for the "standard" way of doing, I just switched to an approach where I first compile and attach all the shaders, then finally perform a single link on the completed program. This seems to work the "bug" around.