I am writing a program that takes heavy use of compute-shaders in OpenGL (in Java using JOGL) which runs fine on my desktop computer but won't link the shaders on my laptop.
I currently have a desktop system, running Ubuntu 18.04LTS with a GTX 1060, where it runs without issue, however when running on my laptop, running Ubuntu 18.04LTS, GTX 1650, the shader does not link properly and prints "error: linking with uncompiled/unspecialized shader" in the shader program log.
I have considered it could be driver issues and tried switching to the proprietary nVidia drivers' with no luck. Both platforms are running the same Open-jdk 8.
Note: graphical shaders work as intended, it is only occurring when trying to link a compute-shader, even when using the same method for reading source in, so I'm sure there's no problem there.
The problem occurs when linking the shader to a program:
int computeShader = gl.glCreateShader(GL4.GL_COMPUTE_SHADER); //Create compute shader
gl.glShaderSource(computeShader, computeShaderSrc.length, computeShaderSrc, null);
gl.glCompileShader(computeShader);
int shaderProg = gl.glCreateProgram(); //Create shader program and attach compute shader
printProgramLog(shaderProg);
System.out.println("Created shader\n");
System.out.println("Attaching shader");
gl.glAttachShader(shaderProg, computeShader);
printProgramLog(shaderProg);
System.out.println("Attached shader\n");
System.out.println("Linking shader");
gl.glLinkProgram(shaderProg);
printProgramLog(shaderProg);
System.out.println("Linked Shader\n");
gl.glDeleteShader(computeShader);
This outputs:
Created shader
Attaching shader
Attached shader
Linking shader
Program Info Log:
error: linking with uncompiled/unspecialized shader
Linked Shader