OpenGL shader introspection/interface queries for images
Those are not accessible via introspection. It should also be pointed out that some of them don't have to &quot;match&quot;.
The shader-defined format doesn't have to be the same as the image-bound format. The image-bound format defines how writing from the image interprets the data provided by the shader. The shader-defined format determines how reading from the image interprets the data in the image. So the two values are fundamentally doing different things and need not match either each other or the texture's internal format. There are rules for how conversion works between these and the image's actual format.
For the access type, you could just pass GL_READ_WRITE for everything and let the shader decide how it's going to access the storage. Given that Vulkan has no equivalent to this value, it probably doesn't matter performance-wise. Also, note that the multibind function glBindImageTextures, which binds multiple images in one call, always uses GL_READ_WRITE (and doesn't have a specified format). Since the whole point of that function is performance, it almost certainly doesn't matter if you always use read-write from the binding side.