Get binding point of sampler/image in shader
The binding value for uniforms of opaque types is, from the perspective of the OpenGL API, the uniform's value. You set it by using glProgramUniform1i.
As such, you query it by querying the value of the uniform with glGetUniformiv.