A number of times I've mistakenly tried to bind a GL_RG32F texture buffer to a layout(rgba32f) imageBuffer.

This mismatch in the image unit format silently fails and all reads result in zeroes. I'd love a way to detect this and report an error. glGetActiveUniform goes a long way in helping debugging, but doesn't seem to report layout() information. Is there any other way I can find this information to do some error checking?